Block / Unblock a Contact
View all WhatsApp Messaging API endpoints →Block or unblock a phone number. Send a JSON body with phone (the full international number, JSON number, digits only) and action (block or unblock). Returns the updated blocklist. Use it to automatically shut out spam or reinstate a contact.
API Features
Block or unblock One endpoint handles both adding and removing a block
By number Target a contact using the full international phone number
Updated list Returns the refreshed blocklist after the change
Live API Demo
🔒 Sign in to try it live
Log in to call this API with your own API key. New accounts get 100 free credits — no card required.
Log in / Sign upNo active API key found. Create one in your Dashboard, then reload this page. Dashboard →
PUT
/api/project/whatsapp-messaging/update-blocklist API Response (JSON)
{} curl -X PUT 'https://api.opendata-api.com/api/project/whatsapp-messaging/update-blocklist?key=<API_KEY>&sessionId=<sessionId>' \
-H 'Content-Type: application/json' \
-d '{"body":"{\"phone\":8613800138000,\"action\":\"block\"}"}'
curl -X PUT 'https://api.opendata-api.com/api/project/whatsapp-messaging/update-blocklist?key=<API_KEY>&sessionId=<sessionId>' \
-H 'Content-Type: application/json' \
-d '{"body":"{\"phone\":8613800138000,\"action\":\"block\"}"}' Query Result
Need Help?
If you encounter API issues or need other API requirements, please contact us.
Use Cases
- Auto-block numbers flagged as spam or abuse
- Unblock a customer after a dispute is resolved
- Enforce a moderation policy programmatically