Templates
Submit Template
Sends a draft template to your own WhatsApp Business Account for review, after the same last checks as the console's Submit. The template moves to pending only if WhatsApp accepted it. Review usually takes minutes, occasionally days; follow it with Get Template, whose status becomes approved or rejected (with the reason in reviewNote). A workspace with no connected WhatsApp number has no account to submit to. Needs a full key.
POST/templates/{name}/submit
Path parameters
- namestringrequired
- The template's name: lowercase letters, numbers and underscores.
Query parameters
- languagestring
- The template's language code. Needed only when the name exists in more than one language; without it such a name is a
409that lists them.
Headers
- Katexs-Workspacestring
- Developers only: the customer workspace this request acts in — its
org_…id fromPOST /customers. Leave it out to act in your own workspace. Refused with404(Workspace not found.) when the id is unknown, is not one of your customers, or is not anorg_…id;410when that customer was deleted (restore it withPOST /customers/{id}/restoreuntil it is erased);403when the key belongs to one customer workspace (it cannot act as another);400when your workspace is not a developer workspace./customers/*andGET /customers/usageare your own workspace's and refuse the header with400: call them without it.
Example request
bash
curl -X POST "https://app.katexs.com/api/v1/templates/{name}/submit" \
-H "Authorization: Bearer $KATEXS_API_KEY"Responses
| Status | Description |
|---|---|
200 | Sent for review. The template as it now is (status: "pending"), plus message. |
400 | Katexs-Workspace was sent from a workspace that is not a developer workspace. |
401 | The key is missing, wrong or revoked. The answer is always the same, whichever it is. |
403 | The key's access level (read-only or build) does not allow this request, the plan does not include it, or a customer's key named another workspace in Katexs-Workspace. code says which: key_scope_read, key_scope_build, workspace_header_forbidden, or forbidden. |
404 | No template of that name (and language) in this workspace. |
409 | The template is not a draft ("Only a draft can be sent for review; this one is pending."); or no WhatsApp number is connected; or the name exists in more than one language and language was not given. |
410 | The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date. |
422 | WhatsApp refused the submission, or the template fails a last check before it is sent. The message says why; the template stays a draft. |
429 | Over a per-minute limit. Wait for Retry-After seconds. code and limit say which limit: rate_limit_resources (240 requests a minute for the workspace), rate_limit_family (2,400 across a developer's customers), rate_limit_calls, rate_limit_messages, rate_limit_codes, rate_limit_code_recipient, concurrent_calls or number_daily_limit. |
503 | WhatsApp is not available on this deployment. Nothing was sent. |
Response fields
- namestringrequired
- The template's name — what Send Message and Create Campaign take.
- languagestringrequired
- Its language code.
- categorystringrequired
- WhatsApp's category, which decides its price and its rules. One of:
utility,marketing,authentication. - statusstringrequired
draftuntil submitted,pendingwhile WhatsApp reviews it, thenapprovedorrejected. WhatsApp may laterpausean approved template that recipients flag. Onlyapprovedcan be sent. One of:draft,pending,approved,rejected,paused.- agentstringrequired
- The agent the template belongs to (
ag_…). - bodystringrequired
- The message, with
{{1}},{{2}}… for the blanks. For an authentication template, the sentence WhatsApp writes around the code. - variableCountintegerrequired
- How many body values a send must carry, in order: the highest
{{n}}in the body. Range: 0–. - variableLabelsobject[]required
- The example given for each body blank.
- buttonVariableCountintegerrequired
- How many button values a send must carry: one per link button whose address ends in a blank. Range: 0–.
- headerKindstringrequired
- The header.
image,videoordocumentmeans a send must pass a media link for it. One of:none,text,image,video,document. - agentMaySendbooleanrequired
- Whether an agent may send this template during a call or chat (its
send_whatsapptool). Only a Utility template with no blank in a link button can be. Every language of a name agrees. Change it with Update Template, sendingagentMaySendalone. - createdAtstring (date-time)required
- When it was created.
- headerTextstring | nullrequired
- A text header's words.
nullfor any other header. - footerstringrequired
- The footer line. Empty when there is none.
- buttonsobject[]required
- The template's buttons, in order.
- reviewNotestring | nullrequired
- Why WhatsApp refused it, when it did.
nullotherwise. - messagestringrequired
- What happened: saved as a draft, sent for review, or — with
submit: true— saved as a draft with the reason the submission was refused.
200 response
{
"name": "order_ready",
"language": "en",
"category": "utility",
"status": "pending",
"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": "Sent for review. WhatsApp usually takes minutes, occasionally days."
}Last updated November 2026 · Found a problem? Email support@katexs.com
