Submit survey response

POST /api/v1/public/surveys/respond/

Submit a survey response with a rating value 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 — initialize each survey separately to obtain its own session.

Request body

Comparison table
FieldTypeRequiredDescription
survey_uuidstring (uuid)YesUUID of the survey being answered.
session_uuidstring (uuid)NoSession to attach the response to (from the init response). Omit to start a fresh session.
valueinteger | nullNoRating value. 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 value returns 400.
textstring | nullNoOptional free-text feedback.
channelweb-popup | web-inline | direct-link | qr-code | emailNo
metadataobjectNoArbitrary JSON object stored alongside the response.

Code example

curl -X POST https://feedback.tools/api/v1/public/surveys/respond \
  -H "Authorization: Bearer pk_..." \
  -H "Content-Type: application/json" \
  -d '{"survey_uuid":"<survey_uuid>"}'

Responses

200 Success

Comparison table
FieldTypeRequired
survey_uuidstring (uuid)Yes
session_uuidstring (uuid)Yes
user_submitted_textbooleanYes

400 / 403 / 409 Error

Comparison table
FieldTypeRequired
detailstringYes
survey_uuidstring (uuid) | nullNo
session_uuidstring (uuid) | nullNo