Skip to main content

Send CSAT Survey

POST 

/accounts/:account_id/conversations/:conversation_id/send_survey

Sends a customer-satisfaction (CSAT) survey message to the contact in this conversation.

The survey is sent as an outgoing message with content_type input_csat, which holds a link to the survey. When the contact answers, the csat_survey_submitted webhook event is sent.

SettingValue
MethodPOST
Path/api/v1/accounts/{account_id}/conversations/{conversation_id}/send_survey
AuthorizationUser token or agent-bot token.

Permissions:

Path parameters

NameTypeRequiredDescription
account_idintegerYesAccount ID.
conversation_idintegerYesConversation display ID.

Body parameters (JSON)

NameTypeRequiredDescription
survey_idintegerNoCSAT survey ID (from the account's CSAT surveys). Omit to send the built-in default survey.

Example request

curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/send_survey' \
-H 'api_access_token: <YOUR_API_ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{}'

Example response: 200 OK with an empty body. An outgoing message with content_type: "input_csat" is added to the conversation — here, for survey 3:

{
"id": 40120,
"content": "Please rate this conversation, https://online.99digital.co.il/survey/responses/NDAxMjA=",
"message_type": 1,
"content_type": "input_csat",
"content_attributes": {
"submitted_values": {
"csat_survey_response": {
"csat_survey_id": 3
}
}
}
}

Error responses

StatusWhenBody
404No CSAT survey with this survey_id.{"error": "Survey not found"}

Request​

Responses​

The survey was sent, with an empty body.