Skip to main content
PUT
Updates a hook in place and returns the full updated record. Every field from Create Hook is accepted, hookType included, and all of them are optional. Only the fields sent are changed. Nothing goes on-chain. Arrays and webhookPayload are replaced whole, not merged. null fails validation for every field, so a URL, checkFrequency, actionType or riskThreshold cannot be unset once stored. Arrays can be emptied with []. Cross-field validation runs against the merged record, not the request body alone. Switching actionType to inform on a hook that has no webhookUrl is therefore rejected with MISSING_WEBHOOK_URL. So is switching hookType to monitorRisk on a hook without a riskUri, with MISSING_RISK_URI.
Unlike create, riskFields is not re-required on update. A monitorRisk hook that already has risk fields keeps them when only checkFrequency is sent. Sending riskFields: [] empties them, and the monitor then fails every run with Missing risk config without logging it.
A changed checkFrequency takes effect from the scheduler’s next wake-up, not from this call. A changed webhookUrl applies to deliveries already queued too, because each attempt is sent to the URL the hook holds at that moment.

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

Any subset of the Create Hook body, with the same types and ranges. triggerHookIds is checked against this market again whenever it is sent non-empty.

Response Fields

object
The updated hook record, with a new updatedAt. See List Hooks for each field.

Error Codes