Management APIs/Webhooks
Delete Webhook
DELETE
Overview
Delete an outbound webhook by numeric ID.
Authentication
All API requests require a Bearer token in the request header.
Authorization: Bearer YOUR_API_KEYCreate and manage API keys from API Keys or use https://www.apimall.ai/api-keys.
Request
API Information
- URL:
DELETE https://gateway.apimall.ai/api/v1/webhooks/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Required | Numeric webhook ID. |
Request Example
DELETE https://gateway.apimall.ai/api/v1/webhooks/8Response Example
{
"success": true,
"data": {
"id": 8
},
"request_id": "req_01HQ9M7J7X9P7Y8T6W5V4U3S2R"
}cURL Example
curl --request DELETE 'https://gateway.apimall.ai/api/v1/webhooks/8' \
--header 'Authorization: Bearer YOUR_API_KEY'JavaScript Example
const API_KEY = process.env.APIMALL_API_KEY;
const id = "8";
const response = await fetch(`https://gateway.apimall.ai/api/v1/webhooks/${encodeURIComponent(String(id))}`, {
method: 'DELETE',
headers: {
Authorization: `Bearer ${API_KEY}`,
},
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status} ${response.statusText}`);
}
const data = await response.json();
console.log(data);Response Parameters
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the request completed successfully. |
data.id | integer | id field returned by the API. |
request_id | string | Request identifier for debugging and support. |
Error Response Example
{
"success": false,
"error": {
"code": "not_found",
"message": "Webhook not found"
},
"request_id": "req_01HQ9M7J7X9P7Y8T6W5V4U3S2R"
}Integration Notes
- Store your API key on the server side only.
Error Codes
Common Error Codes
| Status Code | Description |
|---|---|
| 200 | Request successful |
| 400 | Invalid request parameters |
| 401 | API key required or invalid API key |
| 403 | API access not approved or request made on a non-gateway host |
| 404 | Resource not found |
| 429 | Rate limit exceeded or too many concurrent jobs |
| 500 | Internal server error |