Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Webhook

Delete a webhook

Returns

Returns a resource object of type webhook.

Examples

DELETE https://site-api.datocms.com/webhooks/:webhook_id HTTP/1.1
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
X-Api-Version: 3
Terminal window
curl -g 'https://site-api.datocms.com/webhooks/:webhook_id' \
-X DELETE \
-H "Authorization: Bearer YOUR-API-TOKEN" \
-H "Accept: application/json" \
-H "X-Api-Version: 3"
await fetch("https://site-api.datocms.com/webhooks/:webhook_id", {
method: "DELETE",
headers: {
Authorization: "Bearer YOUR-API-TOKEN",
Accept: "application/json",
"X-Api-Version": "3",
},
});
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: cache-control: max-age=0, private, must-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 28
{
"data": {
"type": "webhook",
"id": "312",
"attributes": {
"name": "Item type creation/update",
"url": "https://www.example.com/webhook",
"enabled": true,
"headers": {
"X-Foo": "Bar"
},
"events": [
{
"entity_type": "item",
"event_types": [
"update"
]
}
],
"http_basic_user": "user",
"http_basic_password": "password",
"custom_payload": "{ \"message\": \"{{event_type}} event triggered on {{entity_type}}!\", \"entity_id\": \"{{#entity}}{{id}}{{/entity}}\"] }",
"payload_api_version": "3",
"nested_items_in_payload": true,
"auto_retry": true
}
}
}