Get Call Consent Status
Get Method
The Get Call Consent Status API allows you to get the consent details of end user mobile numbers for outbound voice calling for WhatsApp Business Numbers.
Prerequisites
- Know Your Customer (KYC) approval is mandatory. For more information on submission and approval, see Completing the Know Your Customer page.
- For prepaid customers, the credit balance should be sufficient to purchase numbers, make and receive calls, and monthly subscription charges. For more information on balance details, see Adding Credits page.
- You must have Proof of Business/Business Address and Proof of Identification (Individual/Company-Signatory) depending on the regulations of that particular region or country.
- Before you get started, Create an API Key. To view the API Key and the SID, see View API Key and SID.
A prerequisite for using Kaleyra WhatsApp APIs is to have an active WhatsApp plan on Kaleyra platform. - To set up a WhatsApp account on Kaleyra platform, see Manual Signup
and Embedded Signup. - An active WhatsApp for Business API plan that includes:
- A WhatsApp verified and approved profile.
- A WABA ID onboarded on Kaleyra WhatsApp API.
API Domain and Value
| api_domain | Value |
|---|---|
| IN pod | api.in.kaleyra.io |
| SG Pod | api.ap.kaleyra.io |
| EU Pod | api.eu.kaleyra.io |
| NA pod | api.na.kaleyra.io |
API Request to Get Call Consent Status
To get the call consent status of the end user numbers, use the https://<api_domain>/v2/<sid>/whatsapp/call_permissions endpoint with the following request method:
The following is the request format to get call consent status:
curl --location --request GET 'https://<api_domain>/v2/<sid>/whatsapp/call_permissions?business_phone_number=<business_phone_number>,<business_phone_number1>&user_phone_number=<user_phone_number>,<user_phone_number1>&limit=<limit>&offset=<offset>' \
--header 'api-key:<api-key>'The following is the sample request format to get call consent status:
curl --location --request GET 'https://api.in.kaleyra.io/v2/HXAP16XXXXXX97IN/whatsapp/call_permissions?business_phone_number=+9120XXXXX472,+9120XXXXX476&user_phone_number=+91XXXXXXXX95, +91XXXXXXXX96&limit=10&offset=2' \
--header 'api-key: AXXXXXXXXXXXXXXXXXXXXXXXXX3'URL Parameters and Headers
The following is the list of parameters and headers to send the outgoing message request:
| Parameter / Headers | Data Type | Description | Example | Mandatory? |
|---|---|---|---|---|
sid | String | Account SID (Security Identifier). | HXAP16XXXXXX97IN | Yes |
api-key | String | API key generated from kaleyra.io account. | AXXXXXXXXXXXXXXXXXXXXXXXXX3 | Yes |
The following is the list of attributes to be added to the query parameters to get call consent status API:
Parameter | Data Type | Description | Example | Mandatory? |
|---|---|---|---|---|
| String | WhatsApp business phone number for which you want to check the permissions. | +9120XXXXX472, +9120XXXXX476 | No |
| String | Phone number of the end user for which you want to check the permission to receive call by the WhatsApp Business Phone number. | +91XXXXXXXX95, +91XXXXXXXX96 | No |
| Integer | Limit the number of responses in output. Note: If the value is not provided, by default the value is set to 25. | 10 | No |
| Integer | Indicates the starting index in the list of fetched objects returned in the response. Note: If the value is not provided, it defaults to zero. | 2 | No |
Sample Success Response
The following is the sample success response.
{
"code": "WA200",
"message": "Request Processed Successfully",
"data": [
{
"business_phone_number": "+9120XXXXX472",
"user_phone_number": "+91XXXXXXXX95",
"can_perform_action": true,
"response": "accept",
"is_permanent": true,
"response_source": "user_action",
"expiration_timestamp": "2025-12-16T08:56:41Z"
}
],
"error": {},
"limit": 25,
"offset": 0,
"total": 1
}Response Parameters
The following is the list of parameters shown in the API response:
Parameter | Data Type | Description | Example |
|---|---|---|---|
code | String | The response code for the request was sent. | WA200 |
message | String | The response message corresponds to the response code. | Request Processed Successfully. |
data | Object | Array of the objects returned by the API response with details of the WhatsApp Business Phone Number returned. | See the specific table below for details. |
error | Array | The error list associated with the response. | |
limit | Integer | The number of templates shown in the GET response. The default value is 25. | 25 |
offset | Integer | Indicates the starting index in the list of fetched objects returned in the response. Note: If the value is not provided, it defaults to zero. | 0 |
total | Integer | The count of the phone numbers is recorded in the response output. | 1 |
Data object Parameters
The following is the list of parameters for Data object in the API response.
Parameter | Data Type | Description | Example | Mandatory? |
|---|---|---|---|---|
| String | The WhatsApp Business Phone number for which permission has been checked. | +9120XXXXX472 | Yes |
| String | The end-user Phone number for which the permission has been checked. | +91XXXXXXXX95 | Yes |
| Boolean | Indicates if the client can call the end user. | true | Yes |
| String | Indicates the response status. It is either set to | accept | Yes |
is_permanent | Boolean | Indicates if permission is permanent. | true | Yes |
| String | Source of the response. It is either | user_action | Yes |
| String | Timestamp after which the permission expires. Time to Live (TTL). | 2025-12-16T08:56:41Z | Yes |
Updated about 17 hours ago
