webhooks

Update Webhook Endpoint

Change an endpoint's URL, filters, description or include_collection_name, or pause and resume it with disabled. Only the fields sent change. Send an empty list to remove a filter.

Setting disabled to false also re-enables an endpoint that Captain disabled after sustained delivery failures. Events for jobs that finished while the endpoint was disabled are not sent automatically; use the recover endpoint for those.

patch/v2/webhooks/endpoints/{endpoint_id}

Path parameters

endpoint_idstring required

The endpoint's id (whe_...).

Request body

collection_idsstring[] nullable

Only jobs that index into these collections, by collection id (up to 10). Empty or omitted means every collection.

descriptionstring nullable

Free-text label, up to 200 characters.

disabledboolean nullable

true pauses deliveries, false resumes them. Setting false also re-enables an endpoint that was disabled after sustained delivery failures.

event_typesstring[] nullable

Events to receive: any of job.completed, job.completed_with_errors, job.failed, job.timed_out, job.cancelled. Empty or omitted means all five.

include_collection_nameboolean nullable

Send collection_name in payloads. When any endpoint receiving an event turns this off, that event carries collection_name: null.

sourcesstring[] nullable

Only jobs from these sources: api (started by a call to an index endpoint) or sync (started by a storage sync). Empty or omitted means both.

sync_idsstring[] nullable

Only jobs started by these syncs (up to 10). Requires sources to include sync or be empty.

urlstring nullable

HTTPS URL that receives events. Must start with https://, be reachable from the public internet, and be at most 2,048 characters.

Response

Successful Response

endpoint_idstring required

The endpoint's id (whe_...).

urlstring required

HTTPS URL that receives events.

descriptionstring required

Free-text label. Empty string when not set.

event_typesstring[] required

Events this endpoint receives. Empty means all five.

collection_idsstring[] required

Collection filter. Empty means every collection.

sync_idsstring[] required

Sync filter. Empty means no sync filter.

sourcesstring[] required

Source filter (api, sync). Empty means both.

channelsstring[] required

Filters set in Captain Studio's Webhooks page that cannot be expressed as collection_ids, sync_ids and sources. Empty for endpoints whose filters were set through the API. Setting collection_ids, sync_ids or sources with PATCH replaces them.

include_collection_nameboolean required

Whether payloads sent to this endpoint may carry collection_name.

disabledboolean required

true when no events are being sent to this endpoint.

disabled_reasonstring nullable required

delivery_failures when Captain disabled the endpoint after sustained failed deliveries. null when it is enabled or was paused through the API.

created_atstring date-time required
updated_atstring date-time required

Changes

Changed in 1 of the 13 revisions of this API.1