curl --request PATCH \
--url https://app.thinnest.ai/api/v1/notification-preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"calls": {
"email": "all"
},
"knowledge": {
"muted": true
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({calls: {email: 'all'}, knowledge: {muted: true}})
};
fetch('https://app.thinnest.ai/api/v1/notification-preferences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/notification-preferences"
payload = {
"calls": { "email": "all" },
"knowledge": { "muted": True }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"items": [
{
"category": "meta",
"label": "WhatsApp",
"muted": false,
"email": "critical"
},
{
"category": "templates",
"label": "Templates",
"muted": false,
"email": "off"
},
{
"category": "campaigns",
"label": "Broadcasts and calling campaigns",
"muted": false,
"email": "all"
},
{
"category": "calls",
"label": "Calls",
"muted": false,
"email": "all"
},
{
"category": "inbox",
"label": "Inbox",
"muted": false,
"email": "off"
},
{
"category": "knowledge",
"label": "Knowledge",
"muted": true,
"email": "off"
},
{
"category": "billing",
"label": "Plan and usage",
"muted": false,
"email": "critical"
},
{
"category": "system",
"label": "Connections",
"muted": false,
"email": "critical"
},
{
"category": "members",
"label": "Members",
"muted": false,
"email": "off"
}
],
"nextCursor": null
}{
"error": "`calls.email` must be one of off, critical, all."
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "This API key is read-only: it can read everything but change nothing."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}Update Notification Preferences
Changes any categories at once, keyed by category: muted hides it from the feed and the bell (a critical notice shows regardless), email chooses what is emailed. A field you leave out keeps its value. Emails go only through the email sender connected in the console’s notification settings; until one is connected nothing is emailed, whatever this says, and that connection is not available by API. Answers with every category. A build key may do this.
curl --request PATCH \
--url https://app.thinnest.ai/api/v1/notification-preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"calls": {
"email": "all"
},
"knowledge": {
"muted": true
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({calls: {email: 'all'}, knowledge: {muted: true}})
};
fetch('https://app.thinnest.ai/api/v1/notification-preferences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/notification-preferences"
payload = {
"calls": { "email": "all" },
"knowledge": { "muted": True }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"items": [
{
"category": "meta",
"label": "WhatsApp",
"muted": false,
"email": "critical"
},
{
"category": "templates",
"label": "Templates",
"muted": false,
"email": "off"
},
{
"category": "campaigns",
"label": "Broadcasts and calling campaigns",
"muted": false,
"email": "all"
},
{
"category": "calls",
"label": "Calls",
"muted": false,
"email": "all"
},
{
"category": "inbox",
"label": "Inbox",
"muted": false,
"email": "off"
},
{
"category": "knowledge",
"label": "Knowledge",
"muted": true,
"email": "off"
},
{
"category": "billing",
"label": "Plan and usage",
"muted": false,
"email": "critical"
},
{
"category": "system",
"label": "Connections",
"muted": false,
"email": "critical"
},
{
"category": "members",
"label": "Members",
"muted": false,
"email": "off"
}
],
"nextCursor": null
}{
"error": "`calls.email` must be one of off, critical, all."
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "This API key is read-only: it can read everything but change nothing."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}Authorizations
Your API key (ta_live_…) from Settings → API keys, sent as Authorization: Bearer <key>. Keep it on a server: it can message every customer you have. A key is full, build or read-only; a request its level does not allow is refused with 403.
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Body
One key per category to change (at least one), each an object with muted and/or email. Any other key is refused.
Send muted, email or both; the other keeps its value.
Show child attributes
Show child attributes
Send muted, email or both; the other keeps its value.
Show child attributes
Show child attributes
Send muted, email or both; the other keeps its value.
Show child attributes
Show child attributes
Send muted, email or both; the other keeps its value.
Show child attributes
Show child attributes
Send muted, email or both; the other keeps its value.
Show child attributes
Show child attributes
Send muted, email or both; the other keeps its value.
Show child attributes
Show child attributes
Send muted, email or both; the other keeps its value.
Show child attributes
Show child attributes
Send muted, email or both; the other keeps its value.
Show child attributes
Show child attributes
Send muted, email or both; the other keeps its value.
Show child attributes
Show child attributes
Send muted, email or both; the other keeps its value.
Show child attributes
Show child attributes