Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique template name (only lowercase + underscores). |
language | string | Yes | Language code (e.g., en, bn). |
category | string | Yes | One of: MARKETING, UTILITY, AUTHENTICATION. |
header | object / null | No | Template header. Can be: - null → No header - text → Text header (max 60 chars) - media → Media header (image/video/document). |
body | object | Yes | Main message body. Supports variables ({{1}}, {{2}}). |
body.text | string | Yes | Message text (max 1024 chars). |
body.otp_code | string | Auth only | Required for AUTHENTICATION templates (max 15 chars). |
body.variables | array | No | Variable placeholders (strings). |
footer | string | No | Footer text (max 60 chars, no emojis). |
buttons | array | No | Interactive buttons (URL, Phone, Quick Reply). |
unsubscribeButton | boolean | No | Whether to show Unsubscribe option. |
blockButton | boolean | No | Whether to show Block option. |
Example Payloads for All type Template
Since JSON doesn’t support comments, Write it in pseudo-JSON with// comments.
(You can later remove the comments for real JSON.)
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the workspace.
Body
application/json
Example:
"login_otp_template"
Example:
"en"
Available options:
MARKETING, UTILITY, AUTHENTICATION Option 2: Text Header
- Option 1
- Option 2
Maximum length:
60Response
Template created successfully