Set Webhook
POST/settings/setWebhook
Part 1: set the webhook address. Set Webhook allows you to set the partner webhook URL, where you receive notifications and updates about your partner account.
Every event of your partner account (WhatsApp onboarding, builders, Online accounts and Facebook onboarding) is sent to this URL — see Webhook for how it works, and the page of each event for its payload: Event: WhatsApp, Event: Builder, Event: Online and Event: Facebook. Webhooks arrive from the IP address 34.165.99.212.
Settings:
| Setting | Value |
|---|---|
| URL | https://partners.99digital.co.il/api/settings/setWebhook |
| Method | JSON via POST |
| Header | Authorization: Bearer <access_token> — the access token is received from Access Token. |
Body:
| Parameter | Description / Example | Maximum length | Remarks |
|---|---|---|---|
url | The webhook URL. It must start with https:// or http://. | 512 | Full URL here: then a domain name or an IPv4 address, an optional port, and a path without spaces. Domain names whose last part is longer than 6 letters (such as .digital) are not accepted. |
Response:
{
"status": "OK",
"url": "https://your-server.example.com/99digital/partners-webhook",
"reason": 1
}
Response explained:
| Parameter | Description |
|---|---|
status | OK or FAIL. "OK" means the webhook URL is saved. "FAIL" means error. |
url | The webhook url you provided. |
reason | The status explanation — see below. |
| Reason | Explanation |
|---|---|
| 1 | Not FAIL. The status is OK. |
| 2 | Wrong credentials: the Authorization header is missing or not Bearer <token>, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). |
| 3 | Access token does not exist or expired. Please generate another one with Access Token. |
| 4 | Server error, try again. Also returned when the body isn't valid JSON, or isn't sent with Content-Type: application/json. |
| 24 | The url is missing or invalid. |
Remarks
- Your partner account has one webhook URL. Setting a new URL replaces the previous one, for every user of your partner account.
- You can't remove the webhook with this endpoint: an empty
urlis rejected with reason 24. - Some events carry API keys, so use an
https://URL. - The change is recorded in the Audit Log of your partners dashboard.
- Send your partner access token. A token created with an Online account's Account API Credentials is rejected with reason 2.
Request
Responses
- 200
The request was processed. Both a successful and a failed request answer with HTTP 200 — check status, and reason when it is FAIL.