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.
Text
POST https://api.gupshup.io/wa/app/{{appId}}/user/unblock
cURL
curl --location 'https://api.gupshup.io/wa/app/{{appId}}/user/unblock' \
--header 'apikey: {{apiKey}}' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"block_users": [
{
"user": "919163805873"
}
]
}'
Key Description Constraints Headers apikey Apikey of app Should be a valid gupshup.io apikey Path Params appId appId of the app Should be a valid appId Body Params block_users List of users that need to be unblocked
Key Description Constraints input Phone number of a WhatsApp user wa_id Unique ID of a WhatsApp user
Status Code Response Comments 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>"
}
]
},
"error": {
"message": "(#139100) Failed to block/unblock users",
"type": "OAuthException",
"code": 139100,
"error_data": {
"details": "Failed to block some users, see the block_users response list for details"
},
"fbtrace_id": "<FBTRACE_ID>"
}
}401 {
"message": "Authentication Failed",
"status": "error"
}When API authentication fails.
Code Description 139100 Failed to block/unblock some users 139103 Internal error – retry the request 139101 Blocklist limit reached 130429 Rate limit hit