Skip to main content

SubmitSurveyResponse submits a complete response in a single call.

POST 

/api/v1/surveys/responses

Use this for channels that collect all answers before submission (e.g. a web form submitting the full survey at once). The server creates the response, persists all answers, and marks it completed in one transaction.

For incremental submission (e.g. IVR collecting answers per question), use StartSurveyResponse + SubmitPartialResponse + CompleteSurveyResponse.

Parameters

  • survey_version_id: Required, version answered (> 0).
  • assignment_id, campaign_id, campaign_contact_id, agent_id, call_id: Optional context linking the response back to the interaction.
  • channel_type: Required, one of voice, whatsapp, sms, webchat, email.
  • answers: Required, at least one answer. Each answer populates the fields appropriate for its question type (see SurveyAnswer).

Example

{
"survey_version_id": 9,
"campaign_id": 7,
"channel_type": "webchat",
"answers": [
{"question_id": 101, "numeric_answer": 5},
{"question_id": 102, "text_answer": "Great service, thanks!"}
]
}

Errors

  • INVALID_ARGUMENT: Missing required answers, wrong answer shape for question type, or validation rule violation.

Request

Responses

A successful response.