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

https://api.99digital.co.il/whatsapp/v2/block

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

whatsapp

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

whatsapp

The number that you blocked

reason

'reason' is the status explanation in case of FAIL

1

not FAIL. the status is OK

2

Your "from" number account does not exist, or JSON syntax error

3

wrong apiKey

4

 'whatsapp' is either empty or wrong number format

6

Error blocking the number, please try again

7

You are trying to block a number but its more than 24 hours since the user sent you a message. You need to wait for his next message.

8

64,000 block limit reached.



Unblock

This endpoint allows you to unblock a number you previously blocked.

Settings:

URL

https://api.99digital.co.il/whatsapp/v2/unblock

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

whatsapp

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

whatsapp

The number that you unblocked

reason

'reason' is the status explanation in case of FAIL

1

not FAIL. the status is OK

2

Your "from" number account does not exist, or JSON syntax error

3

wrong apiKey

4

 'whatsapp' is either empty or wrong number format

6

Error unblocking the number, please try again



Get Blocked List

This endpoint allows you to see all the 

Settings:

URL

https://api.99digital.co.il/whatsapp/v2/blockedList

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

1

not FAIL. the status is OK

2

Your "from" number account does not exist, or JSON syntax error

3

wrong apiKey