Skip to main content
POST

Authorizations

X-API-Key
string
header
required

Path Parameters

businessPhoneNumber
string
required

The WhatsApp business phone number in E.164 format.

Example:

"+16315551111"

Body

application/json

Provide at least one of to or recipient. If both are provided, to takes precedence and recipient is ignored.

templateName
string
required

The name of the approved WhatsApp template.

Example:

"group_invite_link"

languageCode
string
required

The template language code.

Example:

"en_US"

parameters
object[]
required

Template body parameters in template variable order. Must include one group invite link parameter with type=group_id and group_id=<groupId>.

to
string

The recipient's phone number in E.164 format. Required when recipient is not provided.

Example:

"+16315551111"

recipient
string

The recipient's WhatsApp Business-scoped user ID (BSUID) or parent BSUID. Required when to is not provided.

Example:

"US.1234"

Response

The message request is successfully accepted.

WhatsApp outbound message object.

id
string
required

Unique ID of the message.

wabaId
string
required

WhatsApp Business Account ID.

Example:

"whatsapp-business-account-id"

from
string
required

The sender's phone number in E.164 format.

Example:

"+16315551111"

wamid
string

The original message ID on WhatsApp's platform.

Example:

"wamid.BgNODYxN..."

to
string

The recipient's phone number in E.164 format.

Example:

"+16315551111"

recipient
string

The recipient value submitted in the request when a BSUID or parent BSUID was used.

Example:

"US.1234"

recipientUserId
string

The recipient's WhatsApp Business-scoped user ID (BSUID).

Example:

"US.1234"

toUserId
string

Alias of recipientUserId kept for compatibility.

Example:

"US.1234"

parentRecipientUserId
string

The recipient's parent WhatsApp Business-scoped user ID.

Example:

"US.ENT.1234"

toParentUserId
string

Alias of parentRecipientUserId kept for compatibility.

Example:

"US.ENT.1234"

customerProfile
object

The recipient's profile information, including WhatsApp username when available.

conversation
object

WhatsApp defines a conversation as a 24-hour session of messaging between a person and a business. This field is present after the message status changes to sent. See also Conversation-Based Pricing.

type
enum<string>

WhatsApp outbound message type. See also WhatsApp messages.

Available options:
template,
text,
image,
audio,
video,
document,
sticker,
location,
interactive,
contacts,
reaction
template
object

Use for sending a WhatsApp template message.

text
object

WhatsApp Message Text Object.

image
object

Use for image, gif, video, audio, document, or sticker messages. See also Supported Media Types.

Note: Either id or link must be provided, but not both. These parameters are mutually exclusive.

Reference: WhatsApp Cloud API Media Object

video
object

Use for image, gif, video, audio, document, or sticker messages. See also Supported Media Types.

Note: Either id or link must be provided, but not both. These parameters are mutually exclusive.

Reference: WhatsApp Cloud API Media Object

audio
object

Use for image, gif, video, audio, document, or sticker messages. See also Supported Media Types.

Note: Either id or link must be provided, but not both. These parameters are mutually exclusive.

Reference: WhatsApp Cloud API Media Object

document
object

Use for image, gif, video, audio, document, or sticker messages. See also Supported Media Types.

Note: Either id or link must be provided, but not both. These parameters are mutually exclusive.

Reference: WhatsApp Cloud API Media Object

sticker
object

Use for image, gif, video, audio, document, or sticker messages. See also Supported Media Types.

Note: Either id or link must be provided, but not both. These parameters are mutually exclusive.

Reference: WhatsApp Cloud API Media Object

location
object

Use for location messages.

interactive
object

Use for interactive messages.

contacts
object[]
reaction
object

When a user reacts to messages with an emoji, the message type is set to reaction, and this field is included.

context
object

Used to mention a specific message you are replying to. The reply can be any message type.

externalId
string

A unique (recommended) string to reference the object. This can be an order number or similar, and can be used to reconcile the object with your internal systems.

category
string

The Direct Send category, such as utility or authentication, when applicable.

Example:

"utility"

ttlSeconds
integer

The configured Direct Send message lifetime in seconds, when applicable.

Example:

600

status
enum<string>

WhatsApp message status. One of accepted, failed, sent, delivered, read.

  • accepted: The messaging request is accepted by our system.
  • failed: A message sent by your business failed to send.
  • sent: A message sent by your business is in transit within WhatsApp's systems.
  • delivered: A message sent by your business was delivered to the user's device.
  • read: A message sent by your business was read by the user.
Available options:
accepted,
failed,
sent,
delivered,
read
errorCode
string

Error code when the message status is failed.

Example:

"INTERNAL_SERVER_ERROR"

errorMessage
string

Error message when the message status is failed.

createTime
string<date-time>

The time at which this message is created, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.

Example:

"2022-06-01T12:00:00.000Z"

updateTime
string<date-time>

The time at which this message is updated, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.

Example:

"2022-06-01T12:00:00.000Z"

sendTime
string<date-time>

The time at which this message status changed to sent, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.

Example:

"2022-06-01T12:00:00.000Z"

deliverTime
string<date-time>

The time at which this message status changed to delivered, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.

Example:

"2022-06-01T12:00:00.000Z"

readTime
string<date-time>

The time at which this message status changed to read, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.

Example:

"2022-06-01T12:00:00.000Z"

totalPrice
number<double>

Total price of this message. Note: It's only an estimated price when the status is accepted or sent. It becomes the final price after the message is delivered, i.e., the status is delivered or read.

Example:

0.05

currency
string

Price currency. ISO 4217 currency code.

Example:

"USD"

regionCode
string

The region code of the recipient phone number.

Example:

"US"

pricingCategory
enum<string>

The pricing category of the message. Note: It's only an estimated pricing category when the status is accepted or sent. It becomes final after the message is delivered, i.e., the status is delivered or read.

Available options:
referral_conversion,
authentication,
authentication_international,
marketing,
marketing_lite,
utility,
service
pricingModel
enum<string>

The pricing model of the message.

  • PMP: Per-message pricing applies.
  • CBP: Conversation-based pricing applies.
Available options:
PMP,
CBP
pricingType
enum<string>

The pricing type of the message. This field is only available in PMP (Per-Message Pricing) mode.

  • regular: Indicates the message is billable.
  • free_customer_service: Indicates the message is free because it was either a utility template message or non-template message sent within a customer service window.
  • free_entry_point: Indicates the message is free because it is part of a free-entry point conversation.
Available options:
regular,
free_customer_service,
free_entry_point
whatsappApiError
object

The original error object returned by WhatsApp. See Handling Errors, Cloud API Error Codes.

bizType
string

This can be either empty or one of whatsapp, or verify. Defaults to whatsapp.

  • whatsapp: Indicates that the message is sent via the WhatsApp product.
  • verify: Indicates that the message is sent via the Verify product.
Example:

"whatsapp"

verificationId
string

The verification ID. Included only when bizType is verify.

Example:

"VERIFICATION-ID"