Send and receive webhooks
Have Polzy call your system when a response arrives, a campaign ends or an action changes — every delivery signed, logged and retried — and see what calls into Polzy.
On this page
Webhooks let Polzy tell your own system the moment something happens, instead of your system asking over and over. You add an endpoint — an HTTPS address on your side — and choose its events; Polzy then sends each event there, signed with the endpoint's secret, and keeps a log of every attempt. The same page lists everything that calls into Polzy: workflow trigger URLs and connectors that receive calls.
Webhooks are part of API access, on Team and up. Only workspace admins can manage them, under Settings → API → Webhooks, and the workspace must have API access switched on.
Before you start
You need an endpoint on your system that:
- Is served over HTTPS at a public address. Polzy does not call private or internal addresses.
- Accepts a
POSTwith a JSON body, and answers with a2xxstatus within 10 seconds. Do the slow work afterwards, not before answering. - Checks the signature of every call (see Check the signature) and ignores a delivery it has already handled.
Add an endpoint
- Open Settings → API and scroll to Webhooks.
- Choose Add endpoint.
- Enter the Endpoint URL, starting with
https://. - Under Events, tick the events it should receive.
- Switch on Send the response with each response event to receive each response itself — its answers, scores and, when the answer is not anonymous, who gave it — or leave it off to receive ids only.
- Under Campaigns, choose the campaigns the endpoint should hear about, or leave it empty to receive every campaign's events. Narrowed, the endpoint is sent only those campaigns' responses, launches and ends: a response given through the survey's own link, without a campaign, is not sent. Action events belong to no campaign and always arrive, narrowed or not. Campaigns applies once a response or campaign event is ticked.
- Choose Add endpoint.
- Copy the Signing secret and store it with your endpoint's configuration. It starts with
whsec_and is not shown again; afterwards only its last four characters are.
| Event | Sent when | data carries |
|---|---|---|
response.created | A response was completed and its written answers read for safety — before scoring. | id, response_id, survey_id, campaign_id, completed_at, response |
response.scored | Its AI reading was saved, with its scores. Only where AI scoring is on. | The same as response.created |
response.translated | Its written answers were translated into the organization's language — once per response. Only for an endpoint that ticks it. | The same as response.created |
response.deleted | A response was deleted: by an admin, on its own or with the person who gave it, or by that person. | id, response_id, survey_id, campaign_id, deleted_at |
campaign.launched | A campaign went live, or live again after a pause. | id, name, survey_id, resumed, launched_at |
campaign.finished | A campaign closed, with its response rate. | id, name, response_rate |
action.created | An action was created. | id, title, stage, due |
action.completed | An action was completed. | id, title, stage, due |
response is the response itself, in the shape the API gives it, and only for an endpoint with Send the response with each response event on. It is off until somebody switches it on — for an endpoint added now as for one added before 3 November 2026 — here, or later with Edit. An endpoint registered through the API asks for it with include_response: true, which needs a key that also has responses:read. Without it, a response event carries ids, and the API reads the response with an API key that has responses:read.
In response, a translated written answer also carries translated_text, its words in the organization's language, source_language, the language it was written in, and translated_to; an answer without a translation carries none of them. On an anonymous answer of a small group, source_language is left out. See Written answers, translated.
Either way, an anonymous answer never says who gave it: respondent and id are empty, response_id is sealed, and its times are the day alone. It is also held to the privacy floor, as the API holds it: while fewer people than the workspace's minimum group have answered its survey or campaign anonymously, response is left out and response_withheld says GROUP_TOO_SMALL. An answer withheld for safety review arrives with an empty value and withheld: true. A comment marked Only admins can read this is left out of response, as it is of the API, and so is what the AI read from it: on such a response ai.sentiment is null and score.themes keeps only the themes scored from the answers’ own figures. A comment added under a question (Comments on any question) is an answer of its own, with variant: "comment" and comment_on, the ID of the question it is about. A team question's answer carries its group in group — on an anonymous answer only where the person is in that group alone and the group reaches the floor; otherwise it comes with group_held: true instead. Send responses only to a system you trust with them.
Answers to a question removed from the survey since are not in answers, here or in the API: a removed question is retired, not erased, and its answers come back if it is restored. score is worked out again without them shortly after the removal. See Remove an answered question.
Each address can be added once per workspace — an address a Zapier or n8n connection already sends to included. To change an endpoint's events, whether it is sent the response, or the campaigns it is narrowed to, choose Edit; its address and secret stay.
From a campaign
A campaign's Integrations tab has a Webhooks card that lists, read-only, every endpoint that reaches that campaign: the ones narrowed to it, marked This campaign, and the ones that receive every campaign, marked All campaigns — each with its events and whether it is switched on. Nothing is changed there. Create webhook opens Add endpoint on this page with the campaign already chosen under Campaigns, and Manage in API & Webhooks opens this page. Admins and managers see the card; only admins can add or change an endpoint.
What a delivery looks like
Polzy sends a POST with these headers:
| Header | Value |
|---|---|
X-Polzy-Event | The event, such as response.created. |
X-Polzy-Event-Id | The delivery's ID, the same on every retry. |
X-Polzy-Timestamp | When it was signed, in Unix seconds. |
X-Polzy-Signature | The hex HMAC-SHA256 of <timestamp>.<body>, made with the endpoint's secret. |
And a body like this:
{
"id": "response.created:6721c9e0a4b1f2003d5e8a17:6abd1e…",
"type": "response.created",
"created_at": "2026-10-31T14:02:11.000Z",
"data": {
"id": "6721c9e0a4b1f2003d5e8a17",
"response_id": "resp_6721c9e0a4b1f2003d5e8a17",
"survey_id": "6512f0…",
"campaign_id": "6520aa…",
"completed_at": "2026-10-31T14:02:09.000Z",
"response": {
"object": "response",
"id": "resp_6721c9e0a4b1f2003d5e8a17",
"status": "completed",
"respondent": { "id": "65f0…a9", "email": "ada@example.com", "name": "Ada Lovelace", "external_id": null },
"answers": [
{ "question_id": "q1", "question": "Recommend us?", "type": "nps", "variant": null, "value": 9, "label": null, "withheld": false }
],
"score": null,
"ai": { "status": "pending", "sentiment": null }
}
}
}
Check the signature
Check every call before you trust it:
- Read
X-Polzy-Timestampand refuse the call if it is more than five minutes from your clock. - Compute the HMAC-SHA256 of the timestamp, a dot and the raw body — the exact bytes you received, before any JSON parsing — with your signing secret, as hex.
- Compare it with
X-Polzy-Signaturein constant time, and refuse the call if they differ. - Remember
X-Polzy-Event-Id, and answer2xxwithout acting again when the same ID comes back.
In Node.js:
import crypto from 'node:crypto';
function verify(secret, rawBody, headers) {
const timestamp = headers['x-polzy-timestamp'] ?? '';
const signature = headers['x-polzy-signature'] ?? '';
if (!/^\d+$/.test(timestamp) || Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
const expected = crypto.createHmac('sha256', secret).update(`${timestamp}.${rawBody}`).digest('hex');
return signature.length === expected.length && crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
}
In Python:
import hashlib, hmac, time
def verify(secret: str, raw_body: bytes, headers) -> bool:
timestamp = headers.get("X-Polzy-Timestamp", "")
signature = headers.get("X-Polzy-Signature", "")
if not timestamp.isdigit() or abs(time.time() - int(timestamp)) > 300:
return False
expected = hmac.new(secret.encode(), timestamp.encode() + b"." + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(signature, expected)
Calls into Polzy are signed the same way, with the same three X-Polzy-… headers: the Custom API source accepts only signed calls, and a workflow's trigger URL checks a signature when one is sent, and refuses unsigned calls only when it is set to accept signed calls only.
Deliveries and retries
The list under Webhooks shows each endpoint with its events, the end of its Secret, and its Last delivery: Delivered and the date, Failing with the last status and how many failed in a row, or Nothing sent yet.
Choose Deliveries on an endpoint to see its latest 50 deliveries from the last 30 days, each named by its event and when it happened, with every attempt — when, the status your endpoint answered, and the error where it says more than the status — and when the next attempt is.
| State | Meaning |
|---|---|
| Queued | Waiting for its first attempt. |
| Retrying | An attempt failed; Next attempt says when the next one is. |
| Delivered | Your endpoint answered 2xx. |
| Failed | Every attempt failed, or your endpoint answered in a way that is not tried again. |
| Not sent | When it was due, the workspace no longer had API access or was paused for being over its plan, the endpoint was switched off, the API key that registered it had been revoked, or the response had been deleted. It is not sent later. |
An attempt fails when your endpoint answers anything but 2xx, takes longer than 10 seconds, or cannot be reached. No answer, a 408, a 429 or a 5xx is tried again — after 30 seconds, 2 minutes, 10 minutes, half an hour, 1, 3 and 6 hours, then every 12 hours — until three days after the first attempt. Any other 4xx is not tried again, and neither is a redirect: Polzy never follows one. What your endpoint answers is not read, only its status. Each event reaches each endpoint once, even when Polzy announces it again. Your endpoint gets 3 of the 10 seconds to accept the connection, and is sent at most two deliveries at once. After five failures in a row its deliveries wait, untried, and one goes every 5 minutes to try it; once one succeeds, the rest follow. Waiting uses none of a delivery's attempts. A response is announced once: scoring it again later sends nothing again.
An endpoint that fails every attempt for three days is switched off, and the workspace's admins are told by email. It shows Switched off — failed for 3 days, and nothing is sent to it until it is switched back on.
So nobody has to open this page to find out, the workspace's admins also see Your webhook to and the endpoint's host is failing at the top of the dashboard and of Settings → API: how many deliveries in a row have failed and since when, and the date Polzy keeps retrying until before it switches the endpoint off — or, once it is off, the date it was switched off. In Connection health, at the top of Settings → Integrations, an endpoint shows Degraded after one or two failures in a row, Failing from three in a row, and Disconnected once it is switched off, each with Events are not delivered. See Connection health.
An endpoint added with an API key is switched off when that key is revoked or deleted — rotating the key does not — and shows Switched off — its API key was revoked. It cannot be switched back on: register it again with a new key, or remove it. An endpoint added by an admin who later leaves the workspace, is deactivated or is no longer an admin keeps running, and shows Waiting for the owner until the organization's owner chooses Keep — it then runs on their say — or removes it. So nobody has to open this page to find out, the workspace's admins are also told at the top of the dashboard and of Settings → API — Webhooks are waiting for the owner — until every such endpoint is kept or removed. Only the owner can keep one; another admin is told so, and can remove one nobody needs.
Send a test, send again, switch back on
- Send test. Sends a
webhook.testevent to the endpoint once, signed like every delivery, even while it is switched off. It appears under Deliveries with what your endpoint answered. - Send again. On a delivery under Deliveries that is Delivered, Failed or Not sent, sends it once more with the same
X-Polzy-Event-Id. A response event carries the response as it is now; one deleted since is not sent. - Switch on. Shown on an endpoint that was switched off. Fix the endpoint, send it a test, then switch it on: events from then on reach it, and what it missed can be sent again from Deliveries.
Tests and resends together are limited to 20 per endpoint per hour. Through the API, POST /api/v1/webhooks/:id/test sends a test with a key that has webhooks:write.
Rotate the secret or remove an endpoint
- Rotate secret. Makes a new signing secret and shows it once. The old one stops working at once — a secret is rotated because it may have leaked — so update your endpoint straight away. Deliveries in between fail and are tried again for up to three days, so they arrive once your endpoint has the new secret.
- Remove. Nothing more is sent to that address, and its delivery log is deleted.
Endpoints can also be listed, added, changed and removed through the API with a key that has the webhooks:write scope, and narrowed with campaign_ids — survey_ids is no longer accepted; they are the same endpoints as on this page, a Zapier or n8n connection's destinations aside, which only their connection changes.
Zapier and n8n
Answers a survey or campaign sends to a Zapier or n8n connection are delivered by this same system: the same body, the same signature — made with the connection's secret — the same retries and switching off, and the same Deliveries with Send again. Each such destination is listed with Zapier or n8n beside it and only its host: the rest of a Zap's address is its key. Here it can be switched off and on and its deliveries read and sent again; where it sends is changed on the survey's or campaign's Integrations tab. An address this workspace's own endpoints already use is not sent the same answer a second time.
A workflow's Outbound webhook and HTTP request steps carry the same X-Polzy-… headers, signed with the workflow's own signing secret — see Workflows.
What calls in
Below the endpoints, What calls in lists everything that calls into this workspace, each with a link to where it is managed:
- Workflow trigger URLs. A workflow that starts on an incoming webhook, marked Signed calls only, Secret set, signing optional or Address only. Choose Workflow to open it — see Workflows.
- Connectors. A connector whose system calls Polzy — a Custom API source, BambooHR, Shopify or a messaging provider. Choose Connector to open its page, where its address is under Receiving.
Calls signed without a timestamp
The first version of the Custom API source signed the body alone, without X-Polzy-Timestamp. Those calls are still accepted for now. While a connector sends them, it is marked No timestamp under What calls in, a banner on this page gives the date from which they will be refused, and admins are reminded once a week. Until that date, deliveries Polzy sends also carry the older Polzy-Signature header, holding the same signature as t=<timestamp>,v1=<signature>, for receivers written before the change.
Troubleshooting
| What you see | Why | What to do |
|---|---|---|
| That address cannot receive webhooks: it points to a private or internal network. | The address is not public — it points to a private or internal network. | Use an address reachable from the internet. |
| That URL already receives this workspace’s webhooks. Edit that endpoint to change its events. | Each address can be added once. | Choose Edit on that endpoint. |
Failing with 401 or 403 | Your endpoint refuses Polzy's calls — often a signature check against the wrong secret. | Compare the secret's last four characters, or rotate it and update your endpoint. |
| Failing with no status | Your endpoint did not answer within 10 seconds, or could not be reached. | Answer at once and do the work afterwards; check the address is reachable. |
| Your signature never matches | The body was parsed and serialised again before checking, or the secret has spaces. | Sign the raw bytes you received, and copy the secret again. |
| Not sent | API access was off, or the workspace was paused, when the event happened. | Switch API access back on, or bring the workspace within its plan. Missed events are not resent. |
| Switched off — failed for 3 days | Every attempt failed for three days. | Fix your endpoint, choose Send test, then Switch on. Send what it missed again from Deliveries. |
| Switched off — its API key was revoked | The integration that registered it lost its key. | Register the endpoint again with a new key, or remove it. |
| Waiting for the owner | The admin who added it no longer has admin access here. It is still sent everything. | The organization's owner chooses Keep, or removes it. |
Good to know
- Order is not guaranteed. Events can arrive out of order, and a retry can arrive after a later event. Use
created_atand the IDs, not arrival order. - Expect a delivery more than once. Your endpoint may answer and the answer may be lost; then the delivery comes again with the same
X-Polzy-Event-Id. - The API reference. The API reference has the endpoints for managing webhooks and a signature check in more languages. Its OpenAPI file,
/help/api/openapi.json, describes every event with an example delivery. - When each response event is sent.
response.createdgoes as soon as the response's written answers have been read for safety — up to 10 minutes — without waiting for scoring;response.scoredfollows once its AI reading is saved. Subscribe toresponse.scoredwhen you need the scores.
Related articles
Signed-in members can ask Polzy or message the team from Support. How fast we reply depends on your plan.