Set Webhook allows you to set the webhook URL you want for all incoming messages and acknowledges



Settings:

URL

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

Method

JSON via POST



Body:

Parameter

Description / Example

Mandatory

Example

apiKey

Your API key for the service

yes

your-api-key

from

your WhatsApp account. international number without +. for example: 972771234567

yes

972501234567

url

The webhook URL.

if you need to clear this data, you can send " " (space)

no

https://webhook.site/c89cbe22-17c1-4974-890d-e0c73471bda3

system

System messages notifications. 

0 for off

1 for on

default is off.

no

1

systemPhoneAlert

You can receive all system notifications via WhatsApp message directly from us. here you can specify the phone you wish us to send the messages to (start with 972). The messages will be sent in Hebrew.


List phone numbers is acceptable by providing comma separation, up to 5 numbers

if you need to clear this data, you can send " " (space)

no

972502211234,972527788695

readStatus

Read status notification (sent/delivered/read)

0 is off

1 is on

default is off

no

1

retry

Retry mechanism for webhook sending.

Whenever we have a new update that we need to deliver to you, we will try to deliver to your webhook. your webhook must response within 5 seconds with 200 OK status.

if this happens, we assume message received successfully.

if this does not happen, we will initiate more retries in the following sequence (all of them with 5 seconds timeout):


retry 1 - immediately after the first attempt.

retry 2 - after 5 minutes

retry 3 - after 20 minutes

retry 4 - after 1 hours

retry 5 - after 4 hours

retry 6 - after 24 hours


after that, we will stop trying to deliver the webhook message.


for this parameter you have:

1 - enable this feature.

0 - disable this feature.


By default, this feature is disabled (0), which means that we try to send only once (with 5 seconds timeout, and without and retries)

no

1



Response:

{
"status": "OK",
"url": "your-webhook.example.com",
"system": 1,
"systemPhoneAlert": "972501235788",
"readStatus": 1,
"retry": 0,
"reason": 1
}




Response-Explain:

Parameter

Description

status

OK or FAIL

url

The webhook url you provided

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

3

wrong apiKey

4

system must be 0 or 1

5

systemPhoneAlert list is invalid

6

readStatus is invalid

7

retry is invalid

9

The url is invalid