Support for the standalone WhatsApp API will end on September 30, 2023. New customers must use, and existing customers must migrate to, the WhatsApp channel of the Conversation API. Any migration must be completed prior to September 30, 2023.

WhatsApp Capability

Read how to discover if your users are capable of receiving messages via WhatsApp.

Capability endpoint

The Sinch WhatsApp API offers two endpoints where you can request the WhatsApp capability status for a list of numbers.

Note

Starting on March 28th, 2023, ensure your code avoids relying on the capable and waid parameter combinations returned by the Capability Check / Opt In, as they will always return the capable field set to true.

In general, we recommend not using the Capability Check altogether, except for high-throughput use cases (such as promotional message campaigns). For such use-cases, please use the Capability Check ahead of time to preload contact information.

Request

GET whatsapp/v1/{bot-id}/capability POST whatsapp/v1/{bot-id}/capability

JSON object parameters:

Name Description JSON Type Default Constraints Required
numbers List of MSISDNs String array N/A 1 to 20 elements Yes
Note

JSON object should be sent in Request Body although this is GET request

Sample

Copy
Copied
{
  "numbers": ["46732001122", "46732002244"]
}

Responses

200 OK

The response body is a JSON object with the following parameters:

Name Description JSON Type
capabilities List of capability statuses Array[Object]

Capability status

Name Description JSON Type
msisdn Msisdn String
waid WhatsApp account ID String
capable WhatsApp capability status boolean
Copy
Copied
{
  "capabilities": [
    {
      "msisdn": "46732001122",
      "waid": "46732001122",
      "capable": true
    },
    {
      "msisdn": "46732002244",
      "capable": false
    }
  ]
}

400 Bad Request

There was an error with your request. The body is a JSON object described in the introduction

401 Unauthorized

There was an authentication error with your request. Either you're using incorrect credentials or you're attempting to authenticate in a region where your bot doesn't reside. The body is a JSON object described in the introduction

500 Internal Server Error

There was an error with your request. The body is a JSON object described in the introduction

Request could not be processed means that the Request rate limit, which is 20 requests sent per second, has been exceeded.

We'd love to hear from you!
Rate this content:
Still have a question?
 
Ask the community.