Delete Webhook
DELETE /v1/webhooks/{id}
Delete a webhook immediately. Once deleted, the endpoint will stop receiving events.
Try it
Test this endpoint interactively in the Swagger UI.
Authorization required
Include your API key in the Authorization header.
DANGER
Deleting a webhook is immediate and permanent. The endpoint will immediately stop receiving events. This action cannot be undone -- you will need to create a new webhook.
Request
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <token> | Yes |
Path Parameters
| Param | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The webhook ID to delete (e.g., webhook-abc123def456). |
Code Examples
bash
curl -X DELETE https://api.docmap.io/v1/webhooks/webhook-abc123def456 \
-H "Authorization: Bearer dm_live_abc123def456ghi789jkl012mno345"typescript
const apiKey = process.env.DOCMAP_API_KEY
const webhookId = 'webhook-abc123def456'
const response = await fetch(
`https://api.docmap.io/v1/webhooks/${webhookId}`,
{
method: 'DELETE',
headers: { 'Authorization': `Bearer ${apiKey}` },
},
)
const result = await response.json()
console.log(result) // { success: true }python
import requests
api_key = "dm_live_abc123def456ghi789jkl012mno345"
webhook_id = "webhook-abc123def456"
response = requests.delete(
f"https://api.docmap.io/v1/webhooks/{webhook_id}",
headers={"Authorization": f"Bearer {api_key}"},
)
print(response.json()) # {"success": True}Response
Status: 200 OK
Example
json
{
"success": true
}Errors
| Status | Code | Description |
|---|---|---|
401 | UNAUTHORIZED | Missing, invalid, or expired API key / token. |
403 | FORBIDDEN | The webhook belongs to a different user. You can only delete your own webhooks. |
404 | NOT_FOUND | No webhook found with the specified ID. |
