Everything an AI agent can do with the WhatsApp Business API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints19
API versionv25.0
Last updated23 June 2026
Orientation

How the WhatsApp Business API works.

The WhatsApp Business API is how an app or AI agent works with a WhatsApp business account: sending text, template, and interactive messages to customers, marking incoming messages as read, uploading and fetching media, and managing message templates. Access is granted through an access token and a set of Meta permissions, where one permission covers sending messages and another covers managing the account, so an agent reaches only what its token allows. WhatsApp can also push events to a webhook when a customer replies or a sent message is delivered or read.

19Endpoints
6Capability groups
6Read
13Write
2Permissions
Authentication
Every call carries an access token in an 'Authorization: Bearer ' header, sent to Meta's Graph API. Several token types exist: a system user access token that can be set to never expire is recommended for production, a business integration token is used by providers onboarding many customers, a user access token suits login flows, and a temporary token from the App Dashboard lasts about 24 hours for testing.
Permissions
Two Meta permissions split the API. whatsapp_business_messaging covers sending messages, marking them read, and handling media. whatsapp_business_management covers managing the account: phone numbers, the business profile, message templates, and webhook subscriptions. A token granted only the messaging permission can send but cannot change templates or numbers, which keeps sending separate from account control.
The 24-hour window
When a customer messages a business, a 24-hour customer service window opens, during which the business can reply with free-form messages, and it resets on each new customer message. Outside that window a business can only reach a customer with a message template that Meta has approved. A free-form message sent after the window has closed returns error 131047.
Data model
The API is organised around two IDs. A phone number ID is used for sending messages, handling media, and reading or updating that number's business profile. A business account ID, the entity that holds a number, is used for listing numbers, managing templates, and subscribing an app to webhooks. Calls run through Meta's Graph API at https://graph.facebook.com, and customer replies and delivery updates are pushed back through webhooks.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to WhatsApp Business determines what it can reach. Calls go through Meta's Graph API with an access token, and the permissions that token carries decide what it can send and manage.

Ways to connect

Cloud API (Graph API)

The Cloud API answers through Meta's Graph API at https://graph.facebook.com, hosted by Meta so there is no server to run. Messaging and media calls go through a phone number ID, and account management calls through a business account ID.

Best forConnecting an app or AI agent to WhatsApp Business.
Governed byThe access token and the Meta permissions it carries.
Docs ↗

Webhooks

Webhooks deliver inbound customer messages and the status of sent messages to a callback URL once an app is subscribed to a business account. The X-Hub-Signature-256 header on each delivery, an HMAC of the body with the app secret, confirms it came from Meta.

Best forReceiving customer replies and delivery updates without polling.
Governed byThe access token and the Meta permissions it carries.
Docs ↗
Authentication

System user access token

A system user access token belongs to an automated service in Business Manager and can be set to never expire, so it suits a production integration that runs unattended. It carries whichever Meta permissions are granted to it.

TokenSystem user access token
Best forProduction integrations that run unattended
Docs ↗

Business integration system user token

A business integration system user token is generated through Embedded Signup for a tech or solution provider, scoped to each onboarded customer's business account. It is the route for connecting many customers' WhatsApp accounts.

TokenBusiness integration system user token
Best forProviders onboarding many customers
Docs ↗

User access token

A user access token is obtained through Facebook Login for Business and acts for a person who has granted the app access. It is short-lived unless exchanged for a long-lived token, and suits onboarding flows.

TokenUser access token
Best forOnboarding and login flows
Docs ↗

Temporary access token

A temporary access token shown in the App Dashboard lasts about 24 hours and is meant for development and testing, not for production traffic.

TokenTemporary access token
Best forDevelopment and testing
Docs ↗
Capability map

What an AI agent can do in WhatsApp Business.

The WhatsApp Cloud API is split into areas an agent can act on, such as sending messages, handling media, managing phone numbers, the business profile, and message templates. Each area carries its own permission, and sending messages is separated from managing the account.

Endpoint reference

Every WhatsApp Business API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Messages

Send text, template, media, interactive, location, contact, and reaction messages to a customer, and mark an incoming message as read.2

The message type is set in the request body. Free-form messages are only allowed inside the 24-hour window that opens when a customer messages first; outside it, an approved template is required.

Acts onmessage
Permission (capability)whatsapp_business_messaging
VersionAvailable since the API’s base version
Webhook eventmessages
Rate limit80 messages/sec per number by default

Uses the same endpoint as sending, with the body set to status: read and the message_id of the received message. Adding a typing_indicator object shows the customer that a reply is being written.

Acts onmessage
Permission (capability)whatsapp_business_messaging
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Media

Upload a media file to get a reusable ID, fetch the download URL for a received file, and delete an uploaded file.3

An uploaded file is held on WhatsApp's servers for 30 days, after which it must be uploaded again.

Acts onmedia
Permission (capability)whatsapp_business_messaging
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The returned URL is valid for 5 minutes and the download itself must carry the same access token.

Acts onmedia
Permission (capability)whatsapp_business_messaging
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Removes the file from WhatsApp's servers before its 30-day expiry.

Acts onmedia
Permission (capability)whatsapp_business_messaging
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Phone numbers

List the numbers on a business account, read a single number, register or deregister a number for the Cloud API, and request and confirm a verification code.6

Specific fields are requested through the fields query parameter.

Acts onphone number
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The business account is the entity that holds a number, its templates, and its settings.

Acts onphone number
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The request includes the two-step verification PIN for the number. A number cannot send through the Cloud API until it is registered.

Acts onphone number
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

After deregistering, the number can no longer send or receive through the Cloud API until it is registered again.

Acts onphone number
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

The delivery method and language are set in the request. This is the first step of moving a number onto the Cloud API.

Acts onphone number
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Confirms ownership of the number before it can be registered.

Acts onphone number
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Business profile

Read and update the public business profile shown on a number, such as its description, address, email, and website.2

The fields query parameter selects which profile fields are returned.

Acts onbusiness profile
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Changes the description, address, email, websites, profile picture, and vertical that customers see.

Acts onbusiness profile
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Message templates

Create a message template for Meta to approve, list the templates on a business account, and delete a template.3

A template carries a name, language, and category (marketing, utility, or authentication), and must be approved before it can be sent. A business account allows up to 100 template creations per hour.

Acts onmessage template
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limit100 templates per WABA per hour

Each template returns its status, such as approved, pending, or rejected.

Acts onmessage template
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Passing the name query parameter deletes every language version; passing hsm_id with name deletes a single language version.

Acts onmessage template
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Webhook subscription

Subscribe an app to a business account's webhooks, list the subscribed apps, and remove a subscription.3

Until an app is subscribed to the business account, no webhook events are delivered, even when a callback URL is configured.

Acts onsubscribed app
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Confirms which app is set to receive a number's messages and statuses.

Acts onsubscribed app
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

After this, the app stops receiving the business account's events.

Acts onsubscribed app
Permission (capability)whatsapp_business_management
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply
No endpoints match those filters.
Webhooks

Webhook events.

WhatsApp can notify an app or AI agent when a customer sends a message or when a sent message changes state, instead of the app repeatedly asking. Meta posts the event to a webhook URL once an app is subscribed to the business account.

EventWhat it signalsTriggered by
messagesFires when a customer sends a message to the business number, and also when a message the business sent changes state, such as sent, delivered, read, or failed. Both arrive under the single messages subscription field./{PHONE_NUMBER_ID}/messages
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

WhatsApp limits how many people a number can start a conversation with and how fast it can send, through a tier of unique customers per 24 hours and a separate per-second throughput ceiling.

Request rate

WhatsApp limits how many people a number can start a conversation with through messaging tiers, counted as unique customers a business contacts in a rolling 24 hours: 250, then 1,000, 10,000, 100,000, and unlimited. A new number starts at 250, business verification raises it to 1,000, and a number climbs the tiers automatically as it sends to more unique people while keeping a good quality rating. Since October 2025 these tiers apply across a business portfolio rather than a single number. Separately, throughput is capped at 80 messages per second per number by default, and an eligible high-tier number can be upgraded automatically to 1,000 per second. Quality matters on top of volume: a low quality rating, driven by blocks and reports, can block tier upgrades and throttle sending.

Pagination

List endpoints use cursor-based pagination through Meta's Graph API. A response carries a paging object with cursors.before and cursors.after, and a next and previous URL where more pages exist. The next URL should be followed until it is absent, rather than building the URL by hand. The limit query parameter caps how many items a page returns, and a page may hold fewer than the limit, so the presence of a next link is what signals more data.

Request size

Requests and responses are JSON over HTTPS. Media size limits depend on the type, for example up to 5 MB for an image and up to 100 MB for a document, and an uploaded media ID is held for 30 days. A message template has a body limit of 1,024 characters, and a business account allows up to 100 template creations per hour.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
4010: AuthExceptionThe request could not be authenticated. The access token is missing, invalid, or expired.Send a valid, unexpired access token in the Authorization header.
4033: API methodThe token does not carry the permission needed for this call, or the capability is not enabled.Grant the right permission, whatsapp_business_messaging for sending or whatsapp_business_management for account changes.
400100: Invalid parameterA parameter in the request is missing, malformed, or not allowed for this call.Check the request against the reference for the endpoint and correct the named field.
400131026: Message undeliverableThe message could not be delivered. Common causes are that the recipient is not a WhatsApp user, has not accepted updated terms, or is on an old version, and Meta does not always say which.Confirm the number is on WhatsApp, and do not retry the same message in a tight loop.
400131047: Re-engagement messageA free-form message was sent more than 24 hours after the customer's last reply, so the customer service window has closed.Send an approved template message instead, which can reach a customer outside the 24-hour window.
400131056: Pair rate limitToo many messages were sent to the same recipient from the same number in a short time.Slow the rate of messages to that recipient and retry after a short wait.
400132001: Template does not existThe named template is not found in the business account, or the name or language does not match an approved template.Check the template name and language against the approved templates on the business account.
400133010: Not registeredThe phone number has not been registered for the Cloud API, so it cannot send.Register the number through the register method before sending.
42980007: Rate limit hitA business account rate limit was reached for messaging or management calls.Reduce the request rate and retry after a short wait.
Versioning & freshness

Version history.

The Graph API behind WhatsApp Business is versioned by number, and the newest version is v25.0, released on 18 February 2026. Each version is supported for about two years before it expires.

Version history

What changed, and when

Latest versionv25.0
v25.0Current version
Graph API v25.0

Version v25.0 is the newest version of the Graph API behind WhatsApp Business. The API is versioned by number in the request path, and each version is supported for about two years before it expires, so an integration can pin a version and move up on its own schedule. It was released on Wednesday 18 February 2026.

What changed
  • Newest Graph API version available to WhatsApp Cloud API calls
  • Versions are pinned in the request path, for example /v25.0/
v24.0
Graph API v24.0

Version v24.0 was released on Wednesday 8 October 2025. Around this period messaging limits moved to apply across a business portfolio rather than a single phone number.

What changed
  • Messaging tiers began applying across a business portfolio rather than per number
v23.0
Graph API v23.0

Version v23.0 was released on Thursday 29 May 2025.

What changed
  • Graph API version released in May 2025
v22.0
Graph API v22.0

Version v22.0 was released on Tuesday 21 January 2025. In mid-2025 WhatsApp Business messaging moved from conversation-based pricing to per-message pricing, charged per delivered template by category and country.

What changed
  • Per-message pricing replaced conversation-based pricing on 1 July 2025
v21.0
Graph API v21.0

Version v21.0 was released on Wednesday 2 October 2024. From 1 November 2024, service conversations, the free-form replies inside the 24-hour window, became free with no monthly cap.

What changed
  • Service conversations became free with no monthly cap from 1 November 2024

An integration can pin a version in the request path and move up on a schedule that suits it.

WhatsApp Business Platform changelog ↗
Questions

WhatsApp Business API, answered.

What is the 24-hour customer service window?+
When a customer sends a message to a business, a 24-hour window opens during which the business can reply with free-form messages, such as text, media, or interactive messages, with no per-message charge for the service conversation. The window resets each time the customer sends a new message. Once it closes, the business can only reach that customer with a pre-approved message template, and a free-form message sent after it closes returns error 131047.
Which permission does an agent need, messaging or management?+
It depends on the call. Sending messages, marking them read, and uploading or fetching media need whatsapp_business_messaging. Managing the account, which means phone numbers, the business profile, message templates, and webhook subscriptions, needs whatsapp_business_management. A token granted only the messaging permission can send messages but cannot create templates or register numbers, so the two can be kept separate.
Why do I need a message template, and does it have to be approved?+
A message template is required to start a conversation with a customer or to message them outside the 24-hour service window. Templates are submitted to Meta and must be approved before they can be sent, and each carries a category of marketing, utility, or authentication. A business account allows up to 100 template creations per hour, and a template can be paused or rejected based on quality.
What are the messaging limits, and how does a number raise them?+
Messaging tiers cap how many unique customers a business can start a conversation with in a rolling 24 hours: 250, then 1,000, 10,000, 100,000, and unlimited. A new number starts at 250 and business verification raises it to 1,000. A number then climbs automatically as it sends to more unique people while keeping a good quality rating. Throughput is separate, capped at 80 messages per second per number by default, upgradable to 1,000 per second for an eligible high-tier number.
How does an agent receive customer replies instead of polling?+
Through webhooks. A callback URL and a verify token are set in the App Dashboard, and the app is subscribed to the business account through the subscribed apps method. Meta then posts inbound customer messages and the status of sent messages, such as delivered or read, to the callback URL, both under the messages field. Each delivery is signed with an X-Hub-Signature-256 header, an HMAC of the body keyed with the app secret, which confirms it came from Meta. Without subscribing the app, no events arrive.
Is the On-Premises API still an option?+
No. The On-Premises API has been sunset, with its final client version expiring on 23 October 2025, so the Cloud API hosted by Meta is the route for new and existing integrations. The Cloud API removes the need to run a server, and is the API this reference covers.
How is WhatsApp Business messaging priced?+
Pricing moved from conversation-based to per-message pricing on 1 July 2025. A business is charged per delivered template message, priced by the template category, which is marketing, utility, or authentication, and by the recipient's country. Service conversations, the free-form replies inside the 24-hour customer service window, have been free with no monthly cap since 1 November 2024.
Related

More communication API guides for agents

What is Bollard AI?

Control what every AI agent can do in WhatsApp Business.

Bollard AI sits between a team's AI agents and WhatsApp Business. Grant each agent exactly the access it needs, read or write, action by action, and every call is checked and logged.

  • Set read, write, or full access per agent, never a shared WhatsApp token.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
WhatsApp Business
Support Agent
Send template messages ActionOffReadFull use
Read message status ResourceOffReadFull use
Manage message templates ResourceOffReadFull use
Register phone numbers ActionOffReadFull use
Per-agent access, set in Bollard AI, not in WhatsApp