Skip to content
Get Started

Delete webhooks

client.webhooks.delete(WebhookDeleteParams { webhooks, type } body, RequestOptionsoptions?): WebhookDeleteResponse { message, status }
DELETE/api/account/webhooks

Delete specific webhooks from the account

ParametersExpand Collapse
body: WebhookDeleteParams { webhooks, type }
webhooks: Array<string>

Array of webhook URLs to delete

type?: "receive" | "line_blocked" | "line_assigned" | 4 more

Type of webhook to delete from

Accepts one of the following:
"receive"
"line_blocked"
"line_assigned"
"outbound"
"typing_indicator"
"call_log"
"contact_created"
ReturnsExpand Collapse
WebhookDeleteResponse { message, status }
message?: string
status?: string

Delete webhooks

import SendblueAPI from 'sendblue';

const client = new SendblueAPI({
  apiKey: process.env['SENDBLUE_API_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SENDBLUE_API_API_SECRET'], // This is the default and can be omitted
});

const webhook = await client.webhooks.delete({ webhooks: ['https://example.com'] });

console.log(webhook.message);
{
  "message": "Webhooks deleted successfully",
  "status": "OK"
}
Returns Examples
{
  "message": "Webhooks deleted successfully",
  "status": "OK"
}