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

1
DELETE https://site-api.datocms.com/webhooks/:webhook_id HTTP/1.1
2
Authorization: Bearer YOUR-API-TOKEN
3
Accept: application/json
4
X-Api-Version: 3
Terminal window
1
curl -g 'https://site-api.datocms.com/webhooks/:webhook_id' \
2
-X DELETE \
3
-H "Authorization: Bearer YOUR-API-TOKEN" \
4
-H "Accept: application/json" \
5
-H "X-Api-Version: 3"
1
await fetch("https://site-api.datocms.com/webhooks/:webhook_id", {
2
method: "DELETE",
3
headers: {
4
Authorization: "Bearer YOUR-API-TOKEN",
5
Accept: "application/json",
6
"X-Api-Version": "3",
7
},
8
});
1
HTTP/1.1 200 OK
2
Content-Type: application/json
3
Cache-Control: cache-control: max-age=0, private, must-revalidate
4
X-RateLimit-Limit: 30
5
X-RateLimit-Remaining: 28
6
7
{
8
"data": {
9
"type": "webhook",
10
"id": "312",
11
"attributes": {
12
"name": "Item type creation/update",
13
"url": "https://www.example.com/webhook",
14
"enabled": true,
15
"headers": {
16
"X-Foo": "Bar"
17
},
18
"events": [
19
{
20
"entity_type": "item",
21
"event_types": [
22
"update"
23
]
24
}
25
],
26
"http_basic_user": "user",
27
"http_basic_password": "password",
28
"custom_payload": "{ \"message\": \"{{event_type}} event triggered on {{entity_type}}!\", \"entity_id\": \"{{#entity}}{{id}}{{/entity}}\"] }",
29
"payload_api_version": "3",
30
"nested_items_in_payload": true,
31
"auto_retry": true
32
}
33
}
34
}