Ricky logorickyDocs

Validate a template draft

POST
/templates/validate

Checks a draft with the rules of Ricky’s template editor and answers every problem found, without submitting anything to Meta. A body that is not a draft answers 400; a draft that breaks a rule answers 200 with valid: false. Meta can still reject a valid draft in its review.

Scope: templates:read.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body

The body of POST /templates; channel_id is optional here.

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*

The result of checking a template draft without submitting it.

curl -X POST 'https://getricky.ai/api/v1/templates/validate' \  -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": {    "valid": true,    "errors": [      {        "param": "body.examples.1",        "message": "Example required for {{1}}."      }    ],    "components": null  }}