Create a template▾
POST

Create a template

Submit a template to Meta for review.

Templates go to Meta for review on creation. Most clear in minutes; some take up to 24 hours. Watch template.status_updated rather than polling.

Why templates get rejected

CauseFix
Category mismatchAnything promotional is MARKETING, even a discount inside an order update
Missing examplesEvery {{n}} needs a sample value in example
Placeholder at the very start or endWrap it in static copy
Two adjacent placeholdersPut text between {{1}} and {{2}}
URL shorteners in a buttonUse your own domain

Meta can recategorise you

If a UTILITY template reads as promotional, Meta may move it to MARKETING — which changes what the conversation costs. Watch template.category_updated.
POST/v1/templates

Body parameters

namestringrequired

Lowercase, digits and underscores only, up to 512 characters.

languagestringrequired

BCP-47 code, e.g. en, ar, pt_BR.

categoryenumrequired

Picking wrong is the most common rejection cause.

MARKETINGUTILITYAUTHENTICATION

componentsarrayrequired

Ordered components. BODY is mandatory.

typeenumrequired

Component kind.

HEADERBODYFOOTERBUTTONS

formatenum

Header only.

TEXTIMAGEVIDEODOCUMENT

textstring

Copy with {{1}}-style placeholders. Body max 1024 chars, footer 60.

exampleobject

Sample values for every placeholder. Meta rejects submissions without them.

buttonsarray

Up to 3 quick replies, or 2 call-to-action buttons.

curl -X POST https://api.sendport.tech/v1/templates \
  -H "Authorization: Bearer $SENDPORT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"order_shipped","language":"en","category":"UTILITY","components":[{"type":"BODY","text":"Your order {{1}} shipped and arrives on {{2}}.","example":{"body_text":[["A-4417","Tuesday"]]}},{"type":"FOOTER","text":"Reply STOP to opt out."}]}'

Responses

201Created
{
  "object": "template",
  "id": "tpl_01JZQ9C3N5P7R9T1V3X5Z7BDFH",
  "name": "order_shipped",
  "language": "en",
  "category": "UTILITY",
  "status": "PENDING",
  "quality_rating": null,
  "components": [
    { "type": "BODY", "text": "Your order {{1}} shipped and arrives on {{2}}." },
    { "type": "FOOTER", "text": "Reply STOP to opt out." }
  ],
  "created_at": "2026-07-02T09:41:00.000Z"
}
401Unauthorized
{
  "error": {
    "type": "authentication_error",
    "code": "missing_api_key",
    "message": "No API key provided.",
    "doc_url": "https://sendport.tech/docs/errors#missing_api_key",
    "request_id": "req_9f3c2a7b41de08c5b2e6"
  }
}
Try itsandbox