Send Whatsapp Template Message

Sends one or more WhatsApp template messages in a single request, with positional placeholder values.

Before you call

  • Send a messages array. Each item needs content.templateName and content.language for a template on the sending number.
  • Address each message with to (phone number with country code), customerId, or a WhatsApp group's groupId.
  • from is optional. If omitted, your primary connected WhatsApp number is used.
  • templateData.body.placeholders is an array of strings, in order. Its length must match the variables in the template body.
  • If the template header has a variable, send templateData.header of the same type: placeholder for TEXT, mediaUrl for IMAGE/VIDEO/DOCUMENT, plus filename for DOCUMENT.
  • If the template has a URL button with a variable, send a URL button in templateData.buttons. Carousel templates take templateData.cards, each with a cardIndex.

How it works

  • Each message is checked separately. One bad message does not fail the others.
  • The response has one entry per message: status ENQUEUED with a messageId, or FAILED with an errorMessage.
  • Enqueued messages are sent in the background. Use the messageId with Get Message Status to track delivery.
  • Common failures: template name and language not found, no connected WhatsApp number for from, group not found, placeholder count mismatch.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
messages
array of objects
required

Array of template messages to be sent

messages*
Responses
201

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json