Submit survey response
POST /api/public/v2/surveys/{survey_uuid}/responses/
Submit a survey response with a rating score and optional text feedback. Creates a new response for the current session, or updates it if the same session_uuid already responded to this survey.
Returns 409 when the session_uuid is already in use for a different survey: a session_uuid belongs to a single survey and must not be reused across surveys — create a session for each survey separately to obtain its own.
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. Session to attach the response to (from the session response). Omit or send null to start a fresh session. |
score | integer | null | No | Rating score. The valid range depends on the survey type: CSAT-2: 0-1, CSAT-5: 1-5, CES-7: 1-7, NPS: 0-10. An out-of-range score returns 400. |
text | string | null | No | Optional free-text feedback. |
metadata | object | No | Arbitrary JSON object stored alongside the response. |
Code example
curl -X POST https://feedback.tools/api/public/v2/surveys/<survey_uuid>/responses \
-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 |
user_submitted_text | boolean | Yes |
400 / 403 / 409 Error
Comparison table| Field | Type | Required |
|---|
detail | string | Yes |
survey_uuid | string (uuid) | null | No |
session_uuid | string (uuid) | null | No |