curl --request PATCH \
--url https://app.thinnest.ai/api/v1/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"greeting": "Namaste! Skyline Homes here — is this a good time to talk about Sky Towers?",
"temperature": 0.4,
"widget": {
"accent": "#0f766e"
},
"voice": {
"pastConversations": "recap",
"detectMachines": true
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
greeting: 'Namaste! Skyline Homes here — is this a good time to talk about Sky Towers?',
temperature: 0.4,
widget: {accent: '#0f766e'},
voice: {pastConversations: 'recap', detectMachines: true}
})
};
fetch('https://app.thinnest.ai/api/v1/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/agents/{id}"
payload = {
"greeting": "Namaste! Skyline Homes here — is this a good time to talk about Sky Towers?",
"temperature": 0.4,
"widget": { "accent": "#0f766e" },
"voice": {
"pastConversations": "recap",
"detectMachines": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "ag_5c4a5f93-2b1e-4d7a-9f60-8e2d1c3b4a71",
"name": "Skyline Sales",
"instructions": "You call people who enquired about a flat at Sky Towers, Baner. Find out their budget, preferred size and when they can visit the site.",
"greeting": "Namaste! Skyline Homes here — is this a good time to talk about Sky Towers?",
"businessDescription": "Skyline Homes builds 2 and 3 BHK apartments in Pune.",
"model": "prana-voice",
"temperature": 0.4,
"maxReplyTokens": 300,
"language": "Hindi",
"secondLanguage": "English",
"escalation": {
"onNoAnswer": false,
"onRequest": true
},
"captureLeads": true,
"scheduleCallbacks": false,
"steps": [],
"widget": {
"theme": "classic",
"accent": "#0f766e",
"height": 806,
"welcomeScreen": true,
"welcomeCollectLeads": true
},
"voice": {
"answersCalls": true,
"surfaces": [
"web",
"whatsapp",
"phone"
],
"voice": "priya",
"phoneNumber": "+918047361290",
"language": null,
"summariseCalls": true,
"detectMachines": true,
"recordCalls": true,
"maxCallSeconds": 300,
"pastConversations": "recap"
},
"collectFields": [],
"webKey": "pk_9fQ2xLm7Rt4vWb8KcN3hYd6sJ1pZ",
"createdAt": "2026-09-17T09:39:31.204Z"
}Update Agent
Changes any subset of the fields Create Agent takes and answers with the whole agent. Fields you leave out are untouched, and unknown fields are ignored — but a body that names no field this API knows is refused. A model or voice is checked against your plan only when it changes, and a refused voice refuses the whole patch before anything is written. A build key may do this.
curl --request PATCH \
--url https://app.thinnest.ai/api/v1/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"greeting": "Namaste! Skyline Homes here — is this a good time to talk about Sky Towers?",
"temperature": 0.4,
"widget": {
"accent": "#0f766e"
},
"voice": {
"pastConversations": "recap",
"detectMachines": true
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
greeting: 'Namaste! Skyline Homes here — is this a good time to talk about Sky Towers?',
temperature: 0.4,
widget: {accent: '#0f766e'},
voice: {pastConversations: 'recap', detectMachines: true}
})
};
fetch('https://app.thinnest.ai/api/v1/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/agents/{id}"
payload = {
"greeting": "Namaste! Skyline Homes here — is this a good time to talk about Sky Towers?",
"temperature": 0.4,
"widget": { "accent": "#0f766e" },
"voice": {
"pastConversations": "recap",
"detectMachines": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "ag_5c4a5f93-2b1e-4d7a-9f60-8e2d1c3b4a71",
"name": "Skyline Sales",
"instructions": "You call people who enquired about a flat at Sky Towers, Baner. Find out their budget, preferred size and when they can visit the site.",
"greeting": "Namaste! Skyline Homes here — is this a good time to talk about Sky Towers?",
"businessDescription": "Skyline Homes builds 2 and 3 BHK apartments in Pune.",
"model": "prana-voice",
"temperature": 0.4,
"maxReplyTokens": 300,
"language": "Hindi",
"secondLanguage": "English",
"escalation": {
"onNoAnswer": false,
"onRequest": true
},
"captureLeads": true,
"scheduleCallbacks": false,
"steps": [],
"widget": {
"theme": "classic",
"accent": "#0f766e",
"height": 806,
"welcomeScreen": true,
"welcomeCollectLeads": true
},
"voice": {
"answersCalls": true,
"surfaces": [
"web",
"whatsapp",
"phone"
],
"voice": "priya",
"phoneNumber": "+918047361290",
"language": null,
"summariseCalls": true,
"detectMachines": true,
"recordCalls": true,
"maxCallSeconds": 300,
"pastConversations": "recap"
},
"collectFields": [],
"webKey": "pk_9fQ2xLm7Rt4vWb8KcN3hYd6sJ1pZ",
"createdAt": "2026-09-17T09:39:31.204Z"
}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"
Path Parameters
The agent's id (ag_…), as List Agents returns it. Another workspace's agent is the same 404 as one that never existed.
Body
Any subset of the agent's fields. At least one must be a field this API knows.
The agent's name, 2 to 60 characters, without hidden characters or markup.
2 - 60What the agent is and how it behaves. Re-sent on every reply, so every character costs on every turn.
20000The first thing it says on a call or in a chat. An empty string clears it.
200One line about what the business is. Facts belong in Knowledge.
200A model id from List Models. Checked only when it changes, against the console's one model picker for chat and calls alike: on your plan, quick enough to answer a call (voice: true), within the per-minute budget a call can carry, and not one of our voice-only models. A chat-only agent is held to the same list, as in the console.
How adventurous the wording is. Clamped to 0–2.
0 <= x <= 2The longest a reply may be, in tokens, for chat and calls alike. Rounded and clamped to 100–800.
100 <= x <= 800auto to reply in the customer's language, or a language the console offers by its English name, e.g. Hindi, Tamil, English.
A second language it may switch to, from the console's list, or null to clear it. Not auto: that is refused with a 400.
When the agent hands over to a person. Send either or both.
Show child attributes
Show child attributes
{ "onNoAnswer": false, "onRequest": true }
Take a name, email or phone number from an interested customer.
Allow it to book a call back when asked.
Open the website widget on a welcome screen.
Ask for the visitor's details on the welcome screen.
The conversation script, in order, replacing the whole script. [] removes it.
12Show child attributes
Show child attributes
The website widget's look. Send any subset.
Show child attributes
Show child attributes
{
"theme": "modern",
"accent": "#0f766e",
"height": 720
}
How the agent handles calls. Send any subset. Where an agent has no voice channel yet, sending any of these creates one.
Show child attributes
Show child attributes
{
"voice": "priya",
"summariseCalls": true,
"maxCallSeconds": 300,
"pastConversations": "quiet"
}
The details to fill in after every call, replacing the list. [] or null stops collecting; records already taken are kept.
30Show child attributes
Show child attributes
Response
The agent after the change.
An agent as the console shows it.
The agent's id.
"ag_5c4a5f93-2b1e-4d7a-9f60-8e2d1c3b4a71"
The agent's name, 2 to 60 characters.
What the agent is and how it behaves — its standing prompt.
The first thing it says, or an empty string.
One line about the business, or an empty string.
A model id from List Models. null when the agent is on a model that has since been retired.
How adventurous the wording is.
0 <= x <= 2The longest a reply may be, in tokens — one ceiling for chat and calls.
100 <= x <= 800auto (reply in the customer's language) or the language it always replies in, e.g. Hindi.
A second language it may switch to, or null.
When the agent hands the conversation to a person on your team.
Show child attributes
Show child attributes
Whether it takes a name, email or phone number from an interested customer.
Whether it may book a call back when asked.
Its conversation script, in order.
Show child attributes
Show child attributes
The website chat widget's look.
Show child attributes
Show child attributes
How it handles calls. null when the agent has no voice channel (a deployment without voice).
Show child attributes
Show child attributes
The details it fills in after every call, in the shape a call's extract takes. Empty when it collects nothing.
Show child attributes
Show child attributes
The public key the website widget embeds (pk_…). It is published on your site, so it is not a secret.
When the agent was made.