Unblock User

Description
This API allows businesses to unblock previously blocked WhatsApp users, enabling re-engagement and two-way messaging between the user and your WhatsApp Business Account.

Use Cases:

  • Reinstating users who were blocked accidentally.
  • Restoring user access after a support resolution.
  • Manage dynamic block/unblock workflows via automation.

Endpoints

POST {{api_front_url}}/wa/app/{{appId}}/user/unblock

cURL Request

curl --location '{{api_front_url}}/wa/app/{{appId}}/user/unblock' \
--header 'apikey: {{apiKey}}' \
--header 'Content-Type: application/json' \
--data '{
    "messaging_product": "whatsapp",
    "block_users": [
        {
            "user": "919163805873"
        }
    ]
}'

Request Parameters

KeyDescriptionConstraints
Headers
apikeyApikey of appShould be a valid gupshup.io apikey
Path Params
appIdappId of the appShould be a valid appId
Body Params
block_usersList of users that need to be unblocked

Response Parameters

KeyDescriptionConstraints
inputPhone number of a WhatsApp user
wa_idUnique ID of a WhatsApp user

Status Codes

Status CodeResponseComments
Success
200{
"block_users": {
"removed_users": [
{
"input": "919163805873",
"wa_id": "919163805873"
}
]
},
"messaging_product": "whatsapp",
"status": "success"
}
Error
400{
"messaging_product": "whatsapp",
"block_users": {
"added_users": [
{
"input": "<PHONE_NUMBER> or <WA_ID>",
"wa_id": "<WA_ID>"
},
{
"input": "<PHONE_NUMBER> or <WA_ID>",
"wa_id": "<WA_ID>"
},
...
],
"failed_users": [
{
"input": "<PHONE_NUMBER> or <WA_ID>",
"wa_id": "<WA_ID>"
},
{
"input": "<PHONE_NUMBER> or <WA_ID>",
"wa_id": "<WA_ID>"
}
...
"errors": [{
"message": "",
"code": "",
401{
"message": "Authentication Failed",
"status": "error"
}
When API authentication fails.

Common Error Codes

CodeDescription
139100Failed to block/unblock some users
139103Internal error – retry the request
139101Blocklist limit reached
130429Rate limit hit