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
}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
}Authorizations
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. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"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.