Submit values for a message
Sends the visitor’s answer back to a message that asked for one — a CSAT rating, or the values from a form or card. submitted_values is stored on the original message rather than creating a new one, which is why this is a PATCH.
PATCH
/
api
/
v1
/
widget
/
messages
/
{id}
Submit values for a message
curl --request PATCH \
--url https://app.tied.com/api/v1/widget/messages/{id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"message": {
"submitted_values": [
{
"name": "csat",
"value": 5
}
]
}
}
'import requests
url = "https://app.tied.com/api/v1/widget/messages/{id}"
payload = { "message": { "submitted_values": [
{
"name": "csat",
"value": 5
}
] } }
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: {submitted_values: [{name: 'csat', value: 5}]}})
};
fetch('https://app.tied.com/api/v1/widget/messages/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://app.tied.com/api/v1/widget/messages/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": {\n \"submitted_values\": [\n {\n \"name\": \"csat\",\n \"value\": 5\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.tied.com/api/v1/widget/messages/{id}"
payload := strings.NewReader("{\n \"message\": {\n \"submitted_values\": [\n {\n \"name\": \"csat\",\n \"value\": 5\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"contact": {
"id": 266,
"name": "Jamie Visitor",
"email": "visitor@example.com",
"phone_number": null,
"account_id": 1,
"created_at": "2026-09-21T04:31:41.992Z",
"updated_at": "2026-09-21T04:31:42.368Z",
"additional_attributes": {
"avatar_background_color": "#CCF3EA",
"illustration_avatar_index": 16
},
"identifier": "EXAMPLE_IDENTIFIER",
"custom_attributes": {},
"last_activity_at": "2026-09-21T04:31:42.364Z",
"contact_type": "lead",
"middle_name": "",
"last_name": "",
"location": null,
"country_code": null,
"blocked": false,
"company_id": null,
"label_list": []
}
}{
"error": "Resource could not be found"
}Authorizations
The signed session token from POST /api/v1/widget/config. Sent alongside website_token in the query string on every widget request. See /api-reference/widget-api-authentication.
Path Parameters
The message the visitor is answering.
Example:
1204
Query Parameters
The web-widget inbox's public token, as it appears in your widget snippet. Required on every widget request.
Example:
"EXAMPLE_WEBSITE_TOKEN"
Body
application/json
submitted_values, in the shape the message asked for.
Response
Success
The updated message and its contact.
Was this page helpful?
⌘I
Submit values for a message
curl --request PATCH \
--url https://app.tied.com/api/v1/widget/messages/{id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"message": {
"submitted_values": [
{
"name": "csat",
"value": 5
}
]
}
}
'import requests
url = "https://app.tied.com/api/v1/widget/messages/{id}"
payload = { "message": { "submitted_values": [
{
"name": "csat",
"value": 5
}
] } }
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: {submitted_values: [{name: 'csat', value: 5}]}})
};
fetch('https://app.tied.com/api/v1/widget/messages/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://app.tied.com/api/v1/widget/messages/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": {\n \"submitted_values\": [\n {\n \"name\": \"csat\",\n \"value\": 5\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.tied.com/api/v1/widget/messages/{id}"
payload := strings.NewReader("{\n \"message\": {\n \"submitted_values\": [\n {\n \"name\": \"csat\",\n \"value\": 5\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"contact": {
"id": 266,
"name": "Jamie Visitor",
"email": "visitor@example.com",
"phone_number": null,
"account_id": 1,
"created_at": "2026-09-21T04:31:41.992Z",
"updated_at": "2026-09-21T04:31:42.368Z",
"additional_attributes": {
"avatar_background_color": "#CCF3EA",
"illustration_avatar_index": 16
},
"identifier": "EXAMPLE_IDENTIFIER",
"custom_attributes": {},
"last_activity_at": "2026-09-21T04:31:42.364Z",
"contact_type": "lead",
"middle_name": "",
"last_name": "",
"location": null,
"country_code": null,
"blocked": false,
"company_id": null,
"label_list": []
}
}{
"error": "Resource could not be found"
}