The WhatsApp Business Management API allows you to create and manage business assets.
The WhatsApp Business Management API is based on
Meta's Marketing Business Management API
. This API follows some slightly different rules around versioning but uses the same technical infrastructure and authentication framework. This guide is a brief introduction to making API calls and some architectural decisions you will need to make when building your integration.
To use this API, you need:
business_management
permission
Before you start writing your own code for API calls, we recommend using the
Graph API Explorer tool
to test API calls to these endpoints.
To get information about a business, send a GET
request to the WhatsAppBusinessAccount
endpoint where WHATSAPP-BUSINESS-ACCOUNT-ID
is your WhatsApp Business Account ID.
curl -i -X GET
"https://graph.facebook.com/v14.0
/WHATSAPP-BUSINESS-ACCOUNT-ID
?access_token=ACCESS-TOKEN"
{ "id": "WHATSAPP-BUSINESS-ACCOUNT-ID", "name": "Your WhatsApp Business Account Name", "timezone_id": "1", "message_template_namespace": "05155c78_261e_4b2f_82b3_d7958d4cf75f" }
To get specific information about a business, such as name, message templates and phone numbers, send a GET
request to the WhatsAppBusinessAccount
endpoint where WHATSAPP-BUSINESS-ACCOUNT-ID
is your WhatsApp Business Account ID and set the fields
parameter to a list of items you would like returned.
curl -i -X GET "https://graph.facebook.com/<latest-api-version/>/WHATSAPP-BUSINESS-ACCOUNT-ID ?fields=id,name,message_templates,phone_numbers &access_token=ACCESS-TOKEN"
{ "id": "WHATSAPP-BUSINESS-ACCOUNT-ID", "name": "Your WhatsApp Business Account Name", "message_templates": { "data": [ { "name": "hello_world", "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hello World" }, { "type": "BODY", "text": "Welcome and congratulations!! This message demonstrates your ability to send a message notification from WhatsApp Business Platform. Thank you for taking the time to test with us." }, { "type": "FOOTER", "text": "WhatsApp Business Team" } ], "language": "en_US", "status": "APPROVED", "category": "ACCOUNT_UPDATE", "id": "307191531401674" }, { "name": "sample_flight_confirmation", "components": [ { "type": "HEADER", "format": "DOCUMENT" }, { "type": "BODY", "text": "Confirmamos tu vuelo a {{1}}-{{2}} para el {{3}}." }, { "type": "FOOTER", "text": "Este mensaje proviene de un negocio no verificado." } ], "language": "es", "status": "APPROVED", "category": "TICKET_UPDATE", }, ...
Type of Call | Endpoint |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|