Skip to main content
POST
Sets the active flag and returns the full hook record. Execution history is preserved, and nothing goes on-chain. An inactive hook drops out of everything that runs on its own. The scheduler skips an inactive monitorRisk hook. A liquidation does not run an inactive beforeLiquidation or afterLiquidation hook, and a monitor that evaluates to false does not run an inactive afterLiquidation hook. An inactive hook listed in another hook’s triggerHookIds never satisfies that trigger. Execute Hook still runs an inactive hook when called for it directly. Deliveries the hook queued before it was disabled are still sent and retried. Re-enabling a monitor puts it back on the schedule from the scheduler’s next wake-up, not from this call.

Path Parameters

string
required
The market’s record ID, as id on List Markets, not its contract address. See Market IDs.
string
required
Hook ID.

Body Parameters

boolean
required
true to enable, false to disable. Any non-boolean value, including the string "false", returns INVALID_ACTIVE.

Response Fields

object
The updated hook record. See List Hooks for each field.

Error Codes