Submit feedback
POST
{{server}}/api/v1/smart/feedbackSubmitThis endpoint allows the customer to submit feedback by providing answers to specific questions along with optional free-text comments.
Request
-
answers(array of objects, required): An array containing objects with the following keys:-
question(string, required): The unique identifier of the question. -
answer(string, required): The user's response to the question. -
comment(string, optional): Free-text comment provided by the user.
-
Response
It returns status 204, if the submission was successful.
Request
Authorization
| Header | Value |
|---|---|
Authorization | SmartToken {{ticketToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
Body (json)
{
"answers": [
{
"question": "00000000-0000-4000-0014-000000000001",
"answer": "00000000-0000-4000-0015-000000000002",
"comment": "Free-text comment"
}
]
}
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/smart/feedbackSubmit' \
-H 'Accept: application/json' \
-H 'Authorization: SmartToken {{ticketToken}}' \
-H 'Content-Type: application/json' \
-d '{
"answers": [
{
"question": "00000000-0000-4000-0014-000000000001",
"answer": "00000000-0000-4000-0015-000000000002",
"comment": "Free-text comment"
}
]
}'
const response = await fetch("{{server}}/api/v1/smart/feedbackSubmit", {
method: "POST",
headers: {
"Accept": "application/json",
"Authorization": "SmartToken {{ticketToken}}",
"Content-Type": "application/json"
},
body: JSON.stringify({
"answers": [
{
"question": "00000000-0000-4000-0014-000000000001",
"answer": "00000000-0000-4000-0015-000000000002",
"comment": "Free-text comment"
}
]
}),
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/smart/feedbackSubmit"
headers = {
"Accept": "application/json",
"Authorization": "SmartToken {{ticketToken}}",
"Content-Type": "application/json"
}
payload = {
"answers": [
{
"question": "00000000-0000-4000-0014-000000000001",
"answer": "00000000-0000-4000-0015-000000000002",
"comment": "Free-text comment"
}
]
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Example
Example request
POST
{{server}}/api/v1/smart/feedbackSubmitHeaders (1)
| Key | Value |
|---|---|
Accept | application/json |
Body
{
"answers": [
{
"question": "00000000-0000-4000-0014-000000000001",
"answer": "00000000-0000-4000-0015-000000000002",
"comment": "Free-text comment"
}
]
}
Example response 204 No Content
No response body