Skip to main content

List Templates

Retrieve all WhatsApp message templates created under your organisation, including each template's components, variables, language, category, and approval status.

Use this to discover the exact templateName and language values required by Send Message.

Authentication Required

Requires the x-api-key header. See Overview for details.

HTTP Request

GET /api/dragonfly/whatsapp/message_templates

Query Parameters

ParameterTypeRequiredDescription
refreshstringNoPass true to bypass the cache and fetch the latest template list from Meta.
Responses are cached

Template lists are served from a cache. If you just created or edited a template and don't see the change, call this endpoint with ?refresh=true.

Try it

Loading playground…

Code Examples

curl -X GET "https://prod-api.superfone.co.in/superfone/api/dragonfly/whatsapp/message_templates" \
-H "x-api-key: your_api_key_here"

Success Response

Status Code: 200 OK

{
"data": {
"data": [
{
"name": "after_setup_meet",
"parameter_format": "POSITIONAL",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Hi {{1}}",
"example": { "header_text": ["Garima"] }
},
{
"type": "BODY",
"text": "*During our meeting, we completed:* {{1}}\n\n*Pending :* {{2}}\n\n…",
"example": { "body_text": [["ab", "csd", "fref"]] }
},
{
"type": "FOOTER",
"text": "SUPERFONE SUCCESS TEAM"
}
],
"language": "en",
"status": "APPROVED",
"category": "MARKETING",
"id": "1056927135857721"
}
]
},
"message": "success"
}

Response Fields

FieldTypeDescription
data.data[]object[]Array of template objects
data.data[].idstringMeta template ID — use with Get Template by ID
data.data[].namestringTemplate name — the templateName for Send Message
data.data[].languagestringLanguage code — pass this exact value as language when sending (enen_US)
data.data[].statusstringApproval status: APPROVED, PENDING, REJECTED, … Only APPROVED templates can be sent
data.data[].categorystringMARKETING, UTILITY, or AUTHENTICATION
data.data[].parameter_formatstringPOSITIONAL (variables numbered {{1}}, {{2}}, …) or NAMED (variables like {{name}}, with example.body_text_named_params)
data.data[].components[]object[]Template structure: HEADER, BODY, FOOTER, BUTTONS, each with its text and example values

Error Responses

StatusMessageWhen it occurs
400(Meta error message)Meta rejected the template fetch (e.g. account/permission issue)
401UnAuthorized, Please Provide Valid API KeyMissing or invalid x-api-key