Graph API Version

Whats App Business Account

This page contains only the API reference. For more information on how to use the API, refer to the WhatsApp Business Management API documentation.

Reading

Returns the account information of a WhatsApp Business Account

Example

Graph API Explorer
GET /v3.3/{whats-app-business-account-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{whats-app-business-account-id}',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{whats-app-business-account-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{whats-app-business-account-id}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{whats-app-business-account-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

FieldDescription
id
numeric string

ID

analytics

Analytics data of the WhatsApp Business Account

currency
string

The currency in which the payment transactions for the WhatsApp Business Account will be processed

eligible_for_sending_notifications
bool

Whether or not the WhatsApp Business Account is eligible for sending notifications

ineligible_for_sending_notifications_reason
string

The reason why the WhatsApp Business Account is ineligible for delivery \nThis field will be null when the eligible_for_sending_notifications field is false

message_template_namespace
string

Namespace string for the message templates that belong to the WhatsApp Business Account

name
string

User-friendly name to differentiate WhatsApp Business Accounts

on_behalf_of_business_info
WABAOnBehalfOfComputedInfo

The "on behalf of" information for the WhatsApp Business Account

status
string

Status of the WhatsApp Business Account Default: ACTIVE

timezone_id
string

The timezone of the WhatsApp Business Account

Edges

EdgeDescription

Users and permissions assigned to the WhatsApp Business Account

Message templates that belong to the WhatsApp Business Account

The phone numbers that belong to the WhatsApp Business Account

Creating

You can make a POST request to message_templates edge from the following paths:
When posting to this edge, a WhatsAppBusinessAccount will be created.

Create a message template

Parameters

ParameterDescription
id
whatsapp business account ID

id

category
enum {ACCOUNT_UPDATE, PAYMENT_UPDATE, PERSONAL_FINANCE_UPDATE, SHIPPING_UPDATE, RESERVATION_UPDATE, ISSUE_RESOLUTION, APPOINTMENT_UPDATE, TRANSPORTATION_UPDATE, TICKET_UPDATE, ALERT_UPDATE}

Message template category

components
array<JSON object>

This is the new format for entering the content for the message template

language
string

The language (and locale) of the content

name
string

Name of the message template

Return Type

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
id: numeric string,
}

Updating

Deleting

You can dissociate a WhatsAppBusinessAccount from a WhatsAppBusinessAccount by making a DELETE request to /{whats_app_business_account_id}/message_templates.

Deleting a message template in a WhatsApp Business Account

Parameters

ParameterDescription
id
whatsapp business account ID

WhatsApp Business Account ID

name
string

Message Template Name

Return Type

Struct {
success: bool,
}