Black List (block)
This endpoint allows you to block, unlock and get list of blocked WhatsApp user number.
What happens here?
Sometimes you wish to block a contact number (WhatsApp number) from sending you a message for any kind of reasons.
When you do this, this will happen:
The user cannot contact your WhatsApp number at all, they won't be able to send you any message (they will see 1 grey check mark).
You can't message that user too. if you try to send, you will get error.
More Remarks
You can only block users that have messaged you in the last 24 hours.
Maximum limit is 64,000 numbers that you can have in your "block list".
Best Practice - how to use
This blacklist can be used for example when you send a template to the user, with one of the buttons being "Unsubscribe", when the user clicks on it you can add him to the block list. This endpoint is not only blocking incoming, but also outgoing messages, it will prevent from your end any future templates you might accidentally trying to send to him again. a real blacklist.
Another use case - if a client sends you unwanted messages (or files), triggering your chat bot or other process and integrations, you can stop his messages by blocking his number.
Block
This endpoint allows you to block a number.
Settings:
URL | |
Method | JSON via POST |
Body:
Parameter | Description / Example | Mandatory |
apiKey | Your API key for the service | yes |
from | Your WhatsApp account. international number without +. for example: 972771234567 | yes |
The number you want to block. for example: 972501234567 | yes |
Response:
{
"status": "OK",
"from": "972507654321",
"whatsapp": "972501234567",
"reason": 1
}Response-Explain:
Parameter | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
status | OK or FAIL | ||||||||||||||
from | Your WhatsApp account | ||||||||||||||
The number that you blocked | |||||||||||||||
reason | 'reason' is the status explanation in case of FAIL
|
Unblock
This endpoint allows you to unblock a number you previously blocked.
Settings:
URL | |
Method | JSON via POST |
Body:
Parameter | Description / Example | Mandatory |
|---|---|---|
apiKey | Your API key for the service | yes |
from | Your WhatsApp account. international number without +. for example: 972771234567 | yes |
The number you want to unblock. for example: 972501234567 | yes |
Response:
{
"status": "OK",
"from": "972507654321",
"whatsapp": "972501234567",
"reason": 1
}
Response-Explain:
Parameter | Description | ||||||||||
status | OK or FAIL | ||||||||||
from | Your WhatsApp account | ||||||||||
The number that you unblocked | |||||||||||
reason | 'reason' is the status explanation in case of FAIL
|
Get Blocked List
This endpoint allows you to see all the
Settings:
URL | |
Method | JSON via POST |
Body:
Parameter | Description / Example | Mandatory |
|---|---|---|
apiKey | Your API key for the service | yes |
from | Your WhatsApp account. international number without +. for example: 972771234567 | yes |
Response:
{
"status": "OK",
"from": "972507654321",
"numbers": ["972501234567","972502958372"],
"reason": 1
}Response-Explain:
Parameter | Description | ||||||
|---|---|---|---|---|---|---|---|
status | OK or FAIL | ||||||
from | Your WhatsApp account | ||||||
numbers | Array of numbers that was blocked by you | ||||||
reason | 'reason' is the status explanation in case of FAIL
|