Blocklist
List blocked contacts
- Base URL
https://api.polymorfa.com- Required permission
sessions:read
Path parameters
versionstringrequiredSpecifies version for this path parameter.
phoneNumberIdstringrequiredIdentifier for the phone number.
Query parameters
limitstringpattern^[1-9][0-9]{0,4}$Specifies limit for this query parameter.
afterstringmax length512Specifies after for this query parameter.
beforestringmax length512Specifies before for this query parameter.
Responses
200Blocked users
dataarray of objectrequiredStructured data carried by this object.
Show 4 child fields
pagingobjectStructured paging values for this graph graph block users list response.
Show 1 child field
Show 3 headers
400Bad request
401Unauthenticated
403Permission error
404Object does not exist
429Rate limited
500Internal error
Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.
curl "https://api.polymorfa.com/graph/whatsapp/v26.0/<phoneNumberId>/block_users" \
-H "Authorization: Bearer YOUR_API_KEY"{
"data": [
{
"messaging_product": "whatsapp",
"wa_id": "string",
"user_id": "string",
"parent_user_id": "string"
}
]
}Block
- Base URL
https://api.polymorfa.com- Required permission
messages:write
Path parameters
versionstringrequiredSpecifies version for this path parameter.
phoneNumberIdstringrequiredIdentifier for the phone number.
Body
messaging_productstringAlways
whatsapp. Added when omitted.Allowed valueswhatsappblock_usersarray of objectrequireditems1–10001 to 1,000 people.
Show 2 child fields
Responses
200Block result
messaging_productstringMessaging product associated with this Graph API object.
Allowed valueswhatsappblock_usersobjectrequiredStructured block users values for this graph graph block users response.
Show 3 child fields
Show 3 headers
400Bad request
401Unauthenticated
403Permission error
404Object does not exist
429Rate limited
500Internal error
Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.
curl -X POST "https://api.polymorfa.com/graph/whatsapp/v26.0/<phoneNumberId>/block_users" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"block_users": [
{
"user": "+16505551234",
"user_id": "US.13491208655302741918"
}
]
}'{
"block_users": {
"added_users": [
{
"input": "string",
"wa_id": "string",
"user_id": "string"
}
],
"removed_users": [
{
"input": "string",
"wa_id": "string",
"user_id": "string"
}
],
"failed_users": [
{
"input": "string",
"wa_id": "string",
"user_id": "string",
"errors": [
{
"message": "string",
"code": 131047,
"error_data": {
"details": null
}
}
]
}
]
}
}Unblock
- Base URL
https://api.polymorfa.com- Required permission
messages:write
Path parameters
versionstringrequiredSpecifies version for this path parameter.
phoneNumberIdstringrequiredIdentifier for the phone number.
Body
messaging_productstringAlways
whatsapp. Added when omitted.Allowed valueswhatsappblock_usersarray of objectrequireditems1–10001 to 1,000 people.
Show 2 child fields
Responses
200Unblock result
messaging_productstringMessaging product associated with this Graph API object.
Allowed valueswhatsappblock_usersobjectrequiredStructured block users values for this graph graph block users response.
Show 3 child fields
Show 3 headers
400Bad request
401Unauthenticated
403Permission error
404Object does not exist
429Rate limited
500Internal error
Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.
curl -X DELETE "https://api.polymorfa.com/graph/whatsapp/v26.0/<phoneNumberId>/block_users" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"block_users": [
{
"user": "+16505551234",
"user_id": "US.13491208655302741918"
}
]
}'{
"block_users": {
"added_users": [
{
"input": "string",
"wa_id": "string",
"user_id": "string"
}
],
"removed_users": [
{
"input": "string",
"wa_id": "string",
"user_id": "string"
}
],
"failed_users": [
{
"input": "string",
"wa_id": "string",
"user_id": "string",
"errors": [
{
"message": "string",
"code": 131047,
"error_data": {
"details": null
}
}
]
}
]
}
}