curl --request PATCH \
--url https://app.thinnest.ai/api/v1/templates/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "Hello {{1}}, your Kesar Naturals order {{2}} has been packed and will reach you within 3 days.",
"samples": [
"Priya",
"#10432"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('Hello {{1}}, your Kesar Naturals order {{2}} has been packed and will reach you within 3 days.'),
samples: ['Priya', '#10432']
})
};
fetch('https://app.thinnest.ai/api/v1/templates/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/templates/{name}"
payload = {
"body": "Hello {{1}}, your Kesar Naturals order {{2}} has been packed and will reach you within 3 days.",
"samples": ["Priya", "#10432"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"name": "order_ready",
"language": "en",
"category": "utility",
"status": "draft",
"agent": "ag_5c4a5f93-2b1e-4c0a-9d3f-7e8a1b2c3d4e",
"body": "Hello {{1}}, your Kesar Naturals order {{2}} has been packed and will reach you within 3 days.",
"variableCount": 2,
"variableLabels": [
{
"position": 1,
"sample": "Priya"
},
{
"position": 2,
"sample": "#10432"
}
],
"buttonVariableCount": 1,
"headerKind": "none",
"agentMaySend": false,
"createdAt": "2026-10-06T10:00:01.874Z",
"headerText": null,
"footer": "Kesar Naturals, Jaipur",
"buttons": [
{
"kind": "url",
"label": "Track order",
"url": "https://kesarnaturals.in/track/{{1}}"
}
],
"reviewNote": null
}Update Template
Edits a draft template. Send only the fields that change; the result is checked against the same rules as Create Template. Once a template has been sent for review WhatsApp has its text, so it can no longer be edited — create a new template instead. Changing name or language renames it. A build key may do this. The one exception is agentMaySend (whether an agent may send the template in a call or chat): it goes alone and needs a full key.
curl --request PATCH \
--url https://app.thinnest.ai/api/v1/templates/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "Hello {{1}}, your Kesar Naturals order {{2}} has been packed and will reach you within 3 days.",
"samples": [
"Priya",
"#10432"
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('Hello {{1}}, your Kesar Naturals order {{2}} has been packed and will reach you within 3 days.'),
samples: ['Priya', '#10432']
})
};
fetch('https://app.thinnest.ai/api/v1/templates/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/templates/{name}"
payload = {
"body": "Hello {{1}}, your Kesar Naturals order {{2}} has been packed and will reach you within 3 days.",
"samples": ["Priya", "#10432"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"name": "order_ready",
"language": "en",
"category": "utility",
"status": "draft",
"agent": "ag_5c4a5f93-2b1e-4c0a-9d3f-7e8a1b2c3d4e",
"body": "Hello {{1}}, your Kesar Naturals order {{2}} has been packed and will reach you within 3 days.",
"variableCount": 2,
"variableLabels": [
{
"position": 1,
"sample": "Priya"
},
{
"position": 2,
"sample": "#10432"
}
],
"buttonVariableCount": 1,
"headerKind": "none",
"agentMaySend": false,
"createdAt": "2026-10-06T10:00:01.874Z",
"headerText": null,
"footer": "Kesar Naturals, Jaipur",
"buttons": [
{
"kind": "url",
"label": "Track order",
"url": "https://kesarnaturals.in/track/{{1}}"
}
],
"reviewNote": 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"
Path Parameters
Query Parameters
Body
Only the fields sent change; the rest keep their current values. The result must pass the same rules as Create Template.
Let an agent send this template during a call or chat, or stop it. Send it alone, not with other fields; it applies to every language of the name, only a Utility template whose link buttons are fixed can be allowed, and it needs a full key because it decides what an agent may message customers with.
Response
Saved. The template as it now is.
A WhatsApp template with its parts and review note.