Skip to main content
Deleting a webhook is permanent and cannot be undone. If you re-create the webhook, a new signing secret will be issued.
curl -X DELETE 'https://api.anyformat.ai/v2/webhooks/wh_1234567890/' \
  -H 'Authorization: Bearer YOUR_API_KEY'
import requests

webhook_id = "wh_1234567890"
url = f"https://api.anyformat.ai/v2/webhooks/{webhook_id}/"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.delete(url, headers=headers)
print(f"Status: {response.status_code}")
const webhookId = 'wh_1234567890';
const response = await fetch(`https://api.anyformat.ai/v2/webhooks/${webhookId}/`, {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

console.log(`Status: ${response.status}`);
const webhookId = 'wh_1234567890';
const response = await fetch(
  `https://api.anyformat.ai/v2/webhooks/${webhookId}/`,
  {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  }
);

if (response.status !== 204) {
  const error = await response.json();
  throw new Error(`API error: ${error.error_code}`);
}

console.log('Webhook deleted');
// No response body - webhook successfully deleted