Set the widget's launcher (its name, colour, corner, quick links and icon) and its panel's Home. Fields left out stay as they are.
Needs a read + write key.
Tuti APIPortal
Set the widget's launcher (its name, colour, corner, quick links and icon) and its panel's Home. Fields left out stay as they are.
Needs a read + write key.
/widgetAuthorization Bearer token
application/json · object · required
labelstring · 1–30 charactersThe launcher's name, a round button: read out by screen readers and its tooltip; up to 30 characters
colorstring · nullable · matches ^#[0-9a-f]{6}$The launcher's colour, #rrggbb; null follows the portal's accent colour where it stands out on light and dark pages, else the brand green. Sending the launcher's own stored colour keeps it, and sending that default otherwise is null
positionstringIts corner
One of"bottom-right""bottom-left"
linksarray of object · at most 5 itemsHome's quick links, up to 5 (replaces the list)
labelstring · 1–40 charactersrequiredWhat it says, up to 40 characters
urlstring · at most 500 charactersrequiredWhere it goes: a full https:// address
iconstringThe launcher's icon (image with iconImage). Where plans are sold, an icon other than chat needs a plan with the launcher's icon (402 otherwise); on a lower plan the one set is kept and the launcher shows chat
One of"chat""help""megaphone""lightbulb""image"
iconImagestring · nullable · at least 1 characterThe id of an image uploaded in the app, for the image icon
titlestring · at most 60 charactersThe panel's Home: its heading, empty for “How can we help?”; up to 60 characters
greetingstring · at most 60 charactersThe greeting above Home's heading, empty for “Hi there 👋”, with the visitor's first name once their site signs them in; up to 60 characters
hiddenarray of stringThe parts turned off, gone from Home and the tabs (replaces the list)
Each item one of"docs""messages""feedback""whatsNew"
onPortalbooleanWhether the launcher shows on every page of the project's own portal too (true for new projects)
aiFirstbooleanWhether a new message in Messages goes to the docs' AI first, where the server has AI answers and the project has docs, with “Ask a person” to pass it to the team; one with files goes to the team (true for new projects)
200The widget's settings, as changedapplication/json · WidgetSettings
The widget's settings, as changed
labelstringrequiredThe launcher's name, a round button: read out by screen readers and its tooltip
colorstring · nullablerequiredThe launcher's colour, #rrggbb; null follows the portal's accent colour where it stands out, else the brand green
positionstringrequiredIts corner
One of"bottom-right""bottom-left"
linksarray of PortalLinkrequiredHome's quick links
labelstringrequiredWhat it says
urlstringrequiredWhere it goes: a full https:// address
iconstringrequiredThe launcher's icon as set; on a plan without the launcher's icon it shows chat
One of"chat""help""megaphone""lightbulb""image"
iconImageUploadedImage · nullablerequiredThe uploaded icon, when the icon is image
idstringrequiredThe upload's id
urlstringrequiredA lasting link to the image
widthintegerrequiredIts width in pixels
heightintegerrequiredIts height in pixels
titlestringrequiredThe panel's Home: its heading, empty for “How can we help?”
greetingstringrequiredThe greeting above Home's heading, empty for “Hi there 👋”, with the visitor's first name once their site signs them in
hiddenarray of stringrequiredThe parts turned off, gone from Home and the tabs
Each item one of"docs""messages""feedback""whatsNew"
onPortalbooleanrequiredWhether the launcher shows on every page of the project's own portal too (true for new projects)
aiFirstbooleanrequiredWhether a new message in Messages goes to the docs' AI first, where the server has AI answers and the project has docs, with “Ask a person” to pass it to the team; one with files goes to the team (true for new projects)
400The request isn't valid: a field is missing, has the wrong type or is out of range, or the body isn't a JSON object. The message names the field.application/json · Error
errorobjectrequiredcodestringrequiredWhat went wrong, for code to check: stays the same
messagestringrequiredWhat went wrong, for a person: may change
401No API key was sent, or it isn't valid: it was revoked, or whoever created it left the team.application/json · Error
errorobjectrequiredcodestringrequiredWhat went wrong, for code to check: stays the same
messagestringrequiredWhat went wrong, for a person: may change
402The project's plan doesn't include this or is at its limit, it's out of AI credits, or a payment didn't go through. The message says what's needed.application/json · Error
errorobjectrequiredcodestringrequiredWhat went wrong, for code to check: stays the same
messagestringrequiredWhat went wrong, for a person: may change
403It isn't allowed: the key is read-only, its creator isn't a project owner or admin where only they may, only a person can do it in the app, a setting is off, or someone's address isn't confirmed. The code says which.application/json · Error
errorobjectrequiredcodestringrequiredWhat went wrong, for code to check: stays the same
messagestringrequiredWhat went wrong, for a person: may change
409It can't be done as things are now: for example the post was merged, or someone changed it meanwhile. The code says which.application/json · Error
errorobjectrequiredcodestringrequiredWhat went wrong, for code to check: stays the same
messagestringrequiredWhat went wrong, for a person: may change
429Too many requests: past 600 a minute per key, try again after the seconds in the Retry-After header. Some operations have limits of their own (their description gives them), whose 429 has no Retry-After.application/json · Error
errorobjectrequiredcodestringrequiredWhat went wrong, for code to check: stays the same
messagestringrequiredWhat went wrong, for a person: may change
500Something went wrong on Tuti's side. Try again in a moment.application/json · Error
errorobjectrequiredcodestringrequiredWhat went wrong, for code to check: stays the same
messagestringrequiredWhat went wrong, for a person: may change
curl 'https://tuti.so/api/v1/widget' \
--request PATCH \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"label": "Help & feedback",
"color": "#5b21b6",
"position": "bottom-left",
"links": [
{
"label": "Status",
"url": "https://status.example.com"
}
],
"icon": "help",
"title": "Questions about Acme?",
"hidden": [
"whatsNew"
]
}'const response = await fetch("https://tuti.so/api/v1/widget", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"label": "Help & feedback",
"color": "#5b21b6",
"position": "bottom-left",
"links": [
{
"label": "Status",
"url": "https://status.example.com"
}
],
"icon": "help",
"title": "Questions about Acme?",
"hidden": [
"whatsNew"
]
}),
});
const text = await response.text();import requests
response = requests.patch(
"https://tuti.so/api/v1/widget",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
data="{\n \"label\": \"Help & feedback\",\n \"color\": \"#5b21b6\",\n \"position\": \"bottom-left\",\n \"links\": [\n {\n \"label\": \"Status\",\n \"url\": \"https://status.example.com\"\n }\n ],\n \"icon\": \"help\",\n \"title\": \"Questions about Acme?\",\n \"hidden\": [\n \"whatsNew\"\n ]\n}",
)
print(response.text){
"label": "Help & feedback",
"color": "#5b21b6",
"position": "bottom-right",
"links": [
{
"label": "Status",
"url": "https://status.example.com"
}
],
"icon": "chat",
"iconImage": {
"id": "cm3media0001",
"url": "https://media.example.com/cm3media0001/480.webp",
"width": 480,
"height": 120
},
"title": "Questions about Acme?",
"greeting": "",
"hidden": [
"whatsNew"
],
"onPortal": true,
"aiFirst": true
}{
"error": {
"code": "invalid_input",
"message": "title: Title is too short"
}
}{
"error": {
"code": "unauthorized",
"message": "This API key isn't valid or was revoked"
}
}{
"error": {
"code": "plan_required",
"message": "A custom domain needs the Pro plan. See Settings → Billing."
}
}{
"error": {
"code": "forbidden",
"message": "This key can only read. Create a read + write key to change things."
}
}{
"error": {
"code": "merged",
"message": "This post was merged into another one; vote there instead"
}
}{
"error": {
"code": "rate_limited",
"message": "Up to 600 requests a minute per key"
}
}{
"error": {
"code": "internal_error",
"message": "Something went wrong"
}
}