- Docs
- Api%2Freference%2Fwebhooks%2FUpdateWebhook
Update a webhook
Move a webhook to a new address, change what it watches, or switch it off and on. Send only the fields you want to change; the rest stay as they are. **Changing what it watches.** Send the complete replacement `rules` array. It must contain at least one template rule. Empty `actions` or `addresses` inside a rule widen that rule to every action or signer on its template. Leaving `rules` out changes nothing. **Turning one back on.** A webhook that switched itself off after repeated failures comes back with `is_active: true`. Make sure your endpoint is healthy first, or it will simply switch off again. A new address has to meet the same conditions as the original: public, `https`, no credentials in the URL. The signing key stays the same and cannot be changed. Requires the `webhooks.update` permission.
The access token returned after a successful sign-in, sent as
Authorization: Bearer <access_token>.
It identifies the person and the organization they are working in, and
it lasts about fifteen minutes. When it runs out, use their refresh
token at POST /auth/refresh-token instead of asking them to sign in
again.
In: header
Path Parameters
Identifier of the webhook, the same value sent as the X-Webhook-ID header.
Request Body
application/json
The fields to change.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://api.dual.network/webhooks/665f1c2d4b1a2c3d4e5f6ae0" \ -H "Content-Type: application/json" \ -d '{ "is_active": false }'{}{
"code": 3,
"message": "Key: 'limit' Error:Field validation for 'limit' failed on the 'lte' tag"
}{
"code": 16,
"message": "no auth provided"
}{
"code": 5,
"message": "object not found"
}{
"code": 13,
"message": "internal error"
}