Show examples in:
JavascriptHTTP
Content Management API > Webhook call

Webhook call

This represents a log entry in the webhooks activity list, detailing a specific webhook event along with its delivery attempt information.

Object payload

idstring

ID of webhook call

Example:"42"
typestring

Must be exactly "webhook_call".

attributes.entity_typeenum

The subject of webhook triggering

Example:"item"
item_type
item
upload
build_trigger
environment
maintenance_mode
sso_user
cda_cache_tags
attributes.event_typeenum

The event that triggers the webhook call

Example:"update"
create
update
delete
publish
unpublish
promote
deploy_started
deploy_succeeded
deploy_failed
change
invalidate
attributes.created_atdate-time

The moment the event was created

Example:"2016-09-20T18:50:24.914Z"
attributes.request_urlstring

The url that the webhook called

Example:"https://www.example.com/webhook"
attributes.request_headersobject

The request's headers

Example:{ Accept: "*/*", "User-Agent": "DatoCMS (datocms.com)", Authorization: "Basic Y2lhbzptaWFv", "Content-Type": "application/json", }
attributes.request_payloadstring

The webhook's request payload is encoded as a string. Use JSON.parse() to parse it.

Example:'{"webhook_call_id":"103216210","event_triggered_at":"2024-08-26T12:49:16Z","attempted_auto_retries_count":0,"webhook_id":"28374","site_id":"205","environment":"main","is_environment_primary":true,"entity_type":"maintenance_mode","event_type":"change","entity":{"id":"maintenance_mode","type":"maintenance_mode","attributes":{"active":false}},"related_entities":[]}'
attributes.response_statusinteger, null

The status of the response

Example:200
attributes.response_headersobject, null

The response's headers

Example:{ via: "1.1 vegur, 1.1 37c0945d19329fccc23efb283d01aa06.cloudfront.net (CloudFront)", date: "Fri, 27 Jul 2018 11:59:20 GMT", server: "gunicorn/19.6.0", }
attributes.response_payloadstring, null

The body of the response

Example:"ok"
attributes.attempted_auto_retries_countinteger

The number of retries attempted so far

Example:2
attributes.last_sent_atdate-time

The last moment the call occurred

Example:"2016-09-20T18:50:24.914Z"
attributes.next_retry_at

The date when the next retry attempt is scheduled to run. If no retry attempt is scheduled, it is set to null

Type:date-time, null
Example:"2016-09-20T18:50:24.914Z"
attributes.statusenum

The current status

Example:"success"
pending

The delivery attempt is currently in process

success

Delivery completed successfully

failed

Delivery attempt(s) failed due to errors/timeouts

rescheduled

The last delivery attempt failed, a new one will be retried later

relationships.webhook.data

The webhook which has been called

Type:<a href="/docs/content-management-api/resources/webhook">ResourceLinkage&#x3C;"webhook"></a>

Available endpoints