Skip to main content

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:

SettingValue
URLhttps://partners.99digital.co.il/api/settings/setWebhook
MethodJSON via POST
HeaderAuthorization: Bearer <access_token> — the access token is received from Access Token.

Body:

ParameterDescription / ExampleMaximum lengthRemarks
urlThe webhook URL. It must start with https:// or http://.512Full 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:

ParameterDescription
statusOK or FAIL. "OK" means the webhook URL is saved. "FAIL" means error.
urlThe webhook url you provided.
reasonThe status explanation — see below.
ReasonExplanation
1Not FAIL. The status is OK.
2Wrong 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).
3Access token does not exist or expired. Please generate another one with Access Token.
4Server error, try again. Also returned when the body isn't valid JSON, or isn't sent with Content-Type: application/json.
24The 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 url is 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​

The request was processed. Both a successful and a failed request answer with HTTP 200 — check status, and reason when it is FAIL.