curl --request POST \
--url https://app.thinnest.ai/api/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "order_ready",
"language": "en",
"category": "utility",
"body": "Hello {{1}}, your Kesar Naturals order {{2}} is packed and on its way.",
"samples": [
"Priya",
"#10432"
],
"footer": "Kesar Naturals, Jaipur",
"buttons": [
{
"kind": "url",
"label": "Track order",
"url": "https://kesarnaturals.in/track/{{1}}",
"sample": "10432"
}
],
"submit": false
}
'{
"name": "order_ready",
"language": "en",
"category": "utility",
"status": "draft",
"agent": "ag_5c4a5f93-2b1e-4c0a-9d3f-7e8a1b2c3d4e",
"body": "Hello {{1}}, your Kesar Naturals order {{2}} is packed and on its way.",
"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,
"message": "Saved as a draft."
}Create Template
Saves a WhatsApp template as a draft, after the console’s own checks of WhatsApp’s rules for the body, header, footer, buttons and an authentication template’s code. Review is a separate, deliberate step — Submit Template, or submit: true here — because once a name is approved it can never be reused for different words; if that submission is refused, the draft is kept and message says why. Limited-time offers, carousels and buttons that open a WhatsApp form are made in the console. Needs a full key.
curl --request POST \
--url https://app.thinnest.ai/api/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "order_ready",
"language": "en",
"category": "utility",
"body": "Hello {{1}}, your Kesar Naturals order {{2}} is packed and on its way.",
"samples": [
"Priya",
"#10432"
],
"footer": "Kesar Naturals, Jaipur",
"buttons": [
{
"kind": "url",
"label": "Track order",
"url": "https://kesarnaturals.in/track/{{1}}",
"sample": "10432"
}
],
"submit": false
}
'{
"name": "order_ready",
"language": "en",
"category": "utility",
"status": "draft",
"agent": "ag_5c4a5f93-2b1e-4c0a-9d3f-7e8a1b2c3d4e",
"body": "Hello {{1}}, your Kesar Naturals order {{2}} is packed and on its way.",
"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,
"message": "Saved as a draft."
}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
The message, with blanks numbered {{1}}, {{2}} … in order. A blank cannot be at the very start or end, two cannot sit next to each other, and there must be enough words around them. Required unless category is authentication, where WhatsApp writes the body.
1024"Hello {{1}}, your Kesar Naturals order {{2}} is packed and on its way."
Response
Saved. The template as Get Template shows it, plus message: saved as a draft, sent for review, or saved as a draft with the reason the submission was refused.
The template, plus a sentence about what just happened.