Show examples in:
Javascript HTTP

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

id string

ID of webhook call

Example: "42"
type string

Must be exactly "webhook_call".

attributes.entity_type enum

The subject of webhook triggering

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

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_at date-time

The moment the event was created

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

The url that the webhook called

Example: "https://www.example.com/webhook"
attributes.request_headers object

The request's headers

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

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_status integer, null

The status of the response

Example: 200
attributes.response_headers object, 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_payload string, null

The body of the response

Example: "ok"
attributes.attempted_auto_retries_count integer

The number of retries attempted so far

Example: 2
attributes.last_sent_at date-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.status enum

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

Available endpoints