Webhooks

Webhook actions

Create

The create action is triggered whenever a new content entry is created.

This action is only triggered if your webhook is configured to include the draft stage.

Example webhook payload

The payload may differ depending on your webhook configuration.

{
"operation": "create",
"data": {
"DRAFT": {
"__typename": "Post",
"createdAt": "2020-05-06T08:41:49.898265+00:00",
"id": "ck9v3ewug0gge0128amxq0sto",
"updatedAt": "2020-05-06T08:41:49.898265+00:00"
},
"PUBLISHED": null
}
}

Update

The update action is triggered whenever an existing content entry is updated.

This action is only triggered if your webhook is configured to include the draft stage.

Example webhook payload

The payload may differ depending on your webhook configuration.

{
"operation": "update",
"data": {
"DRAFT": {
"__typename": "Post",
"createdAt": "2020-05-06T08:41:49.898265+00:00",
"id": "ck9v3ewug0gge0128amxq0sto",
"updatedAt": "2020-05-06T08:42:10.591257+00:00"
},
"PUBLISHED": null
}
}

Delete

The delete action is triggered whenever a new content entry is created.

This action is only triggered if your webhook is configured to include the draft stage.

Example webhook payload

Deleting an entry that is published will trigger both an unpublish and delete action.

{
"operation": "delete",
"data": {
"id": "ck9v3ipf40fh0016807opo4h1"
}
}

Publish

The publish action is triggered whenever a new content entry or an update to an existing content entry is published.

This action is only triggered if your webhook is configured to include the published stage.

Example webhook payload

The payload may differ depending on your webhook configuration.

{
"operation": "publish",
"data": {
"DRAFT": {
"__typename": "Post",
"createdAt": "2020-05-06T08:41:49.898265+00:00",
"id": "ck9v3ewug0gge0128amxq0sto",
"updatedAt": "2020-05-06T08:42:10.591257+00:00"
},
"PUBLISHED": {
"__typename": "Post",
"createdAt": "2020-05-06T08:41:49.898265+00:00",
"id": "ck9v3ewug0gge0128amxq0sto",
"updatedAt": "2020-05-06T08:42:10.591257+00:00"
}
}
}

Unpublish

The unpublish action is triggered whenever an existing content entry is unpublished.

This action is only triggered if your webhook is configured to include the published stage.

Example webhook payload

{
"operation": "unpublish",
"data": {
"id": "ck9v3ipf40fh0016807opo4h1"
}
}

Were you expecting something more?

We are constantly contributing to our documentation, but if you spot something we're missing, let us know and we'll be sure to add it.

This site uses cookies to provide you with a better user experience. For more information, refer to our Privacy Policy