Create or update response
Create or update a response.
If the response with the specified external ID already exists, the existing response will be updated.
When creating a new response, the survey_id and answers fields are required. The answers array should have at least one item with the question_id and either a choice or choices field.
The customer and team members will be created if they do not already exist with the specified email address. Otherwise, the response will be linked to the existing customer and team member. Team members and customers without emails will be ignored.
Updating any tags or custom_attributes field will overwrite any existing values.
When updating a response none of the fields are required, but at least one field must be provided.
Required scopes: write responses
Request
- Base URL: https://api.simplesat.io
- URL: https://api.simplesat.io/api/v1/responses/create-or-update
- Auth: API key in header X-Simplesat-Token
Request body
Example request
{
"survey_id": 1,
"created": "2024-01-01T00:00:00Z"
}Response
Successful response
Example response
{
"survey_id": 1,
"ticket": {
"id": 1,
"external_id": "1",
"subject": "Coffee machine broken!",
"custom_attributes": {
"Priority": "Medium",
"Category": "Support"
}
},
"team_members": [
{
"external_id": "1",
"name": "Tester McTestFace",
"email": "tester@simplesat.io",
"custom_attributes": {
"Level": "Senior",
"Department": "Support"
},
"role": "Closed by",
"is_primary": true,
"groups": [
{
"token": "iLA0X65ayqAgnnqnKSFuAwlgtiFGbt3gcN-L73SHNP0",
"name": "Outsource BPO"
}
]
}
],
"customer": {
"external_id": "1",
"name": "Tester McTestFace",
"email": "tester@simplesat.io",
"tags": [
"asset",
"issue"
],
"company": "Simplesat",
"custom_attributes": {
"Country": "United States",
"City": "San Francisco",
"Channels": [
"Web",
"Mobile App"
]
}
},
"answers": [
{
"id": 1,
"question": {
"id": 1,
"text": "How did we do?",
"metric": "csat"
},
"choice": "4",
"choices": null,
"comment": null,
"sentiment": "positive",
"follow_up_answer": "Great!",
"choice_label": "Great, I'm satisfied",
"follow_up_answer_choice": "yes",
"follow_up_answer_choices": null,
"follow_up_question": {
"id": 2,
"text": "Was there anything in particular we did that delighted you?",
"metric": "custom"
},
"topics": [
{
"id": 1,
"name": "Response time",
"description": "How quickly the team responded to the request.",
"sentiment": "positive"
}
]
}
],
"id": 1,
"tags": [
"tag1",
"tag2"
],
"created": "2024-01-01T01:00:00Z",
"modified": "2024-01-01T01:00:00Z",
"ip_address": "192.168.1.1",
"survey": {
"id": 1,
"name": "CSAT Survey"
},
"language": "en"
}Changes
No recorded changes to this operation across all 1 revision of this API.