Get template
Returns one WhatsApp message template with its text, buttons, approval state and the rule violations that block a submission. Use it after list_templates. Read-only.
GET /v1/templates/{template_id}
| Permission | templates:read (all permissions) |
| Risk | Read |
| Idempotency-Key | Not needed (how it works) |
| Safe to repeat | Safe: the call only reads. |
| Rate limit class | read (120 requests per minute per key) |
| Confirmation | None |
| MCP tool | Not available in MCP |
| Since version | 2026-10-25 |
#What it does
- Only reads data. It changes nothing and sends nothing.
#Request
Path parameters
| Name | Type | Description |
|---|---|---|
template_id | string | ID of the template, from list_templates. |
#Examples
curl "https://api.smartchat.marketing/v1/templates/tpl_0f8c1a2e4b7d4c3e9a5b6d7e8f901234" \
-H "Authorization: Bearer $SMARTCHAT_API_KEY"import os
import requests
response = requests.get(
"https://api.smartchat.marketing/v1/templates/tpl_0f8c1a2e4b7d4c3e9a5b6d7e8f901234",
headers={"Authorization": "Bearer " + os.environ["SMARTCHAT_API_KEY"]},
)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.smartchat.marketing/v1/templates/tpl_0f8c1a2e4b7d4c3e9a5b6d7e8f901234", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.SMARTCHAT_API_KEY}`,
},
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());Response (200):
{
"object": "template",
"id": "tpl_0f8c1a2e4b7d4c3e9a5b6d7e8f901234",
"name": "Autumn menu",
"channel": "whatsapp",
"purpose": "marketing",
"language": "en",
"text": "Hi {{first_name}}, our autumn menu is here. Book a table for this week.",
"footer": "Reply STOP to unsubscribe",
"buttons": [
{
"type": "quick_reply",
"text": "Book a table",
"url": null
}
],
"status": "draft",
"sendable": false,
"variables": [
"first_name"
],
"settable_variables": [],
"submittable": true,
"issues": [],
"rejection_reason": null,
"created_at": "2026-10-25T09:41:07Z",
"updated_at": "2026-10-25T09:41:07Z"
}#Response
Status 200. Every response has the headers Request-Id, SmartChat-Version and X-RateLimit-*.
| Name | Type | Description |
|---|---|---|
object | string | Always "template". always template |
id | string | Template ID. |
name | string | Name of the template. up to 120 characters |
channel | string | Channel. Only whatsapp exists. one of: whatsapp |
purpose | string | Purpose of the template, for example marketing or utility. up to 40 characters |
language | string or null | Language version at WhatsApp, for example en or de. up to 10 characters |
text | string | Message text with placeholders such as {{1}}. up to 20000 characters |
footer | string or null | Footer line or null. up to 60 characters |
buttons | array of object | Buttons of the template. up to 10 items |
buttons[].type | string | quick_reply sends the label back as a reply. url opens a web address. one of: quick_reply, url |
buttons[].text | string | Label on the button. up to 60 characters |
buttons[].url | string or null | Web address for a url button, otherwise null. up to 2000 characters |
status | string | Approval state at WhatsApp. Only approved templates can be sent outside the 24-hour window. one of: draft, pending, approved, rejected, paused, disabled |
sendable | boolean | True if the template can be sent through the API now (approved, WhatsApp, not a system template). |
variables | array of string | All placeholders in the approved text. up to 50 items |
settable_variables | array of string | Placeholders a caller may fill. The others come from the contact. up to 50 items |
submittable | boolean | True if the template can be submitted to WhatsApp now (draft or rejected and without issues). |
issues | array of string | Why the template cannot be submitted yet. Empty if there are no issues. up to 50 items |
rejection_reason | string or null | Reason given by WhatsApp when the template was rejected, otherwise null. up to 500 characters |
created_at | string | When the template was created. up to 40 characters; format date-time |
updated_at | string | When the template was last changed. up to 40 characters; format date-time |
#Errors
| Code | Status | When |
|---|---|---|
api_key_expired | 401 | This API key has expired. |
api_key_invalid | 401 | This API key is not valid. |
api_key_revoked | 401 | This API key was revoked. |
authentication_required | 401 | No API key was sent. Send 'Authorization: Bearer <key>'. |
account_blocked | 403 | This account is blocked. |
insufficient_scope | 403 | This key lacks a required permission. |
ip_not_allowed | 403 | This IP address is not allowed for this key. |
template_not_found | 404 | No template with this ID exists in this account. |
validation_failed | 422 | A field is not valid. |
rate_limited | 429 | Too many requests. Wait and try again. |
internal_error | 500 | Something went wrong on our side. |
service_unavailable | 503 | The service is temporarily unavailable. |
All errors use one format.