Developers

Update a webhook endpoint

PATCH/webhooks/{webhook_id}

Updates the URL, subscribed event types, resource filters, event filters, description, payload detail level, or status of a webhook endpoint.

Changing status requires the webhooks.activate permission in addition to webhooks.update. A new URL is subject to the same destination restrictions as the create operation.

Changing payload_detail to full, or changing the event types of an endpoint whose payload_detail is full, requires the personal data permissions described in that field. Without them, the request fails with 403 and the error code personal_data_permission_required, and nothing is changed. Deliveries already queued keep the expanded object built when they were created, and send it only while the endpoint still accepts that level: after lowering the level, a retry is sent without expanded.

Setting status to active on an endpoint that the platform deactivated after repeated delivery failures reactivates it: its failure count is reset, and deliveries from the last 48 hours that ended as dead or were canceled by the deactivation go back to the queue. Setting status to inactive on such an endpoint does not change it.

Send the ETag returned by the retrieve operation in the If-Match header to avoid overwriting changes made since the endpoint was retrieved. If the header is omitted, the update is applied to the current revision.

AuthorizationBearer <token>

Credential: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.

In: header

Path Parameters

webhook_id*string

Public ID of the webhook, prefixed with whk_.

Header Parameters

Idempotency-Key?string

Client-generated key that makes the request safe to retry. Must be 1 to 128 characters from [A-Za-z0-9._:-]. Optional on this operation; when sent, a malformed key returns idempotency_key_invalid, and repeating the request with the same key and the same body returns the stored result with Idempotent-Replayed: true.

If-Match?string

Expected revision of the resource, in the same format as the ETag header (W/"<type>:<id>:<revision>"). If the resource has changed since that revision, the request fails with 412 and the revision_mismatch error code. * matches the current revision. Any other value fails with 400 and the if_match_invalid error code. When omitted, the update is applied to the current revision.

X-Client-Request-Id?string

Optional client-generated identifier of the request, up to 64 characters from [A-Za-z0-9._-]. Echoed back in the response and recorded in the request log; it never replaces the server-generated X-Request-Id.

Lengthlength <= 64

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/webhooks/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "created_at": "2019-08-24T14:15:22Z",    "description": "string",    "event_filters": {      "property1": {        "added_tag_id": [          0        ],        "custom_field_id": [          0        ],        "delivery_id": [          0        ],        "exam_id": [          0        ],        "filled": true,        "legal_term_id": [          "string"        ],        "lesson_id": [          0        ],        "milestones": [          50        ],        "min_percent": 0,        "origin": [          "lesson_completed"        ],        "passed": true,        "product_id": [          0        ],        "signup_origin": "paid"      },      "property2": {        "added_tag_id": [          0        ],        "custom_field_id": [          0        ],        "delivery_id": [          0        ],        "exam_id": [          0        ],        "filled": true,        "legal_term_id": [          "string"        ],        "lesson_id": [          0        ],        "milestones": [          50        ],        "min_percent": 0,        "origin": [          "lesson_completed"        ],        "passed": true,        "product_id": [          0        ],        "signup_origin": "paid"      }    },    "event_types": [      "string"    ],    "health": {      "circuit_state": "closed",      "consecutive_failures": 0,      "dead_24h": 0,      "delivered_24h": 0,      "effective_payload_detail": "ids",      "failed_24h": 0,      "last_failure_at": "2019-08-24T14:15:22Z",      "last_success_at": "2019-08-24T14:15:22Z",      "pending": 0    },    "id": "string",    "max_per_second": 0,    "object": "webhook",    "payload_detail": "ids",    "payload_version": 0,    "resource_filters": {      "property1": [        0      ],      "property2": [        0      ]    },    "revision": 0,    "secret": "string",    "status": "active",    "timeout_ms": 0,    "updated_at": "2019-08-24T14:15:22Z",    "url": "http://example.com"  }}