Unblock WhatsApp User Numbers

DELETE Method

The Unblock WhatsApp User Numbers API allows you to programmatically unblock one or more WhatsApp user mobile numbers, allowing them to send again incoming messages. Also, after you unblock the user numbers, you can send them again outgoing messages.

📘

Note:

You can unblock the WhatsApp user numbers that were earlier blocked from your Kaleyra account. Any numbers blocked from different system cannot be unblocked from your kaleyra account.

Prerequisites

  1. 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.
  2. To set up a WhatsApp account on Kaleyra platform, see Manual Signup and Embedded Signup.
  3. An active WhatsApp plan for Business API that includes:
    • A WhatsApp business number.
    • An associated profile with the business number.
    • A WhatsApp verified and approved profile.

Base URL

https://<api_domain>/v2/<SID>

📘

Note:

If you are using WhatsApp V1 version, use https://<api_domain>/v1/<SID> endpoint.

API Domain and Value

api_domainValue
IN podapi.in.kaleyra.io
SG Podapi.ap.kaleyra.io
EU Podapi.eu.kaleyra.io
NA podapi.na.kaleyra.ai

API request to Unblock WhatsApp User Numbers

To unblock WhatsApp user numbers, use https://<api_domain>/v2/<sid>/whatsapp/<phone_number>/block_users endpoint with the following request method.

Request Format

The following is the request format to unblock WhatsApp user numbers:

curl --location --request DELETE 'https://<api-domain>/v2/<SID>/whatsapp/<phone_number>/block_users' \
-H 'api-key: <api-key>' \
-H 'Content-Type: <content-type>' \
-d '{
    "messaging_product": "<messaging_product>",
    "block_users": [
        {
            "user": "<phone_number>"
        },
        {
            "user": "<phone_number1>"
        },
        {
            "user": "<phone_number2>"
        }
    ]
}'

Sample Request Format

The following is the sample request format to unblock WhatsApp user numbers:

curl --location --request DELETE 'https://api.in.kaleyra.io/v2/HXAP16XXXXXX97IN/whatsapp/14094128XXXXXXXX/block_users' \
-H 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3' \
-H 'Content-Type: application/json' \
-d '{
    "messaging_product": "whatsapp",
    "block_users": [
        {
            "user": "+9194070XXXXX"
        },
        {
            "user": "+919863XXXXX"
        },
        {
            "user": "+918074XXXXX"
        }
    ]
}'

URL Parameters and Headers

The following is the list of parameters and headers to unblock WhatsApp user numbers:

Parameter / HeadersData TypeDescriptionExampleMandatory?
sidStringAccount SID (Security Identifier).HXAP16XXXXXX97INYes
api-keyStringAPI key generated from Kaleyra account.Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3Yes
Content-TypeStringIndicates the format of the content the API will be processing.The only allowed value is application/json.Yes
phone_numberStringIndicates the phone number for which you want to unblock user’s mobile numbers.14094128XXXXXXXXYes

The following is the list of attributes to be used in the payload to unblock WhatsApp user numbers:

Parameter / HeadersData TypeDescriptionExampleMandatory?
messaging_productStringThe platform being used for messaging.The only allowed value is whatsapp.Yes
block_usersArrayAn array of elements representing the WhatsApp user mobile numbers to be blocked.See the specific table for details.Yes

The following table describes the attribute used for the block_users array:

ParameterData TypeDescriptionExampleMandatory?
userStringThe phone number in E.164 format of the WhatsApp user you want to unblock.+919863XXXXXYes

Sample Success Response

If all the passed user mobile numbers are removed from the block list, the following success message is returned with the status 200 Accepted:

{
    "code": "WA200",
    "message": "Request Processed Successfully",
    "data": {
        {
          "block_users": {
            "removed_users": [
              {
                "input": "+9194070XXXXX",
                "wa_id": "9194070XXXXX"
              },
              {
                "input": "+919863XXXXXX",
                "wa_id": "919863XXXXXX"
              },
              {
                "input": "+91807XXXXXXX",
                "wa_id": "91807XXXXXXX"
              }
            ]
          },
        "messaging_product": "whatsapp"
      }
    },
    "error": {}
}

Sample Failure Responses

The following are the failure responses:

WABA and WhatsApp Phone Number Check

401 Unauthorized WABA
{
    "code": "WA401",
    "message": "The phone number you're using not active",
    "data": {},
    "error": {
        "phone_number": "The phone number you're using not active"
    }
}
401 Unauthorized Phone Number Status
{
    "code": "WA401",
    "message": "Phone number is not present or does not belong to the account.",
    "data": {},
    "error": {
        "phone_number": "Phone number is not present or does not belong to the account."
    }
}

API Key and SID validations

401 Unauthorized
{
    "code": "RBC001",
    "message": "Incorrect SID or API key.",
    "data": [],
    "error": {
        "error": "Incorrect SID or API key."
    }
}

Payload Validations

400 Incorrect payload
{
    "code": "WA400",
    "message": "Refer to correct payload format",
    "data": {},
    "error": {
        "payload": "Incorrect payload format"
    }
}

Internal Server Errors

500 Internal Server Error
{
    "code": "WA500",
    "message": "Please try again later",
    "data": {},
    "error": {
        "error": "Internal server error"
    }
}

Errors while removing user’s number from the blocklist on Meta side

200 OK Status
{
    "code": "WA-200",
    "message": "Request Processed Successfully",
    "data": {
        "block_users": {
            "added_users": [],
            "failed_users": [
                {
                    "errors": [
                        {
                            "code": 131XXX,
                            "error_data": {
                                "details": "Failed to block due to re-engagement check failed"
                            },
                            "message": "Re-engagement check failed"
                        }
                    ],
                    "input": "+919456XXXXXX"
                }
            ]
        },
        "errors": {
            "code": 139XXX,
            "error_data": {
                "details": "Failed to block some users, see the block_users response list for details"
            },
            "message": "(#139XXX) Failed to block/unblock users",
            "type": "OAuthException"
        },
        "messaging_product": "whatsapp"
    },
    "error": {}
}






© 2025 Kaleyra Inc. All rights reserved.
Trademarks, logos and service marks displayed on this site are registered and unregistered trademarks of Kaleyra Inc.