Skip to main content
WhatsApp

Message Templates

Create, edit, unpause, list, delete and sync WhatsApp message templates, start from Meta's template library, upload header media, and draft templates with AI.

A message template is pre-approved copy you can send outside the 24-hour customer service window. Order updates, delivery notices, reminders and one-time codes are all template sends. Templates are created on WhatsApp, reviewed by Meta, and mirrored locally so you can list and filter them without a Meta round trip.

All endpoints are under https://api.callmissed.com/api/v1/whatsapp.

Lifecycle

  1. 1

    Create

    validates the copy locally, then submits it to WhatsApp

  2. 2

    Review

    Meta reviews it. The template sits at

  3. 3

    Approved

    A status webhook flips it to and it becomes sendable

Statuses you will see: PENDING, APPROVED, REJECTED, PAUSED, DISABLED, IN_APPEAL. Only APPROVED templates can be sent. A rejected template carries a rejection_reason. To change copy, edit the template rather than deleting and recreating it, and unpause a paused one.

Choosing the WABA

Template endpoints act on a WhatsApp Business Account rather than a phone number. Supply exactly one:

FieldTypeWhere it comes from
account_idUUIDThe id from GET /accounts
waba_idstring, max 64Meta's WABA id

Omitting both returns 400 with "Either account_id (UUID) or waba_id (Meta) is required". On GET /templates these are optional filters instead.

Create a template

POST /api/v1/whatsapp/templates · scope whatsapp:write

FieldTypeRequiredNotes
account_id / waba_idUUID / stringOne ofThe WABA to create under
namestring, 1 to 512 charsYesMust match ^[a-z0-9_]+$: lowercase letters, digits and underscores only
categorystringYesMARKETING, UTILITY or AUTHENTICATION
languagestring, 2 to 12 charsYesLocale, for example en_US, hi, es_MX. Must be one of Meta's supported template languages, otherwise 400
componentsarray of objects, at least 1One ofHeader, body, footer and button spec. Must include a BODY. Omit when using library_template_name
library_template_namestring, max 512One ofCreate from a Template Library preset instead of components. Sending both, or neither, returns 422
library_template_body_inputsobjectNoLibrary path only. Body opt-ins such as add_contact_number, add_learn_more_link, add_security_recommendation, add_track_package_link, code_expiration_minutes
library_template_button_inputsarray of objectsNoLibrary path only. Values the preset cannot know, such as your URL, your phone number or the OTP type
parameter_formatstringNopositional ({{1}}) or named ({{customer_name}}), case-insensitive. Omit to infer it from the placeholders. Ignored on the library path
allow_category_changebooleanNoLet Meta re-categorise the template. Defaults to on, so only send this to opt out. Ignored on the library path
message_send_ttl_secondsinteger, -1 to 2592000NoTime-to-live: how long WhatsApp keeps trying to deliver a message sent from this template. Omit for WhatsApp's default. Not accepted with library_template_name (422): create the template, then edit its TTL
curl -X POST https://api.callmissed.com/api/v1/whatsapp/templates \
  -H "Authorization: Bearer cm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "waba_id": "102290129340398",
    "name": "order_shipped",
    "category": "UTILITY",
    "language": "en_US",
    "components": [
      { "type": "HEADER", "format": "TEXT", "text": "Your order is on its way" },
      {
        "type": "BODY",
        "text": "Hi {{1}}, order {{2}} shipped today and should arrive in 2 to 3 days.",
        "example": { "body_text": [["Priya", "AC-10294"]] }
      },
      { "type": "FOOTER", "text": "Acme Coffee" }
    ]
  }'

components is forwarded to WhatsApp unchanged, so any component type WhatsApp supports works, including button blocks. A media header (IMAGE, VIDEO, DOCUMENT) needs a sample in example.header_handle, which you get from upload header media. BODY, FOOTER, text HEADER and the three marketing formats below (carousel, limited-time offer, coupon code) are checked locally first; everything else is validated by Meta.

Response (200 OK)

{
  "template_id": "1234567890123456",
  "status": "PENDING",
  "template": {
    "id": "3f9a1c20-7d8e-4b1a-9c2f-5e6a7b8c9d0e",
    "account_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
    "template_id": "1234567890123456",
    "name": "order_shipped",
    "language": "en_US",
    "category": "UTILITY",
    "status": "PENDING",
    "quality_score": "UNKNOWN",
    "rejection_reason": null,
    "parameter_format": "positional",
    "sub_category": null,
    "correct_category": null,
    "previous_category": null,
    "components": [],
    "last_meta_synced_at": null,
    "created_at": "2026-04-19T12:00:00Z",
    "updated_at": "2026-04-19T12:00:00Z"
  },
  "policy_warnings": []
}
FieldTypeNotes
template_idstring, nullableMeta's template id
statusstringInitial lifecycle state, typically PENDING
templateobjectThe mirrored row, described in the template object
policy_warningsarray of {code, message}Advisory risks the rules check found, for example a likely re-categorisation. They never block the create

The local row is written only after WhatsApp accepts the create, so a rejection leaves nothing behind.

Starting from the Template Library

Meta's Template Library holds pre-written utility and authentication templates that are approved faster. Find a preset with GET /templates/library, then pass its name instead of components:

curl -X POST https://api.callmissed.com/api/v1/whatsapp/templates \
  -H "Authorization: Bearer cm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "waba_id": "102290129340398",
    "name": "acme_order_confirmation",
    "category": "UTILITY",
    "language": "en_US",
    "library_template_name": "order_confirmation_1",
    "library_template_button_inputs": [
      { "type": "URL", "url": { "base_url": "https://acme.example.com/orders/{{1}}", "url_suffix_example": "https://acme.example.com/orders/AC-10294" } }
    ]
  }'

The preset owns the body, header, footer, variable format and category, so parameter_format and allow_category_change do not apply. The response has the same shape as a hand-built create.

Validation before submission

Copy is checked locally first, so a guaranteed rejection does not cost a Meta round trip. Each of these returns 400 with the reason:

RuleMessage you get
Name outside ^[a-z0-9_]+$template name must match ^[a-z0-9_]+$ (lowercase letters, digits, and underscores only)
No BODY componentA BODY component is required.
Empty BODY textThe BODY component requires non-empty text.
BODY over 1024 charactersBODY text exceeds 1024 characters.
FOOTER over 60 charactersFOOTER text exceeds 60 characters.
{{N}} variables with no exampleA component with {{N}} variables requires an 'example.body_text' array.
Example count does not match the variable countThe example provides 1 value(s) but the text has 2 {{N}} variable(s).
An example on a component with no variablesOmit the 'example' object on a component with no {{N}} variables -- Meta rejects an empty example.
{{1}} and {{name}} variables in one templateA template can't mix {{1}} (positional) and {{name}} (named) variables -- pick one format for the whole template.
parameter_format disagrees with the placeholdersparameter_format='named' but the template uses positional variables. Change one to match the other.

example.body_text is an array of arrays: one inner array holding a sample value per variable. A text HEADER with variables uses example.header_text, a flat array.

Named templates use a different example shape: example.body_text_named_params (or header_text_named_params) is a flat array of { "param_name": "customer_name", "example": "Priya" } objects, one per distinct variable, and the names must match the placeholders exactly.

After these structural checks, a rules check looks for anything Meta states it will reject, such as a body that starts or ends with a variable or a footer with a variable. A template that breaks one returns 422 listing every problem: This template breaks WhatsApp's template rules and would be rejected. Fix these first: (1) .... Softer risks come back as policy_warnings on a successful create.

Errors from WhatsApp

Every template route that reaches WhatsApp maps its error to a short, stable message rather than echoing Meta's text:

CodeMeaning
400WhatsApp rejected the request shape, for example a missing sample value
401The stored WhatsApp business token is invalid or expired. Reconnect the number
404The WABA is not on your workspace (WhatsApp account not found), or the template no longer exists on WhatsApp
409A template with this name and language already exists, the WABA is disconnected, the WABA has no active phone number, or the template is paused for low quality
422Any other WhatsApp rejection: WhatsApp rejected this template request. Check the details and try again.
503WhatsApp itself failed. Retry

Time-to-live

message_send_ttl_seconds sets how long WhatsApp keeps trying to deliver a message sent from the template, for example while the customer's phone is off. After that WhatsApp stops trying and the message fails. The allowed range depends on the category:

CategoryMinimumMaximum-1 (30 days)
AUTHENTICATION30 seconds900 seconds (15 minutes)Accepted
UTILITY30 seconds43200 seconds (12 hours)Accepted
MARKETING43200 seconds (12 hours)2592000 seconds (30 days)Not accepted

A value outside the template's range returns 400. On an edit the range is checked against the new category when you change it, otherwise against the current one. A short TTL suits one-time codes, which are useless once they expire.

Authentication templates

One-time-code templates have a different body shape. Meta owns the verification copy, so you must not send BODY text:

curl -X POST https://api.callmissed.com/api/v1/whatsapp/templates \
  -H "Authorization: Bearer cm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "waba_id": "102290129340398",
    "name": "acme_login_code",
    "category": "AUTHENTICATION",
    "language": "en_US",
    "components": [
      { "type": "BODY", "add_security_recommendation": true }
    ]
  }'

The only body option is the boolean add_security_recommendation, and there is no example because there is no sender-supplied variable in the body. Sending BODY text on an AUTHENTICATION template returns 400 telling you the verification-code copy is fixed by Meta, and a non-boolean add_security_recommendation returns 400 as well. Any additional button or footer options come from Meta's authentication-template reference and are passed through unchanged.

Once approved, send the code through POST /messages/template, passing it as the body or button parameter. Authentication templates can only be sent to a phone number, never to a business-scoped user id: WhatsApp refuses that with error 131062.

One-tap and zero-tap codes

An authentication template takes one OTP button in a BUTTONS component. Its otp_type picks how the code reaches your Android app (copy_code, one_tap or zero_tap, case-insensitive):

otp_typeWhat the customer does
copy_codeTaps Copy code and pastes it into your app
one_tapTaps an autofill button, and WhatsApp hands the code to your app.
zero_tapNothing: WhatsApp hands the code to your app without a tap.
Button fieldApplies toNotes
textAllButton label, max 25 characters
autofill_textone_tap, zero_tapAutofill button label, max 25 characters
supported_appsone_tap, zero_tap1 to 5 apps, each { "package_name", "signature_hash" }. Required for zero_tap. package_name is your Android package name: two or more dot-separated segments, each starting with a letter, letters, digits and _ only, max 224 characters. signature_hash is your app's signing-key hash, exactly 11 characters of letters, digits, +, / and =
zero_tap_terms_acceptedzero_tapMust be true. WhatsApp does not create a zero-tap template without it

package_name and signature_hash directly on the button (the older form) are refused with 400: put them in supported_apps. A second OTP button, an unknown otp_type, or a one_tap/zero_tap-only field on a copy_code button also return 400.

curl -X POST https://api.callmissed.com/api/v1/whatsapp/templates \
  -H "Authorization: Bearer cm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "waba_id": "102290129340398",
    "name": "acme_app_login",
    "category": "AUTHENTICATION",
    "language": "en_US",
    "message_send_ttl_seconds": 600,
    "components": [
      { "type": "BODY", "add_security_recommendation": true },
      { "type": "FOOTER", "code_expiration_minutes": 10 },
      {
        "type": "BUTTONS",
        "buttons": [
          {
            "type": "OTP",
            "otp_type": "zero_tap",
            "text": "Copy code",
            "autofill_text": "Autofill",
            "zero_tap_terms_accepted": true,
            "supported_apps": [
              { "package_name": "com.acme.app", "signature_hash": "K8a/AINcGX7" }
            ]
          }
        ]
      }
    ]
  }'

A carousel pairs a normal message BODY with a swipeable row of cards, each with its own media header and buttons. Add a CAROUSEL component alongside the BODY.

Carousels are MARKETING only. Under any other category the create returns 400 naming the format.

RuleDetail
cards2 to 10. The count is fixed at creation: an approved template can only send the number of cards it was created with
Card HEADERRequired on every card, and always media. format is IMAGE or VIDEO
Card header mediaexample.header_handle must be a non-empty array holding an uploaded media handle
Card BODYOptional, but if one card has it every card must. Text max 160 characters, far shorter than the 1024-character message body. Variables need an example object
Card BUTTONSOptional, at most 2 per card, of type QUICK_REPLY, URL or PHONE_NUMBER
Uniform structureEvery card must carry the same components in the same order, and the same button types. Cards render at a shared height, so a body or button on one card is required on all
Top-level BODYStill required, alongside the CAROUSEL component
curl -X POST https://api.callmissed.com/api/v1/whatsapp/templates \
  -H "Authorization: Bearer cm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "waba_id": "102290129340398",
    "name": "summer_blends_carousel",
    "category": "MARKETING",
    "language": "en_US",
    "components": [
      {
        "type": "BODY",
        "text": "Hi {{1}}, our cold brew blends are 20% off this week.",
        "example": { "body_text": [["Priya"]] }
      },
      {
        "type": "CAROUSEL",
        "cards": [
          {
            "components": [
              {
                "type": "HEADER",
                "format": "IMAGE",
                "example": { "header_handle": ["4::aW1hZ2UvanBlZw==:ARZ1"] }
              },
              { "type": "BODY", "text": "Ratnagiri Dark Roast, notes of cocoa and dried fig." },
              {
                "type": "BUTTONS",
                "buttons": [
                  { "type": "QUICK_REPLY", "text": "Send me a sample" },
                  { "type": "URL", "text": "Shop now", "url": "https://acme.example.com/dark-roast" }
                ]
              }
            ]
          },
          {
            "components": [
              {
                "type": "HEADER",
                "format": "IMAGE",
                "example": { "header_handle": ["4::aW1hZ2UvanBlZw==:ARZ2"] }
              },
              { "type": "BODY", "text": "Chikmagalur Medium Roast, bright and citrus-forward." },
              {
                "type": "BUTTONS",
                "buttons": [
                  { "type": "QUICK_REPLY", "text": "Send me a sample" },
                  { "type": "URL", "text": "Shop now", "url": "https://acme.example.com/medium-roast" }
                ]
              }
            ]
          }
        ]
      }
    ]
  }'

Every rule above is checked before submission, and the 400 names the card index and the field, so you do not have to reverse-engineer a generic rejection.

Limited-time offer templates

A limited-time offer adds an offer banner with an optional countdown. Add a LIMITED_TIME_OFFER component. MARKETING only.

RuleDetail
limited_time_offerRequired object: { "text": string (max 16), "has_expiration": boolean }. text is the offer label
BODYMax 600 characters on this format, stricter than the usual 1024
HEADEROptional, but when present must be IMAGE or VIDEO. A text header is not supported
FOOTERNot supported at all. Sending one returns 400
BUTTONSOnly COPY_CODE and URL. When both are present the COPY_CODE button must be declared first, because it is fixed at button index 0 and the URL button at index 1
curl -X POST https://api.callmissed.com/api/v1/whatsapp/templates \
  -H "Authorization: Bearer cm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "waba_id": "102290129340398",
    "name": "monsoon_offer",
    "category": "MARKETING",
    "language": "en_US",
    "components": [
      {
        "type": "HEADER",
        "format": "IMAGE",
        "example": { "header_handle": ["4::aW1hZ2UvanBlZw==:ARZ1"] }
      },
      {
        "type": "BODY",
        "text": "Hi {{1}}, take 20% off your next bag of coffee.",
        "example": { "body_text": [["Priya"]] }
      },
      {
        "type": "LIMITED_TIME_OFFER",
        "limited_time_offer": { "text": "20% off", "has_expiration": true }
      },
      {
        "type": "BUTTONS",
        "buttons": [
          { "type": "COPY_CODE", "example": "MONSOON20" },
          { "type": "URL", "text": "Shop now", "url": "https://acme.example.com/shop" }
        ]
      }
    ]
  }'

has_expiration: true renders a countdown, whose expiry is supplied per send as a component parameter on POST /messages/template. components is forwarded to WhatsApp unchanged on a template send, so the parameter shape is WhatsApp's own.

Coupon code templates

A COPY_CODE button gives the customer a one-tap copy of a discount code. It works on its own marketing template, and is also the button an LTO template uses. MARKETING only.

RuleDetail
Button shape{ "type": "COPY_CODE", "example": "<CODE>" }. The button's label is fixed, so there is no text to set
exampleRequired, a sample coupon code, max 20 characters. The same cap applies to the code you pass at send time
CountAt most one COPY_CODE button per template
CompanionsA QUICK_REPLY button may accompany it
curl -X POST https://api.callmissed.com/api/v1/whatsapp/templates \
  -H "Authorization: Bearer cm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "waba_id": "102290129340398",
    "name": "welcome_coupon",
    "category": "MARKETING",
    "language": "en_US",
    "components": [
      {
        "type": "BODY",
        "text": "Welcome to Acme, {{1}}. Here is 15% off your first order.",
        "example": { "body_text": [["Priya"]] }
      },
      {
        "type": "BUTTONS",
        "buttons": [
          { "type": "COPY_CODE", "example": "WELCOME15" },
          { "type": "QUICK_REPLY", "text": "Browse blends" }
        ]
      }
    ]
  }'

The example is a sample for review, not the code you ship. The real code goes in a coupon_code button parameter per send, capped at the same 20 characters, so one approved template can issue a different code to every customer.

An AUTHENTICATION template's { "type": "OTP", "otp_type": "COPY_CODE" } button is a different component on a different template family and is not subject to these rules.

List templates

GET /api/v1/whatsapp/templates · scope whatsapp:read

Reads the local mirror, newest updated first. All parameters are optional filters.

ParamTypeDefaultNotes
account_idUUIDnoneFilter to one connected account
waba_idstring, max 64noneFilter by Meta WABA id
statusstringnoneAPPROVED, PENDING, REJECTED, PAUSED, DISABLED, IN_APPEAL. Case-insensitive
categorystringnoneMARKETING, UTILITY or AUTHENTICATION. An unknown value returns 400
languagestring, max 12noneFilter by locale
limitinteger, 1 to 500100Max rows
curl "https://api.callmissed.com/api/v1/whatsapp/templates?status=APPROVED&limit=100" \
  -H "Authorization: Bearer cm_your_api_key"

Response (200 OK)

[
  {
    "id": "3f9a1c20-7d8e-4b1a-9c2f-5e6a7b8c9d0e",
    "account_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
    "template_id": "1234567890123456",
    "name": "order_shipped",
    "language": "en_US",
    "category": "UTILITY",
    "status": "APPROVED",
    "quality_score": "GREEN",
    "rejection_reason": null,
    "parameter_format": "positional",
    "sub_category": null,
    "correct_category": null,
    "previous_category": null,
    "components": [
      { "type": "BODY", "text": "Hi {{1}}, order {{2}} shipped today and should arrive in 2 to 3 days." },
      { "type": "FOOTER", "text": "Acme Coffee" }
    ],
    "last_meta_synced_at": "2026-04-19T13:02:44Z",
    "created_at": "2026-04-19T12:00:00Z",
    "updated_at": "2026-04-19T13:02:44Z"
  }
]

The mirror is kept current by status webhooks and an hourly reconciliation sweep. For up-to-the-second consistency, call sync first.

The template object

FieldTypeNotes
idUUIDCallMissed's id. Use it on get and delete
account_idUUIDThe owning WABA
template_idstring, nullableMeta's template id. Null if Meta never confirmed the create
namestringTemplate name
languagestringLocale
categorystringMARKETING, UTILITY or AUTHENTICATION
statusstringLifecycle state
quality_scorestringMeta's quality signal, for example GREEN or UNKNOWN
rejection_reasonstring, nullableWhy Meta rejected it
parameter_formatstring, nullablepositional or named
sub_categorystring, nullableMeta's sub-classification, when it sends one
correct_categorystring, nullableThe category Meta believes the template belongs in. Worth surfacing: a UTILITY to MARKETING move changes the price of every send. Null when Meta agrees with yours
previous_categorystring, nullableThe category before Meta re-categorised it
componentsarray of objectsThe approved component spec
last_meta_synced_atdatetime, nullableLast reconciliation against Meta
created_at / updated_atdatetimeISO 8601 UTC

Get one template

GET /api/v1/whatsapp/templates/{template_uuid} · scope whatsapp:read

{template_uuid} is the id field, not Meta's template_id. Returns the template object, or 404 if it is not on your workspace.

curl https://api.callmissed.com/api/v1/whatsapp/templates/3f9a1c20-7d8e-4b1a-9c2f-5e6a7b8c9d0e \
  -H "Authorization: Bearer cm_your_api_key"

Edit a template

PATCH /api/v1/whatsapp/templates/{template_uuid} · scope whatsapp:write

Also served as POST /api/v1/whatsapp/templates/{template_uuid}/edit for clients that cannot send PATCH. Same body, same response.

Editing keeps the template's name, so it avoids the 30-day name lock a delete-and-recreate costs. name and language are never editable.

FieldTypeRequiredNotes
componentsarray of objectsOne ofA full replacement list. WhatsApp replaces every component, it does not merge. Validated exactly like a create
categorystringOne ofMARKETING, UTILITY or AUTHENTICATION. WhatsApp rejects a category change on an APPROVED template
parameter_formatstringNopositional or named. Selects which variable syntax the new components are checked against
message_send_ttl_secondsinteger, -1 to 2592000One ofNew time-to-live, checked against the template's category
curl -X PATCH https://api.callmissed.com/api/v1/whatsapp/templates/3f9a1c20-7d8e-4b1a-9c2f-5e6a7b8c9d0e \
  -H "Authorization: Bearer cm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "components": [
      {
        "type": "BODY",
        "text": "Hi {{1}}, order {{2}} has shipped and should arrive within 3 days.",
        "example": { "body_text": [["Priya", "AC-10294"]] }
      },
      { "type": "FOOTER", "text": "Acme Coffee" }
    ]
  }'

Response (200 OK): the template object with your new components, plus policy_warnings. The status is not changed here: WhatsApp re-reviews the edit and the result arrives by status webhook (or the next sync).

CodeMeaning
400None of components, category or message_send_ttl_seconds was sent, the components failed validation, or the TTL is outside the category's range
404The template is not on your workspace
409The template is PENDING (only APPROVED, REJECTED and PAUSED templates can be edited), or WhatsApp never confirmed it. Sync, then retry
422The new components break a template rule, or WhatsApp refused the edit

WhatsApp limits edits to an APPROVED template to 10 in 30 days and 1 in 24 hours. REJECTED and PAUSED templates can be edited without limit. WhatsApp enforces this count, so an edit over the limit comes back as a WhatsApp rejection.

Template groups

Group templates from one WABA so you can read their metrics together, for example every order-update template. Groups are read live from WhatsApp; CallMissed keeps no copy. Name member templates by their CallMissed id from list templates; each must be on the same WABA and already confirmed by WhatsApp (sync first if it is new). Every route takes the WABA as account_id or waba_id, in the body for create and update and as a query parameter for read and delete. There is no list call. Per-group delivery figures are at GET /analytics/meta/template-groups.

Method and pathScopeBody
POST /api/v1/whatsapp/template_groupswhatsapp:writename (1 to 256 chars), optional description (max 512), template_uuids (1 to 500)
GET /api/v1/whatsapp/template_groups/{group_id}whatsapp:readNone
PATCH /api/v1/whatsapp/template_groups/{group_id}whatsapp:writeAt least one of name, description, add_template_uuids, remove_template_uuids (each list max 500)
DELETE /api/v1/whatsapp/template_groups/{group_id}whatsapp:writeNone. The templates and their past metrics are kept

group_id is WhatsApp's numeric group id, returned by create.

curl -X POST https://api.callmissed.com/api/v1/whatsapp/template_groups \
  -H "Authorization: Bearer cm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "waba_id": "102290129340398",
    "name": "Order updates",
    "template_uuids": ["3f9a1c20-7d8e-4b1a-9c2f-5e6a7b8c9d0e", "8b2d4e61-1a3c-4f5e-9d7b-2c4e6a8b0d1f"]
  }'
{ "group_id": "1234567890123456", "name": "Order updates", "template_ids": ["594425479261596", "702183654120938"] }

Read returns group_id, name, description, creation_time, update_time, templates (the member templates as WhatsApp returns them) and paging. Update and delete return { "group_id", "success" }.

CodeMeaning
400Neither account_id nor waba_id was sent
403The key is missing the scope
404The group is not on your WABA, or a template is not on it or not yet confirmed by WhatsApp
422A field is outside its bounds, group_id is not numeric, or update had nothing to change

Unpause a template

POST /api/v1/whatsapp/templates/{template_uuid}/unpause · scope whatsapp:write

Lifts a pause on a template. A pause caused by low quality expires on its own, but a template paused by WhatsApp's template pacing stays paused until it is unpaused, either here or in WhatsApp Manager. No body.

curl -X POST https://api.callmissed.com/api/v1/whatsapp/templates/3f9a1c20-7d8e-4b1a-9c2f-5e6a7b8c9d0e/unpause \
  -H "Authorization: Bearer cm_your_api_key"

Response (200 OK)

{
  "template_id": "1234567890123456",
  "unpaused": true,
  "template": { "id": "3f9a1c20-7d8e-4b1a-9c2f-5e6a7b8c9d0e", "status": "PAUSED", "name": "order_shipped" }
}
FieldTypeNotes
template_idstringMeta's template id
unpausedbooleantrue when WhatsApp accepted the request
templateobjectThe template object as stored when you asked. Its status is not rewritten here: the new status arrives by webhook or sync

404 if the template is not on your workspace, 409 if WhatsApp never confirmed it.

Delete a template

DELETE /api/v1/whatsapp/templates/{template_uuid} · scope whatsapp:write

Deletes on WhatsApp and drops the local row. Returns 204 No Content with an empty body.

curl -X DELETE https://api.callmissed.com/api/v1/whatsapp/templates/3f9a1c20-7d8e-4b1a-9c2f-5e6a7b8c9d0e \
  -H "Authorization: Bearer cm_your_api_key"

If the template was already deleted in WhatsApp Manager, the local row is cleaned up anyway. A template that never got a Meta id is simply dropped locally.

Deleting an approved template starts a 30-day cooldown before the same name can be reused. Reusing it sooner fails at create time.

Delete every language of a template

DELETE /api/v1/whatsapp/templates/{template_uuid}/languages · scope whatsapp:write

Deletes the template's name on WhatsApp, which removes every language variant of it, not only the one {template_uuid} points at. Use the single delete above to remove one language.

curl -X DELETE https://api.callmissed.com/api/v1/whatsapp/templates/3f9a1c20-7d8e-4b1a-9c2f-5e6a7b8c9d0e/languages \
  -H "Authorization: Bearer cm_your_api_key"

Response (200 OK)

{
  "name": "order_shipped",
  "deleted_local_rows": 3,
  "deleted_languages": ["en_US", "es_MX", "hi"],
  "name_locked_days": 30
}
FieldTypeNotes
namestringThe template name that was deleted
deleted_local_rowsintegerRows removed, one per language
deleted_languagesarray of stringsEvery language variant that went
name_locked_daysintegerDays before this name can be created again

Delete in bulk

POST /api/v1/whatsapp/templates/bulk_delete · scope whatsapp:write

Deletes up to 100 templates in one WhatsApp call.

FieldTypeRequiredNotes
template_uuidsarray of UUIDs, 1 to 100YesCallMissed template ids. All must belong to the same WABA
curl -X POST https://api.callmissed.com/api/v1/whatsapp/templates/bulk_delete \
  -H "Authorization: Bearer cm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "template_uuids": ["3f9a1c20-7d8e-4b1a-9c2f-5e6a7b8c9d0e", "8b2c4d6e-1a3f-4c5d-9e7f-0a1b2c3d4e5f"] }'

Response (200 OK)

{
  "requested": 2,
  "deleted": 2,
  "meta_template_ids": ["1234567890123456", "1234567890123457"],
  "skipped_local_only": 0
}
FieldTypeNotes
requestedintegerIds you sent
deletedintegerRows removed
meta_template_idsarray of stringsMeta ids sent to WhatsApp's bulk delete
skipped_local_onlyintegerTemplates WhatsApp never confirmed, removed locally without a WhatsApp call

The batch is all or nothing. One unknown id returns 404 and nothing is deleted; templates from more than one WABA return 400; a WhatsApp rejection leaves every template in place.

Sync from WhatsApp

POST /api/v1/whatsapp/templates/sync · scope whatsapp:write

Pulls every template for a WABA from WhatsApp and upserts the local mirror. An hourly sweep does this automatically, so call it when you have just edited templates in WhatsApp Manager and want them reflected immediately.

FieldTypeRequiredNotes
account_id / waba_idUUID / stringOne ofThe WABA to reconcile
curl -X POST https://api.callmissed.com/api/v1/whatsapp/templates/sync \
  -H "Authorization: Bearer cm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "waba_id": "102290129340398" }'

Response (200 OK)

{ "waba_id": "102290129340398", "fetched": 12, "inserted": 2, "updated": 10 }
FieldTypeNotes
waba_idstringThe WABA that was reconciled
fetchedintegerTemplates WhatsApp returned
insertedintegerNew local rows
updatedintegerExisting rows refreshed

Templates WhatsApp no longer returns are not deleted by this call. The background sweep owns that.

Browse the Template Library

GET /api/v1/whatsapp/templates/library · scope whatsapp:read

Searches Meta's Template Library of pre-written utility and authentication templates. Pass a WABA (account_id or waba_id) so the search runs with your credentials; the library itself is the same for every account. Create from a result by passing its name as library_template_name.

ParamTypeDefaultNotes
account_id / waba_idUUID / string, max 64noneOne is required
searchstring, max 256noneMatches template content, name, header, body or footer
topicstringnoneFor example ACCOUNT_UPDATE, CUSTOMER_FEEDBACK, ORDER_MANAGEMENT, PAYMENTS
usecasestring, max 64noneFor example ORDER_CONFIRMATION. Passed to WhatsApp as-is
industrystringnoneFor example E_COMMERCE, FINANCIAL_SERVICES
languagestring, max 12noneLocale filter
namestring, max 512noneExact preset name
limitinteger, 1 to 100WhatsApp's defaultPage size
afterstring, max 512noneCursor from the previous page's paging
curl "https://api.callmissed.com/api/v1/whatsapp/templates/library?waba_id=102290129340398&topic=ORDER_MANAGEMENT&language=en_US" \
  -H "Authorization: Bearer cm_your_api_key"

Response (200 OK)

{
  "data": [
    {
      "name": "order_confirmation_1",
      "language": "en_US",
      "category": "UTILITY",
      "topic": "ORDER_MANAGEMENT",
      "usecase": "ORDER_CONFIRMATION",
      "body": "Hi {{1}}, your order {{2}} is confirmed. We will let you know when it ships.",
      "body_params": ["Priya", "AC-10294"],
      "buttons": [{ "type": "URL", "text": "View order" }]
    }
  ],
  "paging": null
}

data holds WhatsApp's library objects as returned, so fields can vary by preset. Library placeholders are positional: bind body_params by index. paging carries a cursor when there are more results.

Check business verification

GET /api/v1/whatsapp/templates/business_verification · scope whatsapp:read

Whether the Meta business that owns a WABA is verified. Some template features and higher messaging limits need a verified business.

ParamTypeNotes
account_id / waba_idUUID / string, max 64One is required
curl "https://api.callmissed.com/api/v1/whatsapp/templates/business_verification?waba_id=102290129340398" \
  -H "Authorization: Bearer cm_your_api_key"
{ "waba_id": "102290129340398", "status": "verified", "verified": true }
FieldTypeNotes
waba_idstringThe WABA checked
statusstring, nullableWhatsApp's verification status, for example verified, pending, not_verified. Null when it could not be read
verifiedboolean, nullableNull when status is unknown

The result is cached for a few minutes. A failed lookup returns 200 with status: null rather than an error; an unknown WABA still returns 404.

Upload header media

POST /api/v1/whatsapp/media/resumable · scope whatsapp:write

A template with an IMAGE, VIDEO or DOCUMENT header (including every carousel card) must carry a sample file in example.header_handle. This endpoint uploads the sample to WhatsApp and returns that handle. It is not the same as POST /media, which returns a media_id for sending messages; a media_id is not accepted as a header handle.

Send the file as multipart/form-data in a field named file. Accepted types: image/jpeg, image/jpg, image/png, video/mp4, application/pdf. This path accepts larger bodies than the rest of the API so a real video sample fits.

curl -X POST https://api.callmissed.com/api/v1/whatsapp/media/resumable \
  -H "Authorization: Bearer cm_your_api_key" \
  -F "[email protected];type=image/jpeg"

Response (200 OK)

{ "handle": "4::aW1hZ2UvanBlZw==:ARZ1", "file_type": "image/jpeg", "size_bytes": 184233 }

Put handle as the single element of the header's example.header_handle array.

CodeMeaning
400Missing or unsupported Content-Type, or an empty file
413The file is over the upload size limit
422WhatsApp rejected the upload. Check the file type and size

Draft a template with AI

POST /api/v1/whatsapp/ai/draft_template · scope whatsapp:write

Turns a plain-language intent into a Meta-compliant draft, with an approval-risk assessment. It is read-only: nothing is submitted to WhatsApp, so review the draft and then post it to create yourself. The generation is billed to your workspace.

FieldTypeRequiredNotes
intentstring, 10 to 1000 charsYesWhat the template should say and when it is sent
languagestring, 2 to 8 charsNoDefault en
categorystringNoForce UTILITY, MARKETING or AUTHENTICATION. Omit to let the model choose
emojisbooleanNoAllow emojis in the body. Default false, which is safest for approval
include_headerbooleanNoAllow a header line. Default true
include_footerbooleanNoAllow a footer line. Default true
tonestring, max 40NoFor example friendly, formal, concise
curl -X POST https://api.callmissed.com/api/v1/whatsapp/ai/draft_template \
  -H "Authorization: Bearer cm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "intent": "Tell a customer their coffee subscription renews in three days and they can skip or change the blend before then.",
    "language": "en",
    "category": "UTILITY",
    "tone": "friendly"
  }'

Response (200 OK)

{
  "name": "subscription_renewal_reminder",
  "category": "UTILITY",
  "language": "en",
  "body": "Hi {{1}}, your Acme coffee subscription renews on {{2}}. Reply SKIP to pause this delivery or CHANGE to pick a different blend.",
  "header_text": "Your subscription renews soon",
  "footer_text": "Acme Coffee",
  "components": [
    { "type": "HEADER", "format": "TEXT", "text": "Your subscription renews soon" },
    {
      "type": "BODY",
      "text": "Hi {{1}}, your Acme coffee subscription renews on {{2}}. Reply SKIP to pause this delivery or CHANGE to pick a different blend.",
      "example": { "body_text": [["Priya", "22 April"]] }
    },
    { "type": "FOOTER", "text": "Acme Coffee" }
  ],
  "approval_risk": "low",
  "rejection_risks": [],
  "compliance_notes": "Transactional reminder tied to an existing subscription, so UTILITY is the correct category.",
  "policy_review": { "errors": [], "warnings": [], "tips": [], "score": 100 }
}
FieldTypeNotes
namestringSuggested template name, already matching Meta's naming rules
categorystringThe category chosen or forced
languagestringEchoes the requested locale
body / header_text / footer_textstring, nullable for header and footerThe drafted copy
componentsarray of objectsReady to post to POST /templates as-is
approval_riskstringThe model's read on how likely Meta is to approve it
rejection_risksarray of stringsSpecific things that could get it rejected. Empty when none were found
compliance_notesstring, nullableWhy the category and wording were chosen
policy_reviewobject, nullableThe same rules check POST /templates runs, applied to the draft: { errors, warnings, tips, score }, each finding a {code, message} and score from 0 to 100. Any errors here would make the create return 422

422 when the model cannot produce a valid draft. Shorten or clarify the intent and retry.

On this page