GET/v1/messaging/templates/{templateId}

Authorization

Bearer token

Authorizationrequiredheader

Send your API key as Bearer YOUR_API_KEY.

Permissionwhatsapp.send

A key with whatsapp.full_access can also read templates. WhatsApp must be turned on for your organization.

Path parameters

templateIdrequiredstring

The template ID, starting with mtp_, shown on the template's page in the dashboard under Details, or returned by List messaging templates.

Response

application/json200 OK

Example identifiers below are illustrative.

data is the template object.

The template object

idstring

Template ID, starting with mtp_. Send it in template.id with Send a message.

namestring

Lowercase letters, numbers, and underscores, such as order_confirmation.

languagestring

The language code, such as en, fr, ar, or en_US. Each name and language pair is its own template.

categorystring

WhatsApp can recategorize a template on an account; see the approval's category.

One of"marketing""utility""authentication"

content_typestring

See Content types.

One of"text""media""quick_reply""call_to_action""card""authentication""carousel"

statusstring

Only submitted templates can be sent. See Drafts and submitted templates.

One of"draft""submitted""archived"

sourcestring

nexiom for a template created in Nexiom Connect, library for one started from the library, or whatsapp_sync for one found in WhatsApp Manager.

library_keystring or null

The library entry it was started from, such as order_confirmation.

contentobject

What the template says. See Content.

variablesobject

What a send of the template must give. See Variables.

channelsstring[]

The channels its content fits: whatsapp for every type, plus sms for text templates. Sending by SMS isn't available yet.

channel_statusobject

Where it can be sent now. See Channel status.

unsupported_reasonstring or null

Why a template synced from WhatsApp Manager can't be sent from Nexiom Connect, such as a location header.

duplicated_from_idstring or null

The template this one was duplicated from.

submitted_atstring or null

When it was submitted, and its content frozen.

archived_atstring or null

When it was archived.

created_atstring

When it was created.

updated_atstring

When it last changed.

Timestamps are ISO 8601 strings in UTC.

Content

The parts a template uses depend on its content_type; the others are null or empty.

content.headerobject or null

A text header (type text, with text and example) or a media header (type image, video, or document, with example_file_id).

content.bodyobject or null

The message: text, with numbered variables such as {{1}}, and examples, an example value by variable number. null for authentication.

content.footerstring or null

A short line without variables.

content.buttonsarray

The buttons, in order. See Buttons.

content.authenticationobject or null

For authentication only: the options of the verification code message. See Verification code options.

content.cardsarray

For carousel only: 2 to 10 cards, each with a header (type image or video, with example_file_id), a body with text and examples, and buttons.

TypeUses
textbody, and optionally a text header and a footer.
mediaA media header, body, and optionally a footer.
quick_replybody, buttons of type quick_reply, and optionally a header and a footer.
call_to_actionbody, buttons of type url, phone_number, and copy_code, and optionally a header and a footer.
cardbody, any mix of buttons, and optionally a header and a footer.
authenticationauthentication only. WhatsApp writes the text.
carouselbody and cards.

Examples are what WhatsApp reviewed. They are never sent. Templates synced from WhatsApp Manager have no examples and an empty example_file_id, since WhatsApp doesn't return them.

Buttons

typestring

One of"quick_reply""url""phone_number""copy_code"

textstring

The button label, up to 25 characters. Copy-code buttons have none: WhatsApp labels them.

urlstring

For url: the link. A link ending with {{1}} takes its ending with each send.

examplestring or null

For url ending with {{1}}: a full example link. For copy_code: an example code.

phone_numberstring

For phone_number: the number called, in E.164 format.

Verification code options

add_security_recommendationboolean

Adds "For your security, do not share this code." to the message.

code_expiration_minutesnumber or null

Adds "This code expires in N minutes." to the footer, from 1 to 90.

otp_typestring

How the customer uses the code.

One of"copy_code""one_tap""zero_tap"

button_textstring or null

The copy-code button label, up to 25 characters. null uses WhatsApp's translated label.

autofill_textstring or null

For one_tap and zero_tap: the autofill button label, up to 25 characters.

supported_appsarray

For one_tap and zero_tap: 1 to 5 Android apps that receive the code, each with a package_name and an 11-character signature_hash.

zero_tap_terms_acceptedboolean

true for zero_tap: WhatsApp's zero-tap terms were accepted.

message_send_ttl_secondsnumber or null

An undelivered code is dropped after this many seconds, from 30 to 900. null uses WhatsApp's default.

See Verification code templates.

Variables

What Send a message must give for this template, worked out from its content.

variables.headerstring[]

Header variable keys, such as ["1"]. Give each in template.variables.header.

variables.bodystring[]

Body variable keys, such as ["1", "2"]. Give each in template.variables.body.

variables.header_mediastring or null

image, video, or document when each send needs template.header_media.

variables.buttonsarray

The buttons that take a value, each with its index, its type (url, copy_code, or quick_reply), and whether it is required.

variables.codeboolean

true for a verification code template: each send needs template.code.

variables.cardsarray

For a carousel, one entry per card: its index, its header_media (image or video), its body variable keys, and its buttons. Each send needs template.cards.

Channel status

channel_status.whatsapp.readyboolean

true when the template is submitted and approved on at least one WhatsApp account, so it can be sent from that account's number.

channel_status.whatsapp.approvalsarray

One approval per WhatsApp account the template was submitted to or synced from.

channel_status.sms.readyboolean

true when the template is submitted and its content fits SMS. Sending by SMS isn't available yet.

WhatsApp approvals

WhatsApp reviews a template separately on each WhatsApp account it is submitted to. A template can be sent from a number only when its approval on that number's account is approved.

whatsapp_template_idstring

The approval ID, starting with wat_. A send can name it in template.id instead of the mtp_ ID.

account_idstring

The WhatsApp account in Nexiom Connect, starting with wac_.

waba_idstring

The WhatsApp Business Account ID in Meta.

statusstring

active, or archived once the template was deleted in WhatsApp. An archived approval can't be sent.

approval_statusstring

See Review and approval.

One of"pending""approved""rejected""paused""disabled"

categorystring

The category WhatsApp holds for the template on this account. WhatsApp can change it.

rejection_reasonstring or null

WhatsApp's reason, for a rejected template.

unsupported_reasonstring or null

Why this account's template can't be sent from Nexiom Connect.

matches_contentboolean

false when the template was changed in WhatsApp Manager and no longer matches its content here. Messages then send WhatsApp's version. Always true for verification code templates and templates synced from WhatsApp Manager, which follow WhatsApp's wording.

submitted_atstring or null

When it was submitted to this account.

last_synced_atstring or null

When it was last read from WhatsApp.

Nexiom Connect
Open dashboard