WhatsApp
WhatsApp over API

Integrate WhatsApp using the Infobip API


The Infobip WhatsApp API (opens in a new tab) is a scalable solution that enables businesses to programmatically send and receive messages by integrating WhatsApp as their communication channel. It provides a reliable way to interact with customers over WhatsApp, while maintaining data protection and compliance through end-to-end encryption.

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



What you can do with the WhatsApp API

Use the Infobip WhatsApp API (opens in a new tab) 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:



Event subscription

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.
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 users.
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 (opens in a new tab), 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.



Static and 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 static or dynamic button URLs when creating templates over the API (opens in a new tab).

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, define the path as a placeholder 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. It is advisable 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

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.



Ready to integrate WhatsApp API?

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

(opens in a new tab)






Need assistance

Explore Infobip Tutorials

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary
Service status

Copyright @ 2006-2025 Infobip ltd.

Service Terms & ConditionsPrivacy policyTerms of use