---
title: "Send WhatsApp template message"
method: POST
path: "/whatsapp/1/message/template"
tags: ["channels", "whatsapp", "whatsapp-outbound-messages", "whatsapp-template-message"]
---

# Send WhatsApp template message

`POST /whatsapp/1/message/template`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/whatsapp/1/message/template`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - HTTP basic

Send a single or multiple template messages to one or more recipients. Template messages can be sent and delivered at anytime. Each template needs to be registered and pre-approved by WhatsApp. <br/> The API response will not contain the final delivery status, use [Delivery Reports](#channels/whatsapp/receive-whatsapp-delivery-reports) instead.

## Request body

- F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2BulkMessage
  - `messages` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2FailoverMessage[], required: An array of messages being sent.
    - `from` string, required: Registered WhatsApp sender number. Must be in international format and comply with [WhatsApp's requirements](https://www.infobip.com/docs/whatsapp/get-started/sender-registration#phone-number-what-you-need-to-know).
    - `to` string, required: Message recipient number in international format or WhatsApp business-scoped user ID.
    - `messageId` string: The ID that uniquely identifies the message sent.
    - `content` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2TemplateContent, required: The content object to build a message that will be sent.
      - `templateName` string, required: Template name. Should only contain lowercase alphanumeric characters and underscores.
      - `templateData` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2TemplateDataContent, required: Template data. Values have to be set as registered in the template.
        - `body` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2TemplateBodyContent, required: Template body.
          - `type` string, required
        - `header` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2TemplateHeaderContent: Template header. Should be defined, only if placeholders or media have been registered in the template's header.
          - `type` string, required
        - `buttons` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2TemplateButtonContent[]: Template buttons. Should be defined in the correct order, only if `quick reply`, `dynamic URL`, `copy code` or `flow` buttons have been registered. It can have up to ten buttons including a maximum of two `dynamic URL` buttons, one `copy code` button and one `flow` button. When `catalog`, `multi product` or `order details` button is used it needs to be the only button.
          - `type` string, required
        - `carousel` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2TemplateCarouselContent: Template carousel. Should be defined only when template contains carousel.
          - `cards` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2TemplateCardContent[], required: Carousel cards. Should be defined in the correct order. It can have between one and ten cards.
            - `header` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2TemplateHeaderContent, required: Template header. Should be defined, only if placeholders or media have been registered in the template's header.
              - …
            - `body` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2TemplateBodyContent: Template body.
              - …
            - `buttons` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2CardAllowedTemplateButtonContent[]: Card buttons. Define buttons only for `quick reply` or `dynamic URL` buttons (in the required order). For static URL button, omit the buttons section.
              - …
        - `limitedTimeOffer` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2TemplateLimitedTimeOfferContent: Template limited-time offer. Should be defined, only if template contains limited-time offer.
          - `expirationTime` string, date-time, required: Offer code expiration time. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
        - `orderStatus` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2TemplateOrderStatusContent: Template order status. Should be defined, only if template contains order status.
          - `orderStatuses` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2OrderStatusContent[], required: Array of order statuses information.
            - `type` string, required
      - `language` string, required: The code of language or locale to use. Must be the same code used when registering the template.
    - `callbackData` string: Custom client data that will be included in a [Delivery Report](#channels/whatsapp/receive-whatsapp-delivery-reports).
    - `notifyUrl` string: The URL on your callback server to which delivery and seen reports will be sent. [Delivery report format](#channels/whatsapp/receive-whatsapp-delivery-reports), [Seen report format](#channels/whatsapp/receive-whatsapp-seen-reports).
    - `urlOptions` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2UrlOptions: Sets up [URL shortening](https://www.infobip.com/docs/url-shortening) and tracking feature.
      - `shortenUrl` boolean: Enable shortening of the URLs within a message. Set this to `true`, if you want to set up other URL options.
      - `trackClicks` boolean: Enable tracking of short URL clicks within a message: which URL was clicked, how many times, and by whom.
      - `trackingUrl` string: The URL of your callback server on to which the Click report will be sent.
      - `removeProtocol` boolean: Remove a protocol, such as `https://`, from links to shorten a message. Note that some mobiles may not recognize such links as a URL.
      - `customDomain` string: Select a predefined custom domain to use when generating a short URL.
    - `smsFailover` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2Failover: SMS message to be sent if the WhatsApp template message could not be delivered.
      - `from` string, required: SMS sender number. Must be in international format.
      - `text` string, required: Content of the SMS that will be sent.
    - `entityId` string: Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
    - `applicationId` string: Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see our [documentation](https://www.infobip.com/docs/cpaas-x/application-and-entity-management).
    - `context` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2MessageContext: Context object to define WhatsApp-specific metadata about a message.
      - `replyToMessageId` string, required: Inbound message ID used for a reply. Contextual bubble will not appear for template messages.
  - `bulkId` string: The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address.

## Response `200`

Message accepted for delivery

- F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2BulkMessageInfo
  - `messages` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2SingleMessageInfo[]: Array of sent message objects, one object per every message.
    - `to` string: The destination address of the message.
    - `messageCount` integer: Number of messages required to deliver.
    - `messageId` string: The ID that uniquely identifies the message sent. If not passed, it will be automatically generated and returned in a response.
    - `status` F30d78c250ad1209aef755ddde02bb131e1749b705985f0e9f1b007c900b98e2SingleMessageStatus: Indicates the [status](https://www.infobip.com/docs/essentials/response-status-and-error-codes#api-status-codes) of the message and how to recover from an error should there be any.
      - `groupId` integer: Status group ID.
      - `groupName` string: Status group name.
      - `id` integer: Status ID.
      - `name` string: Status name.
      - `description` string: Human-readable description of the status.
      - `action` string: Action that should be taken to eliminate the error.
  - `bulkId` string: The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to more than one destination address.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
