Appearance
Surveys API
On-site surveys shown by the tracker. The public `/s/{key}` endpoints are used by the tracker itself (server root, not /api/v1).
All paths are relative to https://your-site.com/api/v1. Send Authorization: Bearer <token> and Accept: application/json; see authentication and errors.
GET /sites/{site}/survey-designs
The site's survey designs (default first) and the prepared templates to start from (recordings:read)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes |
Responses
- 200 —
data: the designs;meta.templates: id, name, description, suggested accent and style of each template. - 404 — Missing, or another account's.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object[] | ||
data[].id | integer | ||
data[].name | string | ||
data[].template | string | ||
data[].style | object | How a survey card looks; the accent colour is each survey's own. | |
data[].style.background | string | ||
data[].style.text | string | ||
data[].style.muted | string | ||
data[].style.border | string | ||
data[].style.radius | integer | Minimum 0. Maximum 28. | |
data[].style.font | string | One of: system, rounded, serif, mono. | |
data[].style.shadow | string | One of: none, soft, strong. | |
data[].style.width | string | One of: narrow, normal, wide. | |
data[].style.buttons | string | One of: filled, outline, pill. | |
data[].style.header | boolean | ||
data[].style.glass | boolean | ||
data[].accent | string | ||
data[].is_default | boolean | ||
meta | object | ||
meta.templates | object[] |
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/survey-designs" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"POST /sites/{site}/survey-designs
A new design from a template (classic, minimal, dark, soft, bold, glass, compact, elegant) with changes; the site's first is its default (recordings:write, at most 30 per site)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes |
Request body
application/json, required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | At most 80 characters. |
template | string | yes | |
accent | string | ||
is_default | boolean | ||
style | object | How a survey card looks; the accent colour is each survey's own. | |
style.background | string | ||
style.text | string | ||
style.muted | string | ||
style.border | string | ||
style.radius | integer | Minimum 0. Maximum 28. | |
style.font | string | One of: system, rounded, serif, mono. | |
style.shadow | string | One of: none, soft, strong. | |
style.width | string | One of: narrow, normal, wide. | |
style.buttons | string | One of: filled, outline, pill. | |
style.header | boolean | ||
style.glass | boolean |
Responses
- 201 — The design.
- 422 —
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.id | integer | ||
data.name | string | ||
data.template | string | ||
data.style | object | How a survey card looks; the accent colour is each survey's own. | |
data.style.background | string | ||
data.style.text | string | ||
data.style.muted | string | ||
data.style.border | string | ||
data.style.radius | integer | Minimum 0. Maximum 28. | |
data.style.font | string | One of: system, rounded, serif, mono. | |
data.style.shadow | string | One of: none, soft, strong. | |
data.style.width | string | One of: narrow, normal, wide. | |
data.style.buttons | string | One of: filled, outline, pill. | |
data.style.header | boolean | ||
data.style.glass | boolean | ||
data.accent | string | ||
data.is_default | boolean |
bash
curl -X POST "https://your-site.com/api/v1/sites/{site}/survey-designs" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"text","template":"text","accent":"#2563eb","is_default":true,"style":{"background":"#ffffff","text":"text","muted":"text","border":"text","radius":0,"font":"system","shadow":"none","width":"narrow","buttons":"filled","header":true,"glass":true}}'PATCH /sites/{site}/survey-designs/{design}
Changes a design's name, style or accent, or makes it the site's default (recordings:write)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
design | path | integer | yes |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
name | string | At most 80 characters. | |
accent | string | ||
is_default | boolean | ||
style | object | How a survey card looks; the accent colour is each survey's own. | |
style.background | string | ||
style.text | string | ||
style.muted | string | ||
style.border | string | ||
style.radius | integer | Minimum 0. Maximum 28. | |
style.font | string | One of: system, rounded, serif, mono. | |
style.shadow | string | One of: none, soft, strong. | |
style.width | string | One of: narrow, normal, wide. | |
style.buttons | string | One of: filled, outline, pill. | |
style.header | boolean | ||
style.glass | boolean |
Responses
- 200 — The design.
- 404 — Missing, or another account's.
- 422 —
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.id | integer | ||
data.name | string | ||
data.template | string | ||
data.style | object | How a survey card looks; the accent colour is each survey's own. | |
data.style.background | string | ||
data.style.text | string | ||
data.style.muted | string | ||
data.style.border | string | ||
data.style.radius | integer | Minimum 0. Maximum 28. | |
data.style.font | string | One of: system, rounded, serif, mono. | |
data.style.shadow | string | One of: none, soft, strong. | |
data.style.width | string | One of: narrow, normal, wide. | |
data.style.buttons | string | One of: filled, outline, pill. | |
data.style.header | boolean | ||
data.style.glass | boolean | ||
data.accent | string | ||
data.is_default | boolean |
bash
curl -X PATCH "https://your-site.com/api/v1/sites/{site}/survey-designs/{design}" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"text","accent":"text","is_default":true,"style":{"background":"#ffffff","text":"text","muted":"text","border":"text","radius":0,"font":"system","shadow":"none","width":"narrow","buttons":"filled","header":true,"glass":true}}'DELETE /sites/{site}/survey-designs/{design}
Deletes a design: its surveys use the default; a deleted default is replaced by the oldest other design (recordings:write)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
design | path | integer | yes |
Responses
- 204 — Deleted.
- 404 — Missing, or another account's.
bash
curl -X DELETE "https://your-site.com/api/v1/sites/{site}/survey-designs/{design}" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"GET /sites/{site}/surveys
The site's surveys (newest first) with their total responses
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes |
Responses
- 200 — Surveys.
- 404 — Missing, or another account's.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object[] | ||
data[].id | integer | ||
data[].site_id | integer | ||
data[].name | string | ||
data[].status | string | One of: draft, active, paused. | |
data[].questions | object[] | ||
data[].questions[].id | string | yes | Chosen by the client and kept on edits so answers stay with their question. Pattern ^[a-z0-9]{1,12}$. |
data[].questions[].type | string | yes | One of: nps, rating, emoji, thumbs, text, choice. |
data[].questions[].text | string | yes | At most 300 characters. |
data[].questions[].options | string[] | Choice questions only. At most 8 items. | |
data[].questions[].required | boolean | Default false. | |
data[].questions[].show_if | object, nullable | Shown only when an earlier question's answer meets this; answers to questions the visitor was not shown are dropped. at_least / at_most only for scores (nps, rating, emoji). | |
data[].targeting | object | ||
data[].targeting.page | object | ||
data[].targeting.device | string | One of: all, desktop, tablet, mobile. Default "all". | |
data[].targeting.delay_s | integer | Minimum 0. Maximum 600. Default 5. | |
data[].targeting.sample | integer | % of visitors who get the survey. Minimum 1. Maximum 100. Default 100. | |
data[].targeting.trigger | string | delay: after delay_s on the page; event: when the site fires the custom event event (__sr.push(['event', name])). One of: delay, event. Default "delay". | |
data[].targeting.event | string, nullable | At most 64 characters. | |
data[].targeting.min_sessions | integer | From the visitor's n-th session. Minimum 1. Maximum 100. Default 1. | |
data[].targeting.max_completions | integer | How often one visitor may answer it (again in later sessions). Minimum 1. Maximum 100. Default 1. | |
data[].appearance | object | ||
data[].appearance.position | string | One of: right, left, center. Default "right". | |
data[].appearance.color | string | Pattern ^#[0-9a-fA-F]{6}$. | |
data[].appearance.thanks | string, nullable | At most 200 characters. | |
data[].appearance.launcher | object | A tab with an icon and a label that opens the survey, instead of opening by itself. | |
data[].responses | integer | All responses (in lists). | |
data[].created_at | string (date-time), nullable | ||
data[].updated_at | string (date-time), nullable |
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/surveys" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"POST /sites/{site}/surveys
Creates a survey (recordings:write); a draft unless status says otherwise
403 when the account's plan allows no more surveys (plan feature surveys.count).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes |
Request body
application/json, required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | At most 120 characters. |
status | string | One of: draft, active, paused. | |
questions | object[] | yes | At most 10 items. |
questions[].id | string | yes | Chosen by the client and kept on edits so answers stay with their question. Pattern ^[a-z0-9]{1,12}$. |
questions[].type | string | yes | One of: nps, rating, emoji, thumbs, text, choice. |
questions[].text | string | yes | At most 300 characters. |
questions[].options | string[] | Choice questions only. At most 8 items. | |
questions[].required | boolean | Default false. | |
questions[].show_if | object, nullable | Shown only when an earlier question's answer meets this; answers to questions the visitor was not shown are dropped. at_least / at_most only for scores (nps, rating, emoji). | |
questions[].show_if.question | string | The id of an earlier question. | |
questions[].show_if.op | string | One of: is, is_not, at_least, at_most. | |
questions[].show_if.value | string | integer | ||
targeting | object | ||
targeting.page | object | ||
targeting.page.op | string | One of: any, is, contains, begins, pattern. Default "any". | |
targeting.page.value | string, nullable | At most 500 characters. | |
targeting.device | string | One of: all, desktop, tablet, mobile. Default "all". | |
targeting.delay_s | integer | Minimum 0. Maximum 600. Default 5. | |
targeting.sample | integer | % of visitors who get the survey. Minimum 1. Maximum 100. Default 100. | |
targeting.trigger | string | delay: after delay_s on the page; event: when the site fires the custom event event (__sr.push(['event', name])). One of: delay, event. Default "delay". | |
targeting.event | string, nullable | At most 64 characters. | |
targeting.min_sessions | integer | From the visitor's n-th session. Minimum 1. Maximum 100. Default 1. | |
targeting.max_completions | integer | How often one visitor may answer it (again in later sessions). Minimum 1. Maximum 100. Default 1. | |
appearance | object | ||
appearance.position | string | One of: right, left, center. Default "right". | |
appearance.color | string | Pattern ^#[0-9a-fA-F]{6}$. | |
appearance.thanks | string, nullable | At most 200 characters. | |
appearance.launcher | object | A tab with an icon and a label that opens the survey, instead of opening by itself. | |
appearance.launcher.enabled | boolean | Default false. | |
appearance.launcher.icon | string | One of: chat, star, heart, smile, megaphone. Default "chat". | |
appearance.launcher.label | string, nullable | At most 40 characters. |
Responses
- 201 — Created.
- 403 — Not allowed (not an administrator, or outside the token's abilities).
- 404 — Missing, or another account's.
- 422 — Validation failed.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.id | integer | ||
data.site_id | integer | ||
data.name | string | ||
data.status | string | One of: draft, active, paused. | |
data.questions | object[] | ||
data.questions[].id | string | yes | Chosen by the client and kept on edits so answers stay with their question. Pattern ^[a-z0-9]{1,12}$. |
data.questions[].type | string | yes | One of: nps, rating, emoji, thumbs, text, choice. |
data.questions[].text | string | yes | At most 300 characters. |
data.questions[].options | string[] | Choice questions only. At most 8 items. | |
data.questions[].required | boolean | Default false. | |
data.questions[].show_if | object, nullable | Shown only when an earlier question's answer meets this; answers to questions the visitor was not shown are dropped. at_least / at_most only for scores (nps, rating, emoji). | |
data.targeting | object | ||
data.targeting.page | object | ||
data.targeting.device | string | One of: all, desktop, tablet, mobile. Default "all". | |
data.targeting.delay_s | integer | Minimum 0. Maximum 600. Default 5. | |
data.targeting.sample | integer | % of visitors who get the survey. Minimum 1. Maximum 100. Default 100. | |
data.targeting.trigger | string | delay: after delay_s on the page; event: when the site fires the custom event event (__sr.push(['event', name])). One of: delay, event. Default "delay". | |
data.targeting.event | string, nullable | At most 64 characters. | |
data.targeting.min_sessions | integer | From the visitor's n-th session. Minimum 1. Maximum 100. Default 1. | |
data.targeting.max_completions | integer | How often one visitor may answer it (again in later sessions). Minimum 1. Maximum 100. Default 1. | |
data.appearance | object | ||
data.appearance.position | string | One of: right, left, center. Default "right". | |
data.appearance.color | string | Pattern ^#[0-9a-fA-F]{6}$. | |
data.appearance.thanks | string, nullable | At most 200 characters. | |
data.appearance.launcher | object | A tab with an icon and a label that opens the survey, instead of opening by itself. | |
data.responses | integer | All responses (in lists). | |
data.created_at | string (date-time), nullable | ||
data.updated_at | string (date-time), nullable |
bash
curl -X POST "https://your-site.com/api/v1/sites/{site}/surveys" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"text","status":"draft","questions":[{"id":"text","type":"nps","text":"text"}],"targeting":{"page":{"op":"any","value":"text"},"device":"all","delay_s":5,"sample":100,"trigger":"delay","event":"text","min_sessions":1,"max_completions":1},"appearance":{"position":"right","color":"text","thanks":"text","launcher":{"enabled":false,"icon":"chat","label":"text"}}}'GET /sites/{site}/surveys/{survey}
One survey
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
survey | path | integer | yes |
Responses
- 200 — The survey.
- 404 — Missing, or another account's.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.id | integer | ||
data.site_id | integer | ||
data.name | string | ||
data.status | string | One of: draft, active, paused. | |
data.questions | object[] | ||
data.questions[].id | string | yes | Chosen by the client and kept on edits so answers stay with their question. Pattern ^[a-z0-9]{1,12}$. |
data.questions[].type | string | yes | One of: nps, rating, emoji, thumbs, text, choice. |
data.questions[].text | string | yes | At most 300 characters. |
data.questions[].options | string[] | Choice questions only. At most 8 items. | |
data.questions[].required | boolean | Default false. | |
data.questions[].show_if | object, nullable | Shown only when an earlier question's answer meets this; answers to questions the visitor was not shown are dropped. at_least / at_most only for scores (nps, rating, emoji). | |
data.targeting | object | ||
data.targeting.page | object | ||
data.targeting.device | string | One of: all, desktop, tablet, mobile. Default "all". | |
data.targeting.delay_s | integer | Minimum 0. Maximum 600. Default 5. | |
data.targeting.sample | integer | % of visitors who get the survey. Minimum 1. Maximum 100. Default 100. | |
data.targeting.trigger | string | delay: after delay_s on the page; event: when the site fires the custom event event (__sr.push(['event', name])). One of: delay, event. Default "delay". | |
data.targeting.event | string, nullable | At most 64 characters. | |
data.targeting.min_sessions | integer | From the visitor's n-th session. Minimum 1. Maximum 100. Default 1. | |
data.targeting.max_completions | integer | How often one visitor may answer it (again in later sessions). Minimum 1. Maximum 100. Default 1. | |
data.appearance | object | ||
data.appearance.position | string | One of: right, left, center. Default "right". | |
data.appearance.color | string | Pattern ^#[0-9a-fA-F]{6}$. | |
data.appearance.thanks | string, nullable | At most 200 characters. | |
data.appearance.launcher | object | A tab with an icon and a label that opens the survey, instead of opening by itself. | |
data.responses | integer | All responses (in lists). | |
data.created_at | string (date-time), nullable | ||
data.updated_at | string (date-time), nullable |
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/surveys/{survey}" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"PATCH /sites/{site}/surveys/{survey}
Changes a survey (recordings:write); only the parts sent
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
survey | path | integer | yes |
Request body
application/json, required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | At most 120 characters. |
status | string | One of: draft, active, paused. | |
questions | object[] | yes | At most 10 items. |
questions[].id | string | yes | Chosen by the client and kept on edits so answers stay with their question. Pattern ^[a-z0-9]{1,12}$. |
questions[].type | string | yes | One of: nps, rating, emoji, thumbs, text, choice. |
questions[].text | string | yes | At most 300 characters. |
questions[].options | string[] | Choice questions only. At most 8 items. | |
questions[].required | boolean | Default false. | |
questions[].show_if | object, nullable | Shown only when an earlier question's answer meets this; answers to questions the visitor was not shown are dropped. at_least / at_most only for scores (nps, rating, emoji). | |
questions[].show_if.question | string | The id of an earlier question. | |
questions[].show_if.op | string | One of: is, is_not, at_least, at_most. | |
questions[].show_if.value | string | integer | ||
targeting | object | ||
targeting.page | object | ||
targeting.page.op | string | One of: any, is, contains, begins, pattern. Default "any". | |
targeting.page.value | string, nullable | At most 500 characters. | |
targeting.device | string | One of: all, desktop, tablet, mobile. Default "all". | |
targeting.delay_s | integer | Minimum 0. Maximum 600. Default 5. | |
targeting.sample | integer | % of visitors who get the survey. Minimum 1. Maximum 100. Default 100. | |
targeting.trigger | string | delay: after delay_s on the page; event: when the site fires the custom event event (__sr.push(['event', name])). One of: delay, event. Default "delay". | |
targeting.event | string, nullable | At most 64 characters. | |
targeting.min_sessions | integer | From the visitor's n-th session. Minimum 1. Maximum 100. Default 1. | |
targeting.max_completions | integer | How often one visitor may answer it (again in later sessions). Minimum 1. Maximum 100. Default 1. | |
appearance | object | ||
appearance.position | string | One of: right, left, center. Default "right". | |
appearance.color | string | Pattern ^#[0-9a-fA-F]{6}$. | |
appearance.thanks | string, nullable | At most 200 characters. | |
appearance.launcher | object | A tab with an icon and a label that opens the survey, instead of opening by itself. | |
appearance.launcher.enabled | boolean | Default false. | |
appearance.launcher.icon | string | One of: chat, star, heart, smile, megaphone. Default "chat". | |
appearance.launcher.label | string, nullable | At most 40 characters. |
Responses
- 200 — The survey.
- 404 — Missing, or another account's.
- 422 — Validation failed.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.id | integer | ||
data.site_id | integer | ||
data.name | string | ||
data.status | string | One of: draft, active, paused. | |
data.questions | object[] | ||
data.questions[].id | string | yes | Chosen by the client and kept on edits so answers stay with their question. Pattern ^[a-z0-9]{1,12}$. |
data.questions[].type | string | yes | One of: nps, rating, emoji, thumbs, text, choice. |
data.questions[].text | string | yes | At most 300 characters. |
data.questions[].options | string[] | Choice questions only. At most 8 items. | |
data.questions[].required | boolean | Default false. | |
data.questions[].show_if | object, nullable | Shown only when an earlier question's answer meets this; answers to questions the visitor was not shown are dropped. at_least / at_most only for scores (nps, rating, emoji). | |
data.targeting | object | ||
data.targeting.page | object | ||
data.targeting.device | string | One of: all, desktop, tablet, mobile. Default "all". | |
data.targeting.delay_s | integer | Minimum 0. Maximum 600. Default 5. | |
data.targeting.sample | integer | % of visitors who get the survey. Minimum 1. Maximum 100. Default 100. | |
data.targeting.trigger | string | delay: after delay_s on the page; event: when the site fires the custom event event (__sr.push(['event', name])). One of: delay, event. Default "delay". | |
data.targeting.event | string, nullable | At most 64 characters. | |
data.targeting.min_sessions | integer | From the visitor's n-th session. Minimum 1. Maximum 100. Default 1. | |
data.targeting.max_completions | integer | How often one visitor may answer it (again in later sessions). Minimum 1. Maximum 100. Default 1. | |
data.appearance | object | ||
data.appearance.position | string | One of: right, left, center. Default "right". | |
data.appearance.color | string | Pattern ^#[0-9a-fA-F]{6}$. | |
data.appearance.thanks | string, nullable | At most 200 characters. | |
data.appearance.launcher | object | A tab with an icon and a label that opens the survey, instead of opening by itself. | |
data.responses | integer | All responses (in lists). | |
data.created_at | string (date-time), nullable | ||
data.updated_at | string (date-time), nullable |
bash
curl -X PATCH "https://your-site.com/api/v1/sites/{site}/surveys/{survey}" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"text","status":"draft","questions":[{"id":"text","type":"nps","text":"text"}],"targeting":{"page":{"op":"any","value":"text"},"device":"all","delay_s":5,"sample":100,"trigger":"delay","event":"text","min_sessions":1,"max_completions":1},"appearance":{"position":"right","color":"text","thanks":"text","launcher":{"enabled":false,"icon":"chat","label":"text"}}}'DELETE /sites/{site}/surveys/{survey}
Deletes a survey and its answers (recordings:write)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
survey | path | integer | yes |
Responses
- 204 — Deleted.
- 404 — Missing, or another account's.
bash
curl -X DELETE "https://your-site.com/api/v1/sites/{site}/surveys/{survey}" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"GET /sites/{site}/surveys/{survey}/results
Results for a period (default the last 30 days)
Per question answered, plus by type — nps: score (% promoters 9–10 minus % detractors 0–6, null without answers), promoters, passives, detractors, distribution (11 counts, 0–10); rating / emoji: average, distribution (5 counts, 1–5); thumbs: up, down; choice: options [{option, votes}]; text: only the count (list the answers with …/responses?question=).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
survey | path | integer | yes | |
from | query | string (date) | ||
to | query | string (date) |
Responses
- 200 — The results.
- 404 — Missing, or another account's.
- 422 — Validation failed.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.period | object | ||
data.period.from | string (date) | ||
data.period.to | string (date) | ||
data.responses | integer | ||
data.questions | object[] |
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/surveys/{survey}/results" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"GET /sites/{site}/surveys/{survey}/responses
The answers of a period, newest first, 50 per page
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
survey | path | integer | yes | |
from | query | string (date) | ||
to | query | string (date) | ||
question | query | string | Only responses that answered this question. | |
nps | query | string | With question (an NPS question): only promoters (9–10), passives (7–8) or detractors (0–6). One of: promoters, passives, detractors. | |
q | query | string | Only responses whose answers contain this text (any case). At most 200 characters. | |
page | query | integer | Minimum 1. |
Responses
- 200 — Answers (replay at GET /sites/{site}/sessions/{session}).
- 404 — Missing, or another account's.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object[] | ||
data[].id | integer | ||
data[].session | string (uuid) | ||
data[].url | string, nullable | ||
data[].answers | object | ||
data[].created_at | string (date-time) | ||
meta | object | ||
meta.page | integer | ||
meta.more | boolean |
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/surveys/{survey}/responses" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"GET /sites/{site}/surveys/{survey}/responses/export
The same answers as a CSV file (every one, newest first)
Columns: time, page, session, then one per question (its text). Answers starting with = + - @ are prefixed with an apostrophe so spreadsheets never run them as formulas.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
survey | path | integer | yes | |
from | query | string (date) | ||
to | query | string (date) | ||
question | query | string | ||
nps | query | string | One of: promoters, passives, detractors. | |
q | query | string | At most 200 characters. |
Responses
- 200 — The CSV file.
- 404 — Missing, or another account's.
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/surveys/{survey}/responses/export" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"