REST API v1 · Resource
Templates
List, read, submit, delete and sync your WhatsApp message templates.
API reference · Templates
Endpoints
Paths are relative to https://fliok.com/api/v1. Each endpoint names the scope and the lowest key role it needs; a key without them gets 403 (see Authentication).
Templates
5- GET
/templatesList your WhatsApp templates and their Meta approval statusScopetemplates:read· viewer role or higherNeeds an API key - POST
/templatesSubmit a new template to Meta for approvalScopetemplates:write· admin role or higherNeeds an API key - GET
/templates/{id}One template with its components, Meta status and rejection reasonScopetemplates:read· viewer role or higherNeeds an API key - DELETE
/templates/{id}Delete a template at Meta and in Fliok. Refused while a broadcast’s history depends on it. The name is blocked at Meta for 30 daysScopetemplates:write· admin role or higherNeeds an API key - POST
/templates/syncPull every template’s live status, category and components from Meta. Answers how many were updated and createdScopetemplates:write· admin role or higherNeeds an API key
Request bodies
What these endpoints take, field by field. A body that doesn’t match answers 400 naming the field.
POST /templates
JSON body, submitted straight to Meta. Poll GET /templates for the approval.
| Field | Type | What it is |
|---|---|---|
namerequired | string | Lowercase letters, digits and underscores. |
languagerequired | string | A plain code such as "en" or "en_US" (only a send uses { "code": … }). |
categoryrequired | string | MARKETING, UTILITY or AUTHENTICATION. Meta may change it. |
componentsrequired | object[] | Meta’s component array (HEADER, BODY, FOOTER, BUTTONS). Every variable needs an example. |
wabaConnectionId | uuid | Only when the workspace has more than one WhatsApp Business Account. |
Returns 200 with the stored template, status "pending" until Meta decides.
Examples
# Submit a template to Meta for approval (language is a plain code here —
# only a send uses { "code": … }). Every variable needs an example.
curl -X POST https://fliok.com/api/v1/templates \
-H "Authorization: Bearer wa_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "order_update",
"language": "en",
"category": "UTILITY",
"components": [
{ "type": "BODY", "text": "Hi {{1}}, your order {{2}} has shipped.",
"example": { "body_text": [["Rahul", "ORD-12345"]] } },
{ "type": "BUTTONS", "buttons": [
{ "type": "URL", "text": "Track order", "url": "https://example.com/track" } ] }
]
}'Rate limits
The buckets these endpoints use. Burst is how many requests you can make back-to-back from a full bucket; sustained is how fast it refills.
| Bucket | Endpoints | Burst | Sustained |
|---|---|---|---|
| Reads | /messages · /conversations · /contacts · /templates · /phone-numbers · GET /webhooks · Instagram reads · GET /payment-requests/{id} | 600 | 60 / sec |
| Template create | POST /templates | 50 | 50 / hour |
Every limit, the RateLimit-* headers and what to do on a 429: Rate limits.