surveys

Submit

POST
Submits a user response to a survey, which is defined by the survey ID.

Request

This endpoint expects an object.
object
stringRequired
The ID of the object this survey is on (e.g. ticket, conversation, etc).
response
map from strings to anyRequired
Survey response submitted for the object.
survey
stringRequired
The ID of the survey to submit the response to.
dispatch_id
stringOptional
The unique ID associated with the dispatched survey.
response_score
integerOptional
The response score for the survey. Only applicable for CSAT and NPS.
source_channel
stringOptional
The source channel from which survey response is submitted.

Response

This endpoint returns a map from strings to any
POST
1curl -X POST https://api.devrev.ai/surveys.submit \
2 -H "Authorization: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "object": "ACC-12345",
6 "response": {},
7 "survey": "survey"
8}'
200
Successful
1{
2 "string": {
3 "key": "value"
4 }
5}