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.
| Setting | Value |
|---|---|
| Method | POST |
| Path | /api/v1/accounts/{account_id}/conversations/{conversation_id}/send_survey |
| Authorization | User token or agent-bot token. |
Permissions:
- User token: any agent who can see the conversation — see Who can see a conversation.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_id | integer | Yes | Account ID. |
conversation_id | integer | Yes | Conversation display ID. |
Body parameters (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
survey_id | integer | No | CSAT 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
| Status | When | Body |
|---|---|---|
404 | No CSAT survey with this survey_id. | {"error": "Survey not found"} |
Request
Responses
- 200
- 401
- 403
- 404
The survey was sent, with an empty body.
The access token is missing or wrong, or its user does not belong to this account.
The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See Authorization.
The conversation or the survey does not exist in this account.