Ricky logorickyDocs

Edit a template

PATCH
/templates/{template_id}

Changes the category or content of a template and sends it to Meta for review again. Meta allows it only for APPROVED, REJECTED and PAUSED templates, and limits how often an approved one can change; otherwise it answers 422 rule_violation. An edit that keeps an image, video or document header sends header again with a new handle. Templates with buttons or components Ricky’s editor does not build cannot be edited here.

Scope: templates:write.

Authorization

bearerAuth
headerAuthorizationBearer <token>

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

template_id*string

Template ID.

Match^[0-9]{1,32}$
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

Only the parts you send change; buttons replaces every button. Name, language and parameter_format cannot change.

category?string

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

Value in"MARKETING""UTILITY"
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 PATCH 'https://getricky.ai/api/v1/templates/string' \  -H 'Idempotency-Key: order-10482-ready' \  -H 'Content-Type: application/json' \  -d '{  "body": {    "text": "Hola {{1}}, tu pedido {{2}} ya está listo. Te esperamos.",    "examples": {      "1": "Ana",      "2": "10482"    }  }}'
{  "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."      }    ]  }}