Skip to content

REST API v1 · Resource

Templates

List, read, submit, delete and sync your WhatsApp message templates.

API reference · Templates

Last updated

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 statusScope templates:read · viewer role or higher
  • POST/templatesSubmit a new template to Meta for approvalScope templates:write · admin role or higher
  • GET/templates/{id}One template with its components, Meta status and rejection reasonScope templates:read · viewer role or higher
  • 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 daysScope templates:write · admin role or higher
  • POST/templates/syncPull every template’s live status, category and components from Meta. Answers { ok, updated, created, skipped }: skipped names accounts Meta refused (deleted at Meta, access revoked) — the others still syncScope templates:write · admin role or higher

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.

FieldTypeWhat it is
namerequiredstringLowercase letters, digits and underscores.
languagerequiredstringA plain code such as "en" or "en_US" (only a send uses { "code": … }).
categoryrequiredstringMARKETING, UTILITY or AUTHENTICATION. Meta may change it.
componentsrequiredobject[]Meta’s component array (HEADER, BODY, FOOTER, BUTTONS). Every variable needs an example.
wabaConnectionIduuidWhich WhatsApp Business Account receives the template (wabaConnectionId in GET /phone-numbers). Default: the account behind the workspace’s default number.

Returns 200 with the stored template, status "pending" until Meta decides.

Examples

cURL
# 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": [["Yash", "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.

BucketEndpointsBurstSustained
Reads/messages · /conversations · /contacts · /templates · /phone-numbers · GET /webhooks · Instagram, LinkedIn, ads and catalog reads · GET /payment-requests/{id}60060 / sec
Template createPOST /templates5050 / hour

Every limit, the RateLimit-* headers and what to do on a 429: Rate limits.