CTRLK

Additional resources

Shared components

Integrate WhatsApp using the Infobip API

|

View as Markdown

Infobip's WhatsApp Business API ↗ is a scalable solution that enables businesses to programmatically send and receive messages by integrating WhatsApp as their communication channel, while meeting WhatsApp platform requirements and supporting secure communication.

This guide helps you authenticate, configure, and send messages, track delivery, and monitor customer interaction all using Infobip's API.


Learn more

Visit the Infobip WhatsApp API documentation for full endpoint specifications, request examples, and response parameters.



What you can do with the WhatsApp API

Use the WhatsApp Business API ↗ to:

  • Create and send message templates and free-form messages.
  • Receive and respond to inbound user messages.
  • Track delivery, seen status, and user actions.
  • Subscribe to key events (for example, clicks, opt-ins, payments).
  • Shorten and track URLs inside template buttons with engagements analytics.

This API supports full-cycle communication, from onboarding and transactional alerts to rich, two-way customer service.

Set up authentication and configuration

Before you start sending or receiving messages, follow these steps:

  • Authenticate your integration using the API Authentication guide.
  • Configure sender behavior and inbound message routing in the Edit configuration section.
  • Assign a global webhook URL in your configuration or override it per message using the notifyURL parameter.


Event subscription [#event-subscription-message-templates]

When using WhatsApp, subscriptions allow you to track and receive notifications for specific events during communication. These events, such as message delivery or user interactions, trigger notifications that are sent to your designated webhook, helping you monitor the progress and status of WhatsApp messages. Once a template is tied to a particular applicationID or entity ID, you can create a subscription to receive template updates.

For WhatsApp, you can track the following event types:

Event typeDescription
ACCOUNT_REGISTRATIONNotifies you when an account registration occurs. You can also track registration failure reasons and view business portfolio ID through this event.
ACCOUNT_UPDATE_NOTIFICATIONNotifies you about updates to your WhatsApp Business account.
BILLINGProvides updates related to account billing.
BUSINESS_APP_CONTACT_SYNCNotifies you when the WhatsApp Business app synchronizes contact information with Infobip.
CLICKTracks when a user clicks on a button or link within the message.
DELIVERYIndicates that the message was successfully delivered to the recipient.
IDENTITY_CHANGENotifies you when an end user's WhatsApp identity changes.
INBOUND_MESSAGEAlerts you when a new inbound message is received from an end user.
MARKETING_SUBSCRIPTION_UPDATENotifies you when an end user opts in or out of receiving marketing messages.
PAYMENT_STATUSMonitors the status of payment-related messages.
SEENConfirms that the recipient has seen the message.
TEMPLATE_UPDATEProvides updates when a message template changes.

To set up event notifications, use the Subscriptions management API, where you can define subscription rules specifying which events to track and which webhooks should receive notifications. You can create multiple subscriptions to manage different events or route notifications to different webhooks.

For more details, refer to the Subscriptions management page.



Delivery reports

Use the API to track the performance of your communications. The following reports are forwarded to a defined endpoint:

Alternatively, you can specify the endpoint for each message by using the notifyURL parameter. This allows you to customize where message status reports are sent for individual messages, overriding any global configuration settings.



Dynamic template button URLs with shortening and tracking

WhatsApp message templates support two types of button URLs:

  • Static URLs: Fully registered with Meta, including all parameters.
  • Dynamic URLs: More flexible. You must still register the domain with Meta, but you can define placeholder parameters that are populated using the Infobip WhatsApp API when sending the message.

A template can include a maximum of 10 buttons. However, you can only add up to two dynamic button URLs.

You can shorten and track dynamic button URLs when creating templates over the API.

To enable this feature, ensure that during template creation you:

  1. Register a custom domain.
  2. Add the domain under the shorteningOptions object.
  3. For dynamic URLs, add a placeholder (for example, {{1}}) at the end of the URL inside the template structure.

After the template is registered and you are ready to send it:

  • For dynamic links, define the placeholder value and add the custom domain under urlOptions.
  • For static links, no additional configuration is required.

Each link is assigned a dynamic ID when the message is sent. This allows Infobip to track customer clicks.

For more information on setting up URL shortening, refer to the URL shortening and tracking page.

WhatsApp over API - Shortened URL

You can use the following sample request to create a WhatsApp message template with a trackable shortened button URL:



The shorteningOptions object defines the URL shortening settings for the template, including the customDomain property, which is necessary for generating trackable shortened URLs. Do not to modify this object outside the Infobip system, as this could result in errors.

Similarly, you can also send a template with a trackable shortened button URL.



IMPORTANT

When you send a template message request, the customDomain must match the domain used during template creation. Otherwise, the request will fail.



Application and entity assignment [#application-and-entity-assignment-message-templates]

You can assign applicationId and entityId to templates during creation, editing, and retrieval, making the process of managing templates assigned to specific applications or entities flexible.



To learn more about applications and entities, refer to the Application and entity management article.



Supported template languages

Below is the full list of supported languages and their corresponding ISO codes. For languages with regional variations, expand the sections to see all available codes.


Other supported languages

This list includes all other supported languages with a single available code.

LanguageCodeLanguageCode
AfrikaansafAlbaniansq
AzerbaijaniazBelarusianbe_BY
BulgarianbgCatalanca
CroatianhrCzechcs
DanishdaDariprs_AF
EstonianetFilipinofil
FinnishfiGeorgianka
GreekelGujaratigu
HausahaHebrewhe
HindihiHungarianhu
IndonesianidIrishga
ItalianitJapaneseja
KannadaknKazakhkk
Kinyarwandarw_RWKoreanko
Kyrgyz (Kyrgyzstan)ky_KGLaolo
LatvianlvLithuanianlt
MacedonianmkMalayms
MalayalammlMarathimr
NorwegiannbPashtops_AF
PersianfaPolishpl
PunjabipaRomanianro
RussianruSerbiansr
Sinhalasi_LKSlovaksk
SlovenianslSwahilisw
SwedishsvTamilta
TeluguteThaith
TurkishtrUkrainianuk
UrduurUzbekuz
VietnameseviZuluzu


Ready to integrate WhatsApp API?

Get started with Infobip's WhatsApp API and build powerful messaging experiences.



Related pages

Send WhatsApp messages in Infobip solutions
Send messages through Broadcast, Moments, Conversations, or the API.

Reports and insights
Track delivery, seen events, and message analytics.

Manage your WhatsApp integration
Learn about messaging windows, quality ratings, and messaging limits.




Was this page helpful?