Create survey session
POST /api/public/v2/surveys/{survey_uuid}/sessions/
Start a survey-taking session and retrieve the survey configuration, along with the user's previous interaction state for this session.
Path parameters
Comparison table| Parameter | Type | Required | Description |
|---|
survey_uuid | string (uuid) | Yes | UUID of the survey. |
Request body
Comparison table| Field | Type | Required | Description |
|---|
session_uuid | string (uuid) | null | No | Optional. Existing session to resume. Omit or send null on the first call — the response returns a server-generated session_uuid to reuse in responses/events. |
Code example
curl -X POST https://feedback.tools/api/public/v2/surveys/<survey_uuid>/sessions \
-H "Authorization: Bearer pk_..." \
-H "Content-Type: application/json"
Responses
200 Success
Comparison table| Field | Type | Required |
|---|
survey_uuid | string (uuid) | Yes |
session_uuid | string (uuid) | Yes |
survey | object | Yes |
user_closed_survey | boolean | Yes |
user_submitted_score | boolean | Yes |
user_submitted_text | boolean | Yes |
survey object:
Comparison table| Field | Type | Required |
|---|
survey_type | csat_2 | csat_5 | ces_7 | nps_10 | Yes |
scale_style | emoji | numbers | stars | thumbs | Yes |
show_on_pages | object | null | Yes |
trigger | object | null | Yes |
do_not_show_if_closed | boolean | Yes |
manual_tracking | boolean | Yes |
feedback_button | boolean | Yes |
question | string | Yes |
min_label | string | Yes |
max_label | string | Yes |
text_question | string | null | Yes |
text_button_label | string | null | Yes |
thank_you_message | string | null | Yes |
response_type | none | text | choices | Yes |
choice_options | object | null | Yes |
400 / 403 / 404 Error
Comparison table| Field | Type | Required |
|---|
detail | string | Yes |
survey_uuid | string (uuid) | null | No |
session_uuid | string (uuid) | null | No |