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

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const webhookId = "312";
const webhook = await client.webhooks.destroy(webhookId);
// Check the 'Returned output' tab for the result ☝️
console.log(webhook);
}
run();
{
id: "312",
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,
}