VocalDocscontracts 1.65.0

Update a Webhook subscription

PATCH /v1/webhooks/{webhook_id}

PropertyValue
Operationupdate_webhook
GroupWebhooks
Scopewebhooks:write
Route classcontrol
IdempotencyNo Idempotency-Key
AuditAudited webhooks.subscription.update (mutation)
Released in1.63.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Replaces the named fields at the revision If-Match names and answers the next revision (1.63.0), checked as a creation is on the merged subscription. A delivery already pending keeps the URL it was made for until its next attempt, which reads the subscription again.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the webhooks:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X PATCH "$VOCAL_API/v1/webhooks/whk_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H 'If-Match: "1"' \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
webhook_idpathWebhookIdyesThe id of a Webhook subscription: whk_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
if-matchheaderstringyesThe revision the change was made against, quoted as the ETag returns it, or * to overwrite.

Request body

Content type application/json, required: WebhookSubscriptionUpdateRequest.

FieldTypeRequiredDescription
compliance_policy_firingsbooleannoThe opt-in to the record form of a compliance-tagged Policy firing, policy.compliance_fired (1.63.0): true delivers each to this subscription; false by default. From 1.64.0, stated: the subscription's event filter narrows it as it narrows every other type, since a filter the customer set holds.
event_typesarray of EventTypeNameno
familiesarray of EventFamilyno
filter_idEventFilterId or nullno
includearray of WebhookIncludeno
purposeWebhookPurposenogeneral when omitted at creation.
urlstringnoThe https URL deliveries are posted to, checked by the egress guard when saved and at every delivery (egress_denied).

Responses

StatusContent typeShapeError codes
200application/jsonWebhookSubscription
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
412application/jsonErrorEnveloperevision_mismatch
422application/jsonErrorEnvelopevalidation_failed
428application/jsonErrorEnvelopeprecondition_required
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is WebhookSubscription.

FieldTypeRequiredDescription
api_version"v1"yesThe envelope version, fixed at creation.
compliance_policy_firingsbooleanyesThe opt-in to the record form of a compliance-tagged Policy firing, policy.compliance_fired (1.63.0): true delivers each to this subscription; false by default. From 1.64.0, stated: the subscription's event filter narrows it as it narrows every other type, since a filter the customer set holds.
created_atTimestampyes
disabled_atTimestamp or nullyes
disabled_reasonWebhookDisabledReason or nullyesWhy the platform disabled it; null unless disabled.
event_typesarray of EventTypeNameyesThe record types the subscription receives, beside its families.
familiesarray of EventFamilyyesWhole families the subscription receives, beside event_types; at least one of the two is non-empty (1.52.0).
filter_idEventFilterId or nullyesThe event filter that narrows the selection, or null (1.52.0).
idWebhookIdyes
includearray of WebhookIncludeyesOpt-in additions to a post_call delivery; empty for a general one (1.52.0).
last_deliveryWebhookLastDelivery or nullnoThe newest delivery of the subscription, of any kind (1.64.0), so a list shows it without a read per subscription; null when the 30-day log holds none. Absent from an api older than 1.64.0.
object"webhook_subscription"yes
previous_secret_expires_atTimestamp or nullyesWhen the secret before the last rotation stops signing; null outside the window.
purposeWebhookPurposeyes
revisionintegeryesCounts configuration writes; returned as the ETag and required in If-Match.
secret_hintstringyesThe last four characters of the secret.
statusWebhookSubscriptionStatusyes
updated_atTimestampyes
urlstringyesThe https URL deliveries are posted to, checked by the egress guard when saved and at every delivery (egress_denied).