This API endpoint allows you to unblock one or more WhatsApp users who were previously blocked from sending messages to your WhatsApp Business application. Unblocking restores messaging capabilities, allowing users to send messages again and your app to receive messages from them. This reverses the effect of the block operation.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Request Parameters
| Key | Description | Value | Data type | Required/Optional | Constraints |
|---|---|---|---|---|---|
| Authorization | Access Token for the application | {{PARTNER_APP_TOKEN}} | String | Required | Should be a valid Partner App Access Token |
| appId | App ID to fetch the access token | {{APP_ID}} | String | Required |
|
| messaging_product | String | Required | Messaging service used for the request. Must be "whatsapp". Cloud API only. | ||
| block_users | Object | Required | List of user(s) to block. Each element contains a user field. | ||
| user | String | Required | The phone number or WhatsApp ID to be blocked. |
Sample Request
curl --location 'https://partner.gupshup.io/partner/app/{{APP_ID}}/user/unblock' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"block_users": [
{
"user": "<PHONE_NUMBER>"
}
]
}'Sample Response
{
"block_users": {
"removed_users": [
{
"input": "919163805873",
"wa_id": "919163805873"
}
]
},
"messaging_product": "whatsapp",
"status": "success"
}
Status Codes
| Status Code | Response | Comments |
|---|---|---|
| Success | ||
| 200 | { "block_users":{"removed_users":[{ | |
| Error | ||
| 400 | { "messaging_product": "whatsapp", "block_users": { |