Skip to content
KnockDevelopers
Webhooks

Update a webhook

Chat with a Developer
patch/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.

Authorization

ApiKeyAuth
headerx-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.

Path Parameters

webhookId*string

ID of the webhook.

Formatuuid

Request Body

application/json
  1. 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.

Length1 <= length <= 150
url?string

Replaces 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.

Formaturi
Lengthlength <= 2048
events?array<>

Replaces the event types. Omit it to keep the current ones.

Items1 <= items
Value in"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?string

Pauses 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.

Value in"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.

Match^[A-Za-z0-9_-]{1,256}$
Length1 <= length <= 256

Response Body

The updated webhook.

application/json
  1. response

A URL Knock POSTs events to.

id*string

ID of the webhook, sent as the knock-webhook-id header.

Formatuuid
name*|

The label you gave the webhook. Null when it has none.

url*string

The URL Knock POSTs events to.

Formaturi
events*array<>

The event types sent to this webhook.

Value in"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*string

Whether Knock sends events to this webhook: active, or paused (Knock sends it nothing until you set it back to active).

Value in"active""paused"
hasSecretToken*boolean

Whether 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*string

When the webhook was created.

Formatdate-time
Example Request
curl -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 '{}'
Example Response
{  "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"}