Update a webhook
/v1/webhooks/{webhookId}No “Try it” here: this call changes data. Run the code samples from your own backend.
Changes the name, the URL, the event types, the status or the secret token of a webhook, in one write. Events already accepted keep going to the webhook unless you pause it; an event type you remove stops being sent, retries included. A new or removed secret token applies from the next delivery attempt, retries of earlier events included. Unknown fields are ignored.
Needs an API key with the Admin role.
ApiKeyAuthx-api-key<token>Your Knock API key. Reading webhooks takes a key with read access to integrations: the Admin, Editor, Viewer, CRM Admin or AI Manager role (not an Enrichment API key). Changing them takes a key with the Admin role.
webhookId*stringID of the webhook.
uuidapplication/json- body
The fields to change. Each field you send replaces the stored one; null is rejected, except for name and secretToken, where it removes the value.
name?|Sets or replaces the webhook's label: 1 to 150 characters once Knock trims the spaces around it. null removes it; omit it to keep the current one.
1 <= length <= 150url?stringReplaces the URL. Omit it to keep the current one. The URL Knock POSTs events to: https, on port 443, with no user name or password, on a host that resolves to a public address. Each URL can be used by one webhook only, compared exactly as written: https://example.com/hook and https://example.com/hook/ are two URLs.
urilength <= 2048events?array<>Replaces the event types. Omit it to keep the current ones.
1 <= items"meeting.booked""meeting.rescheduled""meeting.declined""meeting.cancelled""meeting.completed""meeting.rejected""outreach.linkedin_invite_sent""outreach.linkedin_invite_accepted""member.linkedin_status_changed""enrichment_request.completed"status?stringPauses or resumes the webhook. Omit it to keep the current status. paused stops deliveries to this webhook and drops every delivery not sent yet, retries included: they are never sent, even after you resume it. active resumes deliveries, for events Knock records from then on: an event from the pause that reaches Knock late can still be sent, and its occurredAt shows when it happened. A request already in flight when you pause it still completes. You can still ping a paused webhook.
"active""paused"secretToken?|Sets or replaces the secret Knock sends as is in the knock-webhook-token header of every delivery to this webhook: 1 to 256 characters from A-Z, a-z, 0-9, _ and -. null removes it; omit it to keep the current one. The change applies from the next delivery attempt, retries of earlier events included. Knock never returns it with the webhook: read it with GET /v1/webhooks/{webhookId}/secret-token.
^[A-Za-z0-9_-]{1,256}$1 <= length <= 256The updated webhook.
application/json- response
A URL Knock POSTs events to.
id*stringID of the webhook, sent as the knock-webhook-id header.
uuidname*|The label you gave the webhook. Null when it has none.
url*stringThe URL Knock POSTs events to.
urievents*array<>The event types sent to this webhook.
"meeting.booked""meeting.rescheduled""meeting.declined""meeting.cancelled""meeting.completed""meeting.rejected""outreach.linkedin_invite_sent""outreach.linkedin_invite_accepted""member.linkedin_status_changed""enrichment_request.completed"status*stringWhether Knock sends events to this webhook: active, or paused (Knock sends it nothing until you set it back to active).
"active""paused"hasSecretToken*booleanWhether the webhook has a secret token. The token itself is never returned with the webhook: read it with GET /v1/webhooks/{webhookId}/secret-token.
createdAt*stringWhen the webhook was created.
date-timecurl -X PATCH 'https://app.knock-ai.com/v1/webhooks/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'x-api-key: <YOUR_API_KEY>' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "url": "http://example.com", "events": [ "meeting.booked" ], "status": "active", "hasSecretToken": true, "createdAt": "2019-08-24T14:15:22Z"}