Skip to main content

List Templates

Retrieve every WhatsApp message template associated with your account — including body text, header format, buttons, variable shape, and Meta approval status. Use this before sending to confirm the template is APPROVED and to discover which variables it expects.

GET /api/v1/templates/

Response fields

FieldTypeDescription
statusstring"success"
templatesarrayArray of template objects
totalnumberTotal number of templates

Template object

FieldTypeDescription
idstringTemplate ID
namestringTemplate name (pass to Send Template Message or Create Campaign)
categorystringMARKETING, UTILITY, or AUTHENTICATION
languagestringBCP-47 language code (e.g., en_US, hi)
statusstringMeta approval status — only APPROVED templates can be sent
header_formatstringNONE, TEXT, IMAGE, VIDEO, DOCUMENT, or LOCATION
headerstring|nullHeader text (when header_format is TEXT)
bodystringBody text with variable placeholders like {{1}}, {{name}}
footerstring|nullFooter text
buttonsarray|nullButton definitions (types: QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE, FLOW, OTP)
requires_mediabooleantrue if you need to provide a media_url when sending
variablesarray|nullVariable names/types with examples
requires_variablesbooleantrue if the template has variables to fill
variable_countnumberNumber of variables across header and body
parameter_formatstringPOSITIONAL ({{1}}, {{2}}) or NAMED ({{name}})
example_dataobjectMeta example payload, including sample header media URL
sample_media_urlstring|nullPreview media URL from Meta
limited_time_offerobject|nullLTO component data if present
offer_codestring|nullStored offer/coupon code for LTO templates
is_carouselbooleantrue if this is a media card carousel template
carousel_cardsarray|nullCard definitions (carousel templates only)
carousel_card_countnumber|nullNumber of cards in the carousel
quality_scoreobject|nullMeta quality score object with score (GREEN, YELLOW, RED, or UNKNOWN) and date (unix timestamp)
message_send_ttl_secondsnumber|nullTTL for messages sent with this template
api_payload_structureobject|nullExample request body for sending this template via the API
created_atstringISO 8601 timestamp

Example request

curl -X GET https://server.waplify.io/api/v1/templates/ \
-H "Authorization: Bearer wapl_your_api_key"

Example response

{
"status": "success",
"templates": [
{
"id": "507f1f77bcf86cd799439012",
"name": "order_confirmation",
"category": "UTILITY",
"language": "en_US",
"status": "APPROVED",
"header_format": "IMAGE",
"body": "Hello {{1}}, your order {{2}} is confirmed for {{3}}.",
"requires_media": true,
"variable_count": 3,
"parameter_format": "POSITIONAL",
"is_carousel": false,
"created_at": "2026-06-15T10:00:00Z"
},
{
"id": "507f1f77bcf86cd799439013",
"name": "welcome_message",
"category": "MARKETING",
"language": "en_US",
"status": "APPROVED",
"header_format": "NONE",
"body": "Welcome {{1}}! Thanks for joining us.",
"requires_media": false,
"variable_count": 1,
"parameter_format": "POSITIONAL",
"is_carousel": false,
"created_at": "2026-06-10T08:00:00Z"
}
],
"total": 2
}

How to use the response

When preparing to send a message or create a campaign, inspect these fields:

  1. status — Only APPROVED templates can be sent. PENDING or REJECTED templates return an error.
  2. body — Look for {{1}}, {{2}}, etc. (or named variables). These become the keys in body_data.
  3. header_format — If IMAGE, VIDEO, or DOCUMENT, you must provide media_url.
  4. requires_media — Fast check: if true, a media URL is required.
  5. is_carousel — If true, use carousel_data to supply per-card media / button values.
  6. limited_time_offer + offer_code — If present, you must pass expiration_time_ms when sending.
tip

Call this endpoint before sending messages to verify your template exists and is approved. This prevents sending errors.