empirio.ai Developer Docs
empirio.ai offers four integration surfaces:
- MCP Server — connect AI agents (ChatGPT, Claude, and compatible hosts).
- REST API — manage surveys and pull responses over HTTPS.
- Webhooks — receive new responses in real time.
- CLI —
@empirio-ai/clinpm package; OAuth 2.1 login and every REST operation on the command line.
Plans and feature availability: see the Pricing page. The survey owner's entitlements apply. Use survey_get.plan_gate to check publishing eligibility; operations report plan_features_exceeded or plan_feature_required when a required feature is unavailable.
Write replay policy depends on the surface. REST requires Idempotency-Key on every write; the CLI, n8n, Zapier, and Make satisfy that REST requirement automatically, with explicit overrides on their normal write commands, actions, and modules for callers that need to reuse a retained value. MCP instead offers an optional idempotency_key: omit it unless the client can retain the value and resend the same key and arguments after an uncertain result.
Beta — This API is in beta. Endpoints, request/response shapes, and behavior may change without prior notice.
REST API
Overview
Use the REST API to manage surveys, quizzes and live polls, and read response data over HTTPS. Survey operations include quiz settings and results/presentation sharing. Live Sessions, Folders and Templates have dedicated sections.
Base URL
https://platform.empirio.ai/rest/v1
All requests must be made over HTTPS. HTTP requests are rejected with a 308 redirect.
Authentication
Include a Bearer token in every request. Two token types are accepted:
Authorization: Bearer sk_live_… # REST API key (dashboard)
Authorization: Bearer <oauth-token> # OAuth 2.1 access token (used by the CLI)
API keys are created in Settings → Integrations. OAuth access tokens are issued via the /mcp-oauth-token endpoint and are used automatically by the empirio.ai CLI after empirio login. A token's scope is a space-separated list of these tokens, and nothing spells "all":
| Scope | Access |
|---|---|
surveys | Manage surveys, live sessions, sharing settings, personal folders and templates |
responses | Read, analyse, export and delete responses; also required for live start/results, deleting a live session and results/presentation sharing |
webhooks | Register, inspect, update and remove delivery endpoints. Also requires responses — see Endpoints in the sidebar |
Survey modes and endpoint families
settings.survey_mode selects survey, quiz or live. It defaults to survey for new content, inherits the template mode when adopting a template, and is preserved when omitted on edit. Quiz and live creation default to one question per page unless a layout is explicit. Question scoring and settings.quiz/settings.live describe how participants answer; the top-level manual/ai mode describes how content is authored.
Live sessions use /surveys/{survey_id}/live-sessions: start, pause, resume, end, reactivate, rename and delete them there; links and their settings are included under share in survey reads and edits. Owners read the current room code and join URL at survey_get.share.live; room-code renewal is available in the web editor. Personal folders and templates use /folders and /templates. Unpublishing, deleting, or publishing a draft that leaves live mode ends and finalizes its running session or rehearsal.
Rate limits
Every limit on a request that authenticates is counted per account, not per credential. The read and write windows key on the account behind the presented token — rest:read:<user_id> and rest:write:<user_id> — so a second API key, or an API key alongside an OAuth token, splits one budget instead of adding a second one. Issue extra keys for rotation or to separate scopes, not for more throughput. The failed-authentication budget is the one exception and is keyed the other way, on the credential that was presented; it is described under the table.
| Metric | Limit |
|---|---|
| Read operations | 60 / minute per account |
| Write operations | 20 / minute per account |
| Failed authentications | 120 / minute per credential (per IP when no credential is presented) |
POST /surveys and POST /surveys/{survey_id}/duplicate | 10 / hour and 50 / day per account, shared between the two — charged only when the request reaches the work it pays for |
Reads and writes are counted separately, so a burst of writes does not consume read budget. The MCP server counts under its own keys again: an agent on MCP and a script on REST do not share a window.
The failed-authentication limit is the exception named above. It counts failed authentications only, and it is charged to the credential that was presented, not to the address it came from. A request that authenticates is charged to its account and never to either. So a client hammering a rotated or mistyped key exhausts that key's budget and nobody else's, and callers sharing an egress IP — the normal case behind Zapier, Make and n8n Cloud — are unaffected by one another. Only a request presenting no credential at all keys on the address, and such a request never reaches a key lookup, so it cannot refuse a valid key from the same address.
The limit exists because a request with no valid credential has no account to charge. It bounds the cost of a flood at one indexed lookup per attempt rather than acting as a brute-force defence, for which an sk_ key carries far too much entropy. Its residual, stated plainly: a flood presenting a different credential on every request gets a fresh budget each time and is not stopped here. That costs the same one lookup per request as a flood on a valid key, which this design already accepts, and belongs at the edge rather than in the application.
Responses that reach the per-account limiter carry its window state. Routing, authentication and scope refusals occur before that limiter; admin accounts bypass it. Both fixed and argument-dependent scope requirements are checked before counting a REST request:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests allowed in the window (60 read / 20 write) |
X-RateLimit-Remaining | Requests left in the current window |
X-RateLimit-Reset | Unix timestamp (seconds) at which the window resets |
When a limit is exceeded the API returns 429. Retry-After and the three X-RateLimit-* headers then describe the budget that refused the call — which is not always the one the request would otherwise have been counted against, since survey creation (POST /surveys and POST /surveys/{survey_id}/duplicate alike) has its own hourly and daily quotas. A refusal with no window behind it, such as the chart-export concurrency cap, sends neither Retry-After nor the headers: a number describing a different budget is worse than no number.
Write operations include POST, PATCH, and DELETE. Read operations are GET requests.
The per-account survey_create limit is applied in addition to the global write rate limit and is intended to prevent account-wide runaway creation. It is not affected by idempotency replays — re-sending a request with the same Idempotency-Key does not consume additional quota.
Admin exemption
Accounts with the admin role bypass every per-account rate limit (read, write, and the survey_create hourly/daily caps), whichever token type they present. An admin token authenticates, so it is never charged to the failure budget. Nor is it affected by anyone else's failures: since the budget is keyed on the presented credential, an admin key is refused by this gate only if that key itself has been failing — which a valid one does not. This exemption is intended for internal tooling and test automation — every other account remains subject to the limits documented above.
Idempotency
Write operations require an idempotency key via header:
- Header:
Idempotency-Key: <value>(max 128 characters)
Repeat requests with the same key within the idempotency window return the original response without re-executing the operation. The exceptions are the two export operations: their download_url and expires_at are re-issued on every reply, because a download link is signed for about an hour while the idempotency window is far longer — a replayed link would otherwise arrive already expired. Everything else in the response, row_count included, is the original.
A key is bound to the request body it was first used with. Reusing it for a different request returns idempotency_key_conflict (409) rather than the earlier response, so a stale key cannot silently answer for a write that never ran. Generate a fresh key per distinct request; reuse one only to replay that exact request.
Response envelope
Every response — success and failure alike — is wrapped. There is no unwrapped variant, so read ok first and take the payload from data:
{
"ok": true,
"data": {
"survey_id": "b6f2c1d0-8a3e-4c57-9f21-7d4e8a1b3c95",
"title": "Customer Feedback Survey"
}
}
The per-endpoint schemas below describe the contents of data.
Error responses
All errors use the matching failure envelope. Branch on error.code, not on error.message: the message is human-readable English and is not a stable contract.
{
"ok": false,
"error": {
"code": "not_found",
"message": "Survey not found."
}
}
| Code | Status | Description |
|---|---|---|
validation_error | 400 | Request parameters failed validation |
quiz_not_ready | 400 | The quiz cannot be published: error.context.reason is missing_solutions (with the question_ids to fix) or nothing_scored. survey_get.quiz_gate reports the same before the call |
idempotency_required | 400 | Idempotency key required but not provided |
not_authorized | 401 | Missing or invalid API key |
insufficient_scope | 403 | Key does not have the required scope |
plan_features_exceeded | 403 | The survey uses a feature the survey owner's plan does not include |
plan_feature_required | 403 | The requested operation is a feature the survey owner's plan does not include |
forbidden | 403 | Action not permitted |
not_found | 404 | Resource or route not found |
method_not_allowed | 405 | HTTP method not allowed for this endpoint |
conflict | 409 | The request conflicts with current state — a concurrently modified working draft, say — and stays so until the request changes or the state does. Live-session pause, resume, reactivate and delete name the state in error.context.reason; finalizing (the session's end is still being processed) clears by itself, so retry shortly |
live_session_active | 409 | A live session is already running. error.context.active_session_id names it: send it as replace_session_id to end it and start the new one |
survey_not_canonical | 409 | The stored survey holds a value the canonical contract no longer accepts, so this write cannot carry it forward. Nothing in the request caused it and resending it unchanged will not clear it — repair the stored value first |
idempotency_in_progress | 409 | Duplicate request is still being processed |
idempotency_key_conflict | 409 | The Idempotency-Key was already used for a different request body |
rate_limited | 429 | Rate limit exceeded |
edge_error | 500 | An upstream service the operation depends on failed. The message is the fixed text Upstream request failed — the underlying cause is logged server-side, not returned |
no_chartable_data | 400 | The survey has no answers to chart yet. Every chart format answers this way; collect responses and request the export again |
export_error | 500 | An export could not be produced |
export_timeout | 500 | A chart export was still rendering when the wait expired. Request it again, or narrow it with date or answer filters — a render measures seconds on a typical survey and about a minute on the largest ones, so this is rare |
upload_error | 500 | The export artifact could not be stored |
export_expired | 404 | The exported file is no longer available. Idempotent replays re-sign the link, but the file itself can be removed before the 24-hour replay window ends; run the export again with a new idempotency_key |
query_error | 500 | A database operation failed |
response_counts_unavailable | 500 | GET /surveys could not read the per-survey response counts it returns alongside each survey. The survey list itself is unaffected — retry the request. Unlike the other 5xx codes this one carries the upstream failure text rather than fixed text, so do not surface its message to an end user |
idempotency_finalize_error | 500 | The operation ran but its idempotency record could not be committed. Retry with the same Idempotency-Key |
internal_error | 500 | Unexpected server error |
5xx messages are replaced with fixed text before they leave the server; the underlying cause is logged with the request ID rather than returned. There is no exception — every 5xx code has a canned message, and a test pins that list against the message table so a new one cannot slip through uncanned.
Recommended survey flow
POST /surveys— create a draftPATCH /surveys/{survey_id}— optional iterative editsPOST /surveys/{survey_id}/publish— publish the draft
Question Types
Write endpoints accept questions as an array of objects. Every question needs a type and question text plus any type-specific fields listed below.
Option lists take two forms. Wherever a table below says string[] — options, matrix_rows, matrix_columns — each entry may be a plain label, in which case the server assigns the identifier, or the {"option_id": "…", "label": "…"} object GET /surveys/{survey_id} returns. Send the object form to keep an existing option's identity: logic rules reference option ids, translations are keyed by them, and stored answers resolve their labels through them, so a read-modify-write cycle that drops the id orphans all three. The two forms may be mixed in one list, and an object without option_id is the same as a plain label. option_id is opaque: send back exactly what you were given rather than composing one.
Required means required. A field marked Yes below is refused at creation when it is missing or empty — validation_error: options is required for 'single-choice' questions. — and an edit cannot empty it again either. These are runtime rules, not JSON Schema required entries, so a schema-validating client will happily build a request the server rejects.
Floors. single-choice, multiple-choice, dropdown, ranking, image-single-choice and image-multiple-choice need at least two options (Question type 'single-choice' requires at least 2 options). matrix rows and columns and text-rating columns need at least one each; a 1×1 matrix is accepted.
image-single-choice and image-multiple-choice carry a picture per option. Each entry of options is an object with a label and an image_url. image_url takes either the storage path survey_get reported — which is what makes a read sendable straight back — or an https URL, which the write fetches: the image is checked to be a PNG, JPEG or WebP within 5 MB, 6000 px per side and 16 megapixels, stored, and the option keeps the resulting path. null removes a picture. A URL that cannot be fetched refuses the whole call and names it, so a picture round is never created half-finished.
Server-assigned values. Some fields are filled in or overridden regardless of what you send; each is noted in its table. They come back from survey_get, so a read-modify-write round trip will show fields you never set.
Selection
Single choice — single-choice
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
options | string[] | Yes | Answer labels, at least 2 and at most 100 |
randomize_options | boolean | No | Shuffle option order per respondent |
allow_other | boolean | No | Allow a free-text "other" answer |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "single-choice",
"question": "How did you hear about us?",
"options": ["Social media", "Search engine", "Friend"],
"allow_other": true
}
Image single choice — image-single-choice
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
options | object[] | Yes | {label, image_url} entries, at least 2 and at most 100 |
randomize_options | boolean | No | Shuffle option order per respondent |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "image-single-choice",
"question": "Which area did you like best?",
"options": [
{ "label": "Lava gorge", "image_url": "https://cdn.example.com/gorge.jpg" },
{ "label": "Arena", "image_url": "https://cdn.example.com/arena.jpg" }
]
}
Image multiple choice — image-multiple-choice
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
options | object[] | Yes | {label, image_url} entries, at least 2 and at most 100 |
randomize_options | boolean | No | Shuffle option order per respondent |
min_selections | integer | No | Fewest options a respondent must tick |
max_selections | integer | No | Most options a respondent may tick |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "image-multiple-choice",
"question": "Which materials clean water?",
"min_selections": 1,
"options": [
{ "label": "Gravel", "image_url": "https://cdn.example.com/gravel.png" },
{ "label": "Cotton", "image_url": "https://cdn.example.com/cotton.webp" }
]
}
Multiple choice — multiple-choice
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
options | string[] | Yes | Answer labels, at least 2 and at most 100 |
randomize_options | boolean | No | Shuffle option order per respondent |
allow_other | boolean | No | Allow a free-text "other" answer |
min_selections | integer | No | Minimum options the respondent must select (≥ 1, ≤ options.length). See the note below — it does not set required. |
max_selections | integer | No | Maximum options the respondent may select (≥ 1, ≥ min_selections, ≤ options.length). |
subtitle | string | Server-assigned when omitted | Defaults to a localized "Multiple selection possible" with show_subtitle: true. A subtitle you send is kept, and show_subtitle: false is honoured. |
show_subtitle | boolean | No | Whether to display the subtitle |
min_selections and required are different fields. min_selections does not change the stored required flag, so both survey_get.draft and survey_get.published keep reporting required: false. It is still enforced on the respondent: while the question is visible, a submission with fewer than min_selections selections is refused, so the question is effectively mandatory. A question hidden by a logic rule stays optional, and its min_selections is not applied.
{
"type": "multiple-choice",
"question": "Which features do you use?",
"options": ["Dashboard", "Reports", "API"],
"randomize_options": true,
"min_selections": 1,
"max_selections": 2
}
Dropdown — dropdown
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
options | string[] | Yes | Answer labels, at least 2 and at most 100 |
randomize_options | boolean | No | Shuffle option order per respondent |
allow_other | boolean | No | Allow a free-text "other" answer |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "dropdown",
"question": "Select your country",
"options": ["Germany", "Austria", "Switzerland"]
}
Yes / No — yes-no
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "yes-no",
"question": "Would you use this product again?",
"required": true
}
Rating
Star rating — rating
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
min | — | Never | Not accepted. The lower bound is always 1 and is set by the server; sending min returns validation_error. |
max | number | No | 2–10 (default 5) |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "rating",
"question": "How would you rate our service?",
"required": true,
"max": 5
}
Thumbs — thumbs
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
min | — | Never | Not accepted. The lower bound is always 1 and is set by the server; sending min returns validation_error. |
max | number | No | 2–10 (default 5) |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "thumbs",
"question": "Did you enjoy this experience?",
"required": true,
"max": 5
}
Number rating — scale
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
min | — | Never | Not accepted. The lower bound is always 1 and is set by the server; sending min returns validation_error. |
max | number | No | 2–20 (default 10) |
scale_labels | { min?: string, max?: string } | Server-assigned when omitted | Label texts for scale ends. Defaults to {"min": "Low", "max": "High"}, which survey_get then reports. |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "scale",
"question": "How satisfied are you?",
"max": 10,
"scale_labels": {
"min": "Not at all",
"max": "Extremely"
}
}
Text rating — text-rating
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
matrix_columns | string[] | Yes | Label texts shown on each rating button, at least 1. These are this type's answer options: a respondent's stored answer is a col_… id from this list, not an opt_… one. |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "text-rating",
"question": "How do you feel?",
"matrix_columns": ["Bad", "Neutral", "Good", "Great"]
}
NPS — nps
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "nps",
"question": "How likely are you to recommend us?",
"required": true
}
Text & Input
Short text — text
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "text",
"question": "What is your name?",
"required": true
}
Long text — text-long
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "text-long",
"question": "Please share additional feedback"
}
Email — email
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "email",
"question": "Your email address",
"required": true
}
Phone — phone
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "phone",
"question": "Your contact number"
}
Number — number
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "number",
"question": "How many employees does your company have?",
"required": true
}
Date — date
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "date",
"question": "When did you first use our product?"
}
Appointment booking — booking
The participant books one slot from the question's availability. A slot is full once capacity participants have booked it; participants see only whether a slot is still free. Deleting a response frees its slot.
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
availability | object | No | Which slots are offered — see Availability below. Defaults to weekdays 09:00–17:00 in 30-minute slots over the next 28 days |
capacity | integer | No | Participants per slot, 1–50. Default 1 |
min_notice_hours | integer | No | Minimum lead time before a slot can be booked, 0–720 hours. Default 24 |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
Availability is one object, shared by booking and scheduling-poll (switching between the two keeps it). Every key is optional and takes its default when left out. An update replaces the whole object — keys you leave out return to their defaults — so send the complete availability when changing it.
| Key | Type | Default | Notes |
|---|---|---|---|
mode | "datetime" | "date" | "datetime" | Time slots of interval minutes, or whole days |
interval | 10 | 15 | 20 | 30 | 60 | 30 | Slot length in minutes |
weekdays | string[] | ["mon","tue","wed","thu","fri"] | Offered weekdays (mon … sun), at least one |
hours | {from, to}[] | [{"from":"09:00","to":"17:00"}] | 1–3 time ranges of a day, HH:MM on a 5-minute step, ascending and non-overlapping |
window | {days} or {from, to} | {"days":28} | A rolling window of 1–365 days starting today, or fixed dates YYYY-MM-DD spanning at most 366 days |
excluded | string[] | [] | Up to 100 dates (YYYY-MM-DD) not offered |
timezone | string | "Europe/Berlin" | IANA time zone every slot is given in |
{
"type": "booking",
"question": "Pick a time for your interview",
"availability": {
"mode": "datetime",
"interval": 30,
"weekdays": ["mon", "tue", "wed", "thu", "fri"],
"hours": [{ "from": "09:00", "to": "12:00" }, { "from": "13:00", "to": "17:00" }],
"window": { "days": 14 },
"excluded": [],
"timezone": "Europe/Berlin"
},
"capacity": 1,
"min_notice_hours": 24
}
Scheduling poll — scheduling-poll
The participant marks every slot that suits them; nobody sees the other participants' choices. Results count the votes per slot.
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
availability | object | No | Which slots are offered — the same object as on booking, see Availability above |
allow_multiple | boolean | No | Whether a participant may mark several slots. Default true |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "scheduling-poll",
"question": "Which days work for the workshop?",
"availability": { "mode": "date", "weekdays": ["mon", "wed", "fri"], "window": { "from": "2026-11-02", "to": "2026-11-27" } },
"allow_multiple": true
}
File upload — file-upload
The participant attaches files. Each file may be up to 10 MB; its content is checked against its type. Files are read like the responses they belong to: responses_list names them, and GET /surveys/{survey_id}/responses/{response_id}/files/{file_id} hands out a download link. Shared result links never show them.
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
file_types | string[] | No | Accepted files: pdf, docx (Word), image (JPEG and PNG). Default all three |
max_files | integer | No | Files per participant, 1–5. Default 1 |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "file-upload",
"question": "Please attach your CV",
"file_types": ["pdf", "docx"],
"max_files": 2,
"required": true
}
Advanced
Matrix — matrix
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
matrix_rows | string[] | Yes | Row labels, at least 1 |
matrix_columns | string[] | Yes | Column labels, at least 1 |
randomize_rows | boolean | No | Shuffle row order per respondent |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "matrix",
"question": "Rate each feature",
"matrix_rows": ["Ease of use", "Performance", "Design"],
"matrix_columns": ["Poor", "Fair", "Good", "Excellent"]
}
Ranking — ranking
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
options | string[] | Yes | Items to rank, at least 2 and at most 100 |
randomize_options | boolean | No | Shuffle option order per respondent |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "ranking",
"question": "Rank by importance",
"options": ["Speed", "Reliability", "Price", "Support"]
}
Content — content
A display-only block: it asks nothing, produces no answer, and appears in no export column.
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Title / label |
content | string | Yes | Body text. HTML in block elements — <p>, <h2>, <ul> or <ol> with <li> — holding text, <br>, <strong>, <em>, <u> and links as <a href>. A link takes an http, https, mailto or tel address and opens in a new tab for participants. Unsupported tags and attributes are removed and their text kept (<script> and <style> go with their content). An href with any other address is dropped, and the link shows as plain text. Plain text without tags is accepted too. |
image_url | string | No | Header image for the block — an absolute URL or a storage asset path. Max 2000 characters, no format check (the editor writes asset paths here). Returned by survey_get and preserved on round trip. Content questions only. |
content_image_paths | string[] | No | Storage paths of the images embedded in content. At most 50 entries, 200 characters each. The editor derives this from the body HTML — send back what survey_get returned rather than composing it. Content questions only. |
subtitle, show_subtitle | — | Never | Not supported on this type; sending either returns Question type 'content' does not support these fields: subtitle, show_subtitle. |
{
"type": "content",
"question": "Section 2: Demographics",
"content": "This section collects demographic information."
}
Privacy Policy — privacy
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Policy title |
required | boolean | No | Ignored. Always stored as true — consent cannot be optional. A false you send is accepted and overridden, and survey_get reports true |
content | string | Yes | Policy text shown to the respondent, HTML as in a content question's content |
privacy_checkbox_label | string | No | Label displayed next to the consent checkbox |
title_alignment | string | No | Alignment of the title: left, center, right or justify. Without it the title is aligned to the start of the line. The same in every language |
subtitle, show_subtitle | — | Never | Not supported on this type; sending either returns Question type 'privacy' does not support these fields: subtitle, show_subtitle. |
{
"type": "privacy",
"question": "Privacy Policy",
"content": "I agree to the processing of my data.",
"privacy_checkbox_label": "I accept",
"required": true
}
Surveys
Create, edit, publish, duplicate, and delete surveys.
post/surveys/{survey_id}/mode
Change survey mode immediately
Change the effective mode to survey, quiz or live without publishing questions or other working draft content. A changed mode deactivates participation and ends any active live session or rehearsal; draft content stays pending. Switching to live normalizes access to open. Read survey_get.version for the required canonical version; stale versions are refused with conflict. Owner or editor only. Activate separately with survey_publish or live_session_start, which publishes the working draft.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
Required
- survey_mode "survey" | "quiz" | "live"required
The effective survey mode to set immediately, without publishing draft content.
- version integerrequired
Expected canonical version from survey_get.version (not published.version). A stale version is refused with conflict.
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
- survey_id string (uuid)required
- version integerrequired
Canonical survey version after the write.
- survey_mode "survey" | "quiz" | "live"required
- is_published booleanrequired
- activation_required booleanrequired
Whether this change deactivated participation. Activate with survey_publish or live_session_start when ready.
- realtime_ok booleanrequired
Whether the successful write was announced to connected editors. False does not undo the write.
Example response
{
"ok": true,
"data": {
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"version": 2,
"survey_mode": "live",
"is_published": false,
"activation_required": true,
"realtime_ok": true
}
}get/surveys
List surveys
List all surveys owned by or shared with the authenticated user, including each survey's effective draft, scheduled, live, or ended status. Filter by survey_mode (survey, quiz or live, of the working draft) and by your private folder_id (null for surveys in no folder). Filters apply before paging and total. A survey shared with you is in your folder, never the owner's.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_mode | query | "survey" | "quiz" | "live" | No | Only surveys whose working draft is in this survey mode: survey, quiz or live. |
| folder_id | query | string (uuid) (nullable) | No | Your private folder ID; null selects unfiled surveys. Omit for all folders. |
| status | query | "all" | "draft" | "published" | No | Filter by publication status |
| limit | query | integer | No | Max results to return (default 50) |
| offset | query | integer | No | Number of results to skip (default 0) |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `survey_list`.
- surveys array of objectrequired
- folder_id string (uuid) (nullable)required
Your private folder for this survey (also for surveys shared with you), or null when it is in no folder.
- survey_mode "survey" | "quiz" | "live"required
Survey mode: survey (classic survey), quiz (scored answers) or live (live polls in sessions with a presentation).
- id string (uuid)required
Survey ID (UUID)
- title stringrequired
- description string (nullable)required
- is_published booleanrequired
- status "draft" | "scheduled" | "live" | "ended"required
Effective respondent-facing state: `draft` is unpublished, `scheduled` is published but before `schedule.start_at`, `live` currently accepts responses, and `ended` is published but at or after `schedule.end_at`.
- role "owner" | "editor" | "viewer"required
- response_count integerrequired
- created_at stringrequired
ISO 8601 timestamp
- updated_at stringrequired
ISO 8601 timestamp
- draft_updated_at string (nullable)required
When the working draft last changed, or null when the survey has no draft. `updated_at` tracks the survey row, which a survey_edit deliberately leaves untouched — so this is the only timestamp that moves for an unpublished edit.
- folder_id string (uuid) (nullable)required
- total integerrequired
Total number of accessible surveys matching the filters, ignoring pagination.
- surveys array of objectrequired
Example response
{
"ok": true,
"data": {
"surveys": [
{
"folder_id": null,
"survey_mode": "survey",
"id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"title": "Customer Satisfaction Q1",
"description": "Quick 3-minute check-in with our Pro customers.",
"is_published": true,
"status": "live",
"role": "owner",
"response_count": 142,
"created_at": "2026-01-12T09:24:00.000Z",
"updated_at": "2026-04-02T16:03:18.000Z",
"draft_updated_at": null
},
{
"folder_id": "5b6c7d8e-9f01-4a2b-8c3d-4e5f6a7b8c9d",
"survey_mode": "quiz",
"id": "c1b2a3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"title": "Onboarding feedback",
"description": null,
"is_published": false,
"status": "draft",
"role": "editor",
"response_count": 0,
"created_at": "2026-03-20T11:00:00.000Z",
"draft_updated_at": "2026-03-22T14:05:00.000Z",
"updated_at": "2026-03-21T08:30:00.000Z"
}
],
"total": 2
}
}post/surveys
Create survey draft
Create a new survey draft (unpublished). Questions are provided as an array — each needs a type and question text plus type-specific fields. See the Question Types section for the full list of supported types and their fields.
All field-level details are documented directly in the request schema attributes.
Logic rules and translations can be created in the same call: give each question a ref and reference that ref from logic_rules and from the keys of translations.questions.<locale>. The response reports the assigned question_id for each ref under question_ids_by_ref.
Pages for appearance.display_mode: "pages" are declared the same way: give each page in pages a ref and use it in a question's page_id and in a page rule's target_page_id. The response reports the assigned page IDs under page_ids_by_ref. Page refs are not stored, so later edits use those IDs.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
Required
- template_id string (uuid)
Template ID from template_list or template_get. Requires mode manual and excludes questions, pages, logic_rules, translations and ai_prompt. The template's texts are copied in settings.master_locale (default: your language), falling back to the template's original text where a translation is missing, and its title is used unless settings.title overrides it. A settings.survey_mode sent with it must match the template's survey_mode. Change the mode afterwards with survey_edit.
- mode "manual" | "ai"required
Creation mode: 'manual' for explicit content, 'ai' for prompt-based generation
- questions array of object
Array of question objects (each must have a valid type). At most 1000 questions per survey.
- scoring object
Quiz scoring. Scorable types: single-choice, multiple-choice, image-single-choice and image-multiple-choice and dropdown (solution in correct_option_ids), yes-no (correct_boolean) and number (numeric_range). On an update, send only the fields to change. The others keep their stored value. The solution may be left out while authoring, but publishing a quiz is refused until every enabled question has one.
- enabled boolean
Score this question in a quiz. false keeps the solution but leaves the question unscored. Default true.
- points integer
Points for a correct answer (a whole number from 1). Default 1.
- correct_option_ids array of string
Correct answer options of a choice or dropdown question: option_id values from survey_get, or, for options created in the same request, the option's ref (give the option as {"label": …, "ref": …}). A value that is neither is read as an option label when it matches the label of exactly one option of the question (exact text, trimmed, case-sensitive). An ambiguous or unknown label is refused. The answer must match the set exactly, with no partial credit. Single-choice types take exactly one.
- correct_boolean boolean
The correct answer of a yes-no question: true for yes, false for no.
- numeric_range object
The correct answer of a number question as an inclusive range. min=max expresses an exact answer.
- min numberrequired
- max numberrequired
- explanation string
Why the answer is correct. Shown with the solution when the quiz shows solutions.
- ai_generated boolean
Marks a solution suggested by AI that still needs a human check. The editor flags it until reviewed.
- enabled boolean
- presentation object
How the question's results are displayed in the live presentation and shared results. Not used for email, phone, number, date, privacy and content questions.
- chart_type "bar" | "column" | "pie" | "donut"
Chart for a choice, rating, scale, NPS, yes-no or ranking question in the live presentation and shared results: bar, column, pie or donut.
- text_display "cloud" | "cards"
Text and long-text questions only: cloud for a word cloud, cards for the answers as written. Default for shared results and MCP; interactive presentation tabs choose their display locally.
- voting_enabled boolean
Text and long-text questions only: show ranked full-text cards with upvotes and downvotes, without display tabs. Stored cloud/cards preferences remain available when voting is turned off; legacy whole_answers is retained but ignored. Participants vote only in the participant presentation: a live vote needs settings.live.presentation_before_participation or presentation_after_participation; a write that turns voting on without either, and sets neither, turns presentation_after_participation on and says so in warnings.
- whole_answers boolean
Legacy grouping preference retained for compatibility. Word clouds always tokenize individual words; this value no longer affects rendering.
- chart_type "bar" | "column" | "pie" | "donut"
- question_id object
Not accepted. Question identifiers are assigned by the server — use `ref` to reference a question within the same request.
- ref string
Caller-chosen name for this question. Stored, returned by `survey_get`, and usable in place of `question_id` on later edits — so it is also how you reference the question from `logic_rules`, `translations` and insert positions in the request that creates it. Unique within the survey, and never equal to a `question_id`. `survey_create` reports the assigned `question_id` for every question it creates. On `survey_edit` the `ref` belongs on the `question_operations` entry itself, beside `op`, not inside this payload.
- type "rating" | "thumbs" | "text-rating" | "text" | "text-long" | "nps" | "single-choice" | "multiple-choice" | "dropdown" | "yes-no" | "scale" | "date" | "email" | "phone" | "number" | "ranking" | "matrix" | "image-single-choice" | "image-multiple-choice" | "content" | "privacy" | "file-upload" | "booking" | "scheduling-poll"required
Question type.
- question string
Question text.
- required boolean
Whether an answer is required. Ignored on `privacy` questions, which always store `true` — consent cannot be optional.
- options array of string | object
Answer options (max 100). Either labels or `{label, ref}` objects — `ref` names the option so `logic_rules` and `translations` can reference it in this same request.
- subtitle string
Optional subtitle. On `multiple-choice` and `image-multiple-choice`, omitting it materializes the locale-specific multi-select hint and sets `show_subtitle: true`; set `show_subtitle: false` to hide that hint.
- page_id string
The page this question is on: a page ID from `survey_get`, or the `ref` of a page declared in `pages` in the same request. Any other value is rejected, and the questions of one page must follow each other. On `survey_create`, every question needs it when `pages` is sent. Without `pages` it must be left out, and the `pages` layout then gives each question a page of its own. On `survey_edit`, a question added without it gets a page of its own, and an update without it keeps the question on its page. Only the `pages` layout shows pages.
- show_subtitle boolean
Whether the subtitle is shown.
- content string
Body content for content/privacy questions. Rich text: at most 3000 characters of text, markup not counted. HTML in block elements — `<p>`, `<h2>`, `<ul>` or `<ol>` with `<li>` — holding text, `<br>`, `<strong>`, `<em>`, `<u>` and links as `<a href>`. A link takes an http, https, mailto or tel address and opens in a new tab for participants. Unsupported tags and attributes are removed and their text kept (`<script>` and `<style>` go with their content). An href with any other address is dropped, and the link shows as plain text. Plain text without tags is accepted too.
- image_url string
Header image for a `content` question — either an absolute URL or a storage asset path. `content` questions only; any other type refuses it.
- content_image_paths array of string
Storage paths of the images embedded in `content` (at most 50). The editor derives this from the body HTML; send back what `survey_get` returned. `content` questions only.
- min object
Not accepted. The lower bound is always 1 and is set by the server.
- max integer
Upper bound. rating/thumbs: 2–10, scale: 2–20. Ignored for types without max support.
- scale_labels object
Scale endpoint labels.
- min string
Minimum scale label.
- max string
Maximum scale label.
- min string
- allow_other boolean
Allow an additional free-text 'other' answer.
- randomize_options boolean
Randomize option order for each respondent.
- min_selections integer
Minimum number of options the respondent must select. multiple-choice only. Implies the question is required when ≥ 1.
- max_selections integer
Maximum number of options the respondent may select. multiple-choice only. Must be ≥ min_selections (if set) and ≤ options.length.
- matrix_rows array of string | object
Row labels for `matrix` questions. Required for `matrix` and unsupported on `text-rating`, whose choices belong in `matrix_columns`. Either labels or `{label, ref}` objects.
- matrix_columns array of string | object
Column labels for `matrix` questions and answer-button labels for `text-rating`. Required for both types. Either labels or `{label, ref}` objects.
- randomize_rows boolean
Randomize matrix row order for each respondent.
- privacy_checkbox_label string
Label shown next to the privacy consent checkbox.
- title_alignment "left" | "center" | "right" | "justify"
Alignment of a `privacy` question's title: `left`, `center`, `right` or `justify`. Without it the title is aligned to the start of the line. `privacy` questions only; any other type refuses it.
- translations map of object
Per-locale question translations keyed by locale (for example `de-DE`).
- file_types array of "pdf" | "docx" | "image"
Accepted files on a `file-upload` question: `pdf`, `docx` (Word), `image` (JPEG and PNG). Default all three. Each file may be up to 10 MB.
- max_files integer
How many files a participant may attach to a `file-upload` question, 1–5. Default 1.
- availability object
When `booking` and `scheduling-poll` questions offer slots. Every key is optional and falls back to its default. An update replaces the whole object — keys you leave out return to their defaults — so send the complete availability when changing it.
- mode "datetime" | "date"
`datetime` offers time slots of `interval` minutes; `date` offers whole days. Default `datetime`.
- interval 10 | 15 | 20 | 30 | 60
Slot length in minutes: 10, 15, 20, 30, 60. Default 30.
- weekdays array of "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun"
Days of the week that offer slots. Default Monday to Friday.
- hours array of object
1 to 3 non-overlapping time ranges per offered day; a slot fits inside one. Default 09:00–17:00.
- from stringrequired
Time of day, `HH:MM`, on a 5-minute step.
- to stringrequired
Time of day, `HH:MM`, on a 5-minute step.
- from stringrequired
- window object | object
Either `{days}` — a rolling window of 1–365 days starting today — or `{from, to}`, a fixed range of at most 366 days. Default `{days: 28}`.
- excluded array of string
Dates without slots (at most 100).
- timezone string
IANA time zone all times are in. Default `Europe/Berlin`.
- mode "datetime" | "date"
- capacity integer
How many participants may book the same slot of a `booking` question, 1–50. Default 1.
- min_notice_hours integer
Minimum lead time in hours before a slot of a `booking` question can be booked, 0–720. Default 24.
- allow_multiple boolean
Whether a participant may mark several slots of a `scheduling-poll` question. Default true.
- scoring object
- pages array of object
The survey's pages for `appearance.display_mode: "pages"`, in the order respondents see them. Declare each page with a `ref`, a name you choose that is valid within this request. Questions name their page with it in `page_id`, and page logic rules name their target page with it in `target_page_id`. The server assigns the page IDs and reports them under `page_ids_by_ref`. When `pages` is sent, every question needs a `page_id`, and the questions of one page must follow each other in `questions`. A page without questions is kept: with a shown title or subtitle it is an information page, otherwise respondents skip it. Without `pages`, the `pages` layout gives every question a page of its own. Manual mode only. In AI mode, describe the layout in `ai_prompt`.
- title string
Plain-text page title, shown above the page's questions in the `pages` layout when `show_title` is true. An empty string clears it.
- subtitle string
Plain-text page subtitle, shown above the page's questions in the `pages` layout when `show_subtitle` is true. An empty string clears it.
- show_title boolean
Whether the page title is shown. Defaults to `false`.
- show_subtitle boolean
Whether the page subtitle is shown, independently of the title. Defaults to `false`.
- translations map of object
Per-locale page translations keyed by locale (for example `de-DE`). Supplied fields are merged into the stored translation for that locale.
- ref stringrequired
Name you choose for a new page, unique within this request. Questions use it in `page_id` and page logic rules in `target_page_id`. The server assigns the page ID and reports it under `page_ids_by_ref`. Unlike a question's `ref`, it is not stored, so later requests use the ID.
- title string
- ai_prompt string
Prompt text for AI-driven survey creation (ai mode)
- welcome_page object
Welcome page configuration shown before the first question. `description` is rich text (HTML, links allowed); `description_image_paths` lists the storage paths of the images it embeds — send back what `survey_get` returned rather than composing it.
- enabled booleanrequired
Whether the welcome page is shown before the first question.
- title string
Welcome page title.
- title_alignment "left" | "center" | "right" | "justify"
Alignment of the welcome page title: `left`, `center`, `right` or `justify`. Without it the title is centered.
- description string
Welcome page description. Rich text: at most 3000 characters of text, markup not counted. HTML in block elements — `<p>`, `<h2>`, `<ul>` or `<ol>` with `<li>` — holding text, `<br>`, `<strong>`, `<em>`, `<u>` and links as `<a href>`. A link takes an http, https, mailto or tel address and opens in a new tab for participants. Unsupported tags and attributes are removed and their text kept (`<script>` and `<style>` go with their content). An href with any other address is dropped, and the link shows as plain text. Plain text without tags is accepted too.
- description_image_paths array of string
Storage paths of the images embedded in the welcome page `description` (at most 50). The editor derives this from the description HTML; send back what `survey_get` returned.
- enabled booleanrequired
- end_page object
End page configuration shown after the last question. Text can recall an earlier answer with {{answer:<question_id>}}; during manual creation or manual edit use the ref of a question added in the same request in place of its ID. Creation rejects unknown references; editing preserves unknown placeholders and reports a warning. `description` is rich text (HTML, no links); `description_image_paths` lists the storage paths of the images it embeds — send back what `survey_get` returned rather than composing it. Where participants go after submitting (the automatic redirect or this page's own button) and the parameters appended to that address are configured in `settings.url_params.outgoing`; its `url` is this page's `custom_button_url`, and `redirect_delay` is the countdown before a redirect while this page is shown.
- enabled booleanrequired
Whether the end page is shown after the final question.
- title string
Custom end-page title. If omitted, the default title is used.
- title_alignment "left" | "center" | "right" | "justify"
Alignment of the end page title: `left`, `center`, `right` or `justify`. Without it the title is centered.
- description string
Custom end-page description text. If omitted, the default text is used. Rich text: at most 3000 characters of text, markup not counted. HTML as in `welcome_page.description`, without links: an `<a>` is removed and its text kept.
- description_image_paths array of string
Storage paths of the images embedded in the end page `description` (at most 50). The editor derives this from the description HTML; send back what `survey_get` returned.
- show_title boolean
Explicit title visibility toggle. Use `false` to hide the title even if `title` is set.
- show_description boolean
Explicit description visibility toggle. Use `false` to hide the description even if it exists.
- show_custom_button boolean
Show a button with your own text and link. Cannot be `true` together with `hide_default_button`. When enabled in an edit, clears `hide_default_button` if that setting is omitted.
- hide_default_button boolean
Remove the button from the end page. Cannot be `true` together with `show_custom_button`. When enabled in an edit, clears `show_custom_button` if that setting is omitted.
- custom_button_text string
Button label shown on the end page.
- custom_button_url string
Destination URL opened by the button. The automatic redirect goes to the same address: it is one stored field with `settings.url_params.outgoing.url`.
- redirect_delay string
Countdown before the automatic redirect (`settings.url_params.outgoing`) while this page is shown, as a string of seconds such as `"5"`.
- enabled booleanrequired
- appearance object
Appearance: `template`, `primary_color`, `logo_url`, `display_mode`, `show_progress`, `show_question_numbers` and `hide_branding`. `logo_url` here is an `https` URL to import: the write fetches the image, checks it, stores it, and the survey keeps the resulting storage path. A path cannot be sent on create — it would have to contain the id of a survey that does not exist yet — but `survey_edit` takes either form.
- template "standard" | "modern" | "cosmos" | "aurora" | "nebula" | "eclipse" | "forest" | "amber"
Visual survey template. Available: `standard` (light, default), `modern` (dark), `cosmos` (dark, depth), `aurora` (light, gradient), `nebula` (dark, purple), `eclipse` (dark, purple accent), `forest` (dark, green), `amber` (dark, blue).
- primary_color string
Primary accent color as a CSS hex color — `#RGB`, `#RGBA`, `#RRGGBB` or `#RRGGBBAA` (for example `#4F46E5`).
- logo_url string (nullable)
Survey logo, given as an `https` URL to import. The write fetches the image, verifies it is a PNG, JPEG or WebP within the size and dimension limits, stores it, and the survey keeps the resulting storage path — which is what `survey_get` reports and what `survey_edit` takes back. A storage path is not accepted here: it would have to contain the id of a survey that does not exist yet.
- display_mode "all" | "single" | "pages"
Question layout: `all` shows every question on one page, `single` shows one question per page, and `pages` shows the pages listed in `pages`, each with the questions that name it in `page_id`. Default on create: `all` for survey, `single` for quiz and live; template creation keeps the template layout and AI-generated pages keep `pages`. survey_edit keeps the current layout unless it is supplied.
- show_progress boolean
Whether to show a progress indicator during completion.
- show_question_numbers boolean
Whether to show numeric question labels (1, 2, 3...).
- hide_branding boolean
Whether to hide empirio.ai branding in the survey footer.
- template "standard" | "modern" | "cosmos" | "aurora" | "nebula" | "eclipse" | "forest" | "amber"
- settings object
Survey settings, including `title` and `survey_mode` (`survey`, `quiz` or `live`). The object and its fields are optional except that manual creation without `template_id` requires a non-empty `settings.title`. AI creation uses its generated title when `settings.title` is omitted, empty or null; a template supplies its localized title in the same way. A non-empty title overrides either source. Layout belongs to `appearance.display_mode`. Survey settings, including `title` and `survey_mode` (`survey`, `quiz` or `live`). The object and its fields are optional except that manual creation without `template_id` requires a non-empty `settings.title`. AI creation uses its generated title when `settings.title` is omitted, empty or null; a template supplies its localized title in the same way. A non-empty title overrides either source. Layout belongs to `appearance.display_mode`. Other fields configure languages, navigation, participation and survey features. `schedule` (the participation window) applies immediately, independently of publishing; every other setting, including `response_limit` and `once_per_browser`, is part of the working draft and takes effect on publishing. Visual switches belong to `appearance`. `url_params` is the URL-parameter card: `incoming` values of the participation link, and `outgoing` where participants go after submitting (redirect or own end-page button) and the values appended to that address. Live presentation switches before and after participation remain under `settings.live`. In ai mode the questions are generated, so supplied configuration cannot point at one yet: `settings.confirmation.email_question_id`, `settings.url_params.incoming.parameters[].question_id` and the `source_id` of an answer- or quiz_correct-sourced `settings.url_params.outgoing.parameters[]` entry are refused. Set them with survey_edit once the survey exists.
- quiz object
Quiz settings: answer feedback, score, pass mark and time limit. Applies while the survey mode is quiz. Send only the fields to change. The others keep their stored value or default.
- time_limit_seconds integer (nullable)
Time limit per participant in seconds (1 to 86400), or null for no time limit. Counted from the start of the attempt: with a welcome page from Start, otherwise from opening the link. The server enforces the deadline and grades the answers given when it runs out. Default no time limit.
- reveal "end" | "per_question"
When participants see whether they answered correctly: per_question right after each answer (the answer is then locked), end on the final page. Default per_question. To show no solution feedback (Never in the app), set reveal=end and show_solutions=false.
- show_score boolean
Show participants their points on the final page. Default true.
- show_solutions boolean
Show the correct answers and explanations in the feedback. Default true.
- pass_threshold number (nullable)
Percentage of the maximum points needed to pass (0 to 100), or null for no pass mark. Default null.
- passed_text string
Message shown to participants who reach the pass mark.
- failed_text string
Message shown to participants who stay below the pass mark.
- time_limit_seconds integer (nullable)
- live object
Live session defaults and presentation options. Applies while the survey mode is live. Send only the fields to change. The others keep their stored value or default.
- duration_seconds integer (nullable)
Default length of a live session in seconds (1 to 86400), or null for no duration limit (until manually ended or the scheduled participation end). Default 600.
- show_room_code boolean
Show the join QR code and the room code at the top of every presentation slide. Turn it off for livestreams or recordings. Default true.
- presentation_before_participation boolean
Open the presentation before participation. Visitors can start or resume the questionnaire from it. Default false.
- presentation_after_participation boolean
Offer results immediately after the participant completes their own response, via a button on the end page. false disables this access even when show_end_results is true.
- show_end_results boolean
Allow completed participants to open results after the session ends when presentation_after_participation is unset. Default false.
- duration_seconds integer (nullable)
- notifications object
Email notifications about new responses. Recipients must be the owner or collaborators.
- enabled boolean
Send email notifications about new responses. Default true when the section is first sent.
- recipient_user_ids array of "me" | string (uuid)
Who receives the notifications (up to 100): user IDs of the owner or collaborators, as `survey_get` lists them under `collaborators`, or "me" for your own account. An empty list notifies the owner. Replaces the stored list.
- frequency "immediate" | "daily"
immediate sends one email per response. daily sends one summary per day. Default immediate.
- enabled boolean
- url_params object
URL parameters, as in the Settings tab: incoming values of the participation link, and the outgoing target and values. Send only the parts to change.
- incoming object
Incoming: values passed in the participation link, stored with each response and usable as response filters.
- parameters array of object
Parameters to capture (up to 20): the defined parameters are captured, an empty list captures none. Replaces the stored list.
- name stringrequired
Parameter name as it appears in the URL: a letter, then letters, digits or underscores (up to 64 characters).
- question_id string
Question to prefill with the parameter's value: its question_id, or the ref of a question created in the same request. Participants can still change it, unless hide_when_prefilled is true. A link value fills text, long text, email, phone, number, yes-no, single choice, image single choice and dropdown questions. A parameter on another type is accepted with a warning and prefills nothing. Omit to store the value only.
- hide_when_prefilled boolean
true: when the link supplies a valid value for this parameter, participants do not see the question, and it is answered with that value. Without a valid value the question shows as usual. Needs question_id. In a quiz, a scored question is always shown. false or omitted: the question always shows.
- name stringrequired
- parameters array of object
- outgoing object
Outgoing: where participants go after submitting, and the values that travel along.
- action "none" | "redirect" | "own_button"
Where participants go after submitting. none: nowhere, the end page keeps the empirio.ai button; it restores that button while a target is on and changes nothing otherwise. redirect: to url, straight away without the end page and after the end page's redirect_delay with it; live mode has no redirect, a stored one shows the own button there. own_button: a button with url on the end page, which needs the end page on (end_page.enabled true, stored or in this request). redirect and own_button turn on the own button's flags and cannot be combined with end_page.hide_default_button true or end_page.show_custom_button false.
- url string
Target address. It is the same stored field as end_page.custom_button_url: a request that sends both with different values is refused. Without a usable address nobody is sent on.
- delay integer
Seconds the end page counts down before the redirect (0 to 30); without the end page participants go on straight away. It is the same stored field as end_page.redirect_delay: a request that sends both with different values is refused. Sent while action is not redirect, it is stored with a warning and counts once the redirect is on.
- parameters array of object
Parameters appended to the target address (up to 20) while action is not none; action none keeps them. Participants can see and change values in an address; a webhook is the reliable channel. Replaces the stored list.
- name stringrequired
Parameter name as it appears in the URL: a letter, then letters, digits or underscores (up to 64 characters).
- source "url_param" | "answer" | "quiz_result" | "quiz_correct"required
Where the value comes from: url_param for a captured URL parameter, answer for a participant's answer, quiz_result for the quiz result (passed is 1 or 0, score in points, percentage), quiz_correct for whether a scored question was answered correctly (1 or 0). The quiz sources carry a value in quiz mode only, also when the quiz hides score or solutions from participants.
- source_id stringrequired
For url_param the name of the captured URL parameter; for answer and quiz_correct the question_id (or same-request ref) of the question; for quiz_result one of passed, score, percentage.
- name stringrequired
- action "none" | "redirect" | "own_button"
- incoming object
- confirmation object
Confirmation email to participants, sent to the address they entered in an email question.
- enabled boolean
Send each participant a confirmation email after they submit. Default true when the section is first sent.
- email_question_id string
The email question whose answer receives the confirmation: its question_id, or the ref of a question created in the same request.
- subject string
Subject line of the confirmation email.
- body string
Text of the confirmation email. In a quiz, the participant's result follows it as the end page shows it: points and percentage while the quiz shows the score, and passed or failed when a pass mark is set.
- enabled boolean
- auto_advance boolean
Whether the respondent flow automatically advances after a question is answered when the question type supports it. Defaults to true, which is also the editor's default — omit this field unless the user asked for something else. Set it to false only on an explicit request to make respondents press the continue button after every question.
- master_locale "en-US" | "en-GB" | "de-DE" | "de-AT" | "de-CH" | "fr-FR" | "es-ES" | "it-IT" | "nl-NL" | ""
Primary survey language. Defaults to the user's preferred language when omitted or empty.
- multi_language_enabled boolean
Whether multi-language answering is enabled.
- additional_locales array of "en-US" | "en-GB" | "de-DE" | "de-AT" | "de-CH" | "fr-FR" | "es-ES" | "it-IT" | "nl-NL"
Additional enabled languages.
- title string (nullable)
Survey title shown to respondents and in the dashboard. Required in manual mode without template_id. In AI mode it overrides the generated title; omit it, or send `""` or `null`, to keep the generated one.
- survey_mode "survey" | "quiz" | "live"
Survey mode: survey, quiz or live. On edit this changes only the working draft; survey_mode_update changes the effective mode immediately. Omit on edit to retain the mode; on template creation to retain the template mode; otherwise creation defaults to survey. Not the top-level manual/ai `mode`. Switching to quiz turns on scoring (1 point) for every scorable question that has none, and the response warns about questions that still need a solution. Switching preserves inactive settings and solutions.
- schedule object
Participation window. Applies immediately, independently of publishing and of the working draft.
- start_at string (nullable)
When the survey activates itself. `null` removes the start and leaves the survey open from the moment it is published.
- end_at string (nullable)
When the survey deactivates itself. Must be later than `start_at`. `null` removes the end and leaves the survey open indefinitely.
- start_at string (nullable)
- response_limit object
Stop accepting responses after a number of completed responses. Part of the working draft: takes effect on publishing.
- enabled boolean
Close participation once the limit is reached. Default true when the section is first sent.
- limit integer
Number of completed responses after which participation closes.
- closed_text string
Message shown to visitors once the limit is reached. Omit for a default text.
- enabled boolean
- once_per_browser object
One response per browser, in survey and quiz mode; a live vote ignores it. On the survey's own page, participants first consent in the cookie banner and cannot take part without it. After a participant with consent submits, the browser keeps a cookie for 90 days that stores no answers, and the survey refuses that browser another participation until it expires. Embedded surveys and the preview link show no banner and never set the cookie. Applies in every access mode. Part of the working draft: takes effect on publishing.
- enabled boolean
Allow one response per browser. Default true when the section is first sent.
- enabled boolean
- quiz object
- logic_rules array of object
Logic rules the new survey should have, as a plain list rather than operations — there is nothing to patch yet, and it is the same shape `survey_get` reports. `question_id` and `target_question_id` name a question's `ref` from this same request, because no question has an identifier until the survey is created. `target_page_id` names a page's `ref` from `pages` in the same way. Rule identifiers are assigned by the server; use `logic_rule_operations` on `survey_edit` to change a rule afterwards.
- question_id string
Answer source. Use exactly one of question_id or url_param; updating either switches the source.
- url_param string
URL parameter source: a name configured in settings.url_params.incoming.parameters. Supports every logic action; jumps skip the prefix before their target and end-survey skips all questions. Uses literal case-sensitive comparisons, with is-set/is-not-set requiring empty values.
- condition "equals" | "not-equals" | "contains" | "greater-than" | "less-than" | "is-set" | "is-not-set"required
Comparison operator. `is-set` / `is-not-set` test whether the question was answered (or the URL parameter carries a nonblank value) and take empty `values`. `file-upload`, `booking` and `scheduling-poll` questions support only these two.
- values array of stringrequired
Values used for the comparison. For equals/not-equals each entry must be a value the referenced question can produce: "true"/"false" for yes-no, the option id for choice questions, the score as a string for nps/rating/scale/thumbs. URL parameter values are literal strings: equals matches any value; not-equals must differ from all. Presence conditions use [].
- action "skip-to" | "show-question" | "hide-question" | "end-survey" | "skip-to-page" | "show-page" | "hide-page"required
Action when the condition matches. `skip-to`, `show-question` and `hide-question` act on the question in `target_question_id`. `skip-to-page`, `show-page` and `hide-page` act on the page in `target_page_id` and need `display_mode: "pages"`. `end-survey` takes no target.
- target_page_id string
Target page for `skip-to-page`, `show-page` and `hide-page`: a page ID from `survey_get`, or the `ref` of a page declared in `pages` in the same request. Cannot be combined with `target_question_id`.
- target_question_id string
Target question for `skip-to`, `show-question` and `hide-question`.
- question_id string
- translations object
Translations for the new survey. Question translations are keyed by a question's `ref` from the same request rather than by `question_id`, which does not exist yet.
- metadata map of object
Per-locale metadata translation patches keyed by locale.
- questions map of map of object
Per-locale question translation patches keyed by locale then `question_id`.
- metadata map of object
Example — Gives each question a `ref` and points `logic_rules` and `translations` at those refs. The response reports the assigned `question_id` for each ref under `question_ids_by_ref`.
{
"mode": "manual",
"settings": {
"master_locale": "en-US",
"additional_locales": [
"de-DE"
],
"title": "Onboarding check-in"
},
"questions": [
{
"ref": "consent",
"type": "yes-no",
"question": "May we ask a few follow-up questions?",
"required": true
},
{
"ref": "details",
"type": "text-long",
"question": "What could we do better?"
}
],
"logic_rules": [
{
"question_id": "consent",
"condition": "equals",
"values": [
"false"
],
"action": "hide-question",
"target_question_id": "details"
}
],
"translations": {
"metadata": {
"de-DE": {
"title": "Onboarding-Check"
}
},
"questions": {
"de-DE": {
"consent": {
"question": "Dürfen wir ein paar Rückfragen stellen?"
}
}
}
}
}Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `survey_create`. `public_url` is a direct link to the draft survey — it only becomes functional after `survey_publish`.
- id string (uuid)
Survey ID (UUID)
- page_ids_by_ref map of string
Server-assigned page IDs keyed by the new pages' request-local refs. Present only when pages were created with refs. Use these IDs on subsequent edits; page refs are not stored.
- public_url string
- public_url_note string
- preview_url string
Preview URL showing the current working draft. Responses submitted via this link are not counted.
- question_ids_by_ref map of string
The identifier assigned to each question that carried a `ref`, keyed by that `ref`. Present only when the request used refs. Shorthand for the question half of `created`, which reports every question and option whether or not it was named.
- created object
Every identifier this call assigned, in the order the request listed them. Use it to address what you just created without a follow-up `survey_get` — including the options. In AI mode the entries have no caller refs, but the generated question and option IDs are still returned here.
- questions array of objectrequired
Every question created, in request order.
- question_id stringrequired
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- ref string
The `ref` you gave this question, when you gave one.
- options array of object
Every option created on this question, in request order.
- option_id stringrequired
The identifier assigned to this option.
- ref string
The `ref` you gave this option.
- field "options" | "matrix_rows" | "matrix_columns"required
Which axis of the question this option belongs to.
- option_id stringrequired
- question_id stringrequired
- questions array of objectrequired
- warnings array of string
Non-fatal problems, such as a translation for a locale the survey does not enable.
- id string (uuid)
Example response
{
"ok": true,
"data": {
"id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"public_url": "https://www.empirio.ai/s/9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"public_url_note": "Survey is not published yet. This link will only work after publishing.",
"preview_url": "https://www.empirio.ai/p/7c1e5a90-3b42-4d8f-9a6b-1e2f3a4b5c6d"
}
}get/surveys/{survey_id}
Get survey details
Get both complete states of a survey: draft is the current working draft and published is the most recently published definition, or null when the survey has never been published. The top-level status and settings.schedule describe current respondent access. The top-level version is the canonical version required by survey_mode_update; published.version identifies the published definition.
share groups participation and preview links. The owner also receives share.live (current room code and join URL, null outside canonical live mode or without an allocated code). With the responses scope, the owner additionally receives existing results and presentation links with their valid access codes; absent links are null. For collaborators, live/results/presentation fields are omitted. Reading creates no links or room codes. Configure results visibility and prepare sharing links through survey_edit.share.results or share.presentation.
Options, matrix_rows, and matrix_columns in both states are returned as {option_id, label} objects. Use draft as the basis for edits and published.questions[].question_id for response analytics. Translation entries with status: "pending" may contain master-locale text as an editable placeholder; that text is not a completed target-locale translation.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | The survey ID |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `survey_get`, with the complete working draft and most recently published definition separated explicitly.
- id string (uuid)required
Survey ID (UUID)
- version integerrequired
Canonical survey version for survey_mode_update. Independent of the published definition version and working draft revision.
- folder_id string (uuid) (nullable)required
The caller’s private folder containing this survey, or null. Collaborators can each place it in their own folder.
- draft objectrequired
Complete current working draft. This is the state survey_edit builds on and survey_publish publishes.
- questions array of objectrequired
- scoring object
Quiz scoring, when the question has any. Change it with `scoring` in a question update.
- enabled booleanrequired
Whether the question is scored in a quiz.
- points integerrequired
Points for a correct answer.
- correct_option_ids array of string
Correct answer options of a choice or dropdown question: option_id values from survey_get, or, for options created in the same request, the option's ref (give the option as {"label": …, "ref": …}). A value that is neither is read as an option label when it matches the label of exactly one option of the question (exact text, trimmed, case-sensitive). An ambiguous or unknown label is refused. The answer must match the set exactly, with no partial credit. Single-choice types take exactly one.
- correct_boolean boolean
The correct answer of a yes-no question: true for yes, false for no.
- numeric_range object
The correct answer of a number question as an inclusive range. min=max expresses an exact answer.
…nested fields omitted
- explanation string
Why the answer is correct. Shown with the solution when the quiz shows solutions.
- ai_generated boolean
Marks a solution suggested by AI that still needs a human check. The editor flags it until reviewed.
- enabled booleanrequired
- presentation object
How the question's results are displayed in the live presentation and shared results. Not used for email, phone, number, date, privacy and content questions.
- chart_type "bar" | "column" | "pie" | "donut"
Chart for a choice, rating, scale, NPS, yes-no or ranking question in the live presentation and shared results: bar, column, pie or donut.
- text_display "cloud" | "cards"
Text and long-text questions only: cloud for a word cloud, cards for the answers as written. Default for shared results and MCP; interactive presentation tabs choose their display locally.
- voting_enabled boolean
Text and long-text questions only: show ranked full-text cards with upvotes and downvotes, without display tabs. Stored cloud/cards preferences remain available when voting is turned off; legacy whole_answers is retained but ignored. Participants vote only in the participant presentation: a live vote needs settings.live.presentation_before_participation or presentation_after_participation; a write that turns voting on without either, and sets neither, turns presentation_after_participation on and says so in warnings.
- whole_answers boolean
Legacy grouping preference retained for compatibility. Word clouds always tokenize individual words; this value no longer affects rendering.
- chart_type "bar" | "column" | "pie" | "donut"
- question_id string (nullable)required
Stable question ID. `null` only for legacy rows without an assigned id.
- ref string
The caller-chosen name this question was given, when it has one. Usable in place of `question_id` wherever a question is addressed.
- type stringrequired
Question type (e.g. text, multiple-choice, matrix, rating).
- question stringrequired
Question title (human-readable prompt).
- required boolean
- subtitle string
- show_subtitle boolean
- page_id string
ID of the page this question is on. Absent when the question has no page assignment.
- options array of object
Answer options for selection questions. Each option has a stable option_id and display label.
- option_id string
Stable opaque option identifier. Use in option_operations to rename, delete, or reorder. Absent on legacy options stored without one — echo the entry back without the key and the next write assigns a real identifier.
- label stringrequired
Display label for this option.
- ref string
The caller-chosen name this option was given, when it has one. Usable in place of `option_id` wherever an option is addressed. Absent on options nobody named — most of them.
- image_url string
The option's image, as the storage path it is held under. Present only on `image-single-choice` and `image-multiple-choice` options that have one. Send it back unchanged to keep the image, an `https` URL to replace it, or `null` to remove it. This is a path and not a link: to display the image, exchange it for a signed URL through the asset endpoints.
- option_id string
- matrix_rows array of object
Matrix row options with stable identifiers.
- option_id string
Stable opaque option identifier. Use in option_operations to rename, delete, or reorder. Absent on legacy options stored without one — echo the entry back without the key and the next write assigns a real identifier.
- label stringrequired
Display label for this option.
- ref string
The caller-chosen name this option was given, when it has one. Usable in place of `option_id` wherever an option is addressed. Absent on options nobody named — most of them.
- image_url string
The option's image, as the storage path it is held under. Present only on `image-single-choice` and `image-multiple-choice` options that have one. Send it back unchanged to keep the image, an `https` URL to replace it, or `null` to remove it. This is a path and not a link: to display the image, exchange it for a signed URL through the asset endpoints.
- option_id string
- matrix_columns array of object
Matrix column options with stable identifiers.
- option_id string
Stable opaque option identifier. Use in option_operations to rename, delete, or reorder. Absent on legacy options stored without one — echo the entry back without the key and the next write assigns a real identifier.
- label stringrequired
Display label for this option.
- ref string
The caller-chosen name this option was given, when it has one. Usable in place of `option_id` wherever an option is addressed. Absent on options nobody named — most of them.
- image_url string
The option's image, as the storage path it is held under. Present only on `image-single-choice` and `image-multiple-choice` options that have one. Send it back unchanged to keep the image, an `https` URL to replace it, or `null` to remove it. This is a path and not a link: to display the image, exchange it for a signed URL through the asset endpoints.
- option_id string
- min number
- max number
- scale_labels object
Optional labels for the min and max endpoints of a scale/rating question.
- min string
- max string
- allow_other boolean
- randomize_options boolean
- randomize_rows boolean
- min_selections number
- max_selections number
- content string
- image_url string
- content_image_paths array of string
- privacy_checkbox_label string
- file_types array of "pdf" | "docx" | "image"
`file-upload`: accepted files — `pdf`, `docx` (Word), `image` (JPEG and PNG).
- max_files integer
`file-upload`: how many files a participant may attach.
- availability object
When a `booking` or `scheduling-poll` question offers slots. An update replaces the whole object, so send the complete availability when changing it.
- mode "datetime" | "date"required
`datetime` offers time slots of `interval` minutes; `date` offers whole days.
- interval integerrequired
Slot length in minutes: 10, 15, 20, 30, 60.
- weekdays array of "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun"required
Offered weekdays in calendar order.
- hours array of objectrequired
Offered time ranges of a day, `HH:MM`, ascending and non-overlapping.
…nested fields omitted
- window object | objectrequired
Which dates are offered.
- excluded array of stringrequired
Dates (`YYYY-MM-DD`) not offered, ascending.
- timezone stringrequired
IANA time zone every slot is given in.
- mode "datetime" | "date"required
- capacity integer
`booking`: how many participants may book the same slot.
- min_notice_hours integer
`booking`: minimum lead time in hours before a slot can be booked.
- allow_multiple boolean
`scheduling-poll`: whether a participant may mark several slots.
- translations map of object
Optional per-locale translation payload and generation status keyed by BCP-47 locale. Treat `status` as authoritative: `pending` content may be a copy of the master-locale text.
- scoring object
- pages array of object
The survey's pages in order, including pages without questions. Absent until the survey has a page list. Until then, consecutive questions with the same `page_id` share a page, and a question without one is a page of its own.
- id stringrequired
Stable page ID. Questions name it in `page_id`, page logic rules in `target_page_id`, and `survey_edit` keeps the page with `{ "id": … }` in `pages`.
- title string
Page title, shown when `show_title` is true.
- subtitle string
Page subtitle, shown when `show_subtitle` is true.
- show_title boolean
Whether the title is shown. Absent means `false`.
- show_subtitle boolean
Whether the subtitle is shown. Absent means `false`.
- translations map of object
Per-locale page translations keyed by locale, with their status (`pending`, `ai_generated`, `reviewed`, or `outdated`).
- id stringrequired
- welcome_page objectrequired
Welcome page configuration, in the shape the write contract takes it.
- enabled boolean
- title string
- description string
- description_image_paths array of string
- end_page objectrequired
End page configuration, in the shape the write contract takes it.
- enabled boolean
- title string
- description string
- description_image_paths array of string
- appearance objectrequired
Appearance configuration in the same structure accepted on create and edit.
- template string
- primary_color string
- logo_url string
- display_mode "all" | "single" | "pages"
- show_progress boolean
- show_question_numbers boolean
- hide_branding boolean
- settings objectrequired
Settings: title, survey mode, languages, behavior, participation and mode/form options.
- quiz object
Quiz settings: answer feedback, score, pass mark and time limit. Applies while the survey mode is quiz. Send only the fields to change. The others keep their stored value or default.
- time_limit_seconds integer (nullable)
Time limit per participant in seconds, counted from the start of the attempt: with a welcome page from Start, otherwise from opening the link. The server enforces the deadline and grades the answers given when it runs out. Omitted or null when the quiz has no time limit.
- reveal "end" | "per_question"required
When participants see whether they answered correctly: per_question right after each answer (the answer is then locked), end on the final page. Default per_question. To show no solution feedback (Never in the app), set reveal=end and show_solutions=false.
- show_score booleanrequired
Show participants their points on the final page. Default true.
- show_solutions booleanrequired
Show the correct answers and explanations in the feedback. Default true.
- pass_threshold number (nullable)required
Percentage of the maximum points needed to pass (0 to 100), or null for no pass mark. Default null.
- passed_text string
Message shown to participants who reach the pass mark.
- failed_text string
Message shown to participants who stay below the pass mark.
- time_limit_seconds integer (nullable)
- live object
Live session defaults and presentation options. Applies while the survey mode is live. Send only the fields to change. The others keep their stored value or default.
- duration_seconds integer (nullable)required
Default length of a live session in seconds (1 to 86400), or null for no duration limit (until manually ended or the scheduled participation end). Default 600.
- show_room_code booleanrequired
Show the join QR code and the room code at the top of every presentation slide. Turn it off for livestreams or recordings. Default true.
- presentation_before_participation boolean
Open the presentation before participation. Visitors can start or resume the questionnaire from it. Default false.
- presentation_after_participation boolean
Offer results immediately after the participant completes their own response, via a button on the end page. false disables this access even when show_end_results is true.
- show_end_results booleanrequired
Allow completed participants to open results after the session ends when presentation_after_participation is unset. Default false.
- duration_seconds integer (nullable)required
- notifications object
Email notifications about new responses. Recipients must be the owner or collaborators.
- enabled booleanrequired
Send email notifications about new responses. Default true when the section is first sent.
- recipient_user_ids array of string (uuid)required
User IDs of the owner or collaborators who receive the notifications. Empty means the owner.
- frequency "immediate" | "daily"required
immediate sends one email per response. daily sends one summary per day. Default immediate.
- enabled booleanrequired
- url_params object
URL parameters, as in the Settings tab: incoming values of the participation link, and the outgoing target and values.
- incoming object
Incoming: values passed in the participation link, stored with each response and usable as response filters.
…nested fields omitted
- outgoing object
Outgoing: where participants go after submitting, and the values that travel along.
…nested fields omitted
- incoming object
- response_limit object
Stop accepting responses after a number of completed responses.
- enabled booleanrequired
Close participation once the limit is reached. Default true when the section is first sent.
- limit integerrequired
Number of completed responses after which participation closes.
- closed_text string
Message shown to visitors once the limit is reached. Omit for a default text.
- enabled booleanrequired
- confirmation object
Confirmation email to participants, sent to the address they entered in an email question.
- enabled booleanrequired
Send each participant a confirmation email after they submit. Default true when the section is first sent.
- email_question_id stringrequired
The email question whose answer receives the confirmation: its question_id, or the ref of a question created in the same request.
- subject stringrequired
Subject line of the confirmation email.
- body stringrequired
Text of the confirmation email. In a quiz, the participant's result follows it as the end page shows it: points and percentage while the quiz shows the score, and passed or failed when a pass mark is set.
- enabled booleanrequired
- once_per_browser object
One response per browser, in survey and quiz mode; a live vote ignores it. On the survey's own page, participants first consent in the cookie banner and cannot take part without it. After a participant with consent submits, the browser keeps a cookie for 90 days that stores no answers, and the survey refuses that browser another participation until it expires. Embedded surveys and the preview link show no banner and never set the cookie. Applies in every access mode.
- enabled booleanrequired
Allow one response per browser. Default true when the section is first sent.
- enabled booleanrequired
- auto_advance boolean
- master_locale string
- multi_language_enabled boolean
- additional_locales array of string
- title stringrequired
- survey_mode "survey" | "quiz" | "live"required
Survey mode: survey (classic survey), quiz (scored answers) or live (live polls in sessions with a presentation).
- quiz object
- share objectrequired
- access_mode "open" | "invite_only" (nullable)
Read-only access mode of this definition; it does not make access policy writable through survey_edit.
- access_mode "open" | "invite_only" (nullable)
- logic_rules array of objectrequired
The survey's logic rules as they stand. Change them with `logic_rule_operations` on `survey_edit`.
- rule_id stringrequired
Stable rule identifier accepted by survey_edit logic operations.
- question_id string
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- url_param string
Configured URL parameter used as this rule’s source instead of question_id.
- condition stringrequired
- values array of stringrequired
- action stringrequired
- target_question_id string
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- target_page_id string
Target page of a `skip-to-page`, `show-page` or `hide-page` rule, as listed in `pages`.
- rule_id stringrequired
- translations objectrequired
Survey-level translations, keyed the way `translations` takes them on write. Question translations are reported inside each question, not here.
- metadata map of object
Per-locale survey metadata translations and their generation status.
- metadata map of object
- updated_at string (nullable)required
When the stored working draft last changed. Null only when no working-draft row exists and the canonical survey is used as its effective draft.
- questions array of objectrequired
- published object (nullable)required
Most recently published definition, or null when the survey has never been published.
- settings objectrequired
Survey-level settings. The participation window applies immediately and is outside the draft/published definitions.
- schedule objectrequired
- start_at string (nullable)required
- end_at string (nullable)required
- schedule objectrequired
- share objectrequired
Survey-level Share state. Live-room admission is included only for the owner; results and presentation also require responses scope. Reading never creates links or room codes.
- participant objectrequired
- url string (uri)required
- code_protected booleanrequired
- preview object (nullable)required
- live object (nullable)
Canonical live-room admission, reported only to the owner. Null outside live mode or while no code is allocated. Reading never allocates or renews a code.
- results object (nullable)
- presentation object (nullable)
- participant objectrequired
- is_published booleanrequired
- status "draft" | "scheduled" | "live" | "ended"required
Effective respondent-facing state: `draft` is unpublished, `scheduled` is published but before `schedule.start_at`, `live` currently accepts responses, and `ended` is published but at or after `schedule.end_at`.
- role "owner" | "editor" | "viewer"required
- public_url stringrequired
Public survey URL.
- preview_url string
Preview URL showing the current working draft. Responses submitted via this link are not counted. A managed preview link is reported to its owner only.
- participant_access "open" | "code" | "invite_only"required
How participants get in right now: open (anyone with the link), code (the participant link asks for the six-digit code set with the web editor), or invite_only (personal invitation codes, the published access_mode). Unlike access_mode, the code takes effect immediately.
- collaborators array of object
The owner and active collaborators. Reported to owners and editors. Editors get no emails.
- user_id string (uuid)required
Use this ID in settings.notifications.recipient_user_ids.
- email string (nullable)
Account email, reported to the survey owner only. Null when it could not be read.
- display_name string (nullable)required
- role "owner" | "editor" | "viewer"required
- user_id string (uuid)required
- quiz_gate object | object | objectrequired
Whether `survey_publish` accepts the working draft as a quiz. `blocked` names what to fix. The same check refuses the publish with `quiz_not_ready`.
- has_pending_draft_changes booleanrequired
True when there are unpublished edits in the working draft.
- plan_gate object | object | objectrequired
Whether `survey_publish` would accept this draft under the owner's current plan. `blocked` names every uncovered feature, `clear` means no plan feature blocks publishing, and `unresolved` means the owner's plan could not be read. The editor shows the same list in its upgrade dialog before the publish button is pressed; this is that answer, ahead of the call. Resolved against the survey OWNER's plan — a collaborator's own upgrade cannot lift the gate.
- created_at stringrequired
ISO 8601 timestamp
- updated_at stringrequired
ISO 8601 timestamp
- id string (uuid)required
Example response
{
"ok": true,
"data": {
"version": 1,
"folder_id": null,
"id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"draft": {
"questions": [
{
"question_id": "q_a3f8d1b24e5c4c2a9d110f8b7e6a1c42",
"type": "single-choice",
"question": "Which product area do you use most?",
"required": true,
"options": [
{
"option_id": "opt_a1b2c3d4",
"label": "Dashboard"
},
{
"option_id": "opt_bbbb2222",
"label": "Reports"
},
{
"option_id": "opt_cccc3333",
"label": "API"
}
],
"allow_other": true
},
{
"question_id": "q_7b2f4e119c3a4a1d8e225f9d3b0a71e8",
"type": "multiple-choice",
"question": "Which features matter most to you?",
"options": [
{
"option_id": "opt_dddd4444",
"label": "Pricing"
},
{
"option_id": "opt_eeee5555",
"label": "Support"
},
{
"option_id": "opt_ffff6666",
"label": "Speed"
}
],
"randomize_options": true
},
{
"question_id": "q_3f8d4b217a954c6e89b12d5e7f1c9a34",
"type": "rating",
"question": "How would you rate our service?",
"required": true,
"min": 1,
"max": 5
},
{
"question_id": "q_6e2c9a745b384f1d92e78a4c7b3d1f05",
"type": "nps",
"question": "How likely are you to recommend us?",
"required": true
}
],
"welcome_page": {
"enabled": true,
"title": "Welcome!"
},
"end_page": {
"enabled": true,
"title": "Thank you!"
},
"settings": {
"auto_advance": true,
"master_locale": "en-US",
"title": "Customer Satisfaction Q2 draft",
"survey_mode": "survey",
"url_params": {
"outgoing": {
"action": "none"
}
}
},
"logic_rules": [],
"translations": {},
"updated_at": "2026-04-05T10:15:00.000Z",
"appearance": {
"template": "standard",
"primary_color": "#4F46E5",
"display_mode": "single",
"show_progress": true,
"show_question_numbers": true
},
"share": {
"access_mode": "open"
}
},
"published": {
"questions": [
{
"question_id": "q_a3f8d1b24e5c4c2a9d110f8b7e6a1c42",
"type": "single-choice",
"question": "Which product area do you use most?",
"required": true,
"options": [
{
"option_id": "opt_a1b2c3d4",
"label": "Dashboard"
},
{
"option_id": "opt_bbbb2222",
"label": "Reports"
},
{
"option_id": "opt_cccc3333",
"label": "API"
}
],
"allow_other": true
},
{
"question_id": "q_7b2f4e119c3a4a1d8e225f9d3b0a71e8",
"type": "multiple-choice",
"question": "Which features matter most to you?",
"options": [
{
"option_id": "opt_dddd4444",
"label": "Pricing"
},
{
"option_id": "opt_eeee5555",
"label": "Support"
},
{
"option_id": "opt_ffff6666",
"label": "Speed"
}
],
"randomize_options": true
},
{
"question_id": "q_3f8d4b217a954c6e89b12d5e7f1c9a34",
"type": "rating",
"question": "How would you rate our service?",
"required": true,
"min": 1,
"max": 5
},
{
"question_id": "q_6e2c9a745b384f1d92e78a4c7b3d1f05",
"type": "nps",
"question": "How likely are you to recommend us?",
"required": true
}
],
"welcome_page": {
"enabled": true,
"title": "Welcome!"
},
"end_page": {
"enabled": true,
"title": "Thank you!"
},
"settings": {
"auto_advance": true,
"master_locale": "en-US",
"title": "Customer Satisfaction Q1",
"survey_mode": "survey",
"url_params": {
"outgoing": {
"action": "none"
}
}
},
"logic_rules": [],
"translations": {},
"version": 7,
"appearance": {
"template": "standard",
"primary_color": "#4F46E5",
"display_mode": "single",
"show_progress": true,
"show_question_numbers": true
},
"share": {
"access_mode": "open"
}
},
"is_published": true,
"status": "ended",
"role": "owner",
"public_url": "https://www.empirio.ai/s/9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"preview_url": "https://www.empirio.ai/p/7c1e5a90-3b42-4d8f-9a6b-1e2f3a4b5c6d",
"share": {
"participant": {
"url": "https://www.empirio.ai/s/9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"code_protected": false
},
"preview": {
"url": "https://www.empirio.ai/p/7c1e5a90-3b42-4d8f-9a6b-1e2f3a4b5c6d",
"code_protected": false
},
"live": null,
"results": null,
"presentation": null
},
"has_pending_draft_changes": true,
"plan_gate": {
"status": "clear"
},
"participant_access": "open",
"collaborators": [
{
"user_id": "0f4b8a12-3c5d-4e6f-9a7b-8c9d0e1f2a3b",
"email": "owner@example.com",
"display_name": "Alex Owner",
"role": "owner"
},
{
"user_id": "7a1c2b3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"email": "editor@example.com",
"display_name": null,
"role": "editor"
}
],
"quiz_gate": {
"status": "not_quiz"
},
"created_at": "2026-01-12T09:24:00.000Z",
"updated_at": "2026-04-02T16:03:18.000Z",
"settings": {
"schedule": {
"start_at": null,
"end_at": "2026-04-30T21:59:59Z"
}
}
}
}patch/surveys/{survey_id}
Update survey
Update a survey's working draft and survey-level sharing. Draft edits need a separate publish. Include only the sections you want to change as top-level fields.
settings.schedule, share.results and share.presentation apply immediately in either edit mode, without publishing draft content. Results and presentation require the owner and the responses scope in addition to surveys. share.results: {} prepares a coded link with summary only, charts and individual responses off, and personal questions omitted. Send only the visibility fields to change; omitted fields, existing link URLs and access codes are retained. An explicit share.results.filter replaces the whole filter; {} clears it. share.presentation: {} prepares a coded presentation link for canonical or working-draft live mode. The response returns the configured links under share and a changed participation window under settings.schedule; survey_get reads both again. settings.response_limit, settings.once_per_browser and the other settings are draft settings and take effect on publishing.
In AI mode, explicit draft sections are ignored; immediate sharing fields still apply. settings.survey_mode changes only the working draft; use POST /surveys/{survey_id}/mode for an immediate effective mode change.
Re-sending an edit whose result already matches the draft is safe: it answers 200 with an empty applied_changes and a warning saying nothing was changed, rather than a conflict. A 409 from this operation means a genuine concurrent modification.
All field-level details and supported operation variants are documented directly in the request schema attributes.
See the request-body Examples for complete manual editing scenarios.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | The survey ID to edit |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
Required
- mode "manual" | "ai"required
'ai' has the survey assistant generate the changes from ai_prompt. Prefer it for content changes. 'manual' applies the sections sent. Use it for a targeted change to a known field with a known value.
- question_operations array of object | object | object | object
Question operations (`add`, `update`, `delete`, `reorder`). At most 1000 operations per request.
- pages array of object | object
The complete page list in its new order. `{ "id": … }` keeps an existing page, under the ID `survey_get` reports. `{ "ref": … }` adds a page, and the response reports its ID under `page_ids_by_ref`. Moving an entry moves the page together with its questions. Fields left out of an entry keep their stored value, an empty string clears a text and `false` hides it. A page missing from the list is removed. If it still holds questions, the same request must delete them or move them to another page with `page_id`. Leave `pages` out to keep the pages as they are. A question added without `page_id` gets a page of its own. Page logic actions need `appearance.display_mode: "pages"`. Manual mode only.
- option_operations array of object | object | object | object | object
Option operations (`add`, `rename`, `delete`, `reorder`, `copy`). At most 1000 operations per request.
- welcome_page object
Partial welcome-page patch.
- enabled boolean
Whether the welcome page is shown before the first question.
- title string
Welcome page title.
- title_alignment "left" | "center" | "right" | "justify"
Alignment of the welcome page title: `left`, `center`, `right` or `justify`. Without it the title is centered.
- description string
Welcome page description. Rich text: at most 3000 characters of text, markup not counted. HTML in block elements — `<p>`, `<h2>`, `<ul>` or `<ol>` with `<li>` — holding text, `<br>`, `<strong>`, `<em>`, `<u>` and links as `<a href>`. A link takes an http, https, mailto or tel address and opens in a new tab for participants. Unsupported tags and attributes are removed and their text kept (`<script>` and `<style>` go with their content). An href with any other address is dropped, and the link shows as plain text. Plain text without tags is accepted too.
- description_image_paths array of string
Storage paths of the images embedded in the welcome page `description` (at most 50). The editor derives this from the description HTML; send back what `survey_get` returned.
- enabled boolean
- end_page object
Partial end-page patch.
- enabled boolean
Whether the end page is shown after the final question.
- title string
Custom end-page title. If omitted, the default title is used.
- title_alignment "left" | "center" | "right" | "justify"
Alignment of the end page title: `left`, `center`, `right` or `justify`. Without it the title is centered.
- description string
Custom end-page description text. If omitted, the default text is used. Rich text: at most 3000 characters of text, markup not counted. HTML as in `welcome_page.description`, without links: an `<a>` is removed and its text kept.
- description_image_paths array of string
Storage paths of the images embedded in the end page `description` (at most 50). The editor derives this from the description HTML; send back what `survey_get` returned.
- show_title boolean
Explicit title visibility toggle. Use `false` to hide the title even if `title` is set.
- show_description boolean
Explicit description visibility toggle. Use `false` to hide the description even if it exists.
- show_custom_button boolean
Show a button with your own text and link. Cannot be `true` together with `hide_default_button`. When enabled in an edit, clears `hide_default_button` if that setting is omitted.
- hide_default_button boolean
Remove the button from the end page. Cannot be `true` together with `show_custom_button`. When enabled in an edit, clears `show_custom_button` if that setting is omitted.
- custom_button_text string
Button label shown on the end page.
- custom_button_url string
Destination URL opened by the button. The automatic redirect goes to the same address: it is one stored field with `settings.url_params.outgoing.url`.
- redirect_delay string
Countdown before the automatic redirect (`settings.url_params.outgoing`) while this page is shown, as a string of seconds such as `"5"`.
- enabled boolean
- logic_rule_operations array of object | object | object
Logic-rule operations (`add`, `update`, `delete`). At most 200 operations per request; a survey may hold at most 200 logic rules in total (enforced on write).
- appearance object
Appearance: `template`, `primary_color`, `logo_url`, `display_mode`, `show_progress`, `show_question_numbers` and `hide_branding`. `logo_url` takes either the storage asset path `survey_get` returned (`<owner_id>/<survey_id>/…`) or an `https` URL to import, and `null` removes the logo.
- template "standard" | "modern" | "cosmos" | "aurora" | "nebula" | "eclipse" | "forest" | "amber"
Visual survey template. Available: `standard` (light, default), `modern` (dark), `cosmos` (dark, depth), `aurora` (light, gradient), `nebula` (dark, purple), `eclipse` (dark, purple accent), `forest` (dark, green), `amber` (dark, blue).
- primary_color string
Primary accent color as a CSS hex color — `#RGB`, `#RGBA`, `#RRGGBB` or `#RRGGBBAA` (for example `#4F46E5`).
- logo_url string (nullable)
Survey logo, in either of the two forms it takes. A **storage path** — `<owner_id>/<survey_id>/…`, what `survey_get` returns — keeps or restores an image that is already stored. An **`https` URL** imports one: the write fetches it, verifies it is a PNG, JPEG or WebP within the size and dimension limits, stores it, and the survey keeps the resulting path. At most 512 characters either way. `null` removes the logo.
- display_mode "all" | "single" | "pages"
Question layout: `all` shows every question on one page, `single` shows one question per page, and `pages` shows the pages listed in `pages`, each with the questions that name it in `page_id`. Default on create: `all` for survey, `single` for quiz and live; template creation keeps the template layout and AI-generated pages keep `pages`. survey_edit keeps the current layout unless it is supplied.
- show_progress boolean
Whether to show a progress indicator during completion.
- show_question_numbers boolean
Whether to show numeric question labels (1, 2, 3...).
- hide_branding boolean
Whether to hide empirio.ai branding in the survey footer.
- template "standard" | "modern" | "cosmos" | "aurora" | "nebula" | "eclipse" | "forest" | "amber"
- settings object
Settings patch: title, survey mode, languages, behavior, participation and feature settings.
- quiz object
Quiz settings: answer feedback, score, pass mark and time limit. Applies while the survey mode is quiz. Send only the fields to change. The others keep their stored value or default.
- time_limit_seconds integer (nullable)
Time limit per participant in seconds (1 to 86400), or null for no time limit. Counted from the start of the attempt: with a welcome page from Start, otherwise from opening the link. The server enforces the deadline and grades the answers given when it runs out. Default no time limit.
- reveal "end" | "per_question"
When participants see whether they answered correctly: per_question right after each answer (the answer is then locked), end on the final page. Default per_question. To show no solution feedback (Never in the app), set reveal=end and show_solutions=false.
- show_score boolean
Show participants their points on the final page. Default true.
- show_solutions boolean
Show the correct answers and explanations in the feedback. Default true.
- pass_threshold number (nullable)
Percentage of the maximum points needed to pass (0 to 100), or null for no pass mark. Default null.
- passed_text string
Message shown to participants who reach the pass mark.
- failed_text string
Message shown to participants who stay below the pass mark.
- time_limit_seconds integer (nullable)
- live object
Live session defaults and presentation options. Applies while the survey mode is live. Send only the fields to change. The others keep their stored value or default.
- duration_seconds integer (nullable)
Default length of a live session in seconds (1 to 86400), or null for no duration limit (until manually ended or the scheduled participation end). Default 600.
- show_room_code boolean
Show the join QR code and the room code at the top of every presentation slide. Turn it off for livestreams or recordings. Default true.
- presentation_before_participation boolean
Open the presentation before participation. Visitors can start or resume the questionnaire from it. Default false.
- presentation_after_participation boolean
Offer results immediately after the participant completes their own response, via a button on the end page. false disables this access even when show_end_results is true.
- show_end_results boolean
Allow completed participants to open results after the session ends when presentation_after_participation is unset. Default false.
- duration_seconds integer (nullable)
- notifications object
Email notifications about new responses. Recipients must be the owner or collaborators.
- enabled boolean
Send email notifications about new responses. Default true when the section is first sent.
- recipient_user_ids array of "me" | string (uuid)
Who receives the notifications (up to 100): user IDs of the owner or collaborators, as `survey_get` lists them under `collaborators`, or "me" for your own account. An empty list notifies the owner. Replaces the stored list.
- frequency "immediate" | "daily"
immediate sends one email per response. daily sends one summary per day. Default immediate.
- enabled boolean
- url_params object
URL parameters, as in the Settings tab: incoming values of the participation link, and the outgoing target and values. Send only the parts to change.
- incoming object
Incoming: values passed in the participation link, stored with each response and usable as response filters.
- parameters array of object
Parameters to capture (up to 20): the defined parameters are captured, an empty list captures none. Replaces the stored list.
- name stringrequired
Parameter name as it appears in the URL: a letter, then letters, digits or underscores (up to 64 characters).
- question_id string
Question to prefill with the parameter's value: its question_id, or the ref of a question created in the same request. Participants can still change it, unless hide_when_prefilled is true. A link value fills text, long text, email, phone, number, yes-no, single choice, image single choice and dropdown questions. A parameter on another type is accepted with a warning and prefills nothing. Omit to store the value only.
- hide_when_prefilled boolean
true: when the link supplies a valid value for this parameter, participants do not see the question, and it is answered with that value. Without a valid value the question shows as usual. Needs question_id. In a quiz, a scored question is always shown. false or omitted: the question always shows.
- name stringrequired
- parameters array of object
- outgoing object
Outgoing: where participants go after submitting, and the values that travel along.
- action "none" | "redirect" | "own_button"
Where participants go after submitting. none: nowhere, the end page keeps the empirio.ai button; it restores that button while a target is on and changes nothing otherwise. redirect: to url, straight away without the end page and after the end page's redirect_delay with it; live mode has no redirect, a stored one shows the own button there. own_button: a button with url on the end page, which needs the end page on (end_page.enabled true, stored or in this request). redirect and own_button turn on the own button's flags and cannot be combined with end_page.hide_default_button true or end_page.show_custom_button false.
- url string
Target address. It is the same stored field as end_page.custom_button_url: a request that sends both with different values is refused. Without a usable address nobody is sent on.
- delay integer
Seconds the end page counts down before the redirect (0 to 30); without the end page participants go on straight away. It is the same stored field as end_page.redirect_delay: a request that sends both with different values is refused. Sent while action is not redirect, it is stored with a warning and counts once the redirect is on.
- parameters array of object
Parameters appended to the target address (up to 20) while action is not none; action none keeps them. Participants can see and change values in an address; a webhook is the reliable channel. Replaces the stored list.
- name stringrequired
Parameter name as it appears in the URL: a letter, then letters, digits or underscores (up to 64 characters).
- source "url_param" | "answer" | "quiz_result" | "quiz_correct"required
Where the value comes from: url_param for a captured URL parameter, answer for a participant's answer, quiz_result for the quiz result (passed is 1 or 0, score in points, percentage), quiz_correct for whether a scored question was answered correctly (1 or 0). The quiz sources carry a value in quiz mode only, also when the quiz hides score or solutions from participants.
- source_id stringrequired
For url_param the name of the captured URL parameter; for answer and quiz_correct the question_id (or same-request ref) of the question; for quiz_result one of passed, score, percentage.
- name stringrequired
- action "none" | "redirect" | "own_button"
- incoming object
- confirmation object
Confirmation email to participants, sent to the address they entered in an email question.
- enabled boolean
Send each participant a confirmation email after they submit. Default true when the section is first sent.
- email_question_id string
The email question whose answer receives the confirmation: its question_id, or the ref of a question created in the same request.
- subject string
Subject line of the confirmation email.
- body string
Text of the confirmation email. In a quiz, the participant's result follows it as the end page shows it: points and percentage while the quiz shows the score, and passed or failed when a pass mark is set.
- enabled boolean
- auto_advance boolean
Whether the respondent flow automatically advances after a question is answered when the question type supports it. Defaults to true, which is also the editor's default — omit this field unless the user asked for something else. Set it to false only on an explicit request to make respondents press the continue button after every question.
- master_locale string
Primary survey language. Supported: `en-US`, `en-GB`, `de-DE`, `de-AT`, `de-CH`, `fr-FR`, `es-ES`, `it-IT`, `nl-NL`.
- multi_language_enabled boolean
Whether multi-language answering is enabled.
- additional_locales array of string
Additional enabled languages. Supported: `en-US`, `en-GB`, `de-DE`, `de-AT`, `de-CH`, `fr-FR`, `es-ES`, `it-IT`, `nl-NL`.
- title string
Survey title shown to respondents and in the dashboard.
- survey_mode "survey" | "quiz" | "live"
Survey mode: survey, quiz or live. On edit this changes only the working draft; survey_mode_update changes the effective mode immediately. Omit on edit to retain the mode; on template creation to retain the template mode; otherwise creation defaults to survey. Not the top-level manual/ai `mode`. Switching to quiz turns on scoring (1 point) for every scorable question that has none, and the response warns about questions that still need a solution. Switching preserves inactive settings and solutions.
- schedule object
Participation window. Applies immediately, independently of publishing and of the working draft.
- start_at string (nullable)
When the survey activates itself. `null` removes the start and leaves the survey open from the moment it is published.
- end_at string (nullable)
When the survey deactivates itself. Must be later than `start_at`. `null` removes the end and leaves the survey open indefinitely.
- start_at string (nullable)
- response_limit object
Stop accepting responses after a number of completed responses. Part of the working draft: takes effect on publishing.
- enabled boolean
Close participation once the limit is reached. Default true when the section is first sent.
- limit integer
Number of completed responses after which participation closes.
- closed_text string
Message shown to visitors once the limit is reached. Omit for a default text.
- enabled boolean
- once_per_browser object
One response per browser, in survey and quiz mode; a live vote ignores it. On the survey's own page, participants first consent in the cookie banner and cannot take part without it. After a participant with consent submits, the browser keeps a cookie for 90 days that stores no answers, and the survey refuses that browser another participation until it expires. Embedded surveys and the preview link show no banner and never set the cookie. Applies in every access mode. Part of the working draft: takes effect on publishing.
- enabled boolean
Allow one response per browser. Default true when the section is first sent.
- enabled boolean
- quiz object
- share object
Results and presentation sharing. Applies immediately in either edit mode, without publishing draft content. Owner and responses scope required.
- results object
Ensures a coded results link and immediately patches supplied fields. Omitted settings remain unchanged. A new link shows summary only and omits personal questions.
- summary boolean
- charts boolean
- responses boolean
- omit_personal boolean
- filter object
Replaces the complete stored filter; {} clears it. Omit to retain it.
- date_from string (date) | string (date-time) | string
Include responses submitted at or after this ISO 8601 date or date-time (UTC day boundary for a bare date).
- date_to string (date) | string (date-time) | string
Include responses submitted at or before this ISO 8601 date or date-time (UTC day boundary for a bare date).
- session_id string (uuid) (nullable)
One live session, or null for responses given outside any live session. Do not combine with session_ids.
- session_ids array of string (uuid) (nullable)
Several live sessions (up to 100). Include null for responses given outside any live session. Omit both session fields for all responses. Send an array such as ["<id>",null].
- score_min number
Inclusive minimum quiz score in points.
- score_max number
Inclusive maximum quiz score in points.
- passed boolean
Only responses that passed (true) or did not pass (false) the quiz.
- url_params map of string
Only responses whose captured URL parameters match these exact values, e.g. {"source": "newsletter"}.
- answer_filters array of object | object
Answer conditions (up to 200). Email, phone and privacy questions cannot be used.
- date_from string (date) | string (date-time) | string
- presentation object
Ensures a coded presentation link. Requires canonical or intended working-draft live mode.
- results object
- translations object
Translation patches for metadata and question content.
- metadata map of object
Per-locale metadata translation patches keyed by locale.
- questions map of map of object
Per-locale question translation patches keyed by locale then `question_id`.
- metadata map of object
- ai_prompt string
Instruction for the survey assistant (ai mode only).
Example — Adds a dropdown question at the end of the survey.
{
"mode": "manual",
"question_operations": [
{
"op": "add",
"position": {
"type": "end"
},
"question": {
"type": "dropdown",
"question": "Select your department:",
"options": [
"Engineering",
"Marketing",
"Sales",
"Support",
"HR"
],
"required": true
}
}
]
}Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `survey_edit`.
- id string (uuid)required
Survey ID (UUID)
- page_ids_by_ref map of string
Server-assigned page IDs keyed by the new pages' request-local refs. Present only when pages were created with refs. Use these IDs on subsequent edits; page refs are not stored.
- warnings array of string
- settings object
`schedule` is the participation window as it now stands, present only when the request carried `settings.schedule`. Both instants are reported even when the request named one of them. It is already in effect and sits outside draft applied_changes.
- schedule object
- start_at string (nullable)required
- end_at string (nullable)required
- schedule object
- share object
Requested immediately effective sharing configuration. Outside draft applied_changes.
- results object
- url string (uri)required
- access_code string (nullable)required
- summary booleanrequired
- charts booleanrequired
- responses booleanrequired
- omit_personal booleanrequired
- filter objectrequired
- date_from string (date) | string (date-time) | string
Include responses submitted at or after this ISO 8601 date or date-time (UTC day boundary for a bare date).
- date_to string (date) | string (date-time) | string
Include responses submitted at or before this ISO 8601 date or date-time (UTC day boundary for a bare date).
- session_id string (uuid) (nullable)
One live session, or null for responses given outside any live session. Do not combine with session_ids.
- session_ids array of string (uuid) (nullable)
Several live sessions (up to 100). Include null for responses given outside any live session. Omit both session fields for all responses. Send an array such as ["<id>",null].
- score_min number
Inclusive minimum quiz score in points.
- score_max number
Inclusive maximum quiz score in points.
- passed boolean
Only responses that passed (true) or did not pass (false) the quiz.
- url_params map of string
Only responses whose captured URL parameters match these exact values, e.g. {"source": "newsletter"}.
- answer_filters array of object | object
Answer conditions (up to 200). Email, phone and privacy questions cannot be used.
- date_from string (date) | string (date-time) | string
- presentation object
- url string (uri)required
- access_code string (nullable)required
- results object
- applied_changes objectrequired
Summary of what the edit actually changed. Added/updated/deleted entries carry `question_id` so callers can correlate applied changes against cached references.
- question_changes objectrequired
- added array of objectrequired
- question_id string (nullable)required
- ref string
The `ref` the request gave this question, when it gave one. Present only for caller-chosen names — an id the server minted internally names nothing the caller can look up.
- question stringrequired
- type stringrequired
- position map of objectrequired
- updated array of objectrequired
- question_id stringrequired
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- changed_fields array of stringrequired
- question_id stringrequired
- deleted array of objectrequired
- question_id stringrequired
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- question stringrequired
- type stringrequired
- question_id stringrequired
- reordered booleanrequired
- added array of objectrequired
- logic_rule_changes objectrequired
- added integerrequired
- updated integerrequired
- deleted integerrequired
Rules actually removed from the resulting draft, including rules removed automatically because a referenced question was deleted.
- added_rule_ids array of stringrequired
The `rule_id` of each logic rule this call created, in the order they were added. Use them directly in a later `logic_rule_operations` update or delete instead of re-reading the survey. Shorter than `added` when the server discarded a rule it could not reconcile — `added` counts requested operations, this counts rules that exist.
- appearance_changes map of object
- welcome_page_changes map of object
- end_page_changes map of object
- settings_changes map of object
- translation_changes_summary map of object
- option_changes object
Summary of option-level changes applied by option_operations.
- added array of objectrequired
Options added, each with the identifier it was assigned — no follow-up `survey_get` needed to address what you just created.
- question_id stringrequired
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- label stringrequired
- option_id string
The identifier assigned to this option. Present whenever the option was created, including on a question this same request created.
- ref string
The `ref` you gave this option, when you gave one.
- image_url string
The durable storage path assigned to the option image. Present when this add set an image.
- question_id stringrequired
- renamed array of objectrequired
- question_id stringrequired
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- option_id stringrequired
- label stringrequired
- image_url string (nullable)
The durable storage path when this rename set an image, or null when it removed one. Omitted when the image was unchanged.
- question_id stringrequired
- deleted array of objectrequired
- question_id stringrequired
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- option_id stringrequired
- question_id stringrequired
- reordered array of objectrequired
- question_id stringrequired
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- field "options" | "matrix_rows" | "matrix_columns"required
- question_id stringrequired
- added array of objectrequired
- question_changes objectrequired
- id string (uuid)required
Example response
{
"ok": true,
"data": {
"id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"applied_changes": {
"question_changes": {
"added": [
{
"question_id": "q_new-b1c4d5e6-7a8b-4c9d-0e1f-2a3b4c5d6e7f",
"question": "Any other feedback?",
"type": "text",
"position": {
"type": "end"
}
}
],
"updated": [
{
"question_id": "q_a3f8d1b24e5c4c2a9d110f8b7e6a1c42",
"changed_fields": [
"question",
"required"
]
}
],
"deleted": [],
"reordered": false
},
"logic_rule_changes": {
"added": 0,
"updated": 0,
"deleted": 0,
"added_rule_ids": []
},
"option_changes": {
"added": [
{
"question_id": "q_7b2f4e119c3a4a1d8e225f9d3b0a71e8",
"label": "New Feature"
}
],
"renamed": [
{
"question_id": "q_a3f8d1b24e5c4c2a9d110f8b7e6a1c42",
"option_id": "opt_a1b2c3d4",
"label": "Main Dashboard"
}
],
"deleted": [],
"reordered": []
},
"settings_changes": {
"title": "Customer Satisfaction Q1 — Updated"
}
}
}
}delete/surveys/{survey_id}
Delete survey
Delete a survey and its responses. Owner only. Takes effect immediately and cannot be undone through the API.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID to delete. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `survey_delete`.
- deleted truerequired
Example response
{
"ok": true,
"data": {
"deleted": true
}
}post/surveys/{survey_id}/publish
Publish survey
Publish the existing survey working draft. If already published, updates the published survey from the current working draft. Does not create new surveys or accept inline content edits. Returns public_url plus effective status; a future schedule returns scheduled and a public_url_note instead of implying the URL already accepts responses.
Publishing a draft that leaves live mode ends its active live session or rehearsal. A quiz is refused with quiz_not_ready (and error.context: reason, question_ids) while an enabled question lacks a solution or nothing is scored. survey_get.quiz_gate answers the same before the call.
Plan-gated features. Publishing is refused with plan_features_exceeded when the survey uses a feature the survey OWNER's plan does not include (a collaborator's own plan is not read). survey_get.plan_gate answers the same question before the call, and survey_create / survey_edit warn as soon as a draft crosses the line.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Existing survey ID to publish |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `survey_publish`.
- id string (uuid)
Survey ID (UUID)
- public_url stringrequired
Public survey URL. Always show this link to the user after publishing.
- status "draft" | "scheduled" | "live" | "ended"required
Effective respondent-facing state: `draft` is unpublished, `scheduled` is published but before `schedule.start_at`, `live` currently accepts responses, and `ended` is published but at or after `schedule.end_at`.
- public_url_note string
Present when the survey is scheduled: explains when the public URL starts accepting responses.
- id string (uuid)
Example response
{
"ok": true,
"data": {
"id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"public_url": "https://www.empirio.ai/s/9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"status": "live"
}
}post/surveys/{survey_id}/unpublish
Unpublish survey
Unpublish a survey and move it back to draft status. Owner or editor — taking a survey off-line is the inverse of putting it on-line, and the same collaborators may do both. Unpublishing ends an active live session or rehearsal and finalizes its participations.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID to unpublish. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `survey_unpublish`.
- id string (uuid)
Survey ID (UUID)
- is_published false
- id string (uuid)
Example response
{
"ok": true,
"data": {
"id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"is_published": false
}
}post/surveys/{survey_id}/revert-draft
Revert survey draft
Replace a survey's working draft with the currently published version, discarding every unpublished edit. The discarded draft cannot be recovered through the API; the live survey and its responses are unaffected.
A survey that has never been published answers 400 — there is no published version to fall back on. A draft that already matches the published version answers 200 with discarded: false. Before and after question counts are snapshot sizes and may be equal despite additions, removals, or modifications. A 409 means a concurrent modification.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey whose working draft is replaced by the currently published version. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `survey_revert_draft`.
- id string (uuid)required
Survey ID (UUID)
- discarded booleanrequired
True when the working draft held unpublished work that this call replaced. False when the draft already matched the published version — a success, with nothing lost.
- discarded_changes objectrequired
What the revert cost. Present on every success; all-empty when nothing was discarded.
- sections array of stringrequired
Legacy snapshot section names, retained for diagnostic compatibility. Which parts of the survey the discarded draft differed in: `questions`, `metadata`, `logic_rules`, `welcome_page`, `end_page`, `design`, `settings`, `translations`, `access_mode`, `ai_context`. These name the stored snapshot parts rather than the canonical configuration tabs. `questions` is changed through `question_operations`, and `logic_rules`, through `logic_rule_operations`. Empty when nothing was discarded.
- question_count_before integerrequired
How many questions the discarded working draft held. This is a snapshot size, not a count of changes; equality with `question_count_after` does not mean that no questions were added, removed, or modified.
- question_count_after integerrequired
How many questions the survey has now, from the published version. This is a snapshot size, not a change indicator; inspect the question change lists even when the before and after counts are equal.
- questions_added_in_draft array of objectrequired
Questions that existed only in the draft. They are gone; their wording is reported so it can be re-entered.
- question_id string (nullable)required
- question stringrequired
- questions_removed_in_draft array of objectrequired
Questions the draft had deleted. They are back, with the answers they had already collected.
- question_id string (nullable)required
- question stringrequired
- questions_modified_in_draft array of objectrequired
Questions that exist on both sides but differ. The wording reported is the draft's — the version being discarded.
- question_id string (nullable)required
- question stringrequired
- sections array of stringrequired
- warnings array of string
- id string (uuid)required
Example response
{
"ok": true,
"data": {
"id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"discarded": true,
"discarded_changes": {
"sections": [
"metadata",
"questions"
],
"question_count_before": 6,
"question_count_after": 5,
"questions_added_in_draft": [
{
"question_id": "q_6e2c9a745b384f1d92e78a4c7b3d1f05",
"question": "How likely are you to recommend us?"
}
],
"questions_removed_in_draft": [],
"questions_modified_in_draft": [
{
"question_id": "q_a3f8d1b24e5c4c2a9d110f8b7e6a1c42",
"question": "Which colour do you prefer?"
}
]
}
}
}post/surveys/{survey_id}/duplicate
Duplicate survey
Create a copy of an existing survey (unpublished draft). Owner only: the copy is a new survey owned by the caller, so it leaves the source survey's collaboration entirely. Question, option, matrix-axis and logic-rule IDs are regenerated, and logic references are remapped to those new IDs. The copy has no publication schedule. Counts against the same creation quota as survey_create (10 per hour, 50 per day per account).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID to duplicate |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `survey_duplicate`. `id` is the new draft survey's UUID. The copy is always an unpublished draft, so `public_url` only becomes functional after publishing — use `preview_url` to look at it before then. It has no publication schedule and carries new question, option, matrix-axis and logic-rule IDs, with logic references remapped to those new IDs.
- id string (uuid)
Survey ID (UUID)
- public_url string
- public_url_note string
- preview_url string
Preview URL showing the current working draft. Responses submitted via this link are not counted.
- created object
Every new question and option identifier in the copy. Use these IDs for later edits without a follow-up survey_get.
- questions array of objectrequired
- question_id stringrequired
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- options array of object
- option_id stringrequired
- field "options" | "matrix_rows" | "matrix_columns"required
- question_id stringrequired
- questions array of objectrequired
- id string (uuid)
Example response
{
"ok": true,
"data": {
"id": "d4e5f6a7-8b9c-4d0e-9f1a-2b3c4d5e6f70",
"public_url": "https://www.empirio.ai/s/d4e5f6a7-8b9c-4d0e-9f1a-2b3c4d5e6f70",
"public_url_note": "Survey is not published yet. This link will only work after publishing.",
"preview_url": "https://www.empirio.ai/p/7c1e5a90-3b42-4d8f-9a6b-1e2f3a4b5c6d"
}
}Responses
List, aggregate, export, cross-tabulate, and delete survey responses.
get/surveys/{survey_id}/responses
List responses
List unlocked survey participations newest first, each with a stable opaque response_id and a newest-first row ranking (row_no) for chronologically ordered lists without session, quiz or URL-parameter filters. Filtered or quiz-sorted rows report row_no: null; use response_id for deletion. Supports order and an exclusive since watermark for polling clients. Returns full answers and response metadata without internal IDs, including survey_mode, the live session_id and session_name, captured url_params and, for quizzes, quiz_result. Filter by live session (session_id / session_ids), quiz score (score_min / score_max), passed and url_params.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| session_id | query | string (uuid) (nullable) | No | One live session, or null for responses given outside any live session. Do not combine with session_ids. |
| session_ids | query | array of string (uuid) (nullable) | No | Several live sessions (up to 100). Include null for responses given outside any live session. Omit both session fields for all responses. Send an array such as ["<id>",null]. |
| score_min | query | number | No | Inclusive minimum quiz score in points. |
| score_max | query | number | No | Inclusive maximum quiz score in points. |
| passed | query | boolean | No | Filter by the stored quiz pass result. |
| url_params | query | map of string | No | Exact captured URL parameter matches, as an object keyed by parameter name. |
| sort_by | query | "score" | "passed" | No | Sort submitted responses by quiz score or pass result before pagination. Ungraded values come last; ties use newest-first timestamp and ID. Cannot be combined with order or include_incomplete_participations. row_no is null; use response_id for deletion. |
| sort_direction | query | "asc" | "desc" | No | Direction for sort_by; defaults to desc. Requires sort_by. |
| date_from | query | string | No | ISO 8601 date filter start |
| date_to | query | string | No | ISO 8601 date filter end |
| since | query | string | No | ISO 8601 date-time with a UTC offset (e.g. 2026-04-05T14:22:31.123456Z). Exclusive lower bound on the participation timestamp — the same field returned as `created_at` — so a polling client can pass the newest `created_at` it has already seen and receive only what arrived after it. Combines with `date_from`/`date_to` as an additional filter: the later of `since` and `date_from` wins, `date_to` still caps the upper end. |
| order | query | "asc" | "desc" | No | Emission order of the page. Default `desc` (newest first). `row_no` is the newest-first rank regardless of this setting for chronological lists without session, quiz or URL-parameter filters. Those filtered lists and quiz-sorted lists return `row_no: null`; delete by `response_id`. `asc` cannot be combined with `include_incomplete_participations`. Prefer `desc` with `since` for polling: an ascending page derives its window from the current total, so a response submitted mid-request shifts it. |
| include_incomplete_participations | query | boolean | No | Include incomplete participations with meaningful saved progress |
| limit | query | integer | No | Default 100 |
| offset | query | integer | No | Zero-based pagination offset. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `responses_list`.
- responses array of objectrequired
- response_id stringrequired
Stable opaque participation identifier (`resp_…` for submitted responses, `part_…` for incomplete participations). Derived from the participation, never a database key, and identical to the `response_id` the webhook payload carries — use it as the join key between polled rows and webhook deliveries, and as the dedupe key for polling triggers. Submitted responses and incomplete participations are separate ID spaces: a participation that is later submitted appears under a different `resp_…` id.
- row_no integer (nullable)required
Global newest-first row ranking (1-based), independent of `order`. Stable within a survey for pagination and accepted by `responses_delete`. `null` for incomplete participations when `since` is set, because their rank depends on how many submitted responses `since` filtered away and `responses_delete` cannot reproduce it. Also null for quiz-sorted lists and session, score, pass or URL-parameter filtered lists; use response_id for deletion.
- answers map of objectrequired
Flat record keyed by the `question_id` that existed when the answer was submitted. New submissions carrying any other key are rejected, but a later question deletion deliberately leaves the historical answer here and names its key in `orphaned_answer_question_ids`. Answer values are resolved to labels rather than internal option IDs, though an option deleted after the answer was recorded has no label left to resolve to and reports its raw identifier. A free-text 'other' answer is the typed text itself: inline as the value for a single-select, and as an extra entry in the array for a multiple-select. It has no separate key here — only the `answers` cell list in the webhook and JSON-export payloads carries it apart, as an `other_text` companion. Matrix answers are `{rowLabel: columnLabel}`, with duplicate row labels disambiguated as `Label (2)`, `Label (3)` … in `matrix_rows` definition order, so a given row keeps the same key across every response. A row deleted after submission appears as `Deleted row <row_id>`. A `file-upload` answer is an array of file objects `{file_id, name, size_bytes, content_type, download}`: `file_id` is the opaque `file_…` identifier and `download` the REST path `/surveys/{survey_id}/responses/{response_id}/files/{file_id}` (relative to the REST base URL) that `responses_file_download` serves; the file itself is never inline. A `booking` or `scheduling-poll` answer is an array of slots `{start, end, timezone}` — ISO 8601 date-times with the time zone's offset, in the question's IANA `timezone`; a whole-day slot runs from local midnight to the next local midnight. A stored value that is no slot of the question is reported as its raw string. The webhook's `answers_flat` carries the same values.
- orphaned_answer_question_ids array of stringrequired
Answer keys in this row that no longer match a question in the published survey, in stored key order. Empty when every answer still has a question. The values remain visible in `answers`; this field marks them so a join with `survey_get.published.questions` cannot silently drop them.
- hidden_answer_question_ids array of stringrequired
Questions whose answer in this response matches a value hidden on its live session presentation. Answers remain present in answers. Empty when no answers are hidden or this response has no live session.
- created_at string (nullable)required
- completed_at string (nullable)required
- duration_seconds number (nullable)required
- ended_by_logic booleanrequired
- locale string (nullable)required
- participation_type "response" | "incomplete_participation"required
- survey_mode "survey" | "quiz" | "live"
Survey mode the response was given in. Present on submitted responses; incomplete participations omit it.
- session_id string (uuid) (nullable)
Live session the response belongs to, or null outside any live session.
- session_name string (nullable)
Name of that live session, or null when it has none or the response is outside a session.
- url_params map of string
URL parameters captured from the participation link, by parameter name. Empty object when none were captured.
- quiz_result object (nullable)
- response_id stringrequired
- total_count integerrequired
- has_more booleanrequired
- responses array of objectrequired
Example response
{
"ok": true,
"data": {
"responses": [
{
"response_id": "resp_8Kx2vQ1mR7pLtYbN4wZa3g",
"row_no": 1,
"answers": {
"q_a3f8d1b24e5c4c2a9d110f8b7e6a1c42": "Dashboard",
"q_7b2f4e119c3a4a1d8e225f9d3b0a71e8": [
"Pricing",
"Support"
],
"q_3f8d4b217a954c6e89b12d5e7f1c9a34": 5,
"q_6e2c9a745b384f1d92e78a4c7b3d1f05": 9
},
"orphaned_answer_question_ids": [],
"created_at": "2026-04-05T14:22:31.000Z",
"completed_at": "2026-04-05T14:25:38.000Z",
"duration_seconds": 187,
"ended_by_logic": false,
"locale": "de-DE",
"participation_type": "response",
"survey_mode": "survey",
"session_id": null,
"session_name": null,
"url_params": {},
"hidden_answer_question_ids": []
},
{
"response_id": "resp_5Db9Ht0cS6nWqXeJ2yVu1k",
"row_no": 2,
"answers": {
"q_a3f8d1b24e5c4c2a9d110f8b7e6a1c42": "API",
"q_a3f8d1b24e5c4c2a9d110f8b7e6a1c42_other": null,
"q_7b2f4e119c3a4a1d8e225f9d3b0a71e8": [
"Speed"
],
"q_3f8d4b217a954c6e89b12d5e7f1c9a34": 4,
"q_6e2c9a745b384f1d92e78a4c7b3d1f05": 7
},
"orphaned_answer_question_ids": [],
"created_at": "2026-04-05T15:10:02.000Z",
"completed_at": "2026-04-05T15:13:45.000Z",
"duration_seconds": 223,
"ended_by_logic": false,
"locale": "en-US",
"participation_type": "response",
"survey_mode": "quiz",
"quiz_result": {
"score": 7,
"max_score": 10,
"percentage": 70,
"passed": true,
"definition_version": 1
},
"session_id": null,
"session_name": null,
"url_params": {},
"hidden_answer_question_ids": []
}
],
"total_count": 142,
"has_more": true
}
}delete/surveys/{survey_id}/responses
Delete responses
Delete responses by stable response_ids (the resp_/part_ identifiers returned by responses_list, webhook deliveries and exports), by ranked row numbers from responses_list, or all responses for a survey. Owner only. An id that names no participation of this survey comes back in unresolved_response_ids, and one already deleted in already_deleted_response_ids, so the call is safe to retry. Ranked row numbers are a ranking over the surviving rows and move under concurrent deletion. Matching responses stop being returned by every read surface immediately, and this cannot be undone through the API.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
Required
- mode "ids" | "rows" | "all"required
Which responses to delete: 'ids' names them by the `response_id` a read surface returned (preferred), 'rows' by ranked row numbers from responses_list, 'all' deletes every response for the survey. Prefer 'ids': a rank is resolved against the live set at the moment of the call, so a response arriving between your list and your delete shifts every rank.
- response_ids array of string
`response_id` values from responses_list / responses_export when mode='ids'. Max 1000 per request. Each names one participation for its whole life, so the selection cannot shift between the read and the delete. Ids that no longer resolve are listed in `unresolved_response_ids` and the rest are still deleted; a request in which *no* id resolves is refused instead, naming them. Ids whose participation was already deleted come back in `already_deleted_response_ids` and answer success with `deleted_count: 0`, which is what makes a retry of this operation safe.
- row_numbers array of integer
Global response row numbers from responses_list (1-based) when mode='rows'. Max 1000 per request. Ranks are newest-first and unaffected by responses_list's `order` and `since`, which have no counterpart here. Racy by construction — prefer mode='ids'.
- date_from string
Date filter used for rank resolution (must match responses_list)
- date_to string
Date filter used for rank resolution (must match responses_list)
- include_incomplete_participations boolean
Incomplete participation filter used for rank resolution (must match responses_list)
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `responses_delete`.
- deleted_count integerrequired
Number of responses that were soft-deleted.
- unresolved_row_numbers array of integerrequired
Row numbers from the request that could not be resolved to an existing response.
- unresolved_response_ids array of string
`mode: "ids"` only. Ids from the request that named no participation in this survey. A batch naming five ids and finding four deletes the four and says which one it could not place. A request in which no id at all resolves is refused rather than answered with an empty delete.
- already_deleted_response_ids array of string
`mode: "ids"` only. Ids that named a real participation which was already deleted. This is what a retry of a successful call reports, and it is why the id selector is safe to retry: the second call finds the same rows, deletes nothing, and answers `deleted_count: 0` instead of moving on to somebody else's data.
- deleted_count integerrequired
Example response
{
"ok": true,
"data": {
"deleted_count": 3,
"unresolved_row_numbers": [],
"unresolved_response_ids": [
"resp_qN4kS1vTgM8bXwLpZa7cRQ"
],
"already_deleted_response_ids": []
}
}get/surveys/{survey_id}/responses/aggregates
Get response aggregates
Get aggregate statistics for survey questions. Buckets are sparse: values with no responses are omitted instead of returned with count: 0. Percentages use respondents who answered the question (totalAnswered) as their denominator, so multi-select percentages can sum above 100%; totalSelections reports their selection count. NPS questions also include the computed score and promoter/passive/detractor groups. Scored quiz questions carry quiz (graded, correct and percentage correct, unanswered; the three most frequent wrong answers when the survey owner's plan includes the quiz question analysis). group_by: "session" adds one aggregate block per live session in groups, including a null-session group for responses outside sessions; it is the session comparison and needs that feature in the owner's plan (plan_feature_required). Set include_quiz_metrics: false to omit quiz metrics. Filter by live session (session_id or session_ids, with null selecting responses outside sessions), quiz score in points (score_min / score_max), passed and captured url_params. These filters select the same response population across lists, statistics, aggregates, crosstabs and exports.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| session_id | query | string (uuid) (nullable) | No | One live session, or null for responses given outside any live session. Do not combine with session_ids. |
| session_ids | query | array of string (uuid) (nullable) | No | Several live sessions (up to 100). Include null for responses given outside any live session. Omit both session fields for all responses. Send an array such as ["<id>",null]. |
| score_min | query | number | No | Inclusive minimum quiz score in points. |
| score_max | query | number | No | Inclusive maximum quiz score in points. |
| passed | query | boolean | No | Filter by the stored quiz pass result. |
| url_params | query | map of string | No | Exact captured URL parameter matches, as an object keyed by parameter name. |
| date_from | query | string | No | Inclusive ISO 8601 start; bare dates start at midnight UTC. |
| date_to | query | string | No | Inclusive ISO 8601 end; bare dates include the whole UTC day. |
| include_incomplete_participations | query | boolean | No | Include meaningful incomplete progress in answer counts; quiz metrics always use completed grades. |
| answer_filters | query | array of object | object | No | Answer equality or presence conditions (up to 200). All conditions must match. |
| group_by | query | "session" | No | Return additional aggregates for each matching live session and the null non-live group. Requires the session comparison entitlement; see the pricing reference. |
| include_quiz_metrics | query | boolean | No | Per-question correct percentages from stored grades. Included by default. Send false to omit them. |
| question_ids | query | array of string | No | Specific question IDs (omit for all, max 200) |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `responses_aggregates`.
- aggregates objectrequired
Aggregate statistics produced by the analytics core. Field names use camelCase (`questionId`, `totalAnswered`, etc.) because this payload mirrors the analytics core's internal contract — the `questionId` value is the same opaque identifier other endpoints expose as `question_id`, so you can still use it as a join key.
- totalFiltered integerrequired
Total number of responses after filters, before per-question answer-counting.
- questions array of objectrequired
Per-question aggregates in the published survey's display order. Question ID suffixes do not encode position.
- quiz object
Stored completed grades for this question. Logic-hidden, unscored and locked details are excluded; visible unanswered graded questions count as incorrect. Null percentage when the denominator is zero.
- gradedCount integerrequired
- correctCount integerrequired
- correctPercentage number (nullable)required
- unansweredCount integer
Graded participations that left this question empty; they count as incorrect, which is why `gradedCount` can exceed `totalAnswered`.
- topWrongAnswers array of object
The three most frequent wrong answers, most frequent first, from the question analysis. Present only when the survey owner's plan includes the quiz question analysis.
…nested fields omitted
- questionId stringrequired
Stable question identifier. Same value as `question_id` emitted by `survey_get` and webhooks — camelCased here because this payload comes directly from the analytics core, which uses camelCase for its internal contract.
- questionText stringrequired
- questionType stringrequired
- totalAnswered integerrequired
Respondents who answered this question. On `multiple-choice`, `image-multiple-choice` and `ranking` — where one respondent contributes several bucket entries — this counts respondents, not selections; see `totalSelections` for the selection total.
- skipped integerrequired
Respondents in the filtered population (`totalFiltered`) who did not answer this question.
- totalSelections integer
Selections made across all respondents. Present only on the question types where one respondent can contribute more than one — `multiple-choice`, `image-multiple-choice`, `ranking` — where `sum(buckets[].count)` is this number rather than `totalAnswered`.
- nps object
Standard Net Promoter Score breakdown, present only for `nps` questions. Group percentages use valid 0–10 scores as their denominator: promoters 9–10, passives 7–8, detractors 0–6.
- score number (nullable)required
Promoter percentage minus detractor percentage (one decimal), or null when there is no valid 0–10 score.
- validResponses integerrequired
- unclassifiedResponses integerrequired
Answered values outside the valid integer range 0–10. They remain visible in buckets but are excluded from the NPS denominator.
- promoters objectrequired
…nested fields omitted
- passives objectrequired
…nested fields omitted
- detractors objectrequired
…nested fields omitted
- score number (nullable)required
- note string
Present when the aggregate cannot express something the question carries. `ranking` always sets it: a ranking answer contains every option exactly once, so the counts say who ranked at all and not what ranked where — `responses_export` has one column per rank position.
- buckets array of objectrequired
Sparse distribution of observed answers. Values with no responses are omitted rather than emitted with `count: 0`; use the published question definition when a complete configured option or scale domain is needed.
- value objectrequired
What was answered: a display label, a numeric value, or the text a respondent typed into an 'other' field. Option IDs are resolved to labels wherever a label still exists — an option deleted after the answer was recorded reports its raw identifier instead, because there is nothing left to resolve it against. One question's bucket list can therefore mix all three: do not assume a bucket value is a label.
- optionId string (nullable)required
The option this bucket stands for, for building `answer_filters` without guessing which label belongs to which option. `null` in the three cases where no single option feeds the bucket: free text typed into an 'other' field, an option deleted since the answer was recorded, and two options sharing one authored label — those merge into a single bucket, as they always have. Matrix questions report `null` throughout: a cell is a row/column pair, not an option.
- count integerrequired
- percentage numberrequired
Share of `totalAnswered` for this bucket (one decimal, e.g. 42.5) — that is, of the respondents who answered the question, not of everyone in the filtered population. The denominator is the same for every question type.
- value objectrequired
- rows array of string
Ordered matrix row labels; present for matrix questions.
- columns array of string
Ordered matrix column labels; present for matrix questions.
- matrixCounts map of map of integer
Matrix counts keyed first by row label and then by column label.
- quiz object
- orphanedQuestionIds array of stringrequired
Question IDs found in stored answers but absent from the published survey, deduplicated. Their buckets are not included in `questions` because no question definition remains to describe their type or labels.
- totalFiltered integerrequired
- group_by "session"
- groups array of object
All nonempty matching session groups, including null for non-live responses. Present only for group_by=session; filters apply to every group.
- session_id string (uuid) (nullable)required
Live session of this group, or null for responses given outside any live session.
- session_name string (nullable)required
Name of the live session, or null.
- aggregates objectrequired
Aggregate statistics produced by the analytics core. Field names use camelCase (`questionId`, `totalAnswered`, etc.) because this payload mirrors the analytics core's internal contract — the `questionId` value is the same opaque identifier other endpoints expose as `question_id`, so you can still use it as a join key.
- totalFiltered integerrequired
Total number of responses after filters, before per-question answer-counting.
- questions array of objectrequired
Per-question aggregates in the published survey's display order. Question ID suffixes do not encode position.
- quiz object
Stored completed grades for this question. Logic-hidden, unscored and locked details are excluded; visible unanswered graded questions count as incorrect. Null percentage when the denominator is zero.
…nested fields omitted
- questionId stringrequired
Stable question identifier. Same value as `question_id` emitted by `survey_get` and webhooks — camelCased here because this payload comes directly from the analytics core, which uses camelCase for its internal contract.
- questionText stringrequired
- questionType stringrequired
- totalAnswered integerrequired
Respondents who answered this question. On `multiple-choice`, `image-multiple-choice` and `ranking` — where one respondent contributes several bucket entries — this counts respondents, not selections; see `totalSelections` for the selection total.
- skipped integerrequired
Respondents in the filtered population (`totalFiltered`) who did not answer this question.
- totalSelections integer
Selections made across all respondents. Present only on the question types where one respondent can contribute more than one — `multiple-choice`, `image-multiple-choice`, `ranking` — where `sum(buckets[].count)` is this number rather than `totalAnswered`.
- nps object
Standard Net Promoter Score breakdown, present only for `nps` questions. Group percentages use valid 0–10 scores as their denominator: promoters 9–10, passives 7–8, detractors 0–6.
…nested fields omitted
- note string
Present when the aggregate cannot express something the question carries. `ranking` always sets it: a ranking answer contains every option exactly once, so the counts say who ranked at all and not what ranked where — `responses_export` has one column per rank position.
- buckets array of objectrequired
Sparse distribution of observed answers. Values with no responses are omitted rather than emitted with `count: 0`; use the published question definition when a complete configured option or scale domain is needed.
…nested fields omitted
- rows array of string
Ordered matrix row labels; present for matrix questions.
- columns array of string
Ordered matrix column labels; present for matrix questions.
- matrixCounts map of map of integer
Matrix counts keyed first by row label and then by column label.
- quiz object
- orphanedQuestionIds array of stringrequired
Question IDs found in stored answers but absent from the published survey, deduplicated. Their buckets are not included in `questions` because no question definition remains to describe their type or labels.
- totalFiltered integerrequired
- session_id string (uuid) (nullable)required
- unresolved_question_ids array of stringrequired
Requested `question_ids` that match no question in the **published** survey, deduplicated. Empty when every requested id resolved, and always empty when the request did not name any. Check this before reading a missing question as 'no answers': a mistyped id lands here instead. Note that responses are only ever recorded against the published survey, so a question that exists solely in the working draft is reported here too. `survey_get.published.questions` contains the questions responses can be filtered by, so take the ids from there.
- aggregates objectrequired
Example response
{
"ok": true,
"data": {
"aggregates": {
"totalFiltered": 142,
"orphanedQuestionIds": [],
"questions": [
{
"questionId": "q_a3f8d1b24e5c4c2a9d110f8b7e6a1c42",
"questionText": "Which product area do you use most?",
"questionType": "single-choice",
"totalAnswered": 142,
"skipped": 0,
"quiz": {
"gradedCount": 142,
"correctCount": 78,
"correctPercentage": 54.9
},
"buckets": [
{
"value": "Dashboard",
"optionId": "opt_4f2a9c1b",
"count": 78,
"percentage": 54.9
},
{
"value": "Reports",
"optionId": "opt_8d31e07a",
"count": 41,
"percentage": 28.9
},
{
"value": "API",
"optionId": null,
"count": 23,
"percentage": 16.2
}
]
},
{
"questionId": "q_3f8d4b217a954c6e89b12d5e7f1c9a34",
"questionText": "How would you rate our service?",
"questionType": "rating",
"totalAnswered": 142,
"skipped": 0,
"buckets": [
{
"value": 5,
"optionId": null,
"count": 71,
"percentage": 50
},
{
"value": 4,
"optionId": null,
"count": 48,
"percentage": 33.8
},
{
"value": 3,
"optionId": null,
"count": 15,
"percentage": 10.6
},
{
"value": 2,
"optionId": null,
"count": 6,
"percentage": 4.2
},
{
"value": 1,
"optionId": null,
"count": 2,
"percentage": 1.4
}
]
},
{
"questionId": "q_6e2c9a745b384f1d92e78a4c7b3d1f05",
"questionText": "How likely are you to recommend us?",
"questionType": "nps",
"totalAnswered": 142,
"skipped": 0,
"nps": {
"score": 42.2,
"validResponses": 142,
"unclassifiedResponses": 0,
"promoters": {
"count": 86,
"percentage": 60.6
},
"passives": {
"count": 30,
"percentage": 21.1
},
"detractors": {
"count": 26,
"percentage": 18.3
}
},
"buckets": [
{
"value": 10,
"optionId": null,
"count": 48,
"percentage": 33.8
},
{
"value": 9,
"optionId": null,
"count": 38,
"percentage": 26.8
},
{
"value": 8,
"optionId": null,
"count": 18,
"percentage": 12.7
},
{
"value": 7,
"optionId": null,
"count": 12,
"percentage": 8.5
},
{
"value": 6,
"optionId": null,
"count": 10,
"percentage": 7
},
{
"value": 5,
"optionId": null,
"count": 8,
"percentage": 5.6
},
{
"value": 4,
"optionId": null,
"count": 8,
"percentage": 5.6
}
]
},
{
"questionId": "q_1a2b3c445d664e778f889a0b1c2d3e4f",
"questionText": "How do you rate each area?",
"questionType": "matrix",
"totalAnswered": 3,
"skipped": 0,
"rows": [
"Speed",
"Quality"
],
"columns": [
"Good",
"Great"
],
"matrixCounts": {
"Speed": {
"Good": 2,
"Great": 1
},
"Quality": {
"Good": 1,
"Great": 2
}
},
"buckets": [
{
"value": {
"row": "Speed",
"column": "Good"
},
"optionId": null,
"count": 2,
"percentage": 66.7
},
{
"value": {
"row": "Speed",
"column": "Great"
},
"optionId": null,
"count": 1,
"percentage": 33.3
},
{
"value": {
"row": "Quality",
"column": "Good"
},
"optionId": null,
"count": 1,
"percentage": 33.3
},
{
"value": {
"row": "Quality",
"column": "Great"
},
"optionId": null,
"count": 2,
"percentage": 66.7
}
]
}
]
},
"unresolved_question_ids": [],
"group_by": "session",
"groups": [
{
"session_id": "f9b85aa1-5236-4d28-a694-76fc87d992b0",
"session_name": "Product workshop",
"aggregates": {
"totalFiltered": 142,
"orphanedQuestionIds": [],
"questions": [
{
"questionId": "q_a3f8d1b24e5c4c2a9d110f8b7e6a1c42",
"questionText": "Which product area do you use most?",
"questionType": "single-choice",
"totalAnswered": 142,
"skipped": 0,
"quiz": {
"gradedCount": 142,
"correctCount": 78,
"correctPercentage": 54.9
},
"buckets": [
{
"value": "Dashboard",
"optionId": "opt_4f2a9c1b",
"count": 78,
"percentage": 54.9
},
{
"value": "Reports",
"optionId": "opt_8d31e07a",
"count": 41,
"percentage": 28.9
},
{
"value": "API",
"optionId": null,
"count": 23,
"percentage": 16.2
}
]
},
{
"questionId": "q_3f8d4b217a954c6e89b12d5e7f1c9a34",
"questionText": "How would you rate our service?",
"questionType": "rating",
"totalAnswered": 142,
"skipped": 0,
"buckets": [
{
"value": 5,
"optionId": null,
"count": 71,
"percentage": 50
},
{
"value": 4,
"optionId": null,
"count": 48,
"percentage": 33.8
},
{
"value": 3,
"optionId": null,
"count": 15,
"percentage": 10.6
},
{
"value": 2,
"optionId": null,
"count": 6,
"percentage": 4.2
},
{
"value": 1,
"optionId": null,
"count": 2,
"percentage": 1.4
}
]
},
{
"questionId": "q_6e2c9a745b384f1d92e78a4c7b3d1f05",
"questionText": "How likely are you to recommend us?",
"questionType": "nps",
"totalAnswered": 142,
"skipped": 0,
"nps": {
"score": 42.2,
"validResponses": 142,
"unclassifiedResponses": 0,
"promoters": {
"count": 86,
"percentage": 60.6
},
"passives": {
"count": 30,
"percentage": 21.1
},
"detractors": {
"count": 26,
"percentage": 18.3
}
},
"buckets": [
{
"value": 10,
"optionId": null,
"count": 48,
"percentage": 33.8
},
{
"value": 9,
"optionId": null,
"count": 38,
"percentage": 26.8
},
{
"value": 8,
"optionId": null,
"count": 18,
"percentage": 12.7
},
{
"value": 7,
"optionId": null,
"count": 12,
"percentage": 8.5
},
{
"value": 6,
"optionId": null,
"count": 10,
"percentage": 7
},
{
"value": 5,
"optionId": null,
"count": 8,
"percentage": 5.6
},
{
"value": 4,
"optionId": null,
"count": 8,
"percentage": 5.6
}
]
},
{
"questionId": "q_1a2b3c445d664e778f889a0b1c2d3e4f",
"questionText": "How do you rate each area?",
"questionType": "matrix",
"totalAnswered": 3,
"skipped": 0,
"rows": [
"Speed",
"Quality"
],
"columns": [
"Good",
"Great"
],
"matrixCounts": {
"Speed": {
"Good": 2,
"Great": 1
},
"Quality": {
"Good": 1,
"Great": 2
}
},
"buckets": [
{
"value": {
"row": "Speed",
"column": "Good"
},
"optionId": null,
"count": 2,
"percentage": 66.7
},
{
"value": {
"row": "Speed",
"column": "Great"
},
"optionId": null,
"count": 1,
"percentage": 33.3
},
{
"value": {
"row": "Quality",
"column": "Good"
},
"optionId": null,
"count": 1,
"percentage": 33.3
},
{
"value": {
"row": "Quality",
"column": "Great"
},
"optionId": null,
"count": 2,
"percentage": 66.7
}
]
}
]
}
}
]
}
}get/surveys/{survey_id}/responses/crosstab
Cross-tabulate responses
Cross-tabulate answers between two non-matrix survey questions. Matrix questions are rejected because the two-axis contract cannot select an individual matrix row. Cross tabulation is one of the analysis tools: without them in the survey owner's plan, a few question pairs per survey are free (counted together with the editor's), and a further pair returns plan_feature_required. Filter by live session (session_id or session_ids, with null selecting responses outside sessions), quiz score in points (score_min / score_max), passed and captured url_params. These filters select the same response population across lists, statistics, aggregates, crosstabs and exports.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| session_id | query | string (uuid) (nullable) | No | One live session, or null for responses given outside any live session. Do not combine with session_ids. |
| session_ids | query | array of string (uuid) (nullable) | No | Several live sessions (up to 100). Include null for responses given outside any live session. Omit both session fields for all responses. Send an array such as ["<id>",null]. |
| score_min | query | number | No | Inclusive minimum quiz score in points. |
| score_max | query | number | No | Inclusive maximum quiz score in points. |
| passed | query | boolean | No | Filter by the stored quiz pass result. |
| url_params | query | map of string | No | Exact captured URL parameter matches, as an object keyed by parameter name. |
| question_x | query | string | Yes | First non-matrix question ID (rows) |
| question_y | query | string | Yes | Second non-matrix question ID (columns) |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `responses_crosstab`.
- crosstab objectrequired
Cross-tabulation between the two requested non-matrix questions. Field names are camelCase because this payload mirrors the analytics core's internal contract; row/column labels are already label-resolved.
- rowQuestion objectrequired
Row question definition. `id` is the same stable question identifier as `question_id` elsewhere.
- id stringrequired
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- text stringrequired
- id stringrequired
- colQuestion objectrequired
Column question definition.
- id stringrequired
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- text stringrequired
- id stringrequired
- matrix array of objectrequired
- rowValue stringrequired
Row label.
- rowTotal integerrequired
Respondents with this row answer who answered the column question, not the sum of the row's cells.
- columns array of objectrequired
- colValue stringrequired
Column label for this cell.
- count integerrequired
- rowPercentage numberrequired
Share of the row's respondents (`rowTotal`), one decimal, e.g. 66.7. With a multi-select column question one respondent can sit in several cells, so a row's percentages can add up to more than 100.
- colValue stringrequired
- rowValue stringrequired
- truncated booleanrequired
True when the row/column set was truncated to stay under the max-categories limit.
- rowQuestion objectrequired
- crosstab objectrequired
Example response
{
"ok": true,
"data": {
"crosstab": {
"rowQuestion": {
"id": "q_a3f8d1b24e5c4c2a9d110f8b7e6a1c42",
"text": "Which product area do you use most?"
},
"colQuestion": {
"id": "q_3f8d4b217a954c6e89b12d5e7f1c9a34",
"text": "How would you rate our service?"
},
"matrix": [
{
"rowValue": "Dashboard",
"rowTotal": 78,
"columns": [
{
"colValue": "1",
"count": 0,
"rowPercentage": 0
},
{
"colValue": "2",
"count": 2,
"rowPercentage": 2.6
},
{
"colValue": "3",
"count": 3,
"rowPercentage": 3.8
},
{
"colValue": "4",
"count": 18,
"rowPercentage": 23.1
},
{
"colValue": "5",
"count": 55,
"rowPercentage": 70.5
}
]
},
{
"rowValue": "Reports",
"rowTotal": 41,
"columns": [
{
"colValue": "1",
"count": 1,
"rowPercentage": 2.4
},
{
"colValue": "2",
"count": 2,
"rowPercentage": 4.9
},
{
"colValue": "3",
"count": 6,
"rowPercentage": 14.6
},
{
"colValue": "4",
"count": 15,
"rowPercentage": 36.6
},
{
"colValue": "5",
"count": 17,
"rowPercentage": 41.5
}
]
},
{
"rowValue": "API",
"rowTotal": 23,
"columns": [
{
"colValue": "1",
"count": 1,
"rowPercentage": 4.3
},
{
"colValue": "2",
"count": 2,
"rowPercentage": 8.7
},
{
"colValue": "3",
"count": 6,
"rowPercentage": 26.1
},
{
"colValue": "4",
"count": 6,
"rowPercentage": 26.1
},
{
"colValue": "5",
"count": 8,
"rowPercentage": 34.8
}
]
}
],
"truncated": false
}
}
}get/surveys/{survey_id}/responses/stats
Get survey statistics
Survey-level statistics, the figures of the results summary: views (visits that opened the survey), started and completed responses, completion rate, completion time (average, shortest, longest, median, and duration.distribution over five ranges), the drop-offs per question in dropoff when the survey owner's plan includes the analysis tools, a live vote's sessions, participants and answers in live, plus for quizzes in quiz the mean score, reachable points, pass rate, score distribution and hardest question. Field names are camelCase because the payload mirrors the analytics core. Filter by live session (session_id or session_ids, with null selecting responses outside sessions), quiz score in points (score_min / score_max), passed and captured url_params. These filters select the same response population across lists, statistics, aggregates, crosstabs and exports.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| session_id | query | string (uuid) (nullable) | No | One live session, or null for responses given outside any live session. Do not combine with session_ids. |
| session_ids | query | array of string (uuid) (nullable) | No | Several live sessions (up to 100). Include null for responses given outside any live session. Omit both session fields for all responses. Send an array such as ["<id>",null]. |
| score_min | query | number | No | Inclusive minimum quiz score in points. |
| score_max | query | number | No | Inclusive maximum quiz score in points. |
| passed | query | boolean | No | Filter by the stored quiz pass result. |
| url_params | query | map of string | No | Exact captured URL parameter matches, as an object keyed by parameter name. |
| date_from | query | string | No | Inclusive ISO 8601 start; bare dates start at midnight UTC. |
| date_to | query | string | No | Inclusive ISO 8601 end; bare dates include the whole UTC day. |
| include_incomplete_participations | query | boolean | No | Include meaningful incomplete progress in answer counts; quiz metrics always use completed grades. |
| answer_filters | query | array of object | object | No | Answer equality or presence conditions (up to 200). All conditions must match. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `responses_survey_stats`. Counts reflect the survey's session dashboard and are computed by the analytics edge function. Field names are camelCase because this payload mirrors the analytics core's internal contract, the same way `responses_aggregates` does.
- quiz object
Quiz summary of the completed stored grades.
- gradedCount integerrequired
- meanScore number (nullable)required
- assessedCount integerrequired
- passedCount integerrequired
- passRate number (nullable)required
- maxScore number (nullable)
Points a participation could reach: the highest stored maximum (logic can leave a path with fewer). Null without grades.
- scoreDistribution array of object
Graded participations per tenth of the reachable points (score percentage 0–10, …, 90–100; 100 % falls into the last range).
- fromPercent integerrequired
- toPercent integerrequired
- count integerrequired
- percentage numberrequired
Share of the graded participations, one decimal.
- hardestQuestion object (nullable)
The question with the lowest share of correct answers among the graded ones; the earlier question on a tie. Null without graded questions.
- surveyId string (uuid)
Survey ID (UUID)
- viewCount integer
Views: visits that opened the survey, one per participant session (a reload in the same visit does not count again), whether or not anyone answered. Follows only the date range. Completion rate uses started participations, not this count.
- startedResponses integer
- completedResponses integer
- completionRate number
Completed divided by started, as a percentage.
- duration object
Completion time in seconds across completed responses.
- average numberrequired
- shortest numberrequired
- longest numberrequired
- median numberrequired
- distribution array of object
Completed responses per completion-time range: five ranges, scaled to the longest time. Empty when no time was recorded.
- label stringrequired
Short range label as the results summary shows it, e.g. `15-30s`, `1-2m`, `> 2h`.
- fromSeconds numberrequired
Inclusive lower bound.
- toSeconds number (nullable)required
Exclusive upper bound; null for the open last range.
- count integerrequired
- percentage numberrequired
Share of the completed responses with a recorded time, one decimal.
- label stringrequired
- dropoff array of object
Where unfinished participations stopped, per question. Present only when the survey owner's plan includes the analysis tools; empty without started participations.
- questionNumber integerrequired
1-based position in the published survey.
- questionId stringrequired
Stable opaque question identifier. Same value emitted by webhooks and returned by survey_get — safe to use as a join key across REST and webhook consumers.
- dropoffCount integerrequired
Unfinished participations whose last answer was the question before this one.
- dropoffRate numberrequired
dropoffCount as a share of `startedResponses`, one decimal.
- questionNumber integerrequired
- live object
A live vote's summary totals. Present for live votes only; per session, `live_session_list` and `live_session_get`.
- sessions integerrequired
Live sessions, rehearsals excluded; with sessions selected in the filters, those.
- participants integerrequired
Participations with at least one answer, unfinished ones included while the filters include them.
- answers integerrequired
Answers given, one per answered question.
- sessions integerrequired
- quiz object
Example response
{
"ok": true,
"data": {
"quiz": {
"gradedCount": 142,
"meanScore": 7.2,
"assessedCount": 140,
"passedCount": 105,
"passRate": 75
},
"surveyId": "3f8d4b21-7a95-4c6e-89b1-2d5e7f1c9a34",
"viewCount": 412,
"startedResponses": 198,
"completedResponses": 142,
"completionRate": 71.7,
"duration": {
"average": 192,
"shortest": 48,
"longest": 903,
"median": 174
}
}
}post/surveys/{survey_id}/responses/export/responses
Export responses
Export unlocked survey responses as CSV, XLSX, JSON, or SPSS. Returns a temporary signed download URL and the actual file extension; SPSS is delivered as a ZIP bundle. By default only completed participations are exported unless include_incomplete_participations=true. Filter by live session (session_id or session_ids, with null selecting responses outside sessions), quiz score in points (score_min / score_max), passed and captured url_params. These filters select the same response population across lists, statistics, aggregates, crosstabs and exports.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
- session_id string (uuid) (nullable)
One live session, or null for responses given outside any live session. Do not combine with session_ids.
- session_ids array of string (uuid) (nullable)
Several live sessions (up to 100). Include null for responses given outside any live session. Omit both session fields for all responses. Send an array such as ["<id>",null].
- score_min number
Inclusive minimum quiz score in points.
- score_max number
Inclusive maximum quiz score in points.
- passed boolean
Filter by the stored quiz pass result.
- url_params map of string
Exact captured URL parameter matches, as an object keyed by parameter name.
- format "csv" | "xlsx" | "json" | "spss"
Export format (default: csv)
- date_from string
ISO 8601 date filter start
- date_to string
ISO 8601 date filter end
- include_incomplete_participations boolean
Include incomplete participations (default: false = completed only).
- time_zone string
IANA timezone for exported date/time fields (e.g. Europe/Berlin).
- answer_filters array of object | object
Answer filters (max 200): equality ({question_id, answer}) or presence ({question_id, presence: answered|unanswered}), with the same semantics as the frontend results filters.
Example — Exports the responses of one session as a spreadsheet.
{
"format": "xlsx",
"session_id": "3c1d9e47-2b8a-4f61-9d0e-5a7b8c9d0e1f"
}Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `responses_export`.
- format "csv" | "xlsx" | "json" | "spss"required
- file_extension "csv" | "xlsx" | "json" | "zip"required
Extension of the downloaded artifact without a leading dot. Usually the same as `format`; `format: "spss"` returns a ZIP bundle and therefore reports `zip`.
- row_count integerrequired
Number of response rows in the exported file. Answers "did my filter match anything" without downloading it — the number reflects `date_from`/`date_to`, `answer_filters` and `include_incomplete_participations`. `0` means the filter matched nothing.
- download_url stringrequired
Temporary signed download URL (valid for ~1 hour).
- expires_at stringrequired
ISO timestamp when the signed download URL expires. Re-issued on every answer, including an idempotent replay, so it is never in the past.
Example response
{
"ok": true,
"data": {
"format": "xlsx",
"file_extension": "xlsx",
"row_count": 128,
"download_url": "https://storage.empirio.ai/exports/9f3a8b12.../responses-1712345678.xlsx?token=...",
"expires_at": "2026-04-10T17:45:00.000Z"
}
}post/surveys/{survey_id}/responses/export/charts
Export charts
Export unlocked survey aggregate charts in one of six formats: native editable PowerPoint (pptx), image-based PowerPoint (pptx_images), landscape A4 PDF (pdf), Word document (docx), ZIP of PNG charts (zip_images), or structured chart data (chart_json). For binary formats, returns a temporary signed download URL (valid for 1 hour) and the actual file_extension. For chart_json, returns structured chart data inline; configured option and bounded-scale axes include unused values with count: 0. By default only completed participations are included unless include_incomplete_participations=true. Filter by live session (session_id or session_ids, with null selecting responses outside sessions), quiz score in points (score_min / score_max), passed and captured url_params. These filters select the same response population across lists, statistics, aggregates, crosstabs and exports.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
- session_id string (uuid) (nullable)
One live session, or null for responses given outside any live session. Do not combine with session_ids.
- session_ids array of string (uuid) (nullable)
Several live sessions (up to 100). Include null for responses given outside any live session. Omit both session fields for all responses. Send an array such as ["<id>",null].
- score_min number
Inclusive minimum quiz score in points.
- score_max number
Inclusive maximum quiz score in points.
- passed boolean
Filter by the stored quiz pass result.
- url_params map of string
Exact captured URL parameter matches, as an object keyed by parameter name.
- format "pptx" | "pptx_images" | "pdf" | "docx" | "zip_images" | "chart_json"
Chart export format (default: pptx). 'pptx' = native editable PowerPoint, 'pptx_images' = PowerPoint with raster slides, 'pdf' = landscape A4 PDF, 'docx' = Word document, 'zip_images' = ZIP archive of PNG charts, 'chart_json' = structured chart data.
- date_from string
ISO 8601 date filter start
- date_to string
ISO 8601 date filter end
- include_incomplete_participations boolean
Include incomplete participations in chart export (default: false = completed only).
- answer_filters array of object | object
Answer filters (max 200): equality ({question_id, answer}) or presence ({question_id, presence: answered|unanswered}), with the same semantics as the frontend results filters.
- time_zone string
Reserved parity field for timezone-aware chart export pipelines.
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data object | objectrequired
Response payload for `responses_export_charts`. Chart exports do not return `row_count`; a request with no chartable answers returns `no_chartable_data`.
Example response
{
"ok": true,
"data": {
"format": "pptx",
"file_extension": "pptx",
"download_url": "https://storage.empirio.ai/exports/9f3a8b12.../charts-1712345678.pptx?token=...",
"expires_at": "2026-04-10T17:45:00.000Z"
}
}get/surveys/{survey_id}/responses/{response_id}/files/{file_id}
Download a response file
Issue a temporary named download link for one participant file of a file-upload answer. Address it by public ids only: the participation's response_id (resp_… / part_…) and the file's file_id (file_…) — the structured answer in responses_list and in webhook deliveries carries both, and its download field is exactly this path. Returns download_url (signed, valid for 1 hour; the file downloads under its original name), expires_at, name, content_type and size_bytes. Every call issues a fresh link. Anyone who can read the survey's responses can download its files; a file of another survey, or one the caller may not read, answers 404 not_found.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| response_id | path | string | Yes | The participation the file belongs to: the `response_id` from `responses_list` or a webhook delivery (`resp_…` for a submitted response, `part_…` for an incomplete participation). |
| file_id | path | string | Yes | The file: the `file_id` of an entry in a `file-upload` answer of that participation. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `responses_file_download`.
- download_url stringrequired
Temporary signed download URL, valid for 1 hour. The file downloads under its original name.
- expires_at stringrequired
ISO timestamp when the signed download URL expires. Every call issues a fresh link.
- name stringrequired
File name as uploaded by the participant.
- content_type stringrequired
MIME type of the file: `application/pdf`, a Word document (`.docx`), `image/jpeg` or `image/png`.
- size_bytes integerrequired
File size in bytes.
- download_url stringrequired
Example response
{
"ok": true,
"data": {
"download_url": "https://storage.empirio.ai/response-files/9f3a8b12.../4c1e9d3a...?token=...&download=cv.pdf",
"expires_at": "2026-04-10T17:45:00.000Z",
"name": "cv.pdf",
"content_type": "application/pdf",
"size_bytes": 248113
}
}Live Sessions
Run a survey in live mode in sessions: start, pause, resume and end them, reopen an ended one, rename or delete them, and read the history and a session's live results. The survey owner reads the current room code and join URL through survey_get.share.live.
get/surveys/{survey_id}/live-sessions
List live sessions
List a survey's live sessions, newest first: name, status (active, paused or ended), start and end, participants and remaining time. open_session is the survey's open session (active or paused) whatever page is read. Pages with limit and next_cursor. Read one session and its live results with live_session_get.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| cursor | query | string | No | next_cursor from the previous page. Omit for the first page. |
| limit | query | integer | No | Page size, 1 to 100, default 100. Follow next_cursor until it is null. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
- sessions array of objectrequired
- id string (uuid)required
Session ID.
- survey_id string (uuid)required
- name string (nullable)required
- status "active" | "paused" | "ended"required
active: participants can answer. paused: the session stays open (room code, joining) but answering is closed and its time limit stands still until live_session_resume. ended: participation is closed; live_session_reactivate reopens it.
- started_at stringrequired
When the session was first started. A reopened session keeps it; reactivated_at marks the current run.
- ends_at string (nullable)required
When participation closes automatically. While active, the earlier of the duration deadline and the scheduled participation end; while paused, only the scheduled participation end, because the time limit stands still. null when neither applies.
- ended_at string (nullable)required
- paused_at string (nullable)required
When the session was paused. Set only while status is paused, otherwise null.
- reactivated_at string (nullable)required
When the session was last reopened with live_session_reactivate, or null if it never was. The current run started then.
- rehearsal booleanrequired
- time_limited booleanrequired
Whether the session runs with a time limit. false means no duration limit; a scheduled participation end still applies. Pausing does not change it.
- duration_seconds integer (nullable)required
The time limit of the current run in seconds, or null without a duration limit.
- participant_count integerrequired
- remaining_seconds integer (nullable)required
Whole seconds left of the time limit: counting down to ends_at while active, frozen at the moment of the pause while paused, 0 once ended. null without a time limit.
- room_code string (nullable)required
The numeric code participants enter at the join page while this session is open (active or paused). null for a rehearsal and for an ended session.
- id string (uuid)required
- open_session object (nullable)required
The survey's open session (active or paused), whatever page this is, or null when none is open. Use it to pause, resume or end the running session.
- next_cursor string (nullable)required
- server_time stringrequired
- sessions array of objectrequired
Example response
{
"ok": true,
"data": {
"sessions": [
{
"id": "3c1d9e47-2b8a-4f61-9d0e-5a7b8c9d0e1f",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"name": "Workshop",
"status": "active",
"started_at": "2026-10-14T10:00:00Z",
"ends_at": "2026-10-14T10:10:00Z",
"ended_at": null,
"rehearsal": false,
"paused_at": null,
"reactivated_at": null,
"time_limited": true,
"duration_seconds": 600,
"participant_count": 12,
"remaining_seconds": 600,
"room_code": "482915"
},
{
"id": "7e2f4a90-1c3b-4d5e-8f60-a1b2c3d4e5f6",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"name": "Rehearsal",
"status": "ended",
"started_at": "2026-10-14T10:00:00Z",
"ends_at": "2026-10-14T10:10:00Z",
"ended_at": "2026-10-14T10:05:00Z",
"rehearsal": true,
"paused_at": null,
"reactivated_at": null,
"time_limited": true,
"duration_seconds": 600,
"participant_count": 12,
"remaining_seconds": 0,
"room_code": null
}
],
"open_session": {
"id": "3c1d9e47-2b8a-4f61-9d0e-5a7b8c9d0e1f",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"name": "Workshop",
"status": "active",
"started_at": "2026-10-14T10:00:00Z",
"ends_at": "2026-10-14T10:10:00Z",
"ended_at": null,
"rehearsal": false,
"paused_at": null,
"reactivated_at": null,
"time_limited": true,
"duration_seconds": 600,
"participant_count": 12,
"remaining_seconds": 600,
"room_code": "482915"
},
"next_cursor": null,
"server_time": "2026-10-14T10:00:00Z"
}
}post/surveys/{survey_id}/live-sessions
Start live session
Open participation for a survey in live mode, for one session (a meeting, a class). Starting publishes the survey, as the editor does: an unpublished survey is published and pending working-draft changes go live first, with the checks and refusals of survey_publish (plan gate, option labels). It stays published after the session ends; between sessions participants see a waiting screen. Returns the session, the participation URL with a QR code image, the presentation URL and, in the session, the room code participants can type in at the join page. Only one session is open at a time: while one is active or paused the call is refused with live_session_active, before anything is published, and the error details name it, unless replace_session_id names it to end it first. duration_seconds overrides settings.live.duration_seconds for this session. rehearsal starts a test run whose answers stay out of the results. Requires edit access and the surveys and responses scopes.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
- name string
Optional label for the session history, such as the event or class. Up to 120 characters.
- replace_session_id string (uuid)
End this active session and start the new one in its place. Without it, starting while a session is active is refused with `live_session_active`, whose `error.context` names the active session. If this session has already ended and none is running, the new one simply starts.
- duration_seconds integer (nullable)
How long participants can answer, in seconds (1 to 86400). Omit to use settings.live.duration_seconds of the published survey. null means no duration limit; the session stays open until manually ended or the scheduled participation end.
- rehearsal boolean
true starts a test run that participants join only through the returned participation URL. Its answers stay out of the survey's results and quota. Defaults to false.
Example — Opens participation for ten minutes. The reply carries the participation URL, the room code and a QR code.
{
"name": "Monday all-hands",
"duration_seconds": 600
}Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
- session objectrequired
One live session.
- id string (uuid)required
Session ID.
- survey_id string (uuid)required
- name string (nullable)required
- status "active" | "paused" | "ended"required
active: participants can answer. paused: the session stays open (room code, joining) but answering is closed and its time limit stands still until live_session_resume. ended: participation is closed; live_session_reactivate reopens it.
- started_at stringrequired
When the session was first started. A reopened session keeps it; reactivated_at marks the current run.
- ends_at string (nullable)required
When participation closes automatically. While active, the earlier of the duration deadline and the scheduled participation end; while paused, only the scheduled participation end, because the time limit stands still. null when neither applies.
- ended_at string (nullable)required
- paused_at string (nullable)required
When the session was paused. Set only while status is paused, otherwise null.
- reactivated_at string (nullable)required
When the session was last reopened with live_session_reactivate, or null if it never was. The current run started then.
- rehearsal booleanrequired
- time_limited booleanrequired
Whether the session runs with a time limit. false means no duration limit; a scheduled participation end still applies. Pausing does not change it.
- duration_seconds integer (nullable)required
The time limit of the current run in seconds, or null without a duration limit.
- participant_count integerrequired
- remaining_seconds integer (nullable)required
Whole seconds left of the time limit: counting down to ends_at while active, frozen at the moment of the pause while paused, 0 once ended. null without a time limit.
- room_code string (nullable)required
The numeric code participants enter at the join page while this session is open (active or paused). null for a rehearsal and for an ended session.
- id string (uuid)required
- server_time stringrequired
- participation_url string (uri)required
Direct admission through the current room code; rehearsals require authenticated editor access.
- presentation_url string (uri)required
Owners get the public presentation link, editors and rehearsals the signed-in presentation page.
- qr_image stringrequired
PNG image of a QR code for participation_url, as a data URI (data:image/png;base64,…).
- warnings array of string
Problems that did not stop the session, such as a public presentation link that could not be prepared.
- session objectrequired
Example response
{
"ok": true,
"data": {
"session": {
"id": "3c1d9e47-2b8a-4f61-9d0e-5a7b8c9d0e1f",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"name": "Workshop",
"status": "active",
"started_at": "2026-10-14T10:00:00Z",
"ends_at": "2026-10-14T10:10:00Z",
"ended_at": null,
"rehearsal": false,
"paused_at": null,
"reactivated_at": null,
"time_limited": true,
"duration_seconds": 600,
"participant_count": 12,
"remaining_seconds": 600,
"room_code": "482915"
},
"server_time": "2026-10-14T10:00:00Z",
"participation_url": "https://www.empirio.ai/live?code=482915",
"presentation_url": "https://www.empirio.ai/c/sh_4430dd58-b6a5-42c1-bc54-42e33f47bc25.1.f791daf1d90c1101478e2ecda4c7512bb894bacdf3092a43b92847026b38fe1b",
"qr_image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAFAAQMAAAD3XjfpAAAABlBMVEX///8AAABVwtN+…"
}
}get/surveys/{survey_id}/live-sessions/{session_id}
Get live session
Read one live session. With include_results it also returns the live results the presentation shows — per question the answer counts, word-cloud texts or matrix cells — and, for editors, the answers hidden in the web presentation. Results need the responses scope. For filtered analysis across sessions use responses_aggregates with session_id or group_by session.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| session_id | path | string (uuid) | Yes | ID of the session to read. |
| include_results | query | boolean | No | Also return `results`, the session's live results (what the presentation shows), and for editors `hidden_answers`. Requires the responses scope. Defaults to false. |
| results_version | query | string | No | With include_results: the results_version of the results you already hold. When nothing changed since, the answer carries results_unchanged true and the current session instead of the results again, which makes polling cheap. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
- session objectrequired
One live session.
- id string (uuid)required
Session ID.
- survey_id string (uuid)required
- name string (nullable)required
- status "active" | "paused" | "ended"required
active: participants can answer. paused: the session stays open (room code, joining) but answering is closed and its time limit stands still until live_session_resume. ended: participation is closed; live_session_reactivate reopens it.
- started_at stringrequired
When the session was first started. A reopened session keeps it; reactivated_at marks the current run.
- ends_at string (nullable)required
When participation closes automatically. While active, the earlier of the duration deadline and the scheduled participation end; while paused, only the scheduled participation end, because the time limit stands still. null when neither applies.
- ended_at string (nullable)required
- paused_at string (nullable)required
When the session was paused. Set only while status is paused, otherwise null.
- reactivated_at string (nullable)required
When the session was last reopened with live_session_reactivate, or null if it never was. The current run started then.
- rehearsal booleanrequired
- time_limited booleanrequired
Whether the session runs with a time limit. false means no duration limit; a scheduled participation end still applies. Pausing does not change it.
- duration_seconds integer (nullable)required
The time limit of the current run in seconds, or null without a duration limit.
- participant_count integerrequired
- remaining_seconds integer (nullable)required
Whole seconds left of the time limit: counting down to ends_at while active, frozen at the moment of the pause while paused, 0 once ended. null without a time limit.
- room_code string (nullable)required
The numeric code participants enter at the join page while this session is open (active or paused). null for a rehearsal and for an ended session.
- id string (uuid)required
- server_time stringrequired
- results object
Live results of a session, as the presentation shows them.
- title string
- locale string
Survey content language. Word clouds use it to drop filler words.
- primary_color string
The survey's primary colour as #RRGGBB. Absent when the survey uses the default colour.
- participant_count numberrequired
Participants counted in these results, including responses past the monthly quota.
- questions array of objectrequired
- question_id stringrequired
- type stringrequired
- question string
- options array of object
- option_id stringrequired
- label stringrequired
- image_url string
- matrix_rows array of object
- option_id stringrequired
- label stringrequired
- matrix_columns array of object
- option_id stringrequired
- label stringrequired
- min number
- max number
- content string
Sanitized HTML body of a content block.
- image_url string
- scale_labels map of object
- presentation object
- chart_type "bar" | "column" | "pie" | "donut"
- text_display "cloud" | "cards"
- whole_answers boolean
- voting_enabled boolean
Text questions: participants can rate answers in the presentation.
- answer_count numberrequired
Participants who answered this question.
- count_only boolean
true exposes only answer_count because this question currently or previously collected private answers in the session. values is empty.
- values array of objectrequired
Answer counts. Questions marked count_only, including email, phone and privacy questions, report an empty array.
- value objectrequired
The answer: an option_id (`__other__` for free Other text, `__deleted_answer__` for removed choices), a number, a text, an ISO date or true/false.
- count numberrequired
- score number
Ranking questions: total rank points.
- average_rank number
- vote_score integer
Text voting: upvotes minus downvotes, independent of the answer count.
- first_seen_at number
Text voting: first occurrence timestamp in Unix milliseconds, used to order equal scores.
- row_id string
Matrix questions: the row's option_id.
- column_id string
Matrix questions: the column's option_id.
- value objectrequired
- hidden_answers array of object
Answers hidden from this session's results in the web presentation, per question. Editors only.
- question_id stringrequired
- values array of stringrequired
- results_version string
With include_results: the version of these results. Send it back as results_version to poll for changes.
- results_unchanged boolean
true when results_version was sent and the results did not change. results and hidden_answers are then left out.
- session objectrequired
Example response
{
"ok": true,
"data": {
"session": {
"id": "3c1d9e47-2b8a-4f61-9d0e-5a7b8c9d0e1f",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"name": "Workshop",
"status": "active",
"started_at": "2026-10-14T10:00:00Z",
"ends_at": "2026-10-14T10:10:00Z",
"ended_at": null,
"rehearsal": false,
"paused_at": null,
"reactivated_at": null,
"time_limited": true,
"duration_seconds": 600,
"participant_count": 12,
"remaining_seconds": 600,
"room_code": "482915"
},
"server_time": "2026-10-14T10:02:00Z",
"results": {
"title": "Sprint retro",
"locale": "en-US",
"participant_count": 12,
"questions": [
{
"question_id": "q_7b2f4e119c3a4a1d8e225f9d3b0a71e8",
"type": "single-choice",
"question": "How did this sprint feel?",
"options": [
{
"option_id": "opt_aaaa1111",
"label": "Great"
},
{
"option_id": "opt_bbbb2222",
"label": "Okay"
}
],
"presentation": {
"chart_type": "donut"
},
"answer_count": 12,
"values": [
{
"value": "opt_aaaa1111",
"count": 8
},
{
"value": "opt_bbbb2222",
"count": 4
}
]
},
{
"question_id": "q_3f8d4b21a0c94e6f9b2d7e5a1c8f0d34",
"type": "text",
"question": "One word for this sprint?",
"presentation": {
"text_display": "cloud"
},
"answer_count": 9,
"values": [
{
"value": "Calm",
"count": 4
},
{
"value": "Busy",
"count": 3
}
]
}
]
},
"hidden_answers": [
{
"question_id": "q_3f8d4b21a0c94e6f9b2d7e5a1c8f0d34",
"values": [
"Chaos"
]
}
]
}
}patch/surveys/{survey_id}/live-sessions/{session_id}
Update live session
Rename a live session, open or ended. The name labels it in the session history and the results filter. Requires edit access.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| session_id | path | string (uuid) | Yes | ID of the session to rename. Any session can be renamed, open or ended. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
Required
- name stringrequired
New label for the session history, such as the event or class. 1 to 120 characters after trimming.
Example — Changes the label shown in the session history and the results filter.
{
"name": "Monday all-hands (team A)"
}Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
- session objectrequired
One live session.
- id string (uuid)required
Session ID.
- survey_id string (uuid)required
- name string (nullable)required
- status "active" | "paused" | "ended"required
active: participants can answer. paused: the session stays open (room code, joining) but answering is closed and its time limit stands still until live_session_resume. ended: participation is closed; live_session_reactivate reopens it.
- started_at stringrequired
When the session was first started. A reopened session keeps it; reactivated_at marks the current run.
- ends_at string (nullable)required
When participation closes automatically. While active, the earlier of the duration deadline and the scheduled participation end; while paused, only the scheduled participation end, because the time limit stands still. null when neither applies.
- ended_at string (nullable)required
- paused_at string (nullable)required
When the session was paused. Set only while status is paused, otherwise null.
- reactivated_at string (nullable)required
When the session was last reopened with live_session_reactivate, or null if it never was. The current run started then.
- rehearsal booleanrequired
- time_limited booleanrequired
Whether the session runs with a time limit. false means no duration limit; a scheduled participation end still applies. Pausing does not change it.
- duration_seconds integer (nullable)required
The time limit of the current run in seconds, or null without a duration limit.
- participant_count integerrequired
- remaining_seconds integer (nullable)required
Whole seconds left of the time limit: counting down to ends_at while active, frozen at the moment of the pause while paused, 0 once ended. null without a time limit.
- room_code string (nullable)required
The numeric code participants enter at the join page while this session is open (active or paused). null for a rehearsal and for an ended session.
- id string (uuid)required
- server_time stringrequired
- session objectrequired
Example response
{
"ok": true,
"data": {
"session": {
"id": "3c1d9e47-2b8a-4f61-9d0e-5a7b8c9d0e1f",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"name": "Workshop (team A)",
"status": "active",
"started_at": "2026-10-14T10:00:00Z",
"ends_at": "2026-10-14T10:10:00Z",
"ended_at": null,
"rehearsal": false,
"paused_at": null,
"reactivated_at": null,
"time_limited": true,
"duration_seconds": 600,
"participant_count": 12,
"remaining_seconds": 480,
"room_code": "482915"
},
"server_time": "2026-10-14T10:02:00Z"
}
}delete/surveys/{survey_id}/live-sessions/{session_id}
Delete live session
Delete a live session with its responses and participations. Owner only; the session must not be open. Takes effect immediately and cannot be undone through the API. Results links filtered to this session show nothing until the filter is changed.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| session_id | path | string (uuid) | Yes | ID of the session to delete. It must not be open: end an active or paused session first. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
- session_id string (uuid)required
ID of the deleted session.
- deleted truerequired
- deleted_response_count integerrequired
Responses of the session that were deleted with it. Its participations without a response are removed too.
- session_id string (uuid)required
Example response
{
"ok": true,
"data": {
"session_id": "7e2f4a90-1c3b-4d5e-8f60-a1b2c3d4e5f6",
"deleted": true,
"deleted_response_count": 18
}
}post/surveys/{survey_id}/live-sessions/{session_id}/end
End live session
End a live session, active or paused. Participation closes, people still answering are completed with what they answered, and every answer is kept. live_session_reactivate can reopen the session later, but completed participations stay completed. To stop answering only for a moment, use live_session_pause. Requires edit access.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| session_id | path | string (uuid) | Yes | ID of the session to end. Ending an already ended session returns it unchanged. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
- session objectrequired
One live session.
- id string (uuid)required
Session ID.
- survey_id string (uuid)required
- name string (nullable)required
- status "active" | "paused" | "ended"required
active: participants can answer. paused: the session stays open (room code, joining) but answering is closed and its time limit stands still until live_session_resume. ended: participation is closed; live_session_reactivate reopens it.
- started_at stringrequired
When the session was first started. A reopened session keeps it; reactivated_at marks the current run.
- ends_at string (nullable)required
When participation closes automatically. While active, the earlier of the duration deadline and the scheduled participation end; while paused, only the scheduled participation end, because the time limit stands still. null when neither applies.
- ended_at string (nullable)required
- paused_at string (nullable)required
When the session was paused. Set only while status is paused, otherwise null.
- reactivated_at string (nullable)required
When the session was last reopened with live_session_reactivate, or null if it never was. The current run started then.
- rehearsal booleanrequired
- time_limited booleanrequired
Whether the session runs with a time limit. false means no duration limit; a scheduled participation end still applies. Pausing does not change it.
- duration_seconds integer (nullable)required
The time limit of the current run in seconds, or null without a duration limit.
- participant_count integerrequired
- remaining_seconds integer (nullable)required
Whole seconds left of the time limit: counting down to ends_at while active, frozen at the moment of the pause while paused, 0 once ended. null without a time limit.
- room_code string (nullable)required
The numeric code participants enter at the join page while this session is open (active or paused). null for a rehearsal and for an ended session.
- id string (uuid)required
- server_time stringrequired
- session objectrequired
Example response
{
"ok": true,
"data": {
"session": {
"id": "3c1d9e47-2b8a-4f61-9d0e-5a7b8c9d0e1f",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"name": "Workshop",
"status": "ended",
"started_at": "2026-10-14T10:00:00Z",
"ends_at": "2026-10-14T10:10:00Z",
"ended_at": "2026-10-14T10:05:00Z",
"rehearsal": false,
"paused_at": null,
"reactivated_at": null,
"time_limited": true,
"duration_seconds": 600,
"participant_count": 12,
"remaining_seconds": 0,
"room_code": null
},
"server_time": "2026-10-14T10:05:00Z"
}
}post/surveys/{survey_id}/live-sessions/{session_id}/pause
Pause live session
Pause an active live session: answering and voting close until live_session_resume, and the session's time limit stands still. The session stays open: its room code keeps working, people can still join and see that voting is paused, and it still blocks starting another session. End and the scheduled participation end still close it. Requires edit access.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| session_id | path | string (uuid) | Yes | ID of the active session to pause. Pausing an already paused session returns it unchanged. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
- session objectrequired
One live session.
- id string (uuid)required
Session ID.
- survey_id string (uuid)required
- name string (nullable)required
- status "active" | "paused" | "ended"required
active: participants can answer. paused: the session stays open (room code, joining) but answering is closed and its time limit stands still until live_session_resume. ended: participation is closed; live_session_reactivate reopens it.
- started_at stringrequired
When the session was first started. A reopened session keeps it; reactivated_at marks the current run.
- ends_at string (nullable)required
When participation closes automatically. While active, the earlier of the duration deadline and the scheduled participation end; while paused, only the scheduled participation end, because the time limit stands still. null when neither applies.
- ended_at string (nullable)required
- paused_at string (nullable)required
When the session was paused. Set only while status is paused, otherwise null.
- reactivated_at string (nullable)required
When the session was last reopened with live_session_reactivate, or null if it never was. The current run started then.
- rehearsal booleanrequired
- time_limited booleanrequired
Whether the session runs with a time limit. false means no duration limit; a scheduled participation end still applies. Pausing does not change it.
- duration_seconds integer (nullable)required
The time limit of the current run in seconds, or null without a duration limit.
- participant_count integerrequired
- remaining_seconds integer (nullable)required
Whole seconds left of the time limit: counting down to ends_at while active, frozen at the moment of the pause while paused, 0 once ended. null without a time limit.
- room_code string (nullable)required
The numeric code participants enter at the join page while this session is open (active or paused). null for a rehearsal and for an ended session.
- id string (uuid)required
- server_time stringrequired
- session objectrequired
Example response
{
"ok": true,
"data": {
"session": {
"id": "3c1d9e47-2b8a-4f61-9d0e-5a7b8c9d0e1f",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"name": "Workshop",
"status": "paused",
"started_at": "2026-10-14T10:00:00Z",
"ends_at": null,
"ended_at": null,
"rehearsal": false,
"paused_at": "2026-10-14T10:04:00Z",
"reactivated_at": null,
"time_limited": true,
"duration_seconds": 600,
"participant_count": 12,
"remaining_seconds": 360,
"room_code": "482915"
},
"server_time": "2026-10-14T10:04:00Z"
}
}post/surveys/{survey_id}/live-sessions/{session_id}/resume
Resume live session
Resume a paused live session: participants can answer again and the time limit continues with the time that was left at the pause. Requires edit access.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| session_id | path | string (uuid) | Yes | ID of the paused session to resume. Resuming a session that is already active returns it unchanged. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
- session objectrequired
One live session.
- id string (uuid)required
Session ID.
- survey_id string (uuid)required
- name string (nullable)required
- status "active" | "paused" | "ended"required
active: participants can answer. paused: the session stays open (room code, joining) but answering is closed and its time limit stands still until live_session_resume. ended: participation is closed; live_session_reactivate reopens it.
- started_at stringrequired
When the session was first started. A reopened session keeps it; reactivated_at marks the current run.
- ends_at string (nullable)required
When participation closes automatically. While active, the earlier of the duration deadline and the scheduled participation end; while paused, only the scheduled participation end, because the time limit stands still. null when neither applies.
- ended_at string (nullable)required
- paused_at string (nullable)required
When the session was paused. Set only while status is paused, otherwise null.
- reactivated_at string (nullable)required
When the session was last reopened with live_session_reactivate, or null if it never was. The current run started then.
- rehearsal booleanrequired
- time_limited booleanrequired
Whether the session runs with a time limit. false means no duration limit; a scheduled participation end still applies. Pausing does not change it.
- duration_seconds integer (nullable)required
The time limit of the current run in seconds, or null without a duration limit.
- participant_count integerrequired
- remaining_seconds integer (nullable)required
Whole seconds left of the time limit: counting down to ends_at while active, frozen at the moment of the pause while paused, 0 once ended. null without a time limit.
- room_code string (nullable)required
The numeric code participants enter at the join page while this session is open (active or paused). null for a rehearsal and for an ended session.
- id string (uuid)required
- server_time stringrequired
- session objectrequired
Example response
{
"ok": true,
"data": {
"session": {
"id": "3c1d9e47-2b8a-4f61-9d0e-5a7b8c9d0e1f",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"name": "Workshop",
"status": "active",
"started_at": "2026-10-14T10:00:00Z",
"ends_at": "2026-10-14T10:12:00Z",
"ended_at": null,
"rehearsal": false,
"paused_at": null,
"reactivated_at": null,
"time_limited": true,
"duration_seconds": 600,
"participant_count": 12,
"remaining_seconds": 360,
"room_code": "482915"
},
"server_time": "2026-10-14T10:06:00Z"
}
}post/surveys/{survey_id}/live-sessions/{session_id}/reactivate
Reactivate live session
Reopen an ended live session, so participants can answer again in the same session: its answers and room code are kept and it continues in the session history and results. It runs the currently published version of the survey; pending working-draft changes are not published. The time limit starts again from now (duration_seconds overrides settings.live.duration_seconds). People who completed their participation in the session stay completed. Refused with conflict while another session of the survey is open (error.context.active_session_id names it), for a rehearsal, once the scheduled participation end has passed, and while the session's end is still being processed (retry shortly). Returns the session; the participation link and room code stay those of the survey. Requires edit access.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| session_id | path | string (uuid) | Yes | ID of the ended session to reopen. Reopening a session that is already open returns it unchanged. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
- duration_seconds integer (nullable)
How long participants can answer from now on, in seconds (1 to 86400). Omit to use settings.live.duration_seconds of the published survey. null means no duration limit; the session stays open until manually ended or the scheduled participation end.
Example — Continues the ended session with the published survey; its answers and room code are kept and the time limit starts again from now.
{
"duration_seconds": 300
}Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
- session objectrequired
One live session.
- id string (uuid)required
Session ID.
- survey_id string (uuid)required
- name string (nullable)required
- status "active" | "paused" | "ended"required
active: participants can answer. paused: the session stays open (room code, joining) but answering is closed and its time limit stands still until live_session_resume. ended: participation is closed; live_session_reactivate reopens it.
- started_at stringrequired
When the session was first started. A reopened session keeps it; reactivated_at marks the current run.
- ends_at string (nullable)required
When participation closes automatically. While active, the earlier of the duration deadline and the scheduled participation end; while paused, only the scheduled participation end, because the time limit stands still. null when neither applies.
- ended_at string (nullable)required
- paused_at string (nullable)required
When the session was paused. Set only while status is paused, otherwise null.
- reactivated_at string (nullable)required
When the session was last reopened with live_session_reactivate, or null if it never was. The current run started then.
- rehearsal booleanrequired
- time_limited booleanrequired
Whether the session runs with a time limit. false means no duration limit; a scheduled participation end still applies. Pausing does not change it.
- duration_seconds integer (nullable)required
The time limit of the current run in seconds, or null without a duration limit.
- participant_count integerrequired
- remaining_seconds integer (nullable)required
Whole seconds left of the time limit: counting down to ends_at while active, frozen at the moment of the pause while paused, 0 once ended. null without a time limit.
- room_code string (nullable)required
The numeric code participants enter at the join page while this session is open (active or paused). null for a rehearsal and for an ended session.
- id string (uuid)required
- server_time stringrequired
- session objectrequired
Example response
{
"ok": true,
"data": {
"session": {
"id": "7e2f4a90-1c3b-4d5e-8f60-a1b2c3d4e5f6",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"name": "Workshop",
"status": "active",
"started_at": "2026-10-14T10:00:00Z",
"ends_at": "2026-10-14T11:05:00Z",
"ended_at": null,
"rehearsal": false,
"paused_at": null,
"reactivated_at": "2026-10-14T11:00:00Z",
"time_limited": true,
"duration_seconds": 300,
"participant_count": 12,
"remaining_seconds": 300,
"room_code": "482915"
},
"server_time": "2026-10-14T11:00:00Z"
}
}Folders
Your personal folders for organising surveys, including surveys shared with you. Collaborators never see each other's folders.
get/folders
List folders
List your own folders and folders shared with you, each with the number of accessible surveys. survey_list reports personal folder_id placement; filtering by a shared folder also includes its shared contents.
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
- folders array of objectrequired
All your folders, in list order.
- id string (uuid)required
Folder ID.
- name stringrequired
- position integerrequired
Zero-based position in your folder list.
- survey_count integerrequired
Surveys you can access that are filed in this folder.
- created_at stringrequired
- owner_id string (uuid)required
Account that owns this folder.
- shared booleanrequired
Whether the folder is shared with another account.
- folder_role "owner" | "editor" | "viewer"required
Your role on the folder. Only its owner manages invitations and removes shared contents.
- survey_role "editor" | "viewer"required
Access granted to surveys through your folder membership; other grants may provide more access.
- id string (uuid)required
- folders array of objectrequired
Example response
{
"ok": true,
"data": {
"folders": [
{
"owner_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"shared": false,
"folder_role": "owner",
"survey_role": "editor",
"id": "5b6c7d8e-9f01-4a2b-8c3d-4e5f6a7b8c9d",
"name": "Workshops",
"position": 0,
"survey_count": 3,
"created_at": "2026-10-01T08:00:00Z"
}
]
}
}post/folders
Create folder
Create a personal folder at the end of your list (HTTP 201), or return the folder you already have with that name (ignoring case) unchanged (already_exists true, HTTP 200).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
Required
- name stringrequired
Folder name, 1 to 80 characters. Names are unique per person, ignoring case.
Example — Creates the folder, or returns the one you already have with that name.
{
"name": "Workshops"
}Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 201 | Resource created |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
- folder objectrequired
A folder you own or that is shared with you.
- id string (uuid)required
Folder ID.
- name stringrequired
- position integerrequired
Zero-based position in your folder list.
- survey_count integerrequired
Surveys you can access that are filed in this folder.
- created_at stringrequired
- owner_id string (uuid)required
Account that owns this folder.
- shared booleanrequired
Whether the folder is shared with another account.
- folder_role "owner" | "editor" | "viewer"required
Your role on the folder. Only its owner manages invitations and removes shared contents.
- survey_role "editor" | "viewer"required
Access granted to surveys through your folder membership; other grants may provide more access.
- id string (uuid)required
- already_exists booleanrequired
True when you already had a folder of that name and it was returned unchanged.
- folder objectrequired
Example response
{
"ok": true,
"data": {
"folder": {
"owner_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"shared": false,
"folder_role": "owner",
"survey_role": "editor",
"id": "5b6c7d8e-9f01-4a2b-8c3d-4e5f6a7b8c9d",
"name": "Workshops",
"position": 0,
"survey_count": 3,
"created_at": "2026-10-01T08:00:00Z"
},
"already_exists": false
}
}patch/folders/{folder_id}
Update folder
Rename one of your folders or move it to another position in your list.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| folder_id | path | string (uuid) | Yes | ID of the folder to change. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
- name string
New name, 1 to 80 characters. Omit to keep the name.
- position integer
New zero-based position in your folder list. The other folders shift. Omit to keep the position.
Example — Renames the folder and puts it first in your list.
{
"name": "Workshops 2026",
"position": 0
}Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
- folder objectrequired
A folder you own or that is shared with you.
- id string (uuid)required
Folder ID.
- name stringrequired
- position integerrequired
Zero-based position in your folder list.
- survey_count integerrequired
Surveys you can access that are filed in this folder.
- created_at stringrequired
- owner_id string (uuid)required
Account that owns this folder.
- shared booleanrequired
Whether the folder is shared with another account.
- folder_role "owner" | "editor" | "viewer"required
Your role on the folder. Only its owner manages invitations and removes shared contents.
- survey_role "editor" | "viewer"required
Access granted to surveys through your folder membership; other grants may provide more access.
- id string (uuid)required
- folder objectrequired
Example response
{
"ok": true,
"data": {
"folder": {
"owner_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"shared": false,
"folder_role": "owner",
"survey_role": "editor",
"id": "5b6c7d8e-9f01-4a2b-8c3d-4e5f6a7b8c9d",
"name": "Workshops 2026",
"position": 0,
"survey_count": 3,
"created_at": "2026-10-01T08:00:00Z"
}
}
}delete/folders/{folder_id}
Delete folder
Delete one of your folders and end access granted through it. The surveys and other direct or folder grants are kept.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| folder_id | path | string (uuid) | Yes | ID of the folder to delete. Its surveys are not deleted. They move out of the folder. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
- folder_id string (uuid)required
- deleted truerequired
Example response
{
"ok": true,
"data": {
"folder_id": "5b6c7d8e-9f01-4a2b-8c3d-4e5f6a7b8c9d",
"deleted": true
}
}patch/surveys/{survey_id}/folder
Move survey to folder
File a survey in one of your folders, or take it out of any folder with folder_id null. Name the folder by folder_id or by folder_name, and add create_if_missing to create a named folder you do not have yet. Filing your own survey in any folder requires the responses scope, including private or newly created folders, because membership can grant response access. Folder editors may add their own surveys to someone else's shared folder by ID, preserving their personal placement. Foreign surveys may be filed personally but are never shared onward. Only the folder owner removes shared contents.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
- folder_id string (uuid) (nullable)
Folder to file the survey in, or null to take it out of any folder. Use either folder_id or folder_name.
- folder_name string
Name of one of your folders, instead of folder_id. Case does not matter.
- create_if_missing boolean
With folder_name: create the folder when you have none of that name. Defaults to false, which answers not_found.
Example — Creates the private folder if it does not exist yet and moves the survey into it.
{
"folder_name": "Workshops",
"create_if_missing": true
}Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
- survey_id string (uuid)required
- folder_id string (uuid) (nullable)required
The folder the survey is now in, or null.
- previous_folder_id string (uuid) (nullable)required
Example response
{
"ok": true,
"data": {
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"folder_id": "5b6c7d8e-9f01-4a2b-8c3d-4e5f6a7b8c9d",
"previous_folder_id": null
}
}Templates
The template catalog. Read a template, then create a survey from it with survey_create and template_id.
get/templates
List survey templates
List the template catalog, optionally by survey mode and category, in one language. Read a template's questions with template_get and create a survey from it with survey_create and template_id.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| locale | query | "en-US" | "en-GB" | "de-DE" | "de-AT" | "de-CH" | "fr-FR" | "es-ES" | "it-IT" | "nl-NL" | No | Language of the template texts: en-US, en-GB, de-DE, de-AT, de-CH, fr-FR, es-ES, it-IT, nl-NL. Defaults to your language. |
| category | query | "customer" | "employee" | "market" | "education" | "hr" | "event" | "forms" | "other" | "meetings" | "leads" | No | Only templates of this category: customer, employee, market, education, hr, event, forms, other, meetings, leads. |
| survey_mode | query | "survey" | "quiz" | "live" | No | Only templates of this survey mode: survey, quiz or live. |
| cursor | query | string | No | next_cursor from the previous page. Omit for the first page. |
| limit | query | integer | No | Page size, 1 to 200, default 50. Follow next_cursor until it is null. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
- templates array of objectrequired
- id string (uuid)required
Template ID. Pass it to template_get or to survey_create as template_id.
- slug string (nullable)required
The template's web address part, as in /templates/<slug>.
- title stringrequired
- description string (nullable)required
- category "customer" | "employee" | "market" | "education" | "hr" | "event" | "forms" | "other" | "meetings" | "leads"required
- survey_mode "survey" | "quiz" | "live"required
Survey mode: survey (classic survey), quiz (scored answers) or live (live polls in sessions with a presentation).
- appearance objectrequired
- template stringrequired
Design template name.
- primary_color string (nullable)required
Primary colour as #RRGGBB, or null for the design's own.
- display_mode "all" | "single" | "pages"
- template stringrequired
- id string (uuid)required
- total integerrequired
Templates matching the filters, ignoring paging.
- next_cursor string (nullable)required
- templates array of objectrequired
Example response
{
"ok": true,
"data": {
"templates": [
{
"id": "4f2b3f0e-8612-5a47-a105-a84aefa9296b",
"slug": "phishing-check",
"title": "Phishing check",
"description": "Ten everyday situations with example mails, solutions and an 80 percent pass mark.",
"category": "employee",
"survey_mode": "quiz",
"appearance": {
"template": "standard",
"primary_color": "#EE2B4B"
}
}
],
"total": 1,
"next_cursor": null
}
}get/templates/{template_id}
Get survey template
Read one template with its questions, in the shape survey_get reports questions, including the solutions of quiz templates. Nothing is created.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| template_id | path | string (uuid) | Yes | Template ID from template_list. |
| locale | query | "en-US" | "en-GB" | "de-DE" | "de-AT" | "de-CH" | "fr-FR" | "es-ES" | "it-IT" | "nl-NL" | No | Language of the template texts: en-US, en-GB, de-DE, de-AT, de-CH, fr-FR, es-ES, it-IT, nl-NL. Defaults to your language. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
- id string (uuid)required
Template ID. Pass it to template_get or to survey_create as template_id.
- slug string (nullable)required
The template's web address part, as in /templates/<slug>.
- title stringrequired
- description string (nullable)required
- category "customer" | "employee" | "market" | "education" | "hr" | "event" | "forms" | "other" | "meetings" | "leads"required
- survey_mode "survey" | "quiz" | "live"required
Survey mode: survey (classic survey), quiz (scored answers) or live (live polls in sessions with a presentation).
- appearance objectrequired
- template stringrequired
Design template name.
- primary_color string (nullable)required
Primary colour as #RRGGBB, or null for the design's own.
- display_mode "all" | "single" | "pages"
- template stringrequired
- locale stringrequired
Language the texts are in.
- question_count integerrequired
- questions array of objectrequired
The template's questions in the shape survey_get reports them, including quiz solutions.
- scoring object
Quiz scoring, when the question has any. Change it with `scoring` in a question update.
- enabled booleanrequired
Whether the question is scored in a quiz.
- points integerrequired
Points for a correct answer.
- correct_option_ids array of string
Correct answer options of a choice or dropdown question: option_id values from survey_get, or, for options created in the same request, the option's ref (give the option as {"label": …, "ref": …}). A value that is neither is read as an option label when it matches the label of exactly one option of the question (exact text, trimmed, case-sensitive). An ambiguous or unknown label is refused. The answer must match the set exactly, with no partial credit. Single-choice types take exactly one.
- correct_boolean boolean
The correct answer of a yes-no question: true for yes, false for no.
- numeric_range object
The correct answer of a number question as an inclusive range. min=max expresses an exact answer.
- min numberrequired
- max numberrequired
- explanation string
Why the answer is correct. Shown with the solution when the quiz shows solutions.
- ai_generated boolean
Marks a solution suggested by AI that still needs a human check. The editor flags it until reviewed.
- enabled booleanrequired
- presentation object
How the question's results are displayed in the live presentation and shared results. Not used for email, phone, number, date, privacy and content questions.
- chart_type "bar" | "column" | "pie" | "donut"
Chart for a choice, rating, scale, NPS, yes-no or ranking question in the live presentation and shared results: bar, column, pie or donut.
- text_display "cloud" | "cards"
Text and long-text questions only: cloud for a word cloud, cards for the answers as written. Default for shared results and MCP; interactive presentation tabs choose their display locally.
- voting_enabled boolean
Text and long-text questions only: show ranked full-text cards with upvotes and downvotes, without display tabs. Stored cloud/cards preferences remain available when voting is turned off; legacy whole_answers is retained but ignored. Participants vote only in the participant presentation: a live vote needs settings.live.presentation_before_participation or presentation_after_participation; a write that turns voting on without either, and sets neither, turns presentation_after_participation on and says so in warnings.
- whole_answers boolean
Legacy grouping preference retained for compatibility. Word clouds always tokenize individual words; this value no longer affects rendering.
- chart_type "bar" | "column" | "pie" | "donut"
- question_id string (nullable)required
Stable question ID. `null` only for legacy rows without an assigned id.
- ref string
The caller-chosen name this question was given, when it has one. Usable in place of `question_id` wherever a question is addressed.
- type stringrequired
Question type (e.g. text, multiple-choice, matrix, rating).
- question stringrequired
Question title (human-readable prompt).
- required boolean
- subtitle string
- show_subtitle boolean
- page_id string
ID of the page this question is on. Absent when the question has no page assignment.
- options array of object
Answer options for selection questions. Each option has a stable option_id and display label.
- option_id string
Stable opaque option identifier. Use in option_operations to rename, delete, or reorder. Absent on legacy options stored without one — echo the entry back without the key and the next write assigns a real identifier.
- label stringrequired
Display label for this option.
- ref string
The caller-chosen name this option was given, when it has one. Usable in place of `option_id` wherever an option is addressed. Absent on options nobody named — most of them.
- image_url string
The option's image, as the storage path it is held under. Present only on `image-single-choice` and `image-multiple-choice` options that have one. Send it back unchanged to keep the image, an `https` URL to replace it, or `null` to remove it. This is a path and not a link: to display the image, exchange it for a signed URL through the asset endpoints.
- option_id string
- matrix_rows array of object
Matrix row options with stable identifiers.
- option_id string
Stable opaque option identifier. Use in option_operations to rename, delete, or reorder. Absent on legacy options stored without one — echo the entry back without the key and the next write assigns a real identifier.
- label stringrequired
Display label for this option.
- ref string
The caller-chosen name this option was given, when it has one. Usable in place of `option_id` wherever an option is addressed. Absent on options nobody named — most of them.
- image_url string
The option's image, as the storage path it is held under. Present only on `image-single-choice` and `image-multiple-choice` options that have one. Send it back unchanged to keep the image, an `https` URL to replace it, or `null` to remove it. This is a path and not a link: to display the image, exchange it for a signed URL through the asset endpoints.
- option_id string
- matrix_columns array of object
Matrix column options with stable identifiers.
- option_id string
Stable opaque option identifier. Use in option_operations to rename, delete, or reorder. Absent on legacy options stored without one — echo the entry back without the key and the next write assigns a real identifier.
- label stringrequired
Display label for this option.
- ref string
The caller-chosen name this option was given, when it has one. Usable in place of `option_id` wherever an option is addressed. Absent on options nobody named — most of them.
- image_url string
The option's image, as the storage path it is held under. Present only on `image-single-choice` and `image-multiple-choice` options that have one. Send it back unchanged to keep the image, an `https` URL to replace it, or `null` to remove it. This is a path and not a link: to display the image, exchange it for a signed URL through the asset endpoints.
- option_id string
- min number
- max number
- scale_labels object
Optional labels for the min and max endpoints of a scale/rating question.
- min string
- max string
- allow_other boolean
- randomize_options boolean
- randomize_rows boolean
- min_selections number
- max_selections number
- content string
- image_url string
- content_image_paths array of string
- privacy_checkbox_label string
- file_types array of "pdf" | "docx" | "image"
`file-upload`: accepted files — `pdf`, `docx` (Word), `image` (JPEG and PNG).
- max_files integer
`file-upload`: how many files a participant may attach.
- availability object
When a `booking` or `scheduling-poll` question offers slots. An update replaces the whole object, so send the complete availability when changing it.
- mode "datetime" | "date"required
`datetime` offers time slots of `interval` minutes; `date` offers whole days.
- interval integerrequired
Slot length in minutes: 10, 15, 20, 30, 60.
- weekdays array of "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun"required
Offered weekdays in calendar order.
- hours array of objectrequired
Offered time ranges of a day, `HH:MM`, ascending and non-overlapping.
- from stringrequired
- to stringrequired
- window object | objectrequired
Which dates are offered.
- excluded array of stringrequired
Dates (`YYYY-MM-DD`) not offered, ascending.
- timezone stringrequired
IANA time zone every slot is given in.
- mode "datetime" | "date"required
- capacity integer
`booking`: how many participants may book the same slot.
- min_notice_hours integer
`booking`: minimum lead time in hours before a slot can be booked.
- allow_multiple boolean
`scheduling-poll`: whether a participant may mark several slots.
- translations map of object
Optional per-locale translation payload and generation status keyed by BCP-47 locale. Treat `status` as authoritative: `pending` content may be a copy of the master-locale text.
- scoring object
- id string (uuid)required
Example response
{
"ok": true,
"data": {
"id": "4f2b3f0e-8612-5a47-a105-a84aefa9296b",
"slug": "phishing-check",
"title": "Phishing check",
"description": "Ten everyday situations with example mails, solutions and an 80 percent pass mark.",
"category": "employee",
"survey_mode": "quiz",
"locale": "en-US",
"question_count": 1,
"questions": [
{
"question_id": "q-https",
"type": "yes-no",
"question": "Does a padlock in the address bar prove a site is trustworthy?",
"required": true,
"scoring": {
"enabled": true,
"points": 1,
"correct_boolean": false,
"explanation": "It only shows the connection is encrypted."
}
}
],
"appearance": {
"template": "standard",
"primary_color": "#EE2B4B",
"display_mode": "single"
}
}
}Webhooks
Overview
empirio.ai can push survey responses to your server as soon as they are submitted. Webhooks complement the REST API — you register endpoints once, and empirio.ai delivers signed JSON payloads every time a respondent finishes a survey.
| Property | Value |
|---|---|
| Direction | Outbound (empirio.ai → your server) |
| Trigger | survey.response.submitted |
| Transport | HTTPS only (private IP ranges rejected) |
| Signing | HMAC-SHA256 over <timestamp>.<raw request body> |
| Content type | application/json |
| Max endpoints per survey | 10 |
| Retries | 3 attempts in total; retries after about 1 and 10 minutes with jitter, respecting Retry-After |
Endpoints are managed in Settings → Integrations in the empirio.ai app or over the REST API — see Endpoints in the sidebar. The signing secret is returned only once on creation — store it immediately.
Endpoints
Register, inspect, and remove delivery endpoints over the REST API. These endpoints use the same Bearer authentication, rate limits and Idempotency-Key header as the rest of the REST API.
They require both the webhooks and responses scopes, and are not reachable with any other grant. webhooks is a permission of its own because registering an endpoint sends response data out of the account continuously, to a destination the caller picks; responses is required alongside it because the endpoint receives response content, so a token that cannot read responses cannot arrange for them to be delivered elsewhere either.
They are also not exposed as CLI commands (x-cli-hidden) or as MCP tools. Registering a delivery endpoint is a durable account configuration for an automation platform, not something to type at a terminal or hand to an agent mid-conversation — and the signing secret is returned exactly once.
| Method | Path | Purpose |
|---|---|---|
GET | /surveys/{survey_id}/webhooks | List endpoints on a survey |
POST | /surveys/{survey_id}/webhooks | Register an endpoint |
PATCH | /webhooks/{webhook_id} | Change URL, label, or delivery state |
DELETE | /webhooks/{webhook_id} | Remove an endpoint |
POST | /webhooks/{webhook_id}/rotate-secret | Issue a new signing secret |
POST | /webhooks/{webhook_id}/deliveries/{delivery_id}/resolve | Resolve a Make notification to its stored payload |
Idempotent registration
POST /surveys/{survey_id}/webhooks is idempotent on endpoint_url:
- New endpoint → 201 with
already_exists: falseand the signingsecret(64 hex characters), returned this one time only. - URL already registered on the survey → 200 with
already_exists: true, the existing configuration, andsecret: null. Lost secrets are replaced viaPOST /webhooks/{webhook_id}/rotate-secret, never re-revealed.
Automation platforms can therefore run "create the endpoint if it does not exist" on every workflow activation without special-casing conflicts.
Labels and ownership
label (max 120 characters) is descriptive. managed_by (zapier | make | n8n | custom) identifies the registering client; make additionally enables the delivery-proof and authenticated fetch-back transport. Both are returned on every webhook object and are null when unset. An idempotent registration with an explicit managed_by value adopts the existing endpoint for that client and resumes it when paused.
Limits
A survey accepts up to 10 endpoints. Registering an eleventh returns 400 with validation_error. Endpoints must be HTTPS and resolve to a public address; private, link-local, and loopback ranges are rejected.
get/surveys/{survey_id}/webhooks
List webhook endpoints
List the webhook endpoints registered on a survey. Signing secrets are never returned.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `webhook_list`.
- webhooks array of objectrequired
Endpoints registered on this survey.
- id string (uuid)required
Webhook ID.
- survey_id string (uuid)required
Survey this endpoint belongs to.
- endpoint_url stringrequired
HTTPS endpoint that receives deliveries.
- label string (nullable)required
Human-readable name, or null when unset.
- managed_by "zapier" | "make" | "n8n" | "custom" (nullable)required
Tool that registered the endpoint, or null when unset.
- is_active booleanrequired
False while deliveries are paused.
- created_at stringrequired
ISO-8601 creation timestamp.
- updated_at stringrequired
ISO-8601 timestamp of the last change.
- id string (uuid)required
- webhooks array of objectrequired
Example response
{
"ok": true,
"data": {
"webhooks": [
{
"id": "6a1f2c84-9b3d-4e57-8c21-7f0a5d3b9e64",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"endpoint_url": "https://hooks.example.com/empirio",
"label": "Production CRM sync",
"managed_by": "n8n",
"is_active": true,
"created_at": "2026-08-01T09:14:22.000Z",
"updated_at": "2026-08-01T09:14:22.000Z"
}
]
}
}post/surveys/{survey_id}/webhooks
Create webhook endpoint
Register an HTTPS endpoint that receives a signed JSON payload whenever a response is submitted to this survey. A survey accepts up to 10 endpoints.
The call is idempotent on the endpoint URL: registering a URL that already exists on the survey returns the existing configuration with already_exists: true and secret: null (HTTP 200) instead of an error. A newly created endpoint answers HTTP 201 and returns the signing secret exactly once — store it immediately; use rotate-secret if it is lost.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| survey_id | path | string (uuid) | Yes | Survey ID. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
Required
- endpoint_url string (uri)required
HTTPS endpoint that receives the signed delivery. Private/internal hosts are rejected.
- label string
Optional human-readable name for this endpoint (max 120 characters).
- managed_by "zapier" | "make" | "n8n" | "custom"
Which tool registered this endpoint. It identifies automation-created endpoints on the Integrations page; the make value also enables the authenticated delivery fetch-back flow.
Example — Registers an HTTPS endpoint that receives every submitted response.
{
"endpoint_url": "https://hooks.example.com/empirio",
"label": "Production CRM sync"
}Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 201 | Resource created |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `webhook_create`.
- webhook objectrequired
Webhook endpoint configuration.
- id string (uuid)required
Webhook ID.
- survey_id string (uuid)required
Survey this endpoint belongs to.
- endpoint_url stringrequired
HTTPS endpoint that receives deliveries.
- label string (nullable)required
Human-readable name, or null when unset.
- managed_by "zapier" | "make" | "n8n" | "custom" (nullable)required
Tool that registered the endpoint, or null when unset.
- is_active booleanrequired
False while deliveries are paused.
- created_at stringrequired
ISO-8601 creation timestamp.
- updated_at stringrequired
ISO-8601 timestamp of the last change.
- id string (uuid)required
- secret string (nullable)required
Signing secret (64 hex characters), returned only when the endpoint was newly created. Null when `already_exists` is true — use `rotate-secret` to obtain a new secret.
- already_exists booleanrequired
True when this endpoint URL was already registered on the survey and the existing configuration was returned (HTTP 200 instead of 201). A paused endpoint is resumed before it is returned, so a successful call always means deliveries are active.
- secret_withheld boolean
True when this response is a replay of an earlier request with the same `Idempotency-Key`. The signing secret is revealed once, to the request that created or rotated it, and is not stored for replay — so `secret` is null here. Call `rotate-secret` to obtain a usable secret.
- endpoint_url_redacted boolean
True when this response is a replay of an earlier request with the same `Idempotency-Key`. The endpoint URL is not kept for replay — for Zapier catch hooks, Slack and Discord the URL is itself the credential — so `webhook.endpoint_url` is reduced to `scheme://host/#redacted` here and must not be stored as the real endpoint. Call `webhook_list` to read the current configuration.
- webhook objectrequired
Example response
{
"ok": true,
"data": {
"webhook": {
"id": "6a1f2c84-9b3d-4e57-8c21-7f0a5d3b9e64",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"endpoint_url": "https://hooks.example.com/empirio",
"label": "Production CRM sync",
"managed_by": "n8n",
"is_active": true,
"created_at": "2026-08-01T09:14:22.000Z",
"updated_at": "2026-08-01T09:14:22.000Z"
},
"secret": "9f2c1d7b4a63e58f0c3d8b1a6e4f92d70b5c8a3e1f6d4b029c7a5e83f1d604b2",
"already_exists": false
}
}patch/webhooks/{webhook_id}
Update webhook endpoint
Update a webhook endpoint's URL, label, or delivery state. Pausing an endpoint (is_active: false) keeps its configuration and signing secret intact.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| webhook_id | path | string (uuid) | Yes | Webhook ID. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
- endpoint_url string (uri)
HTTPS endpoint that receives the signed delivery. Private/internal hosts are rejected.
- is_active boolean
Pause (false) or resume (true) deliveries to this endpoint.
- label string
Optional human-readable name for this endpoint (max 120 characters).
Example — Stops deliveries without removing the endpoint or its signing secret.
{
"is_active": false
}Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `webhook_update`.
- webhook objectrequired
Webhook endpoint configuration.
- id string (uuid)required
Webhook ID.
- survey_id string (uuid)required
Survey this endpoint belongs to.
- endpoint_url stringrequired
HTTPS endpoint that receives deliveries.
- label string (nullable)required
Human-readable name, or null when unset.
- managed_by "zapier" | "make" | "n8n" | "custom" (nullable)required
Tool that registered the endpoint, or null when unset.
- is_active booleanrequired
False while deliveries are paused.
- created_at stringrequired
ISO-8601 creation timestamp.
- updated_at stringrequired
ISO-8601 timestamp of the last change.
- id string (uuid)required
- endpoint_url_redacted boolean
True when this response is a replay of an earlier request with the same `Idempotency-Key`. The endpoint URL is not kept for replay — for Zapier catch hooks, Slack and Discord the URL is itself the credential — so `webhook.endpoint_url` is reduced to `scheme://host/#redacted` here and must not be stored as the real endpoint. Call `webhook_list` to read the current configuration.
- webhook objectrequired
Example response
{
"ok": true,
"data": {
"webhook": {
"id": "6a1f2c84-9b3d-4e57-8c21-7f0a5d3b9e64",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"endpoint_url": "https://hooks.example.com/empirio",
"label": "Production CRM sync",
"managed_by": "n8n",
"is_active": false,
"created_at": "2026-08-01T09:14:22.000Z",
"updated_at": "2026-08-01T09:14:22.000Z"
}
}
}delete/webhooks/{webhook_id}
Delete webhook endpoint
Permanently remove a webhook endpoint. Pending deliveries for the endpoint are dropped. Use PATCH /webhooks/{webhook_id} with is_active: false to pause deliveries instead.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| webhook_id | path | string (uuid) | Yes | Webhook ID. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `webhook_delete`.
- deleted truerequired
Always true when the endpoint was removed.
- deleted truerequired
Example response
{
"ok": true,
"data": {
"deleted": true
}
}post/webhooks/{webhook_id}/rotate-secret
Rotate webhook signing secret
Generate a new signing secret for a webhook endpoint and return it once. The previous secret stops verifying immediately, so update your receiver before rotating.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| webhook_id | path | string (uuid) | Yes | Webhook ID. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Response payload for `webhook_rotate_secret`.
- webhook objectrequired
Webhook endpoint configuration.
- id string (uuid)required
Webhook ID.
- survey_id string (uuid)required
Survey this endpoint belongs to.
- endpoint_url stringrequired
HTTPS endpoint that receives deliveries.
- label string (nullable)required
Human-readable name, or null when unset.
- managed_by "zapier" | "make" | "n8n" | "custom" (nullable)required
Tool that registered the endpoint, or null when unset.
- is_active booleanrequired
False while deliveries are paused.
- created_at stringrequired
ISO-8601 creation timestamp.
- updated_at stringrequired
ISO-8601 timestamp of the last change.
- id string (uuid)required
- secret string (nullable)required
The new signing secret (64 hex characters). Null only when this response is a replay of an earlier request with the same `Idempotency-Key` — see `secret_withheld`.
- secret_withheld boolean
True when this response is a replay of an earlier request with the same `Idempotency-Key`. The signing secret is revealed once, to the request that created or rotated it, and is not stored for replay — so `secret` is null here. Call `rotate-secret` to obtain a usable secret.
- endpoint_url_redacted boolean
True when this response is a replay of an earlier request with the same `Idempotency-Key`. The endpoint URL is not kept for replay — for Zapier catch hooks, Slack and Discord the URL is itself the credential — so `webhook.endpoint_url` is reduced to `scheme://host/#redacted` here and must not be stored as the real endpoint. Call `webhook_list` to read the current configuration.
- webhook objectrequired
Example response
{
"ok": true,
"data": {
"webhook": {
"id": "6a1f2c84-9b3d-4e57-8c21-7f0a5d3b9e64",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"endpoint_url": "https://hooks.example.com/empirio",
"label": "Production CRM sync",
"managed_by": "n8n",
"is_active": true,
"created_at": "2026-08-01T09:14:22.000Z",
"updated_at": "2026-08-01T09:14:22.000Z"
},
"secret": "3b8e1f70d24c9a65e0f7b3d81c4a26f9508d7e3b1a6c4f92d05b8e731f4c6a20"
}
}post/webhooks/{webhook_id}/deliveries/{delivery_id}/resolve
Resolve a Make webhook delivery
Exchange a delivery-bound Make proof for the authoritative payload saved before the webhook was sent. The authenticated caller must own the Make-managed webhook, and the delivery must belong to it. The exact proof is valid only while that delivery row is retained. This operation exists only for the Make instant trigger.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| webhook_id | path | string (uuid) | Yes | Make-managed webhook ID. |
| delivery_id | path | string (uuid) | Yes | Webhook delivery job ID. |
| Idempotency-Key | header | string | Yes | Required idempotency key for write operations. Reuse the same value when retrying the same request. |
Request body
Required
- delivery_proof stringrequired
Opaque X-EmpirioAi-Delivery-Proof value received for this Make delivery.
Responses
| Status | Description |
|---|---|
| 200 | Successful response |
| 400 | Validation error. `error.code` is one of: `validation_error`, `quiz_not_ready`, `idempotency_required`, `no_chartable_data`. |
| 401 | Unauthorized. `error.code` is one of: `not_authorized`. |
| 403 | Forbidden. `error.code` is one of: `insufficient_scope`, `plan_features_exceeded`, `plan_feature_required`, `forbidden`. |
| 404 | Not found. `error.code` is one of: `not_found`, `export_expired`. |
| 409 | Conflict. `error.code` is one of: `conflict`, `live_session_active`, `survey_not_canonical`, `idempotency_in_progress`, `idempotency_key_conflict`. |
| 429 | Rate limited. `error.code` is one of: `rate_limited`. |
| 500 | Internal error. `error.code` is one of: `edge_error`, `export_error`, `export_timeout`, `upload_error`, `query_error`, `response_counts_unavailable`, `idempotency_finalize_error`, `internal_error`. |
200 response schema
- data objectrequired
Verified payload returned to a Make instant trigger.
- event "survey.response.submitted"required
- delivery_id string (uuid)required
- survey_id string (uuid)required
- survey_title stringrequired
- survey_version integer (nullable)required
- responded_at string (date-time) | stringrequired
- response objectrequired
- response_id stringrequired
- survey_mode "survey" | "quiz" | "live"
Survey mode the response was given in. Present on every submitted response.
- session_id string (uuid) (nullable)
Live session of the response, or null outside any session.
- session_name string (nullable)
Name of that live session, or null when it has no name or the response is outside a session.
- url_params map of string
URL parameters captured from the participation link. Empty object when none were captured.
- quiz_result object (nullable)
Quiz grade, in the same shape `responses_list` reports it. Absent outside quiz mode.
- duration_seconds number (nullable)required
- response_locale string (nullable)required
- ended_by_logic booleanrequired
- answers array of map of objectrequired
- answers_flat map of objectrequired
- answers_by_title map of objectrequired
Example response
{
"ok": true,
"data": {
"event": "survey.response.submitted",
"delivery_id": "b7c1e5a9-3b42-4d8f-9a6b-1e2f3a4b5c6d",
"survey_id": "9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b",
"survey_title": "Customer satisfaction Q1",
"survey_version": 7,
"responded_at": "2026-04-05T14:22:31.000Z",
"response": {
"response_id": "resp_9f3a1c7d2b4e",
"survey_mode": "quiz",
"session_id": null,
"session_name": null,
"url_params": {
"source": "newsletter"
},
"quiz_result": {
"score": 8,
"max_score": 10,
"percentage": 80,
"passed": true,
"definition_version": 7
},
"duration_seconds": 187,
"response_locale": "en-US",
"ended_by_logic": false,
"answers": [],
"answers_flat": {
"q_a3f8d1b24e5c4c2a9d110f8b7e6a1c42": "Social media"
},
"answers_by_title": {
"How did you hear about us?": "Social media"
}
}
}
}Signing & Verification
Request headers
Every delivery arrives with these headers:
Content-Type: application/json
X-EmpirioAi-Signature: t=<unix seconds>,v1=<hex>
X-EmpirioAi-Timestamp: <unix seconds>
X-EmpirioAi-Survey-Id: <uuid>
X-EmpirioAi-Delivery-Id: <uuid>
User-Agent: empirio-webhook/1.0
Verifying the signature
X-EmpirioAi-Signature carries t=<unix seconds>,v1=<hex>. The digest is an HMAC-SHA256 over <t>.<raw request body> using your endpoint's signing secret. Always verify before trusting the payload.
The timestamp is part of the signed material rather than a separate header, and that is the point: a digest over the body alone would make a captured delivery replayable forever, because nothing in it says when it was sent. Reject anything outside a tolerance you choose — five minutes is a reasonable default — and reject timestamps from the future as well, since a request dated ahead is as suspect as a stale one.
Parse the header by key rather than by position, and ignore vN= parts you do not recognise: a future scheme will be added alongside v1 rather than replacing it.
import crypto from "node:crypto";
const MAX_AGE_SECONDS = 5 * 60;
function verifyEmpirioSignature(rawBody, headerValue, secret) {
const parts = Object.fromEntries(
String(headerValue || "")
.split(",")
.map((part) => {
const at = part.indexOf("=");
return at === -1 ? [] : [part.slice(0, at).trim(), part.slice(at + 1).trim()];
})
.filter((entry) => entry.length === 2),
);
const timestamp = parts.t;
const received = (parts.v1 || "").toLowerCase();
if (!/^[0-9]+$/.test(timestamp || "") || !/^[0-9a-f]{64}$/.test(received)) return false;
const age = Math.floor(Date.now() / 1000) - Number(timestamp);
if (age > MAX_AGE_SECONDS || age < -MAX_AGE_SECONDS) return false;
const expected = crypto
.createHmac("sha256", secret)
.update(`${timestamp}.`)
.update(rawBody)
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(expected, "hex"),
Buffer.from(received, "hex"),
);
}
Payload Structure
Envelope
{
"event": "survey.response.submitted",
"delivery_id": "…",
"survey_id": "…",
"survey_title": "Customer Satisfaction Q1",
"survey_version": 7,
"responded_at": "2026-04-05T14:22:31.000Z",
"response": {
"response_id": "resp_…",
"survey_mode": "quiz",
"session_id": null,
"session_name": null,
"url_params": { "source": "newsletter" },
"quiz_result": { "score": 8, "max_score": 10, "percentage": 80, "passed": true, "definition_version": 7 },
"duration_seconds": 187,
"response_locale": "de-DE",
"ended_by_logic": false,
"answers": [ /* cell entries — see below */ ],
"answers_flat": { /* question_id → answer — see below */ },
"answers_by_title": { /* question title → answer — see below */ }
}
}
survey_mode, session_id, session_name, url_params and quiz_result use the same names and casing as a GET /surveys/{survey_id}/responses row. survey_mode, session_id, session_name and url_params are always present; session fields are null outside any session and URL parameters are {} when none were captured. quiz_result appears for graded responses (passed is null without a pass mark; solutions are never included).
Identifiers
delivery_id identifies this delivery attempt and carries the same value as the X-EmpirioAi-Delivery-Id header. It stays constant across retries of the same delivery, so it is the key to deduplicate on.
response.response_id identifies the participation itself. It is opaque and stable, and GET /surveys/{survey_id}/responses returns the same value for the same participation — so webhook receivers and REST clients share one join key. Treat it as a string; do not parse it.
question_id is likewise an opaque string. Different creation paths mint different shapes — q_text, q_<hex> and others all occur — so match on equality, never parse or pattern-match it. The examples below use one arbitrary shape; do not read a format into it.
Answer entries
Each element of response.answers represents one "cell", using the same decomposition as empirio.ai's CSV export — one entry per scalar answer, per multi-select option, per matrix row, per rank position, and per allow_other free-text companion. The two are not identical in width: see Which parts of the cell list are fixed below, since a ranking contributes one entry per stored rank while CSV pads every row to the survey's widest.
Every entry includes question_id, question_title, and question_type. The rest of the shape depends on what kind of question the entry belongs to — entries are distinguished by field presence, not an explicit discriminator:
| Emitted for | Extra fields | value | Identify by |
|---|---|---|---|
| text, text-long, email, phone, date, number, rating, scale, nps, thumbs, yes-no, privacy, single-choice, dropdown, image-single-choice, text-rating | selected_option_id (single-select option types only) | string / number / boolean / null | none of option_label / row_label / rank_position / other_text present — selected_option_id may or may not be there, and either way the entry is a scalar / single-select one |
| multiple-choice, image-multiple-choice (one entry per defined option) | option_id, option_label | boolean (true if selected) | option_label present |
| matrix (one entry per defined row, plus retained deleted-row answers when present) | row_id, row_label, selected_column_id | string / null (column label) | row_label present |
| ranking (one entry per rank position; N = the larger of the defined option count and this response's stored ranking) | rank_position, selected_option_id | string / null (option label at this position) | rank_position present |
any question with allow_other: true (free-text companion) | other_text (replaces value) | — | other_text present |
Note: a single-choice, multiple-choice, or dropdown question with allow_other: true emits its normal entries plus one trailing companion entry in the same response — so a single single-choice question can contribute two entries, and a multiple-choice question with N options contributes N+1.
A consumer can route entries with a single switch:
for (const entry of response.answers) {
if ("other_text" in entry) { /* free-text "other" answer */ }
else if ("option_label" in entry) { /* multiple-choice one-hot */ }
else if ("row_label" in entry) { /* matrix row */ }
else if ("rank_position" in entry){ /* ranking position */ }
else { /* scalar / single-select */ }
}
Flat answers
response.answers_flat carries the same response keyed by question_id, one entry per question rather than one per cell:
"answers_flat": {
"q_a3f8d1b2-…": "Blue", // single-select / scalar
"q_7b2f4e11-…": ["Pricing", "Custom other"], // multiple-choice — selected labels, free text inline
"q_3f8d4b21-…": { "Quality": "Excellent" }, // matrix — answered rows, row → column
"q_6e2c9a74-…": ["C", "A", "B"], // ranking — best first
"q_8d2e4f6a-…": [ // booking / scheduling-poll — slots with offsets
{ "start": "2026-10-29T10:30:00+01:00", "end": "2026-10-29T11:00:00+01:00", "timezone": "Europe/Berlin" }
],
"q_6c4a2e8f-…": [ // file-upload — one object per file
{ "file_id": "file_Hk3v…", "name": "cv.pdf", "size_bytes": 248113,
"content_type": "application/pdf",
"download": "/surveys/9f3a8b12-…/responses/resp_8Kx2…/files/file_Hk3v…" }
]
}
Three question types carry structured values instead of labels. A file-upload answer is one object per file: file_id is the opaque file_… identifier, and download is the REST path, relative to the REST base URL, that answers with a one-hour download link (GET /surveys/{survey_id}/responses/{response_id}/files/{file_id}) — the file itself never travels in a delivery. A booking or scheduling-poll answer is one {start, end, timezone} object per slot, ISO 8601 with the offset of the question's time zone; a whole-day slot runs from local midnight to the next local midnight.
Every key is a question_id. There are no derived keys — in particular there is no <question_id>_other entry, because a submission whose answer keys are not question IDs is rejected outright. A free-text "other" answer reaches you two ways instead: inline in the question's own answers_flat value (the free text stands in for the option label), and as the dedicated other_text companion cell in answers. The companion cell is the reliable one — it is the only place the free text appears on its own, separate from the regular selections.
It is the same record GET /surveys/{survey_id}/responses returns as answers, so the two surfaces agree field for field. Use it when you want one named value per question.
response.answers_by_title carries those same values under the question's title instead of its ID:
"answers_by_title": {
"How did you hear about us?": "Social media",
"Which features matter?": ["Pricing", "Custom other"]
}
It exists for visual builders, where the key of a mapped field IS its label and a column of q_… keys cannot be mapped by hand. Values are taken verbatim from answers_flat; the titles and the question order come from the cell list. Two questions sharing a title are disambiguated with (2), (3) in survey order, a free-text "other" answer arrives under <title> (Other), an untitled question keeps its question_id as the key, and so does an answer to a question that has since been deleted, because the cell list no longer describes it. Titles are author-written and change; answers_flat is the one to key on when a stored mapping has to survive a rename.
The two views answer different questions, so pick deliberately. answers_flat reflects what was stored: a question the respondent skipped, an unselected multiple-choice option, and an unanswered matrix row are simply absent, and an answer to a question that has since been deleted is still there under its stored key. answers instead follows the current survey definition: it emits a cell for every defined option, row and rank position, so an unselected option and an unanswered row still produce an entry.
How much of answers is fixed
Most of the cell list is a property of the survey, and two parts of it are a property of the individual response. Both exceptions exist because a stored answer can outlive the definition it was written against:
| Question type | Entries | Fixed per survey? |
|---|---|---|
| text, number, date, single-select, … | 1 | yes |
| multiple-choice | one per currently defined option | yes |
| matrix | one per currently defined row | yes |
| matrix, retained deleted row | one per row key this response still answers that the question no longer defines | no — per response |
| ranking | max(currently defined options, this response's stored ranking length) | no — per response |
other_text companion | 1 per allow_other question | yes |
A ranking is frozen at submission time, so deleting one option leaves every earlier answer one rank longer than the current option list. Within a single export that means a response which ranked five items contributes five ranking cells while a response submitted after the deletion contributes four. A deleted matrix row behaves the same way: the extra "Deleted row row_…" entry appears only on the responses that actually still hold an answer for it.
So iterate the array and key on question_id plus the distinguishing field (option_id, row_id, rank_position). Do not address a cell by its index, and do not assume two responses of the same survey have the same number of cells.
Writing rows to a spreadsheet? Use the CSV or XLSX export instead of building rows from answers. Those exports compute one column plan for the whole file — the widest stored ranking and the union of deleted matrix rows across every exported response — so every row is the same width and the header matches all of them. answers is built per response and has no such shared plan.
Value conventions
- No localization. Booleans are real JSON
true/false(including yes-no and privacy); localize for presentation on your side. question_idis stable, persistent, and opaque. Each question is assigned an ID at creation time and keeps it for the survey's lifetime. Inserting, removing, or reordering questions does not shift existing IDs, soquestion_idis a sound join key for longitudinal or repeated-response analysis. The format is not a contract: different creation paths mint different shapes (q_text,q_<hex>, and others). Compare it for equality; never parse it.- IDs travel alongside labels. A label is what a survey author edits, so a mapping built on one breaks silently when someone renames an option. Every entry that has an option identity reports it:
<thing>_idmirrors<thing>_label— the subject of the entry — whileselected_*_idmirrorsvalue, what the respondent chose. These areopt_/row_/col_identifiers of the same vocabularyGET /surveys/{survey_id}returns, so a webhook receiver and a REST client can join on them. Build durable mappings on the IDs and show the labels. But "same vocabulary" is not "always resolvable": an identifier describes the option as stored at submission time, andmatrixandrankingentries report the stored ID verbatim, so they can carry an identifier the current definition no longer contains. Expect a lookup against today'sGET /surveys/{survey_id}to miss, and handle the miss. selected_option_idis absent, not null, on entries that cannot have one. Text, number and date answers have no option identity, so the key does not appear at all. Fortext-ratingthe identifier is acol_value, because that type stores its choices as matrix columns.- A single-select
selected_option_id: nullis genuinely ambiguous. Unlike matrix and ranking, a single-select entry does not report an unresolvable ID: whenever the stored value is not a currently defined option,selected_option_idisnulland the raw stored string lands invalue. That covers two different events — the respondent typed a free-text "other" answer, or the option they picked was deleted after they submitted — and nothing in the payload separates them. On anallow_otherquestion theother_textcompanion carries that same raw string in both cases, so it does not disambiguate either. If you need to tell them apart, keep your own history of the survey definition. - Unanswered cells are always emitted. Every defined matrix row, rank position, and multiple-choice option produces an entry — unanswered ones carry
value: null(orvalue: falsefor multiple-choice options). Which cells exist follows the current definition, so an edit to the survey changes it; and the ranking and retained-deleted-row counts vary per response even without one, as How much ofanswersis fixed describes. - Deleted matrix rows are retained. If a stored response still holds an answer for a matrix row that is no longer in the current definition,
answerscarries an extra matrix entry for it after the current rows. Itsrow_idis the retained row key on its own, and itsrow_labelis the canonical deleted-row marker followed by that key —"Deleted row row_4b91c2e7". Read the ID; do not parse the label. - Survey order. Entries follow the survey's question order. Within a question, multiple-choice / matrix / ranking entries follow the order of the corresponding
options/matrix_rowsarrays; retained deleted matrix rows follow the current rows in stable key order; theother_textcompanion comes last. - Reading the
allow_othercompanion. Forsingle-choice/dropdownwithallow_other: true, the companion tells you whether free text was stored, not which option was chosen:- Companion
other_text: null→ nothing was stored in the free-text field. The main entry'svalueis a regular option's label. - Companion
other_text: "<string>"→ the main entry'svaluecarries the same string. Usually the respondent typed it; it can also be the raw ID of an option deleted since submission (see the ambiguity above). Legacy records that stored only the "Other" marker without free text surface the literal string"Other"in both fields.
- Companion
- Orphaned answers are dropped from
answers, kept inanswers_flat. If a stored answer refers to a question that no longer exists in the survey definition, no cell is emitted for it —answersfollows the definition.answers_flatfollows the stored record and still carries it under its stored key. Both are deliberate; a consumer iteratinganswers_flatmust tolerate keys it cannot resolve to a question. - No scale bounds. Rating/scale/nps/thumbs entries do not include
min/max; read these from the survey definition viaGET /surveys/{survey_id}if you need them.
Question Types
Concrete entry shapes for every question type — the groups and ordering mirror the REST API → Question Types section so you can jump back and forth between the create-payload shape and the webhook-receive shape for the same type.
Every example shows what one question of that type contributes to the response.answers array. Any single-choice, multiple-choice, or dropdown question with allow_other: true emits one additional other_text entry after its main entries — see the dedicated example at the bottom of this page.
The question_id values below are illustrative only. The field is an opaque string whose shape depends on how the question was created — q_text and q_<hex> both occur — so compare it for equality and never parse it. What is guaranteed is stability: an ID stays with its question for the survey's lifetime, which is what makes it a usable join key.
Entries that refer to an answer option carry its identifier too — option_id / row_id next to the matching label, and selected_option_id / selected_column_id next to value. These are the same opt_ / row_ / col_ identifiers GET /surveys/{survey_id} returns, and unlike labels they survive a rename.
| Question type | Entries per response | Value | Distinguishing field |
|---|---|---|---|
| text, text-long, email, phone, date | 1 | string or null | — |
| number, rating, scale, nps, thumbs | 1 | number or null | — |
| yes-no, privacy | 1 | boolean or null | — |
| single-choice, dropdown, image-single-choice, text-rating | 1 | option label or null | — |
| multiple-choice, image-multiple-choice | N (one per defined option) | boolean | option_label |
| matrix | R (one per defined row), +1 per retained deleted row | column label or null | row_label |
| ranking | N = the larger of the defined option count and this response's stored ranking | option label at this rank or null | rank_position |
| file-upload | 1 | file names joined with ; or null | — |
| booking, scheduling-poll | 1 | chosen slots as text, joined with ; , or null | — |
…plus allow_other: true | +1 | — | other_text (replaces value) |
| content | — (not emitted) | — | — |
Selection
Single choice — single-choice
One entry whose value is the picked option's label. When the stored value is not a currently defined option — a free-text "other" answer, or an option deleted since submission — selected_option_id is null and value carries the raw stored string. The two cases are not distinguishable from the payload.
{
"question_id": "q_c4e18b732a564f0d91b86e3a7d5c2f14",
"question_title": "How did you hear about us?",
"question_type": "single-choice",
"selected_option_id": "opt_3f9a2c71",
"value": "Social media"
}
Image single choice — image-single-choice
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
options | object[] | Yes | {label, image_url} entries, at least 2 and at most 100 |
randomize_options | boolean | No | Shuffle option order per respondent |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "image-single-choice",
"question": "Which area did you like best?",
"options": [
{ "label": "Lava gorge", "image_url": "https://cdn.example.com/gorge.jpg" },
{ "label": "Arena", "image_url": "https://cdn.example.com/arena.jpg" }
]
}
Image multiple choice — image-multiple-choice
| Field | Type | Required | Notes |
|---|---|---|---|
question | string | Yes | Question text |
required | boolean | No | Whether an answer is required |
options | object[] | Yes | {label, image_url} entries, at least 2 and at most 100 |
randomize_options | boolean | No | Shuffle option order per respondent |
min_selections | integer | No | Fewest options a respondent must tick |
max_selections | integer | No | Most options a respondent may tick |
subtitle | string | No | Optional subtitle text |
show_subtitle | boolean | No | Whether to display the subtitle |
{
"type": "image-multiple-choice",
"question": "Which materials clean water?",
"min_selections": 1,
"options": [
{ "label": "Gravel", "image_url": "https://cdn.example.com/gravel.png" },
{ "label": "Cotton", "image_url": "https://cdn.example.com/cotton.webp" }
]
}
Multiple choice — multiple-choice
N entries — one per defined option — each carrying the option's label and a boolean value indicating whether the respondent selected it.
[
{
"question_id": "q_7b2f4e119c3a4a1d8e225f9d3b0a71e8",
"question_title": "Features?",
"question_type": "multiple-choice",
"option_id": "opt_9c14e7a3",
"option_label": "Pricing",
"value": true
},
{
"question_id": "q_7b2f4e119c3a4a1d8e225f9d3b0a71e8",
"question_title": "Features?",
"question_type": "multiple-choice",
"option_id": "opt_2d68b0f5",
"option_label": "Support",
"value": false
},
{
"question_id": "q_7b2f4e119c3a4a1d8e225f9d3b0a71e8",
"question_title": "Features?",
"question_type": "multiple-choice",
"option_id": "opt_7e35c9d1",
"option_label": "Speed",
"value": false
}
]
Dropdown — dropdown
One entry whose value is the picked option's label (or the free-text answer when the user picked "Other").
{
"question_id": "q_d94b1a6f2e774b8e87c13d4f9a2e05bd",
"question_title": "Select your country",
"question_type": "dropdown",
"selected_option_id": "opt_5a71f3c8",
"value": "Germany"
}
Yes / No — yes-no
One entry with a boolean value (or null if unanswered).
{
"question_id": "q_5e3f8c297a144d6b91e02a7c4b8f3d91",
"question_title": "Would you use this product again?",
"question_type": "yes-no",
"value": true
}
Rating
Star rating — rating
One entry with a numeric value from 1 to max (or null if unanswered).
{
"question_id": "q_ac8d0f125b434f2a8c7e1e9f6b3a7d42",
"question_title": "How would you rate our service?",
"question_type": "rating",
"value": 4
}
Thumbs — thumbs
One entry with a numeric value from 1 to max (or null if unanswered).
{
"question_id": "q_3b9e2c478f154a3d92c67d1f8e4b5a09",
"question_title": "Did you enjoy this experience?",
"question_type": "thumbs",
"value": 4
}
Number rating — scale
One entry with a numeric value from 1 to max (or null if unanswered).
{
"question_id": "q_6d4a8f132e514b7c83f95a2c9d6e1f78",
"question_title": "How satisfied are you?",
"question_type": "scale",
"value": 8
}
Text rating — text-rating
One entry whose value is the label of the picked column (or null if unanswered).
{
"question_id": "q_9c2e5a816b734d1f8a4e3b7f2d9c4e15",
"question_title": "How do you feel?",
"question_type": "text-rating",
"selected_option_id": "col_6b209d4f",
"value": "Good"
}
NPS — nps
One entry with a numeric value from 0 to 10 (or null if unanswered).
{
"question_id": "q_1f7b4e925c864a3d91f26e4a8c7d9b31",
"question_title": "How likely are you to recommend us?",
"question_type": "nps",
"value": 9
}
Text & Input
Short text — text
One entry with a string value (or null if unanswered).
{
"question_id": "q_4a8e2f163d954b7c82a19f5e6c3d1b74",
"question_title": "What is your name?",
"question_type": "text",
"value": "Jane Doe"
}
Long text — text-long
One entry with a string value (or null if unanswered).
{
"question_id": "q_8d3c1e749f424b5a87e62a1f7b4c9d53",
"question_title": "Please share additional feedback",
"question_type": "text-long",
"value": "Great product, very easy to use."
}
Email — email
One entry with a string value (or null if unanswered).
{
"question_id": "q_2e9f6a384c714d8b93a51b7e4f2c8a69",
"question_title": "Your email address",
"question_type": "email",
"value": "jane@example.com"
}
Phone — phone
One entry with a string value (or null if unanswered).
{
"question_id": "q_7c4b9e125a384f6d81e93a2f8b7c4d61",
"question_title": "Your contact number",
"question_type": "phone",
"value": "+49 30 1234567"
}
Number — number
One entry with a numeric value (or null if unanswered).
{
"question_id": "q_0b3e8a576d214f9c84b75e1a9c3d7f28",
"question_title": "How many employees does your company have?",
"question_type": "number",
"value": 42
}
Date — date
One entry with an ISO-8601 date string as value (or null if unanswered).
{
"question_id": "q_5a7f2c831e964b4d87c39d4e6a1f8b52",
"question_title": "When did you first use our product?",
"question_type": "date",
"value": "2024-03-15"
}
Appointment booking — booking
One entry whose value names the booked slot as text, in the question's time zone (null if unanswered). The machine-readable slot is in answers_flat: an array of {start, end, timezone} with ISO-8601 date-times carrying the zone's offset.
{
"question_id": "q_8d2e4f6a1b3c4d5e9f7a6b5c4d3e2f1a",
"question_title": "Pick a time for your interview",
"question_type": "booking",
"value": "Thu, 10/29/2026, 10:30 AM–11:00 AM"
}
answers_flat for the same question:
{
"q_8d2e4f6a1b3c4d5e9f7a6b5c4d3e2f1a": [
{ "start": "2026-10-29T10:30:00+01:00", "end": "2026-10-29T11:00:00+01:00", "timezone": "Europe/Berlin" }
]
}
Scheduling poll — scheduling-poll
One entry whose value lists every marked slot as text, joined with ; (null if unanswered). answers_flat carries them as {start, end, timezone} objects like booking; a whole-day slot runs from local midnight to the next local midnight.
{
"question_id": "q_1f3e5d7c9b2a4c6e8d0f1a3b5c7d9e2f",
"question_title": "Which days work for the workshop?",
"question_type": "scheduling-poll",
"value": "Mon, 11/02/2026; Wed, 11/04/2026"
}
File upload — file-upload
One entry whose value names the uploaded files, joined with ; (null if none) — never a link or an identifier. answers_flat carries one object per file: file_id (file_…), name, size_bytes, content_type and download, the REST path that issues a download link (responses_file_download, relative to the REST base URL).
{
"question_id": "q_6c4a2e8f0d1b3a5c7e9f2d4b6a8c0e1f",
"question_title": "Please attach your CV",
"question_type": "file-upload",
"value": "cv.pdf; references.docx"
}
answers_flat for the same question:
{
"q_6c4a2e8f0d1b3a5c7e9f2d4b6a8c0e1f": [
{
"file_id": "file_Hk3vP0qL9sXw2YbN4mRt7A",
"name": "cv.pdf",
"size_bytes": 248113,
"content_type": "application/pdf",
"download": "/surveys/9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b/responses/resp_8Kx2vQ1mR7pLtYbN4wZa3g/files/file_Hk3vP0qL9sXw2YbN4mRt7A"
}
]
}
Advanced
Matrix — matrix
R entries — one per defined row. Each entry carries the row's label and the column label the respondent picked as value. Unanswered rows still produce an entry with value: null.
[
{
"question_id": "q_3f8d4b217a954c6e89b12d5e7f1c9a34",
"question_title": "Rate",
"question_type": "matrix",
"row_id": "row_1d47a8e2",
"row_label": "Quality",
"selected_column_id": "col_3e7a1b58",
"value": "Excellent"
},
{
"question_id": "q_3f8d4b217a954c6e89b12d5e7f1c9a34",
"question_title": "Rate",
"question_type": "matrix",
"row_id": "row_8f3b25c7",
"row_label": "Speed",
"selected_column_id": null,
"value": null
}
]
A stored answer for a row that has since been removed from the survey is not discarded. It follows the current rows as one extra entry whose row_id is the retained row key and whose row_label is the deleted-row marker plus that key:
{
"question_id": "q_3f8d4b217a954c6e89b12d5e7f1c9a34",
"question_title": "Rate",
"question_type": "matrix",
"row_id": "row_4b91c2e7",
"row_label": "Deleted row row_4b91c2e7",
"selected_column_id": "col_6b209d4f",
"value": "Good"
}
Ranking — ranking
N entries — one per rank position, with the option placed at that rank as value. N is the larger of the question's current option count and the length of this response's stored ranking, so a response submitted before an option was deleted carries one rank more than a later one. The extra position reports the stored ID it still holds, in both selected_option_id and value.
[
{
"question_id": "q_6e2c9a745b384f1d92e78a4c7b3d1f05",
"question_title": "Priorities",
"question_type": "ranking",
"rank_position": 1,
"selected_option_id": "opt_e21a9c48",
"value": "C"
},
{
"question_id": "q_6e2c9a745b384f1d92e78a4c7b3d1f05",
"question_title": "Priorities",
"question_type": "ranking",
"rank_position": 2,
"selected_option_id": "opt_4c8e1a92",
"value": "A"
},
{
"question_id": "q_6e2c9a745b384f1d92e78a4c7b3d1f05",
"question_title": "Priorities",
"question_type": "ranking",
"rank_position": 3,
"selected_option_id": "opt_b73f5d06",
"value": "B"
}
]
Content — content
Content blocks (headings, dividers, static text) are not emitted — they are display-only and never appear in response.answers.
Privacy Policy — privacy
One entry with a boolean value — true if the respondent consented, false if they did not.
{
"question_id": "q_9d1e4a683c724b5f86a95d7c2f8e1b43",
"question_title": "Privacy Policy",
"question_type": "privacy",
"value": true
}
allow_other: true companion
Any single-choice, multiple-choice, or dropdown question that was created with allow_other: true emits one additional entry after its main entries. This companion uses the key other_text in place of value — a consumer can identify it unambiguously by checking "other_text" in entry. The content is the respondent's free-text answer, or null if they did not use the "other" field.
{
"question_id": "q_c4e18b732a564f0d91b86e3a7d5c2f14",
"question_title": "How did you hear about us?",
"question_type": "single-choice",
"other_text": "From a conference"
}
This companion is where the free text lives. It is not a way to tell a typed answer apart from a deleted option: for a single-select, an unresolvable stored value lands in other_text and in the main entry's value alike, whichever of the two produced it.
Delivery Guarantees
- At-least-once delivery. On any failure (non-2xx response, connection error, timeout) a delivery is attempted 3 times in total — the first attempt plus 2 retries, after about 1 and 10 minutes with ±20% jitter. A receiver’s
Retry-Afterheader can extend the delay up to 24 hours. Retries and new deliveries share a limit of 5 starts/second and 2 concurrent calls per destination URL. Ensure your handler is idempotent — useX-EmpirioAi-Delivery-Idto deduplicate. - 10-second delivery timeout. Return a 2xx status within 10 seconds; longer work should be queued asynchronously on your side. (empirio.ai allows itself 12 seconds for the internal hop that makes the call, so 10 is the budget your endpoint actually gets.)
MCP
Overview
The Model Context Protocol (MCP) server allows AI agents — ChatGPT, Claude, and any MCP-compatible host — to interact with your empirio.ai surveys and response data.
MCP requests require OAuth authentication and per-tool scope. Operations also enforce the survey owner's feature entitlements and response limits, as on the REST API, CLI and webhooks.
Server URL
https://platform.empirio.ai/mcp
Authentication
OAuth 2.1 with PKCE. Clients auto-discover endpoints via .well-known metadata — no manual configuration needed.
| Property | Value |
|---|---|
| Protocol | MCP Streamable HTTP (stateless) |
| Auth | OAuth 2.1 + PKCE (auto-discovered) |
| Scopes | surveys, responses |
Scopes
| Scope | Access |
|---|---|
surveys | Manage surveys, quizzes, live sessions, share links, personal folders and templates |
responses | Read, analyse, export and delete responses; also required for live start/results, deleting a live session and results/presentation sharing |
All tools are listed regardless of the current token scope. If a tool requires a scope the token doesn't have, the server responds with HTTP 403 plus WWW-Authenticate: Bearer ... error="insufficient_scope" scope="<required-scope>" so the client can re-authorize with additional permissions. The advisory JSON-RPC body also includes error.data.code = "insufficient_scope" with the required and current scopes.
Argument-dependent requirements, including include_results and results/presentation sharing, use the same step-up challenge. MCP counts authenticated requests before scope checking; REST checks scope before counting.
Write tools accept an optional idempotency_key in their MCP input payload. A call without one executes normally without replay caching. Supply a high-entropy value only when the client can retain it; after a timeout or unknown result, retry with exactly the same key and arguments. Use a new key for a different call.
Canvas resource reads and listing use the read budget.
Rate limits
| Metric | Limit |
|---|---|
| Read tools | 60 / minute per user |
| Write tools | 20 / minute per user |
survey_create and survey_duplicate | 10 / hour and 50 / day per account, shared between the two — charged only when the request reaches the work it pays for |
Quick start
ChatGPT (Responses API)
{
"model": "gpt-4o",
"tools": [{
"type": "mcp",
"server_label": "empirio",
"server_url": "https://platform.empirio.ai/mcp",
"require_approval": "never"
}],
"input": "List my surveys"
}
Claude (Settings → Connectors)
Add as a remote MCP server:
- URL:
https://platform.empirio.ai/mcp - Auth: OAuth 2.1 (auto-discovered via
.well-known)
Examples
Once connected, your AI agent can handle prompts like these. Each example shows the tool sequence the model will typically follow.
-
"Show me the responses from my latest customer-satisfaction survey." →
survey_list→responses_survey_stats→responses_aggregates -
"Create a 5-question NPS survey for our new product and publish it." →
survey_create(mode: "ai") →survey_publish -
"Cross-tabulate 'How satisfied are you?' against 'Would you recommend us?' for survey X." →
survey_get→ take IDs frompublished.questions→responses_crosstab -
"Export the responses from survey X as an editable PowerPoint deck." →
responses_export_charts(format: "pptx") -
"Delete the last 10 incomplete responses from survey X." →
responses_list(include_incomplete_participations: true) →responses_delete(mode: "rows")
Error codes
Tool responses use a consistent envelope. On failure the response is { "ok": false, "error": { "code": ..., "message": ... } }.
| Code | Meaning | Typical resolution |
|---|---|---|
insufficient_scope | Token is missing a scope the tool requires | Re-authorize the client requesting the scopes named in the challenge |
not_authorized | Access token is missing, invalid, or expired | Refresh or re-issue the token |
forbidden | Caller has no access to the target resource | Verify ownership or collaboration role |
plan_features_exceeded | Publishing is blocked because the survey uses features the OWNER's plan does not include | error.message names every blocking feature and its plan. Remove them or have the owner upgrade — a collaborator's own upgrade cannot lift this gate |
plan_feature_required | The requested export or other single operation is a feature the survey OWNER's plan does not include | Have the owner upgrade, or skip the operation; changing the survey does not unlock the operation itself |
not_found | Survey, response, or related resource does not exist | Check the survey_id / filters |
validation_error | Input does not match the tool's schema | Inspect error.message for the offending field and retry |
conflict | The request conflicts with current state, e.g. a survey_edit whose working draft was changed by someone else while the edit was being prepared | Re-read the draft, rebuild the edit on top of it, and send it again; retrying the original unchanged will keep failing |
survey_not_canonical | The stored survey holds a value the canonical contract no longer accepts, so the write cannot carry it forward. Nothing in the request caused it | Repair the stored value, then retry. error.message names the field. For an option label, a survey_edit option_operations rename fixes it without rewriting the list, keeping the identifier and the answers that reference it |
idempotency_in_progress | A call with the same idempotency_key is still running | Wait briefly, then retry with the same key |
idempotency_key_conflict | The idempotency_key is already bound to a different request body | Use a new key for a new request; reuse a key only to replay the identical request |
rate_limited | Per-user rate limit exceeded | Back off and retry after the indicated window |
edge_error | Upstream platform service returned a 5xx | Retry with the same key and arguments if the original call supplied a retained key; otherwise inspect state before retrying |
internal_error | Unexpected server-side failure | Retry with the same key and arguments if the original call supplied a retained key; otherwise inspect state first. Contact support if it persists |
Every surface answers in English and puts the whole message in error.message; there is no error.details and no localization. An agent relays or acts on message directly.
Support
- Email: info@empirio.ai
- Privacy policy: empirio.ai/privacy-policy
- Terms of service: empirio.ai/terms-of-service
Tools
Survey
| Tool | Description | Write | Destructive |
|---|---|---|---|
survey_list | List all surveys owned by or shared with the authenticated user | ||
survey_get | Read draft and published definitions, participation/preview links and owner-only live/results/presentation sharing | ||
survey_create | Create a new survey draft | ✓ | |
survey_edit | Edit the working draft and immediately configure run windows and results/presentation sharing | ✓ | ✓ |
survey_publish | Publish the working draft; leaving live mode ends and finalizes its running session or rehearsal | ✓ | ✓ |
survey_revert_draft | Replace the working draft with the currently published version, discarding every unpublished edit | ✓ | ✓ |
survey_duplicate | Clone a survey as a new unpublished draft | ✓ | |
survey_delete | Remove a survey and its responses from the account (irreversible; rows are purged after an internal 14-day window) | ✓ | ✓ |
survey_unpublish | Unpublish the survey and finalize its running live session or rehearsal | ✓ | ✓ |
survey_mode_update | Change the canonical survey mode while preserving pending draft edits; deactivates participation. | ✓ | ✓ |
live_session_start | Start a live session and get the participation link, room code and QR code. | ✓ | ✓ |
live_session_end | End a live session, active or paused. | ✓ | ✓ |
live_session_pause | Pause voting in an active live session; its time limit stands still. | ✓ | ✓ |
live_session_resume | Resume a paused live session with the time that was left. | ✓ | ✓ |
live_session_reactivate | Reopen an ended live session with the published survey; its answers are kept. | ✓ | ✓ |
live_session_update | Rename a live session. | ✓ | |
live_session_delete | Delete an ended live session and its responses (owner only). | ✓ | ✓ |
live_session_list | List a survey's live sessions with status, participants and remaining time, and the open session. | ||
live_session_get | Read one live session, optionally with its live results (shown in the canvas app). | ||
folder_list | List your own folders and folders shared with you. | ||
folder_create | Create a personal folder, or return the one with that name. | ✓ | |
folder_update | Rename a folder or move it in your list. | ✓ | |
folder_delete | Delete a folder. Its surveys move out of it and are kept. | ✓ | ✓ |
survey_move | File a survey in a folder; adding your own survey to a shared folder grants its members access. | ✓ | ✓ |
template_list | List templates by survey mode and category. | ||
template_get | Read one template with its questions. |
All survey tools require the surveys scope. live_session_start and live_session_delete always require responses, live_session_get requires it with include_results, and survey_edit requires it when configuring results or presentation links. survey_get includes those links only for the owner with responses; the owner's current live-room admission is readable with surveys alone. Filing an owned survey in a folder through survey_move also requires responses.
Response
| Tool | Description | Write | Destructive |
|---|---|---|---|
responses_list | List responses with date, answer, session, quiz and URL-parameter filters and optional quiz sorting | ||
responses_aggregates | Per-question aggregates, quiz metrics and optional session groups | ||
responses_crosstab | Cross-tabulate answers between two non-matrix survey questions | ||
responses_survey_stats | Survey statistics and quiz scores/pass rates for the selected responses | ||
responses_delete | Delete responses by stable response IDs, ranked row numbers or all | ✓ | ✓ |
responses_export | Export responses as CSV, XLSX, JSON, or SPSS | ||
responses_export_charts | Export charts as PowerPoint (editable or image-based), PDF, Word, ZIP of PNGs, or chart JSON | ||
responses_file_download | Temporary download link for one file a participant uploaded |
All response tools require the responses scope.
Both columns are the tool's own MCP annotations, generated from the same catalog entry the tool is registered from: Write is readOnlyHint: false — the tool changes something you own — and Destructive is destructiveHint: true — it removes something, is irreversible, or changes what other people see.
They are annotations, not the platform's accounting, and the two can differ: a tool that stores an artifact of its own is rate-limited as a write even when nothing of yours changes, so it can be annotated read-only and still offer an optional idempotency_key. Take that option from the tool's input schema rather than from this column.
CLI
Overview
The empirio.ai CLI (@empirio-ai/cli) is a command-line surface over the REST API. It ships as an npm package and delegates every call to the REST endpoints documented in this reference.
Its commands are generated from this document, one per operation — with the deliberate exception of the operations marked x-cli-hidden. The webhook endpoints carry that marker: they exist for automation platforms, which call them over HTTP, and the CLI has no webhook command group at all. Manage endpoints in Settings → Integrations or over REST.
Package
npm install -g @empirio-ai/cli
# or
npx @empirio-ai/cli --help
Binary name: empirio. Requires Node.js ≥ 20.
See Commands (next in the sidebar) for the full reference of every
empirio …subcommand, its parameters, and usage examples.
Authentication
Two modes. Precedence per invocation: EMPIRIO_API_KEY env var → OS keychain → ~/.config/empirio/credentials.json.
| Mode | Command | When |
|---|---|---|
| OAuth 2.1 (PKCE) | empirio login | Interactive developer workstations |
| API key | EMPIRIO_API_KEY=sk_… empirio … | CI / headless / automation |
The OAuth flow opens the default browser, the user approves consent on www.empirio.ai, and the CLI receives the authorization code on an ephemeral http://127.0.0.1:<port>/callback listener (RFC 8252 §7.3). Tokens are stored in the OS keychain via keytar and fall back to a chmod 0600 file on systems where keytar is unavailable. Refresh tokens are rotated on every use; the access-token TTL is one hour.
Global flags
| Flag | Effect |
|---|---|
--json | Emit machine-readable JSON instead of pretty tables |
--quiet | Suppress non-error output |
Both are declared on the root command, so they work on either side of the subcommand: empirio --json survey list and empirio survey list --json are equivalent.
--idempotency-key <uuid> is not global. It is declared on each write subcommand separately, so it has to come after the command:
empirio survey delete --survey-id <uuid> --idempotency-key <uuid> # works
empirio --idempotency-key <uuid> survey delete --survey-id <uuid> # error: unknown option '--idempotency-key'
Every write command accepts it and no read command does; the per-command tables under Commands list it wherever it applies.
Object-valued body fields (settings, appearance, share, welcome_page, logic_rule_operations, translations, …) accept a JSON string on the command line: empirio survey edit --settings '{"title":"Renamed"}' ….
Nullable flags accept the literal null (for example --duration-seconds null). Arrays accept comma-separated values, JSON arrays or repeated flags; repeated values accumulate. --session-ids <uuid>,null includes responses outside live sessions, on reads and exports alike.
Boolean flags take an explicit value: --is-active true. Accepted spellings are true, 1, yes, on and false, 0, no, off, matched case-insensitively; anything else is an error rather than a silent false.
Environment overrides
For local development, set both origins because the platform API and browser consent page run on separate servers:
EMPIRIO_PLATFORM_URL=http://localhost:7788 \
EMPIRIO_APP_URL=http://localhost:8081 \
empirio login
Any non-loopback host must be https://; the CLI refuses to send credentials over plain HTTP otherwise. For hosted environments, EMPIRIO_APP_URL is auto-derived when EMPIRIO_PLATFORM_URL uses a platform.* host. Other host shapes require both variables explicitly so an OAuth code is never requested from a different environment.
Support
- Email: info@empirio.ai
- Privacy policy: empirio.ai/privacy-policy
- Terms of service: empirio.ai/terms-of-service
Commands
This section documents every empirio … subcommand that calls the API, with its parameters and a usage example. empirio commands is the one omission: it lists the available commands locally and calls nothing, so it has no parameters to document — run it, or empirio --help, to see the same list. Operations marked x-cli-hidden in this document generate no subcommand and appear nowhere below; the webhook endpoints are the only ones. Flags use kebab-case (e.g. --survey-id, --ai-prompt); object-valued flags accept a JSON string.
The command group is the first word of the operation ID; the remaining words form the verb: survey_mode_update becomes empirio survey mode-update, and live_session_start becomes empirio live session-start.
All examples assume you are authenticated (either via empirio login or EMPIRIO_API_KEY).
Authentication
empirio login
Start the browser-based OAuth 2.1 (PKCE) flow. On success, tokens are written to the OS keychain (or ~/.config/empirio/credentials.json fallback).
| Parameter | Type | Required | Description |
|---|---|---|---|
--scope | string | No | Requested OAuth scopes, space-separated. Default: surveys responses. |
empirio login
# or request a narrower scope:
empirio login --scope "surveys"
empirio logout
Revoke the stored access + refresh tokens server-side and clear the local credential store.
empirio logout
empirio whoami
Return the authenticated user, plan, and active scopes. Exempt from the scope gate so every authenticated caller can inspect their own state.
empirio whoami
empirio whoami --json
Survey
empirio survey list
List surveys owned by or shared with the authenticated user.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-mode | survey/quiz/live | No | Only surveys whose working draft is in this survey mode. |
--folder-id | UUID or null | No | Your own or shared folder. null selects unfiled surveys. Filtering precedes pagination. |
--status | draft | published | all | No | Filter by publication status. Default: all. |
--limit | integer (1–100) | No | Page size. Default: 50. |
--offset | integer (≥ 0) | No | Zero-based pagination offset. |
empirio survey list
empirio survey list --status published --limit 10
empirio survey list --json | jq '.surveys[].id'
empirio survey get
Fetch both complete survey definitions. draft is the current working state used by edits and
the next publish. published is the latest published state, including stable question_id and
option_id values, or null before the first publish. Root fields describe current access,
the run window (settings.schedule), and effective draft, scheduled, live, or ended status.
share includes participation and preview links. Owners also receive the current live-room code and join URL under share.live; results/presentation links and access codes additionally require the responses scope. Reading creates no links or room codes. Configure sharing with survey edit --share.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey to retrieve. |
empirio survey get --survey-id 9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b
empirio survey create
Create a new (unpublished) survey draft in either manual mode (you supply title + questions) or AI mode (you supply a prompt and the server generates the survey).
| Parameter | Type | Required | Description |
|---|---|---|---|
--mode | manual | ai | Yes | Creation mode. |
--template-id | UUID | No | Manual mode: adopt a catalog template in the selected master locale. Omit questions/pages/logic-rules/translations/ai-prompt. Title is an optional override. A settings.survey_mode sent with it must match the template's survey mode. |
--ai-prompt | string | In AI | Prompt that describes the survey to generate (AI mode only). |
--questions | JSON array | No | Pre-built question objects (manual mode), including scoring and presentation. Give a question a ref to reference it from --logic-rules and --translations in the same call. See Question Types in the REST sidebar for the per-type schema. |
--pages | JSON array | No | Manual mode: ordered new pages, e.g. [{"ref":"intro"},{"ref":"empty"}]. Questions use these refs in page_id; the server assigns IDs and returns page_ids_by_ref. |
--welcome-page | JSON object | No | Welcome page configuration. |
--end-page | JSON object | No | End page content and its own button. |
--appearance | JSON object | No | Appearance (template, primary color, logo, display_mode, show_progress, show_question_numbers, hide_branding). |
--settings | JSON object | No | Title, survey_mode and behavior: master_locale, auto_advance, quiz, live, notifications, url_params (incoming link values; outgoing redirect and values), confirmation and the participation settings. schedule is the run window — {"start_at": …, "end_at": …}, ISO 8601 instants with an offset; the survey activates and deactivates itself at those times without a further publish. response_limit and once_per_browser are part of the draft. Title is required in manual creation without a template. In AI creation explicit supplied values override generated values. In AI mode, settings that point at a question (the confirmation email question, an incoming URL parameter's question, an outgoing parameter sourced from an answer or a quiz question) are refused: set them with survey edit once the survey exists. |
--logic-rules | JSON array | No | Logic rules the new survey should have, as a plain list — question_id and target_question_id name a question's ref from this call. Max 200. |
--translations | JSON object | No | Per-locale translations. Question translations are keyed by a question's ref, not by question_id. |
--idempotency-key | UUID | No | Override the auto-generated idempotency key. |
Manual mode:
empirio survey create \
--mode manual \
--questions '[
{"type":"nps","question":"How likely are you to recommend us?","required":true},
{"type":"text-long","question":"What could we improve?"}
]' \
--settings '{"title":"Customer Satisfaction Q2","master_locale":"en-US","auto_advance":true}'
Quiz with a scored question:
empirio survey create --mode manual --questions '[{"type":"yes-no","question":"Is water H2O?","scoring":{"enabled":true,"points":1,"correct_boolean":true}}]' --settings '{"title":"Knowledge check","survey_mode":"quiz","quiz":{"time_limit_seconds":600,"reveal":"end","show_score":true}}'
Live poll:
empirio survey create --mode manual --questions '[{"type":"text","question":"What should we discuss?"}]' --settings '{"title":"Team poll","survey_mode":"live","live":{"duration_seconds":600}}'
AI mode:
empirio survey create \
--mode ai \
--ai-prompt "Five-question NPS survey for a mobile banking app, in German, with a content block explaining data-protection"
AI mode with design override:
empirio survey create \
--mode ai \
--ai-prompt "Short post-purchase CSAT survey" \
--appearance '{"template":"modern","primary_color":"#ff5a5f"}' \
--settings '{"master_locale":"de-DE","auto_advance":false}'
Rate limit:
survey_createis additionally capped at 10 / hour and 50 / day per account. On overflow the call returns429withRetry-After.
empirio survey edit
Update the survey's working draft and survey-level sharing. Draft edits need a separate survey publish. Manual mode accepts targeted section patches; AI mode applies prompt-generated changes and ignores accompanying explicit draft sections. settings.schedule, share.results and share.presentation apply immediately in either mode. Results and presentation configuration require the owner and both surveys and responses scopes. Setting settings.survey_mode edits the draft; survey mode-update changes the effective mode immediately.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey to edit. |
--mode | manual | ai | Yes | Edit mode. |
--ai-prompt | string | In AI | Prompt describing the change (AI mode only). |
--question-operations | JSON array | No | Per-question ops: add / update / delete / reorder. An add may carry a ref so later operations in the same call can point at it. |
--option-operations | JSON array | No | Per-option ops inside a question. |
--pages | JSON array | No | Manual mode: full ordered page list. Use {id} for an existing page or {ref} for a new page with a server-assigned ID. Omit to preserve pages; includes empty pages. New IDs are returned in page_ids_by_ref. |
--welcome-page | JSON object | No | Replace welcome-page config. |
--end-page | JSON object | No | Patch end-page content and its own button. |
--logic-rule-operations | JSON array | No | Logic-rule operations (add, update, delete). Max 200 operations per request; a survey holds at most 200 logic rules in total. |
--appearance | JSON object | No | Appearance patch (theme, color, logo, layout, progress, question numbers and branding). |
--settings | JSON object | No | Title, survey_mode, quiz, live, notifications, url_params (incoming link values; outgoing redirect and values) and confirmation, plus auto_advance, locale and participation settings. schedule applies immediately (ISO 8601 instants with an offset; null removes a bound); response_limit and once_per_browser are part of the draft. |
--translations | JSON object | No | Per-locale translation patches. |
--share | JSON object | No | Applies immediately. results: {} prepares a coded summary-only link; optional summary, charts, responses and omit_personal patch visibility. results.filter replaces the whole filter; {} clears it. presentation: {} prepares a live presentation link. Omitted settings and existing URLs/codes are retained. Configured links are returned in share and readable with survey get. |
--idempotency-key | UUID | No | Override the auto-generated idempotency key. |
Change quiz scoring and feature settings:
empirio survey edit --survey-id <uuid> --mode manual --settings '{"survey_mode":"quiz","quiz":{"pass_threshold":70},"notifications":{"enabled":false}}' --question-operations '[{"op":"update","question_id":"<question-id>","changes":{"scoring":{"enabled":true,"points":2,"correct_boolean":true}}}]'
Rename a question via manual mode:
empirio survey edit \
--survey-id 9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b \
--mode manual \
--question-operations '[
{"op":"update","question_id":"q_a3f8d1b2","changes":{"question":"Updated wording","required":true}}
]'
Add a new question at the end:
empirio survey edit --survey-id <uuid> --mode manual \
--question-operations '[
{"op":"add","position":{"type":"end"},"question":{"type":"text","question":"Any other feedback?"}}
]'
Add a question and point a logic rule at it, in one call:
# The `ref` names the new question before it has an identifier; the rule
# resolves it. The response reports the id it was assigned.
empirio survey edit --survey-id <uuid> --mode manual \
--question-operations '[
{"op":"add","ref":"followup","position":{"type":"end"},
"question":{"type":"text-long","question":"What could we improve?"}}
]' \
--logic-rule-operations '[
{"op":"add","rule":{"question_id":"q_a3f8d1b2","condition":"less-than",
"values":["7"],"action":"show-question","target_question_id":"followup"}}
]'
AI mode:
empirio survey edit --survey-id <uuid> --mode ai \
--ai-prompt "Add a demographics section with age range and country"
empirio survey publish
Publishing a draft that leaves live mode ends and finalizes the running session or rehearsal.
Publish a draft, or update a published survey from its working draft. Owner or editor.
The result reports the effective status; a future start returns scheduled plus a
public_url_note instead of implying the public link already accepts responses.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey to publish. |
--idempotency-key | UUID | No | Override the auto-generated idempotency key. |
empirio survey publish --survey-id 9f3a8b12-4c5d-4e6f-8a1b-0c2d3e4f5a6b
empirio survey unpublish
Unpublishing ends and finalizes the running live session or rehearsal.
Move a published survey back to draft state. Owner or editor.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey to unpublish. |
--idempotency-key | UUID | No | Override the auto-generated idempotency key. |
empirio survey unpublish --survey-id <uuid>
empirio survey revert-draft
Replace the working draft with the currently published version. Owner or editor. Destructive.
Every unpublished edit in the draft is discarded and cannot be recovered through the API — no command hands it back. The live survey, its public link and its responses are unaffected. The result reports what was thrown away: the question count before and after, which sections differed, and the questions the draft had added, removed or changed.
A survey that has never been published answers 400 — there is nothing to fall back on. A draft that already matches the published version answers 200 with discarded: false.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey whose draft is replaced. |
--idempotency-key | UUID | No | Override the auto-generated idempotency key. |
empirio survey revert-draft --survey-id <uuid>
empirio survey duplicate
Clone a survey as a new unpublished draft. Owner-only — the copy belongs to the caller, so it leaves the source survey's collaboration entirely.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Source survey. |
--idempotency-key | UUID | No | Override the auto-generated idempotency key. |
empirio survey duplicate --survey-id <uuid>
empirio survey delete
Remove a survey from the account. Owner-only. Destructive.
The survey disappears from the API immediately: empirio survey list no longer returns it, and survey get, responses list and every other call on that survey_id answer 404 not_found — including a second survey delete. Any public link stops working, because the survey is unpublished as part of the same operation.
The underlying rows are not erased at that moment. The survey is marked for deletion 14 days out (scheduled_for_deletion_at = now() + 14 days) and its response rows are left in place; a nightly job removes the survey and cascades to its responses once that date passes. The window is an internal recovery net, not a user-facing undo — nothing in the API, the CLI or the app can bring a deleted survey back, so treat the command as final. Export anything you still need before calling it: the export endpoints answer 404 from the moment it returns.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey to delete. |
--idempotency-key | UUID | No | Override the auto-generated idempotency key. |
empirio survey delete --survey-id <uuid>
Responses
empirio responses list
List individual responses for a survey with per-question answers and rank-based row_no.
Each row's orphaned_answer_question_ids marks historical answer keys whose question
has since been deleted.
| Parameter | Type | Required | Description |
|---|---|---|---|
--session-id | UUID or null | No | One live session. null selects responses given outside a live session. Do not combine with --session-ids. |
--session-ids | array of UUID or null | No | Several live sessions (up to 100). null includes responses given outside a live session. Omit both for all responses. |
--score-min | number | No | Inclusive minimum quiz score in points. |
--score-max | number | No | Inclusive maximum quiz score in points. |
--passed | boolean | No | Filter by the stored quiz pass result. |
--url-params | JSON object | No | Exact captured URL parameter matches. |
--survey-id | UUID | Yes | Survey whose responses to list. |
--date-from | ISO 8601 | No | Filter start. |
--date-to | ISO 8601 | No | Filter end. |
--since | ISO 8601 date-time | No | Exclusive lower bound on the participation timestamp (the created_at field of the returned rows). Pass the newest created_at you have already seen to receive only what arrived after it. Combines with --date-from/--date-to: the later of --since and --date-from wins, --date-to still caps the upper end. |
--sort-by | score / passed | No | Quiz ordering across the complete selected population; row_no is null. Cannot combine with order or incomplete participations. |
--sort-direction | asc / desc | No | Direction for sort-by, default desc. Ungraded values sort last. |
--order | desc | asc | No | Emission order of the page. Default desc (newest first). Chronological lists without session, quiz or URL-parameter filters keep newest-first row_no under either order. Filtered or quiz-sorted lists return row_no: null; delete by response_id. asc cannot be combined with --include-incomplete-participations. |
--include-incomplete-participations | boolean | No | Include incomplete participations with saved progress. Default false. |
--limit | integer (1–1000) | No | Default 100. |
--offset | integer (0–100000) | No | Zero-based offset. |
empirio responses list --survey-id <uuid>
empirio responses list --survey-id <uuid> --date-from 2026-04-01 --limit 500
# Polling: ask only for what arrived after the newest response you already have.
empirio responses list --survey-id <uuid> --since 2026-04-05T14:22:31.123456Z
empirio responses aggregates
Get aggregate counts and percentages per current question. The result's
aggregates.orphanedQuestionIds separately names deleted questions still found in
historical answers. Session grouping keeps the combined result and adds groups, each with session_id, session_name and aggregates.
| Parameter | Type | Required | Description |
|---|---|---|---|
--date-from / --date-to | ISO date-time | No | Filter the participation timestamp. |
--include-incomplete-participations | boolean | No | Include unfinished participations in the aggregate population. Quiz metrics use submitted grades only. |
--answer-filters | JSON array | No | Up to 200 question_id plus answer or presence (answered/unanswered) rows. |
--group-by | session | No | Add per-session groups alongside combined aggregates. Needs the session comparison feature, see the pricing page. |
--include-quiz-metrics | boolean | No | Per-question graded and correct counts and correctness percentage. Included by default. false omits them. |
--session-id | UUID or null | No | One live session. null selects responses given outside a live session. Do not combine with --session-ids. |
--session-ids | array of UUID or null | No | Several live sessions (up to 100). null includes responses given outside a live session. Omit both for all responses. |
--score-min | number | No | Inclusive minimum quiz score in points. |
--score-max | number | No | Inclusive maximum quiz score in points. |
--passed | boolean | No | Filter by the stored quiz pass result. |
--url-params | JSON object | No | Exact captured URL parameter matches. |
--survey-id | UUID | Yes | Survey to aggregate. |
--question-ids | comma-separated list | No | Limit to specific questions (max 200). Omit for all. |
empirio responses aggregates --survey-id <uuid>
empirio responses aggregates --survey-id <uuid> --question-ids q_a3f8d1b2,q_7b2f4e11
empirio responses crosstab
Cross-tabulate two non-matrix questions (rows × columns). Matrix questions are rejected because the operation has no matrix-row selector.
| Parameter | Type | Required | Description |
|---|---|---|---|
--session-id | UUID or null | No | One live session. null selects responses given outside a live session. Do not combine with --session-ids. |
--session-ids | array of UUID or null | No | Several live sessions (up to 100). null includes responses given outside a live session. Omit both for all responses. |
--score-min | number | No | Inclusive minimum quiz score in points. |
--score-max | number | No | Inclusive maximum quiz score in points. |
--passed | boolean | No | Filter by the stored quiz pass result. |
--url-params | JSON object | No | Exact captured URL parameter matches. |
--survey-id | UUID | Yes | Survey. |
--question-x | question_id | Yes | Row question. |
--question-y | question_id | Yes | Column question. |
empirio responses crosstab \
--survey-id <uuid> \
--question-x q_a3f8d1b2 \
--question-y q_7b2f4e11
empirio responses survey-stats
Summary statistics, camelCase because the payload mirrors the analytics core: surveyId, viewCount (views: visits that opened the survey, one per participant session), startedResponses, completedResponses, completionRate (a percentage) and duration (average, shortest, longest, median, in seconds across completed responses, and distribution over five completion-time ranges). dropoff lists the drop-offs per question when the survey owner's plan includes the analysis tools, and live a live vote's sessions, participants and answers. The quiz block reports gradedCount, meanScore (points), assessedCount, passedCount and passRate (percentage), plus maxScore, scoreDistribution and hardestQuestion; unavailable means/rates are null. There is no last-response timestamp here — take it from the newest row of empirio responses list.
| Parameter | Type | Required | Description |
|---|---|---|---|
--date-from / --date-to | ISO date-time | No | Filter the participation timestamp. |
--include-incomplete-participations | boolean | No | Include unfinished participations in the aggregate population. Quiz metrics use submitted grades only. |
--answer-filters | JSON array | No | Up to 200 question_id plus answer or presence (answered/unanswered) rows. |
--session-id | UUID or null | No | One live session. null selects responses given outside a live session. Do not combine with --session-ids. |
--session-ids | array of UUID or null | No | Several live sessions (up to 100). null includes responses given outside a live session. Omit both for all responses. |
--score-min | number | No | Inclusive minimum quiz score in points. |
--score-max | number | No | Inclusive maximum quiz score in points. |
--passed | boolean | No | Filter by the stored quiz pass result. |
--url-params | JSON object | No | Exact captured URL parameter matches. |
--survey-id | UUID | Yes | Survey. |
empirio responses survey-stats --survey-id <uuid>
empirio responses delete
Delete responses by response_id (--mode ids, preferred), by rank (--mode rows with --row-numbers from responses list), or wipe all responses (--mode all). Destructive.
Prefer --mode ids. A rank is resolved against the live response set at the moment of the call, so a response arriving between your responses list and your delete shifts every rank by one — and --row-numbers 1 then destroys the arrival you never saw. A response_id names one participation for the whole of its life.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey. |
--mode | ids | rows | all | Yes | Targeting mode. |
--response-ids | comma-separated resp_… / part_… | In ids mode | response_id values from responses list (max 1000). Cannot be combined with --row-numbers. |
--row-numbers | comma-separated integers | In rows mode | Ranks from responses list (1-based, max 1000). |
--date-from / --date-to | ISO 8601 | No | Must mirror the responses list filter used for rank resolution. Ignored in ids mode. |
--include-incomplete-participations | boolean | No | Must mirror the responses list filter. Ignored in ids mode. |
--idempotency-key | UUID | No | Override the auto-generated idempotency key. |
In ids mode the answer carries unresolved_response_ids (ids that named no participation — the rest are still deleted) and already_deleted_response_ids (ids whose participation was already gone, answered as success with deleted_count: 0, which is what makes a retry safe). A request in which no id at all resolves is refused, naming them.
# Delete the two responses you just listed, by their stable ids:
empirio responses delete --survey-id <uuid> --mode ids --response-ids resp_LtJDYFHhAx6phdcj0zbHAQ,part_jSh1yYC83FWbZ5by4cz4bg
# Delete responses at row 3, 7, 12 (from the last `responses list` you ran):
empirio responses delete --survey-id <uuid> --mode rows --row-numbers 3,7,12
# Wipe everything:
empirio responses delete --survey-id <uuid> --mode all
empirio responses export
Export responses as CSV, XLSX, JSON, or SPSS. Returns a temporary signed download URL and
the actual file extension. SPSS is delivered as a ZIP bundle, so its response reports
format: "spss" together with file_extension: "zip".
| Parameter | Type | Required | Description |
|---|---|---|---|
--session-id | UUID or null | No | One live session. null selects responses given outside a live session. Do not combine with --session-ids. |
--session-ids | array of UUID or null | No | Several live sessions (up to 100). null includes responses given outside a live session. Omit both for all responses. |
--score-min | number | No | Inclusive minimum quiz score in points. |
--score-max | number | No | Inclusive maximum quiz score in points. |
--passed | boolean | No | Filter by the stored quiz pass result. |
--url-params | JSON object | No | Exact captured URL parameter matches. |
--survey-id | UUID | Yes | Survey. |
--format | csv | xlsx | json | spss | No | Default csv. |
--date-from / --date-to | ISO 8601 | No | Filter window. |
--include-incomplete-participations | boolean | No | Default false. |
--time-zone | IANA TZ | No | e.g. Europe/Berlin for exported timestamps. |
--answer-filters | JSON array | No | Filter by specific answer values (max 100). |
--idempotency-key | UUID | No | Override the auto-generated idempotency key. |
empirio responses export --survey-id <uuid> --format xlsx
empirio responses export --survey-id <uuid> --format csv --time-zone Europe/Berlin
empirio responses export-charts
Export aggregate charts in one of six formats: native editable PowerPoint (pptx), image-based PowerPoint (pptx_images), landscape A4 PDF (pdf), Word document (docx), ZIP of PNG charts (zip_images), or structured chart JSON (chart_json).
| Parameter | Type | Required | Description |
|---|---|---|---|
--session-id | UUID or null | No | One live session. null selects responses given outside a live session. Do not combine with --session-ids. |
--session-ids | array of UUID or null | No | Several live sessions (up to 100). null includes responses given outside a live session. Omit both for all responses. |
--score-min | number | No | Inclusive minimum quiz score in points. |
--score-max | number | No | Inclusive maximum quiz score in points. |
--passed | boolean | No | Filter by the stored quiz pass result. |
--url-params | JSON object | No | Exact captured URL parameter matches. |
--survey-id | UUID | Yes | Survey. |
--format | pptx | pptx_images | pdf | docx | zip_images | chart_json | No | Default pptx. Binary formats return a 1h signed download URL; chart_json returns inline content. |
--date-from / --date-to | ISO 8601 | No | Filter window. |
--include-incomplete-participations | boolean | No | Default false. |
--time-zone | IANA TZ | No | e.g. Europe/Berlin. |
--answer-filters | JSON array | No | Same as responses export. |
--idempotency-key | UUID | No | Override the auto-generated idempotency key. |
empirio responses export-charts --survey-id <uuid> --format pptx
empirio responses export-charts --survey-id <uuid> --format pdf
empirio responses export-charts --survey-id <uuid> --format docx
empirio responses export-charts --survey-id <uuid> --format zip_images
empirio responses export-charts --survey-id <uuid> --format chart_json --json > charts.json
empirio responses file-download
Print a temporary download link for one file a participant uploaded to a file-upload question. The link is valid
for one hour and downloads the file under its original name; the CLI prints it and saves nothing. Take the three ids
from a file-upload answer in responses list: the row's response_id and the file's file_id.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey. |
--response-id | string | Yes | The participation's response_id (resp_… or part_…). |
--file-id | string | Yes | The file's file_id (file_…). |
empirio responses file-download --survey-id <uuid> --response-id resp_8Kx2vQ1mR7pLtYbN4wZa3g --file-id file_Hk3vP0qL9sXw2YbN4mRt7A
Effective survey mode
empirio survey mode-update
Changes the effective mode without publishing other working draft content. A changed mode deactivates participation and ends any active live session or rehearsal. Switching to live sets access to open. Owner or editor only. Read the top-level version from survey get, then activate separately with survey publish or live session-start when ready.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey to change. |
--survey-mode | survey / quiz / live | Yes | Mode to make effective immediately. |
--version | integer | Yes | Canonical survey get.version, from 1 to 2147483647. This is not published.version. A stale value returns conflict. |
--idempotency-key | UUID | No | Stable retry key. Reuse it with the same arguments after an uncertain result. |
empirio survey mode-update --survey-id <uuid> --survey-mode live --version 8
Live sessions
A survey in live mode runs in sessions. All live commands need the surveys scope. Starting a session, deleting one and reading results also need responses. A session is active, paused (open, but answering is closed and the time limit stands still) or ended; only one session is open at a time.
empirio live session-start
Opens participation for one session. Starting publishes the survey first (pending draft changes go live, with the refusals of survey publish), and it stays published afterwards. Returns the session (with the room code participants type in at the join page), the participation link, a QR code image of it (qr_image, a PNG data URI) and the presentation link. Starting while a session is open (active or paused) answers live_session_active, and error.context.active_session_id names the open session.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | ID of a survey in live mode. |
--name | string | No | Label for the session history, such as the event or class. |
--replace-session-id | UUID | No | End this running session and start the new one in its place. |
--duration-seconds | integer or null | No | Omit for settings.live.duration_seconds. null means no duration limit, until manually ended or the scheduled participation end. |
--rehearsal | boolean | No | true starts a test run whose answers stay out of the results. |
--idempotency-key | UUID | No | Stable retry key for this start. |
empirio live session-start --survey-id <uuid> --name "Team meeting" --duration-seconds 600
empirio live session-end
Ends an active or paused session. People still answering are completed with what they answered. live session-reactivate can reopen it later.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey ID. |
--session-id | UUID | Yes | Session to end. Ending an ended session returns it unchanged. |
--idempotency-key | UUID | No | Stable retry key. |
empirio live session-end --survey-id <uuid> --session-id <uuid>
empirio live session-pause
Closes answering and voting in an active session until it is resumed; the time limit stands still. A paused session stays open: its room code works and people can still join. Pausing a paused session returns it unchanged; an ended session answers conflict with error.context.reason session_ended.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey ID. |
--session-id | UUID | Yes | Active session to pause. |
--idempotency-key | UUID | No | Stable retry key. |
empirio live session-pause --survey-id <uuid> --session-id <uuid>
empirio live session-resume
Opens answering again in a paused session; the time limit continues with the time that was left at the pause. Resuming an active session returns it unchanged.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey ID. |
--session-id | UUID | Yes | Paused session to resume. |
--idempotency-key | UUID | No | Stable retry key. |
empirio live session-resume --survey-id <uuid> --session-id <uuid>
empirio live session-reactivate
Reopens an ended session with the currently published survey; nothing is published. Its answers and room code are kept, the time limit starts again from now, and people who completed their participation stay completed. Refused with conflict while another session is open (error.context.active_session_id), for a rehearsal, after the scheduled participation end, and while the session's end is still being processed (finalizing: retry shortly).
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | ID of a published survey in live mode. |
--session-id | UUID | Yes | Ended session to reopen. An open session is returned unchanged. |
--duration-seconds | integer or null | No | Omit for settings.live.duration_seconds. null means no duration limit. |
--idempotency-key | UUID | No | Stable retry key. A retry with the same key never reopens a session that was ended again since. |
empirio live session-reactivate --survey-id <uuid> --session-id <uuid> --duration-seconds 300
empirio live session-update
Renames a session, open or ended.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey ID. |
--session-id | UUID | Yes | Session to rename. |
--name | string | Yes | New name, 1 to 120 characters. |
--idempotency-key | UUID | No | Stable retry key. |
empirio live session-update --survey-id <uuid> --session-id <uuid> --name "Team meeting (group A)"
empirio live session-delete
Deletes a session that is not open, with its responses and participations. Owner only; needs the responses scope. It cannot be undone through the API. Results links filtered to the session show nothing until their filter is changed. Returns deleted_response_count.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey ID. |
--session-id | UUID | Yes | Session to delete. A repeat answers not_found. |
--idempotency-key | UUID | No | Stable retry key. |
empirio live session-delete --survey-id <uuid> --session-id <uuid>
empirio live session-list
Lists the sessions newest first, with status, participants and remaining time. open_session is the open (active or paused) session on every page.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey ID. |
--cursor | string | No | next_cursor from the previous page. |
--limit | integer | No | Page size, 1 to 100, default 100. Follow next_cursor until it is null. |
empirio live session-list --survey-id <uuid> --limit 20
empirio live session-get
Reads one session. With --include-results true it also returns the live results the presentation shows and, for editors, the hidden answers.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey ID. |
--session-id | UUID | Yes | Session to read. |
--include-results | boolean | No | Also return the live results (needs the responses scope). |
--results-version | string | No | The results_version of results you already hold. Unchanged results answer results_unchanged: true instead. |
empirio live session-get --survey-id <uuid> --session-id <uuid> --include-results true
Folders
Folders can be personal or shared. The list reports ownership, your folder role, your survey role and whether a folder is shared. Folder access and survey access are separate grants.
empirio folder list
Lists folders you own or belong to in list order. This read takes no parameters.
empirio folder list
empirio folder create
Creates the folder, or returns the one you already have with that name, with already_exists: true.
| Parameter | Type | Required | Description |
|---|---|---|---|
--name | string | Yes | 1 to 80 characters. |
--idempotency-key | UUID | No | Stable retry key. |
empirio folder create --name Workshops
empirio folder update
| Parameter | Type | Required | Description |
|---|---|---|---|
--folder-id | UUID | Yes | Folder to change. |
--name | string | No | New name. |
--position | integer | No | New zero-based position in your list. |
--idempotency-key | UUID | No | Stable retry key. |
empirio folder update --folder-id <uuid> --name Workshops
empirio folder delete
Deletes the folder. Its surveys move out of it and are kept.
| Parameter | Type | Required | Description |
|---|---|---|---|
--folder-id | UUID | Yes | Folder to delete. |
--idempotency-key | UUID | No | Stable retry key. |
empirio folder delete --folder-id <uuid>
empirio survey move
Sets your personal placement. Placing an owned survey in a folder also adds shared contents and requires the responses scope, even when the folder currently has no other members. Placing a survey you do not own changes only your private placement. Removing personal placement does not remove existing shared contents. Manage shared contents in the web editor.
| Parameter | Type | Required | Description |
|---|---|---|---|
--survey-id | UUID | Yes | Survey ID. |
--folder-id | UUID or null | No | Folder ID, or null to take the survey out of its folder. |
--folder-name | string | No | One of your folders by name, instead of the ID. |
--create-if-missing | boolean | No | With --folder-name: create the folder if you have none of that name. |
--idempotency-key | UUID | No | Stable retry key. |
empirio survey move --survey-id <uuid> --folder-name Workshops --create-if-missing true
empirio survey move --survey-id <uuid> --folder-id null
Templates
empirio template list
| Parameter | Type | Required | Description |
|---|---|---|---|
--locale | string | No | Language of the template texts, e.g. de-DE. |
--category | customer / employee / market / education / hr / event / forms / other / meetings / leads | No | Filter by template category. |
--survey-mode | survey / quiz / live | No | survey, quiz or live. |
--cursor | string | No | next_cursor from the previous page. |
--limit | integer | No | Page size, 1 to 200, default 50. |
empirio template list --survey-mode quiz --locale en-US
empirio template get
Reads a template with its questions. Create a survey from it with empirio survey create --mode manual --template-id <uuid>.
| Parameter | Type | Required | Description |
|---|---|---|---|
--template-id | UUID | Yes | Template ID from template list. |
--locale | string | No | Language of the texts. |
empirio template get --template-id <uuid> --locale en-US