Get a sample event
Returns one sample webhook body for an event, marked test: true, with fixed sample ids.
GET /v1/automation/samples/{event}
Returns one sample webhook body for an event, marked test: true, with fixed sample ids. Use it to map fields before a real event arrives.
| Property | Value |
|---|---|
| Authentication | API key or OAuth access token: Authorization: Bearer ... |
| Scope | responses.read |
| Success | 200 OK |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
event |
enum | Yes | The event. One of response.completed, detractor.flagged, ticket.opened, ticket.updated, ticket.closed. |
Response
200 OK
| Field | Type | Description |
|---|---|---|
items |
array of object | One sample webhook body. Webhooks explains each field. |
{
"items": [
{
"id": "response.completed:00000000-0000-4000-8000-000000000001",
"type": "response.completed",
"created_at": "2026-11-01T09:30:00.000Z",
"tenant_id": "3f6c1a2e-8b4d-4c7a-9e21-5d0b7f3a9c10",
"test": true,
"data": {
"responseId": "00000000-0000-4000-8000-000000000001",
"surveyId": "00000000-0000-4000-8000-000000000003",
"orgUnitId": null,
"channel": "whatsapp",
"lang": "ar",
"nps": 9,
"csat": null,
"ces": null,
"detractor": false,
"completedAt": "2026-11-01T09:30:00.000Z"
}
}
]
}Errors
Errors have the body { "code": "...", "message": "...", "requestId": "..." }. See Errors.
| Status | Code | Meaning |
|---|---|---|
| 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. |
| 429 | RATE_LIMITED |
Too many requests. Wait for the number of seconds in the Retry-After header. |
Example request
curl -X GET "https://api.sayvara.com/v1/automation/samples/response.completed" \
-H "Authorization: Bearer $SAYVARA_API_KEY"Was this page helpful?
Thanks. Need more help? Email support@sayvara.com