delete alert webhook.md

Delete Alert Webhook

Authentication

Permissions

The external-api-delete-alert-webhook-endpoint permission is required to access this endpoint.

Endpoint

Headers

Path Params

Request Example:

curl --location --request DELETE 'https://api.genlogs.io/alerts/webhook/{webhook_id}' \
--header 'access-token: <your-api-access-token>' \
--header 'x-api-key: <your-x-api-key>' \

Response:

Response Body:

200 OK – Webhook Deleted Successfully

{
    "id": "0a7f4670-aeed-491a-91ae-af7e88b397b3",
    "webhook_url": "https://example.domain/webhooks/genlogs-alerts",
    "description": "test-to-be-deleted",
    "created_at": "2026-02-20T18:58:19.132530",
    "deleted": true
}

400 Bad Request

Returned when:

{
    "message": "Invalid webhook ID format.",
    "error_code": "VALIDATION_ERROR"
}

401 Unauthorized

{
    "detail": "Token is missing!"
}
{
    "detail": "Token is expired!"
}

403 Forbidden

{
    "detail": "User not allowed to access this endpoint"
}

404 Not Found

{
    "message": "Webhook 0a7f4670-aeed-491a-91ae-af7e88b397b3 not found or does not belong to customer",
    "error_type": "WebhookNotFoundError",
    "error_code": "WEBHOOK_NOT_FOUND"
}

Delete alert webhook

Delete an alert webhook by ID. Requires ownership for the authenticated customer. Returns the deleted webhook data (id, webhook_url, description, created_at). Requires admin or external-api-delete-alert-webhook-endpoint.

{"openapi":"3.0.3","info":{"title":"Alert API - Delete Webhook","version":"1.0.0"},"paths":{"/alerts/webhook/{webhook_id}":{"delete":{"summary":"Delete alert webhook","description":"Delete an alert webhook by ID. Requires ownership for the authenticated customer. Returns the deleted webhook data (id, webhook_url, description, created_at). Requires admin or external-api-delete-alert-webhook-endpoint.\n","operationId":"deleteAlertWebhook","parameters":[{"in":"header","name":"Access-Token","required":true,"schema":{"type":"string"},"description":"JWT access token for authentication"},{"in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"},"description":"API key for authentication"},{"in":"path","name":"webhook_id","required":true,"schema":{"type":"string","format":"uuid"},"description":"UUID of the webhook to delete"}],"responses":{"200":{"description":"Webhook deleted successfully; returns deleted webhook data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedWebhookResponse"}}}},"400":{"description":"Bad Request – invalid webhook ID format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized – missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden – insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found – webhook does not exist or does not belong to customer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"DeletedWebhookResponse":{"type":"object","description":"Deleted webhook data returned on successful DELETE (secret and enabled excluded)","properties":{"id":{"type":"string","format":"uuid"},"webhook_url":{"type":"string","format":"uri"},"description":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"deleted":{"type":"boolean","description":"Always true for delete response"}},"required":["id","webhook_url","created_at","deleted"]},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"error_code":{"type":"string","description":"Machine-readable error code"}},"required":["message"]}}}}