Subscribe a URL to the event in the path
The same as Subscribe a URL to an event, with the event in the path instead of the body.
POST /v1/automation/hooks/{event}
The same as Subscribe a URL to an event, with the event in the path instead of the body. Useful for tools that need one operation per event.
| Property | Value |
|---|---|
| Authentication | API key or OAuth access token: Authorization: Bearer ... |
| Scope | responses.read |
| Success | 201 Created |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
event |
enum | Yes | The event to subscribe to. One of response.completed, detractor.flagged, ticket.opened, ticket.updated, ticket.closed. |
Request body
Content type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
targetUrl |
string (uri) | Yes | Your HTTPS URL that receives the events. A public host name: no IP address, no user name or password in the URL. At most 2000 characters. |
platform |
string | No | Optional tag for the calling tool. Use other. |
{
"targetUrl": "https://example.com/webhooks/sayvara",
"platform": "other"
}Response
201 Created
| Field | Type | Description |
|---|---|---|
id |
string (uuid) | Hook id. |
event |
enum | The webhook event. One of response.completed, detractor.flagged, ticket.opened, ticket.updated, ticket.closed. |
platform |
string | Tag set when the hook was created. |
targetUrl |
string | Your HTTPS URL that receives the events. A public host name: no IP address, no user name or password in the URL. |
status |
enum | The hook state. One of active, disabled. |
disabledReason |
enum or null | failing when Sayvara switched the hook off after repeated failed deliveries, off when an admin switched it off. One of failing, off. |
consecutiveFailures |
integer | Deliveries in a row that failed after all their tries. At least 0. |
createdAt |
string (date-time) | When the hook was made. |
lastSuccessAt |
string (date-time) or null | The last delivery your URL accepted. |
signingSecret |
string | The secret that signs every delivery to this hook. Shown in this response only: store it safely. At least 32 characters. |
{
"id": "3f6c1a2e-8b4d-4c7a-9e21-5d0b7f3a9c10",
"event": "response.completed",
"platform": "other",
"targetUrl": "https://example.com/webhooks/sayvara",
"status": "active",
"disabledReason": null,
"consecutiveFailures": 0,
"createdAt": "2026-11-01T09:30:00.000Z",
"lastSuccessAt": null,
"signingSecret": "whsec_REPLACE_WITH_THE_SECRET_YOU_RECEIVED"
}Errors
Errors have the body { "code": "...", "message": "...", "requestId": "..." }. See Errors.
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED |
The URL is not valid. details says why. |
| 401 | INVALID_API_KEY |
The API key or access token is missing, wrong, revoked or expired. |
| 403 | API_KEY_SCOPE |
The key or token does not hold the scope this operation needs. |
| 403 | IP_NOT_ALLOWED |
An OAuth access token was used from an address outside its client's allow-list. |
| 403 | ENTITLEMENT_REQUIRED |
Your plan does not include API access. |
| 404 | NOT_FOUND |
The event in the path does not exist. |
| 409 | AUTOMATION_HOOK_LIMIT |
Your organisation already has 100 hooks. |
| 429 | RATE_LIMITED |
Too many requests. Wait for the number of seconds in the Retry-After header. |
Example request
curl -X POST "https://api.sayvara.com/v1/automation/hooks/response.completed" \
-H "Authorization: Bearer $SAYVARA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://example.com/webhooks/sayvara",
"platform": "other"
}'Was this page helpful?
Thanks. Need more help? Email support@sayvara.com