Skip to main content

List Templates

Retrieve all WhatsApp message templates associated with your account. Use this to see which templates are available, what variables they require, and whether they need a media attachment.

GET /api/v1/templates/

Response fields

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

Template object

FieldTypeDescription
idstringTemplate ID
namestringTemplate name (use this in the Send Template Message endpoint)
categorystringMARKETING, UTILITY, or AUTHENTICATION
languagestringLanguage code (e.g., en_US, hi)
statusstringApproval status — only APPROVED templates can be used for sending
header_formatstringHeader type: NONE, TEXT, IMAGE, VIDEO, or DOCUMENT
bodystringTemplate body text with variable placeholders like {{1}}, {{2}}
requires_mediabooleantrue if you need to provide a media_url when sending
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,
"created_at": "2024-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,
"created_at": "2024-06-10T08:00:00Z"
}
],
"total": 2
}

How to use the response

When preparing to send a message, check these fields:

  1. body — Look for {{1}}, {{2}}, etc. These are the variables you need to provide in body_data
  2. header_format — If it is IMAGE, VIDEO, or DOCUMENT, you must provide a media_url
  3. requires_media — Quick check: if true, a media URL is required
  4. status — Only APPROVED templates can be sent. PENDING or REJECTED templates will return an error
tip

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