Skip to main content

Delete an existing webhoook subscription

Agent Skill

Automate this endpoint with an AI agent using the 2chat-webhooks skill:

npx skills add 2ChatCo/agent-skills -s 2chat-webhooks

With this endpoint you will be able to delete webhooks you have previously created using this API.

tip

You can also delete a subscription manually using the Developer's portal in app.2chat.io.

Requirements​

The query path in the invocation URL must have the ID of the webhook you want to delete. This ID always start with WHK followed by 36 characters. For example: WHK530c9d58-2259-4ce2-82a8-1941f3a60665.

If you want to obtain the ID required to delete a webhook, you can do so using the List All Webhooks endpoint.

Invocation​

Using the webhook ID WHK530c9d58-2259-4ce2-82a8-1941f3a60665 as example:

curl --location --request DELETE 'https://api.p.2chat.io/open/webhooks/WHK530c9d58-2259-4ce2-82a8-1941f3a60665' \
--header 'X-User-API-Key: your_api_key_here' \
--data ''

Response​

The API will return a successful respond if the webhook was correctly deleted

{
"success": true
}