Ricky logorickyDocs

Create a template

POST
/templates

Submits a template to Meta for review from the business account of channel_id. It answers the template as Meta has it, usually PENDING; follow it with GET /templates/{template_id}. A draft that breaks a rule answers 400 with the first problem; Meta refusing it answers 422 rule_violation with its reason.

Scope: templates:write.

Authorization

bearerAuth
headerAuthorizationBearer <token>

An organization API key, rky_live_…, created in Settings → API. Send it only from a server.

Idempotency-Key?string

Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as order-10482-ready. Retrying with the same key and body replays the first response instead of repeating the write.

Length8 <= length <= 200

Request Body

application/json
  1. body

A template draft. Ricky checks it as POST /templates/validate does, then submits it.

channel_id*string

WhatsApp channel whose business account will own the template.

Formatuuid
name*string

Lowercase letters, digits and underscores, starting with a letter.

Match^[a-z][a-z0-9_]*$
Lengthlength <= 512
language*string

Language code, for example es or en_US.

Match^[a-z]{2,3}(?:_[A-Z]{2})?$
category*string

UTILITY for updates on something the customer asked for; MARKETING otherwise.

Value in"MARKETING""UTILITY"
parameter_format?string

How variables are written: {{first_name}} or {{1}}. It cannot change later.

Default"NAMED"
Value in"NAMED""POSITIONAL"
header?|||||

TEXT, IMAGE, VIDEO, DOCUMENT or LOCATION. Send null for no header.

body*

The message text.

footer?|

Footer text, without variables.

buttons?array<||>

Quick replies, at most two links and one phone. Quick replies cannot sit between the other buttons.

Itemsitems <= 10

Response Body

Success.

application/json
  1. response
data*

A WhatsApp message template.

curl -X POST 'https://getricky.ai/api/v1/templates' \  -H 'Idempotency-Key: order-10482-ready' \  -H 'Content-Type: application/json' \  -d '{  "channel_id": "8f3c2a5e-6b1d-4c7a-9e2f-1a2b3c4d5e6f",  "name": "pedido_listo",  "language": "es",  "category": "UTILITY",  "parameter_format": "POSITIONAL",  "body": {    "text": "Hola {{1}}, tu pedido {{2}} está listo para retirar.",    "examples": {      "1": "Ana",      "2": "10482"    }  },  "footer": "Casa Nativa",  "buttons": [    {      "type": "QUICK_REPLY",      "text": "Gracias"    }  ]}'
{  "data": {    "id": "1234567890123456",    "name": "pedido_listo",    "language": "es",    "category": "UTILITY",    "status": "APPROVED",    "whatsapp_business_account_id": "102030405060708",    "parameter_format": "POSITIONAL",    "components": [      {        "type": "BODY",        "text": "Hola {{1}}, tu pedido {{2}} está listo para retirar."      }    ]  }}