Webhooks API
REST API endpoints for managing webhook endpoints, secrets, and delivery history.
Last updated on
Webhooks can be managed both through the admin dashboard and via the REST API.
List webhook endpoints
GET /api/integrations/webhooksResponse:
{
"data": [
{
"id": "whe_abc123",
"url": "https://hooks.example.com/enafeedback",
"events": ["survey.response.created", "feedback.ticket.created"],
"enabled": true,
"created_at": "2026-03-01T12:00:00Z"
}
]
}Create webhook endpoint
POST /api/integrations/webhooksRequest body:
{
"url": "https://hooks.example.com/enafeedback",
"events": ["survey.response.created", "hygiene.submission.created"],
"enabled": true
}Response: HTTP 201 with the created endpoint including the generated secret:
{
"id": "whe_xyz789",
"url": "https://hooks.example.com/enafeedback",
"events": ["survey.response.created", "hygiene.submission.created"],
"enabled": true,
"secret": "whs_xxxxxxxxxxxxxxxxxxxxxxxx",
"created_at": "2026-06-07T10:00:00Z"
}The secret is only shown once at creation time. Store it securely. If lost, you must rotate the secret.
Update webhook endpoint
PATCH /api/integrations/webhooks/:idRequest body (all fields optional):
{
"url": "https://new-url.example.com/hook",
"events": ["*"],
"enabled": false
}Setting events to ["*"] subscribes to all current and future events.
Rotate webhook secret
POST /api/integrations/webhooks/:id/rotate-secretGenerates a new secret and immediately invalidates the old one. The new secret is returned in the response body. Update your signature verification code before rotating.
Delete webhook endpoint
DELETE /api/integrations/webhooks/:idReturns HTTP 204. The endpoint is deleted immediately and no further events are delivered. Delivery history is also deleted.
List webhook deliveries
GET /api/integrations/webhooks/:id/deliveriesQuery parameters: from, to, status (delivered, failed), page, per_page
Response:
{
"data": [
{
"id": "del_001",
"event": "survey.response.created",
"delivered_at": "2026-06-07T10:30:05Z",
"http_status": 200,
"attempt_count": 1,
"status": "delivered"
}
]
}Retry a delivery
POST /api/integrations/webhooks/:id/deliveries/:delivery_id/retryImmediately retries a failed delivery. Returns HTTP 202 if the retry is queued.
Send a test event
POST /api/integrations/webhooks/:id/testRequest body:
{
"event": "survey.response.created"
}Sends a sample payload for the specified event type with mock data. The payload includes "test": true.