smartchat

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}

Permissiontemplates:read (all permissions)
RiskRead
Idempotency-KeyNot needed (how it works)
Safe to repeatSafe: the call only reads.
Rate limit classread (120 requests per minute per key)
ConfirmationNone
MCP toolNot available in MCP
Since version2026-10-25

#What it does

  • Only reads data. It changes nothing and sends nothing.

#Request

Path parameters

NameTypeDescription
template_idstringID 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-*.

NameTypeDescription
objectstringAlways "template". always template
idstringTemplate ID.
namestringName of the template. up to 120 characters
channelstringChannel. Only whatsapp exists. one of: whatsapp
purposestringPurpose of the template, for example marketing or utility. up to 40 characters
languagestring or nullLanguage version at WhatsApp, for example en or de. up to 10 characters
textstringMessage text with placeholders such as {{1}}. up to 20000 characters
footerstring or nullFooter line or null. up to 60 characters
buttonsarray of objectButtons of the template. up to 10 items
buttons[].typestringquick_reply sends the label back as a reply. url opens a web address. one of: quick_reply, url
buttons[].textstringLabel on the button. up to 60 characters
buttons[].urlstring or nullWeb address for a url button, otherwise null. up to 2000 characters
statusstringApproval state at WhatsApp. Only approved templates can be sent outside the 24-hour window. one of: draft, pending, approved, rejected, paused, disabled
sendablebooleanTrue if the template can be sent through the API now (approved, WhatsApp, not a system template).
variablesarray of stringAll placeholders in the approved text. up to 50 items
settable_variablesarray of stringPlaceholders a caller may fill. The others come from the contact. up to 50 items
submittablebooleanTrue if the template can be submitted to WhatsApp now (draft or rejected and without issues).
issuesarray of stringWhy the template cannot be submitted yet. Empty if there are no issues. up to 50 items
rejection_reasonstring or nullReason given by WhatsApp when the template was rejected, otherwise null. up to 500 characters
created_atstringWhen the template was created. up to 40 characters; format date-time
updated_atstringWhen the template was last changed. up to 40 characters; format date-time

#Errors

CodeStatusWhen
api_key_expired401This API key has expired.
api_key_invalid401This API key is not valid.
api_key_revoked401This API key was revoked.
authentication_required401No API key was sent. Send 'Authorization: Bearer <key>'.
account_blocked403This account is blocked.
insufficient_scope403This key lacks a required permission.
ip_not_allowed403This IP address is not allowed for this key.
template_not_found404No template with this ID exists in this account.
validation_failed422A field is not valid.
rate_limited429Too many requests. Wait and try again.
internal_error500Something went wrong on our side.
service_unavailable503The service is temporarily unavailable.

All errors use one format.