Templates
Templates are the message blueprints you’ll later attach to a
broadcast. Every template goes through an AI compliance review on
submission — approved lets you broadcast immediately, needs_admin
sends it to a human reviewer, rejected blocks you with a reason.
POST /api/v1/rcs/templates
GET /api/v1/rcs/templates
GET /api/v1/rcs/templates/{id}
DELETE /api/v1/rcs/templates/{id}Create a template
POST /api/v1/rcs/templates
Authorization: Bearer <jwt>
Content-Type: application/json
{
"name": "order_shipped",
"category": "transactional",
"language": "en_US",
"components": {
"type": "text",
"text": "Your order #{{1}} has shipped. Track at {{2}}."
},
"suggestions": [
{ "type": "url", "text": "Track order", "url": "{{3}}" }
]
}| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | Snake-case, unique per account |
category | string | yes | transactional | promotional | otp |
language | string | yes | BCP-47 (en_US, hi_IN, …) |
components | object | yes | Free-form JSON — text, rich card, carousel, or media |
suggestions | array | no | Interactive button definitions |
Response:
{
"success": true,
"template_id": "1f7a…",
"ai_review_status": "pending",
"message": "Template submitted — AI review usually completes within 5s."
}Poll GET /api/v1/rcs/templates/{id} for the verdict.
Get one template
GET /api/v1/rcs/templates/{id}{
"success": true,
"template": {
"template_id": "1f7a…",
"name": "order_shipped",
"category": "transactional",
"language": "en_US",
"components": { "type": "text", "text": "…" },
"suggestions": [ … ],
"ai_review_status": "approved",
"ai_review_score": 0.93,
"ai_review_reason": "Clean transactional template, no policy hits.",
"admin_status": "",
"admin_reason": "",
"effective_status": "approved",
"submitted_at": "2026-05-27T08:31:21Z",
"reviewed_at": "2026-05-27T08:31:24Z"
}
}effective_status is what broadcasts check — admin override wins when
present, otherwise the AI verdict.
List templates
GET /api/v1/rcs/templatesReturns { "success": true, "templates": [ … ] } with the same row
shape as GET /…/{id}, ordered by submitted_at desc.
Delete
DELETE /api/v1/rcs/templates/{id}Removes the template. Broadcasts already running with this template keep their assignment and won’t break.