Webhook events reference
Use this reference to route survey events and parse the signed JSON that Pollarix delivers. For the initial connection check, see Testing your webhook.
Event flow
A saved survey response can produce more than one event. Pollarix delivers each event separately to the active endpoints subscribed to it. For example, completing a response can emit both a status change and a completion event. Handle them by event name and idempotency key.
Common payload structure
A signed SURVEY_COMPLETED delivery with a synthetic response looks like this:
{
"departmentId": "10000000-0000-0000-0000-000000000001",
"event": "SURVEY_COMPLETED",
"timestamp": "2026-11-20T08:30:00Z",
"data": {
"surveyResponse": {
"id": "20000000-0000-0000-0000-000000000001",
"status": "COMPLETED",
"content": {"rating": 4},
"maxScore": null,
"totalScore": null,
"surveyId": 42,
"collectorId": "example-collector",
"contactId": null,
"createdAt": "2026-11-20T08:28:00Z",
"updatedAt": "2026-11-20T08:30:00Z"
}
}
}
Common fields
| Field | Meaning |
|---|---|
departmentId | UUID of the department that owns the survey. |
event | The event name from this reference. |
timestamp | ISO 8601 timestamp when Pollarix created the event. |
data.surveyResponse | Snapshot of the affected response. |
data.coupon | Coupon data when the response receives a coupon. |
| Delivery header | Use |
|---|---|
X-Signature | Verify the hexadecimal HMAC-SHA256 of the raw request body using the department API secret. |
Idempotency-Key | Identify retries of the same event. Keep each handled key scoped to the receiver or subscription. |
X-Pollarix-Schema-Version | Select the payload schema. The current version is 1. |
SURVEY_COMPLETED
When it fires
Pollarix emits this event when it saves a survey response as completed.
Data fields
Field inside surveyResponse | Meaning |
|---|---|
id, status | Response identifier and status after the operation. |
surveyId, collectorId, contactId | Survey, collector, and optional contact identifiers. |
content | Saved response content. Its shape depends on the survey and can be an object, a list, or null. |
maxScore, totalScore | Scores, when available. |
createdAt, updatedAt | Response creation and update timestamps. |
Handler examples
To import completed responses, verify the signature first, then select SURVEY_COMPLETED and read data.surveyResponse. A receiver that sends alerts should also check the expected answer field and score before creating an alert.
SURVEY_STATUS_CHANGED
When it fires
The status of an existing response changed. This event carries its current snapshot, including data.surveyResponse.status.
Status values
Typical transitions include CREATED → IN_PROGRESS and IN_PROGRESS → COMPLETED. Use the current status to update your own record. Keep your own prior state if your application needs to compare the two.
Handler examples
For a progress display, look up the response by data.surveyResponse.id and store the new status. Keep completion-specific workflows on the SURVEY_COMPLETED subscription.
COUPON_REDEEMED
When it fires
A survey workflow awarded a coupon for the response.
Data fields
The envelope includes data.coupon, which can contain code, expiresAt, and workflow-specific extra data. The response snapshot is included with content set to null.
Response handling
Return a 2xx status after you securely accept a delivery. Use the final HTTPS URL because redirects count as failures. Pollarix retries delivery failures, so keep the handler safe when the same event arrives more than once.
Idempotent handler pattern
Verify the signature and schema version. In a durable store, insert the Idempotency-Key and queue the work together. Return 2xx for a key you already accepted. A status event and a completion event for the same response have separate keys.