# 99 Digital Partners API — complete documentation Generated: 2026-11-29T20:03:58.741Z Canonical documentation: https://docs.99digital.co.il/partners-api Documentation index: https://docs.99digital.co.il/partners-api/llms.txt > This file is generated from every public page of the Partners API documentation during the production build. Do not edit it manually. --- # Partners API Source: https://docs.99digital.co.il/partners-api Markdown: https://docs.99digital.co.il/markdown/partners-api.md Section: Partners API For 99 Digital partners: register and onboard WhatsApp numbers for your customers, create Facebook onboarding links, and manage Builder and Online accounts. ## Base URL ```text https://partners.99digital.co.il/api ``` ## Authentication Exchange the client id and client secret from your partners dashboard for an access token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), then send the token as a bearer token on every request: ```http Authorization: Bearer ``` An access token is valid for one hour. ## Where to start - New to the partners program: [Become a Partner](https://docs.99digital.co.il/partners-api/become-a-partner). - WhatsApp numbers for your customers: [Start Here!](https://docs.99digital.co.il/partners-api/whatsapp/start-here). - Facebook and Instagram onboarding: [Start Here!](https://docs.99digital.co.il/partners-api/facebook/start-here). - Events about your customers' accounts sent to your server: [Webhook](https://docs.99digital.co.il/partners-api/settings/webhook). --- # Become a Partner Source: https://docs.99digital.co.il/partners-api/become-a-partner Markdown: https://docs.99digital.co.il/markdown/partners-api/become-a-partner.md Section: Partners API Becoming a partner of 99 Digital allows you to create, sell and distribute any of the 99 Digital products to your customers. If you would like to join our partners program, please contact a 99 Digital employee at [www.99digital.co.il](https://www.99digital.co.il). --- # Start Here! Source: https://docs.99digital.co.il/partners-api/whatsapp/start-here Markdown: https://docs.99digital.co.il/markdown/partners-api/whatsapp/start-here.md Section: Partners API › WhatsApp Creating a new WhatsApp account: an explanation page. Please read carefully the following steps on how the onboarding works. Creating a WhatsApp account is an easy 3-step process. By the end of this process, the WhatsApp account will usually be available immediately to start receiving incoming messages. A few minutes later, you will also be able to send out outgoing messages and templates. ## The steps - Register a new number. This step will verify a phone number, to be a potential WhatsApp account, and store it under your account. You must first verify the number, and then you can create an account with that number. This is the [Step 1: Register a number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number) API. - You create a new WhatsApp account using the [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding) API (`createAccount`). It creates an onboarding link that you share with your client, who completes the onboarding through it. - Once the client finishes the onboarding, you will get a webhook notification about it. You can set and see the webhook information with the [Webhook](https://docs.99digital.co.il/partners-api/settings/webhook) API (Settings → Webhook). :::tip To onboard a number as [coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) — the client keeps using the WhatsApp Business app on their phone, so the number is not registered as a new number — skip step 1 and go straight to [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding). ::: ## Managing your numbers and accounts | Endpoint | What it does | | --- | --- | | [Get Registered numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-registered-numbers) | The verified numbers that are still waiting to be connected to an account. | | [Get Onboarding List](https://docs.99digital.co.il/partners-api/whatsapp/get-onboarding-list) | The onboarding links you created, and whether the client finished each one. | | [Delete Onboarding account](https://docs.99digital.co.il/partners-api/whatsapp/delete-onboarding-account) | Remove an onboarding link that the client didn't finish. | | [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers) | The WhatsApp accounts you manage, with their API keys and this month's conversations. | | [Get Conversations Statistics](https://docs.99digital.co.il/partners-api/whatsapp/get-conversations-statistics) | Your WhatsApp numbers' conversations, month by month. | | [Delete WhatsApp Account](https://docs.99digital.co.il/partners-api/whatsapp/delete-whatsapp-account) | Cancel a WhatsApp account and remove it immediately. | | [Get Stores list](https://docs.99digital.co.il/partners-api/whatsapp/get-stores-list) | The WhatsApp stores you created. | --- # Step 1: Register a number Source: https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number Markdown: https://docs.99digital.co.il/markdown/partners-api/whatsapp/step-1-register-a-number.md Section: Partners API › WhatsApp › Step 1: Register a number This API allows you to add a number to your account, in order to use the [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding) API. In order to use the number, we must verify the number. You can request the verification code by SMS or by a phone call. | Endpoint | What it does | | --- | --- | | [Register a number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/register-number) | Part 1: request a verification code for the number, by SMS or a phone call. | | [Verify a number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/verify-number) | Part 2: send the code you received. The number is verified and belongs to you. | ## Important remarks - The number you wish to register must not be installed on any WhatsApp phone: it must be a new number. If you wish to onboard a number as [coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) (meaning you want to keep using the WhatsApp mobile app, and not register it as a new number), jump to [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding). - Do not attempt to request a code more than 3 times, or Facebook might block the request for 1 hour to avoid abuse. - If you want to use a phone call, please make sure you are able to dial the number yourself and that the number does not have an IVR operator. Make sure that a call can go through smoothly and that you are able to answer the phone call. The phone call will be received from a foreign country code or an unknown number: make sure those numbers are not blocked on your phone. - Registered phone numbers will wait in your account for 90 days. During this time you must create an account with that number. If you did not create an account with that phone number, after 90 days you will have to register the number again. - You can register and keep up to 500 numbers in your account waiting to be connected. This process is a two-part process: - **Part 1:** you register the number by asking for the verification code. After submitting the [registerNumber](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/register-number) API, you will get an SMS or a phone call with a 6-digit verification code. - **Part 2:** you verify the code you received with the [verifyNumber](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/verify-number) API. Now the number is verified and belongs to you. Then create the WhatsApp account with [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding). [Get Registered numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-registered-numbers) lists your verified numbers that are still waiting to be connected to an account. ## Part 1: Register a number ### Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/whatsapp/registerNumber` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Add new number** permission (Verified Numbers). ### Body | Parameter | Description / Example | Maximum length | Remarks | Mandatory | | --- | --- | --- | --- | --- | | `whatsapp` | The WhatsApp number you wish to register | 20 | Use the country code and the number, digits only, without `+`. For example: `972501234567` | Yes | | `method` | `1` for SMS; `2` for a phone call (a number, not a string) | 1 | If both options are available for your number, we recommend using SMS, as it is a more stable way and not based on answering a phone call. | Yes | | `language` | The language code — see the `language` table below (a number, not a string) | 1 | The language of the SMS / voice call that brings the verification code. (For SMS, in some cases, the code will be sent in English regardless of what was selected in `language`.) | Yes | | `comment` | A free text for you to use along with the number registration. You get it back as `comment` in [Get Registered numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-registered-numbers). | 100 | Numbers and letters only (spaces, hyphens, underscores and parentheses are accepted too). | No | `language` values: | Language name | Code to use | | --- | --- | | Hebrew | 1 | | English | 2 | | Arabic | 3 | | Russian | 4 | | Spanish | 5 | | Chinese | 6 | | Hindi | 7 | | Thai | 8 | | French | 9 | ### Response ```json { "status": "OK", "whatsapp": "972501234567", "reason": 1 } ``` ### Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the SMS or phone call has been sent. "FAIL" means error. | | `whatsapp` | The WhatsApp number. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | The WhatsApp number is empty or wrong (digits only, up to 20). | | 5 | `method` is empty or wrong (1 or 2). | | 6 | `language` is empty or wrong (1 to 9). | | 7 | The number you are trying to verify has already been verified by you. | | 8 | The number you are trying to verify is not a new WhatsApp number. The number might be used by another WhatsApp API business or by the WhatsApp app, or the number you provided is not a valid phone number. | | 9 | Error trying to send the verification code, please try again later. | | 15 | Unknown error, please contact support. Also returned when the request body is not valid JSON. | | 24 | You requested the code too many times. Please try again in 1 hour. | | 27 | The comment length is too long, or the comment is invalid. | ## Part 2: Verify a number ### Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/whatsapp/verifyNumber` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Add new number** permission (Verified Numbers). ### Body | Parameter | Description / Example | Maximum length | Remarks | Mandatory | | --- | --- | --- | --- | --- | | `whatsapp` | The same WhatsApp number you used to request the code with the registerNumber API | 20 | Use the country code and the number, digits only, without `+`. For example: `972501234567` | Yes | | `code` | The 6-digit code | 6 | 6 digits, numbers only. Remove any hyphens if the code received by SMS contains any. You can try up to 3 times. | Yes | ### Response ```json { "status": "OK", "whatsapp": "972501234567", "expiration": 1737109621, "reason": 1 } ``` ### Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the verification was successful. "FAIL" means error. | | `whatsapp` | The WhatsApp number. | | `expiration` | The expiration timestamp (Unix time, in seconds), 90 days from now. Create the WhatsApp account with this number before then. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | The WhatsApp number is empty or wrong (digits only, up to 20). | | 7 | The number you are trying to verify has already been verified by you. | | 10 | `code` is empty or not a 6-digit number. | | 11 | The WhatsApp number you are trying to verify is not a number that is waiting to be verified (in your account). Please use the registerNumber API (Part 1) first. | | 12 | The code is wrong, please try again. You can try up to 3 times. | | 15 | Unknown error, please contact support. Also returned when the request body is not valid JSON. | --- # Register a number Source: https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/register-number Markdown: https://docs.99digital.co.il/markdown/partners-api/whatsapp/step-1-register-a-number/register-number.md Section: Partners API › WhatsApp › Step 1: Register a number `POST https://partners.99digital.co.il/api/whatsapp/registerNumber` This API allows you to add a number to your account, in order to use the Step 2: Onboarding API. In order to use the number, we must verify the number. You can request the verification code by SMS or by a phone call. This is part 1 of [Step 1: Register a number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number); part 2 is [Verify a number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/verify-number). **Important remarks** - The number you wish to register must not be installed on any WhatsApp phone: it must be a new number. If you wish to onboard a number as [coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) (meaning you want to keep using the WhatsApp mobile app, and not register it as a new number), jump to [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding). - Do not attempt to request a code more than 3 times, or Facebook might block the request for 1 hour to avoid abuse (reason 24). - If you want to use a phone call, please make sure you are able to dial the number yourself and that the number does not have an IVR operator. Make sure that a call can go through smoothly and that you are able to answer the phone call. The phone call will be received from a foreign country code or an unknown number: make sure those numbers are not blocked on your phone. - Registered phone numbers will wait in your account for 90 days. During this time you must create an account with that number. If you did not create an account with that phone number, after 90 days you will have to register the number again. - You can register and keep up to 500 numbers in your account waiting to be connected. This process is a two-part process: - **Part 1:** you register the number by asking for the verification code. After submitting the registerNumber API (this page), you will get an SMS or a phone call with a 6-digit verification code. - **Part 2:** you verify the code you received with [Verify a number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/verify-number). Now the number is verified and belongs to you. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/whatsapp/registerNumber` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Add new number** permission (Verified Numbers). ## Body | Parameter | Description / Example | Maximum length | Remarks | Mandatory | | --- | --- | --- | --- | --- | | `whatsapp` | The WhatsApp number you wish to register | 20 | Use the country code and the number, digits only, without `+`. For example: `972501234567` | Yes | | `method` | `1` for SMS; `2` for a phone call (a number, not a string) | 1 | If both options are available for your number, we recommend using SMS, as it is a more stable way and not based on answering a phone call. | Yes | | `language` | The language code — see the `language` table below (a number, not a string) | 1 | The language of the SMS / voice call that brings the verification code. (For SMS, in some cases, the code will be sent in English regardless of what was selected in `language`.) | Yes | | `comment` | A free text for you to use along with the number registration. You get it back as `comment` in [Get Registered numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-registered-numbers). | 100 | Numbers and letters only (spaces, hyphens, underscores and parentheses are accepted too). | No | `language` values: | Language name | Code to use | | --- | --- | | Hebrew | 1 | | English | 2 | | Arabic | 3 | | Russian | 4 | | Spanish | 5 | | Chinese | 6 | | Hindi | 7 | | Thai | 8 | | French | 9 | ## Response ```json { "status": "OK", "whatsapp": "972501234567", "reason": 1 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the SMS or phone call has been sent. "FAIL" means error. | | `whatsapp` | The WhatsApp number. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | The WhatsApp number is empty or wrong (digits only, up to 20). | | 5 | `method` is empty or wrong (1 or 2). | | 6 | `language` is empty or wrong (1 to 9). | | 7 | The number you are trying to verify has already been verified by you. | | 8 | The number you are trying to verify is not a new WhatsApp number. The number might be used by another WhatsApp API business or by the WhatsApp app, or the number you provided is not a valid phone number. | | 9 | Error trying to send the verification code, please try again later. | | 15 | Unknown error, please contact support. Also returned when the request body is not valid JSON. | | 24 | You requested the code too many times. Please try again in 1 hour. | | 27 | The comment length is too long, or the comment is invalid. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `whatsapp` | string | Yes | The WhatsApp number you wish to register. Use the country code and the number, digits only (up to 20), without `+`. For example: `972501234567`. The number must be a new number, not installed on any WhatsApp phone. Max length: 20. Pattern: `^[0-9]{1,20}$`. Example: `972501234567`. | | `method` | integer | Yes | How to send the verification code: 1 for SMS, 2 for a phone call — a number, not a string. If both options are available for your number, we recommend using SMS, as it is a more stable way and not based on answering a phone call. For a phone call, make sure you can dial the number yourself, that it has no IVR operator, and that calls from a foreign country code or an unknown number are not blocked. One of: `1` — SMS — the 6-digit code is sent by SMS (recommended); `2` — Phone call — the 6-digit code is read in a phone call. Make sure you are able to answer it. Example: `1`. | | `language` | integer | Yes | The language of the SMS / voice call that brings the verification code — a number, not a string. (For SMS, in some cases, the code will be sent in English regardless of what was selected in `language`.) One of: `1` — Hebrew; `2` — English; `3` — Arabic; `4` — Russian; `5` — Spanish; `6` — Chinese; `7` — Hindi; `8` — Thai; `9` — French. Example: `1`. | | `comment` | string | No | A free text for you to use along with the number registration, up to 100 characters. Numbers and letters only (spaces, hyphens, underscores and parentheses are accepted too). You get it back as `comment` in [Get Registered numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-registered-numbers). Max length: 100. Example: `Reserved number for client A`. | ### Example: SMS Send the code by SMS, in Hebrew. ```json { "whatsapp": "972501234567", "method": 1, "language": 1 } ``` ### Example: Phone call Send the code by a phone call, in English. Make sure you can answer the call. ```json { "whatsapp": "972501234567", "method": 2, "language": 2 } ``` ### Example: With comment Add a comment of your own to the registered number. ```json { "whatsapp": "972501234567", "method": 1, "language": 2, "comment": "Reserved number for client A" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK means the SMS or the phone call with the verification code has been sent. Always `OK`. | | `whatsapp` | string | (one of: OK) The WhatsApp number. Example: `972501234567`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL means error — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API; `4` — The WhatsApp number is empty or wrong: digits only, up to 20; `5` — `method` is empty or wrong: 1 or 2; `6` — `language` is empty or wrong: 1 to 9; `7` — The number you are trying to verify has already been verified by you; `8` — The number you are trying to verify is not a new WhatsApp number: it might be used by another WhatsApp API business or by the WhatsApp app, or the number you provided is not a valid phone number; `9` — Error trying to send the verification code, please try again later; `15` — Unknown error, please contact support. Also returned when the request body is not valid JSON; `24` — You requested the code too many times. Please try again in 1 hour; `27` — The comment length is too long, or the comment is invalid. | #### Example: OK The verification code has been sent. ```json { "status": "OK", "whatsapp": "972501234567", "reason": 1 } ``` #### Example: Reason 7 You have already verified this number. ```json { "status": "FAIL", "reason": 7 } ``` #### Example: Reason 8 The number is not a new WhatsApp number, or not a valid phone number. ```json { "status": "FAIL", "reason": 8 } ``` #### Example: Reason 24 You requested the code too many times. Try again in 1 hour. ```json { "status": "FAIL", "reason": 24 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Verify a number Source: https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/verify-number Markdown: https://docs.99digital.co.il/markdown/partners-api/whatsapp/step-1-register-a-number/verify-number.md Section: Partners API › WhatsApp › Step 1: Register a number `POST https://partners.99digital.co.il/api/whatsapp/verifyNumber` Part 2: you verify the code you received, and now the number is verified and belongs to you. This API allows you to add a number to your account, in order to use the [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding) API. In order to use the number, we must verify the number. You can request the verification code by SMS or by a phone call. This is part 2 of [Step 1: Register a number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number). This process is a two-part process: - **Part 1:** you register the number by asking for the verification code. After submitting the [registerNumber](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/register-number) API, you will get an SMS or a phone call with a 6-digit verification code. - **Part 2:** you verify the code you received (this page). Now the number is verified and belongs to you. Registered phone numbers will wait in your account for 90 days, until `expiration`. During this time you must create an account with that number ([Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding)). If you did not create an account with that phone number, after 90 days you will have to register the number again. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/whatsapp/verifyNumber` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Add new number** permission (Verified Numbers). ## Body | Parameter | Description / Example | Maximum length | Remarks | Mandatory | | --- | --- | --- | --- | --- | | `whatsapp` | The same WhatsApp number you used to request the code with the [registerNumber](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/register-number) API | 20 | Use the country code and the number, digits only, without `+`. For example: `972501234567` | Yes | | `code` | The 6-digit code | 6 | 6 digits, numbers only. Remove any hyphens if the code received by SMS contains any. You can try up to 3 times. | Yes | ## Response ```json { "status": "OK", "whatsapp": "972501234567", "expiration": 1737109621, "reason": 1 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the verification was successful. "FAIL" means error. | | `whatsapp` | The WhatsApp number. | | `expiration` | The expiration timestamp (Unix time, in seconds), 90 days from now. Create the WhatsApp account with this number before then. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | The WhatsApp number is empty or wrong (digits only, up to 20). | | 7 | The number you are trying to verify has already been verified by you. | | 10 | `code` is empty or not a 6-digit number. | | 11 | The WhatsApp number you are trying to verify is not a number that is waiting to be verified (in your account). Please use the [registerNumber](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/register-number) API (part 1) first. | | 12 | The code is wrong, please try again. You can try up to 3 times. | | 15 | Unknown error, please contact support. Also returned when the request body is not valid JSON. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `whatsapp` | string | Yes | The same WhatsApp number you used to request the code with [Register a number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/register-number) (the registerNumber API). Use the country code and the number, digits only (up to 20), without `+`. For example: `972501234567`. Max length: 20. Pattern: `^[0-9]{1,20}$`. Example: `972501234567`. | | `code` | string | Yes | The 6-digit code you received by SMS or phone call. 6 digits, numbers only: remove any hyphens if the code received by SMS contains any. You can try up to 3 times. Min length: 6. Max length: 6. Pattern: `^[0-9]{6}$`. Example: `123456`. | ### Example (generated from the schema) ```json { "whatsapp": "972501234567", "code": "123456" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK means the verification was successful: the number is verified and belongs to you. Always `OK`. | | `whatsapp` | string | (one of: OK) The WhatsApp number. Example: `972501234567`. | | `expiration` | integer | (one of: OK) The expiration timestamp (Unix time, in seconds), 90 days from now. Create the WhatsApp account with this number before then; after it, you will have to register the number again. Example: `1737109621`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL means error — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API; `4` — The WhatsApp number is empty or wrong: digits only, up to 20; `7` — The number you are trying to verify has already been verified by you; `10` — `code` is empty or not a 6-digit number; `11` — The WhatsApp number you are trying to verify is not a number that is waiting to be verified in your account. Please use the registerNumber API (Register a number, part 1) first; `12` — The code is wrong, please try again. You can try up to 3 times; `15` — Unknown error, please contact support. Also returned when the request body is not valid JSON. | #### Example: OK The number is verified and waits in your account for 90 days. ```json { "status": "OK", "whatsapp": "972501234567", "expiration": 1737109621, "reason": 1 } ``` #### Example: Reason 11 The number is not waiting to be verified in your account — use Register a number first. ```json { "status": "FAIL", "reason": 11 } ``` #### Example: Reason 12 The code is wrong, please try again. ```json { "status": "FAIL", "reason": 12 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Step 2: Onboarding Source: https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding Markdown: https://docs.99digital.co.il/markdown/partners-api/whatsapp/step-2-onboarding.md Section: Partners API › WhatsApp `POST https://partners.99digital.co.il/api/whatsapp/createAccount` Create a WhatsApp onboarding link account: a link your client opens to create their WhatsApp account. Please read carefully the following steps on how the onboarding works. - This API allows you to create a WhatsApp account from a registered number ([Step 1: Register a number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number)). You will provide the registered number you want to onboard, and this number should be verified in your account first. Once you add and verify the number, you can create an account. To onboard a number as [coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) instead, send `1` as `whatsapp`: no registered number is needed. - Next, the system will generate an onboarding link. The onboarding link should be shared with your client / customer: the link should be shared with the business owner. - Once the client opens the onboarding link and follows the Facebook onboarding process, this will create a WhatsApp account for them. After the client opens the link, this is what they will be facing: - The client is asked to log in to their Facebook account. If their browser is already logged in, it will recognize it automatically. If the client doesn't have a Facebook account, the onboarding will create an account for them. - The client is asked to provide their business details (business name, business email). If the client already has a business on Facebook, they can select the business. If the client doesn't have a business, the onboarding will create one for them. If you know details about your customer's business, such as its name and email address, you can inject this data into the onboarding screen. This can dramatically reduce the amount of input and interaction required by your customers. - The client might be asked to create a "WhatsApp" account. They can choose the name for their WhatsApp (for reference purposes only) and the time zone. (This page only shows if the client already had a business on Facebook.) - Submit: the client clicks the "Confirm" button and the page closes itself. The process is completed and the client can start using WhatsApp right away. - You will get a [webhook](https://docs.99digital.co.il/partners-api/settings/webhook/whatsapp-event) (a `whatsapp` event) once the client completed the process, and the WhatsApp account will usually be active immediately to receive messages. - It might take a few hours on Facebook's side to confirm the account (verify its authenticity). Once it is confirmed, you will be able to send templates and messages. - You can generate only 1 onboarding link per registered number. You can't change the onboarding information once the link has been created. If you wish to change the information, you must delete the onboarding link first ([Delete Onboarding account](https://docs.99digital.co.il/partners-api/whatsapp/delete-onboarding-account)) and then create a new one. Once the onboarding link is completed by the client, you can't change the information or delete the onboarding link anymore. **Important notice:** when creating a business profile on Facebook using the onboarding link, Facebook also asks for a landing page of the business (business website). Our system will automatically generate a landing page for you if you provide `business_name`, `business_address` and `business_id`. Facebook has very strict rules on how the company website should be, and the landing page we generate fits their rules. This landing page is not visible to end users; it is only for Facebook's reference purposes. The above notice isn't relevant if the client already has a business on Facebook. [Get Onboarding List](https://docs.99digital.co.il/partners-api/whatsapp/get-onboarding-list) shows the onboarding links you created and whether the client finished each one. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/whatsapp/createAccount` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Create new onboarding link** permission (Onboarding Links). ## Body | Parameter | Description / Example | Maximum length | Mandatory | | --- | --- | --- | --- | | `whatsapp` | For a new WhatsApp, here is where you put the registered and verified number from your account (from [Step 1](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number)), with the country code, digits only, without `+`. The number must be within its 90 days and must not have an onboarding link yet (reason 4). If you want to use the coexistence feature, put `1` here as the `whatsapp` parameter — [read more about coexistence here](https://docs.99digital.co.il/whatsapp-api/information/coexistence). | 20 | Yes | | `business_name` | This is the official business name of your client. Letters, numbers and hyphens are allowed (spaces and underscores too). | 100 | Yes | | `business_email` | This is the business email address. Provide this value if you wish to help your client create a business profile on Facebook in case they don't have one. | 200 | No | | `business_id` | This is the ID of the business. Provide this value if you wish to help your client create a business profile on Facebook in case they don't have one. Numbers only. | 20 | No | | `business_address` | This is the home/office address of the business. Provide this value if you wish to help your client create a business profile on Facebook in case they don't have one. Provide here the full address of the business, in free text: letters, numbers, spaces, commas, dots and slashes only (no hyphens); quotes are removed. | 300 | No | | `display_name` | The WhatsApp display name that your client's customers will see on WhatsApp. It is very important to choose the right name, one that matches the business brand name. For example, for the business name "Pizza Hut", the display name should be something similar to "Pizza Hut" / "Pizza Hut - Customer Service" / "Pizza Hut - support", etc. This value can't be changed later, only via our support. Letters, numbers and hyphens are allowed (spaces, underscores and parentheses too). | 50 | Yes | | `onboarding_logo` | The onboarding link contains a logo image. In the [Business settings](https://docs.99digital.co.il/partners-api/settings/business-settings) API you can set the default logo of your onboarding links. Here, you can set a specific HTTPS URL of a different logo for this link: it overrides the account's onboarding logo from Business settings. The image size should be 200x60 px, in PNG/JPG format. The URL must start with `https://` (or `http://`) and end with `.png`, `.jpg`, `.jpeg`, `.gif`, `.bmp` or `.webp`. | 1000 | No | | `onboarding_message` | The onboarding link contains a welcome text before the client starts the onboarding. In the [Business settings](https://docs.99digital.co.il/partners-api/settings/business-settings) API you can set your default onboarding message text. Here, you can set a specific welcome text for this link: it overrides the account's onboarding text from Business settings. Any letters, numbers and dashes are acceptable (also spaces, underscores, dots, commas, `!` and `?`). | 200 | No | | `reference` | Any reference value (text/numbers only) you wish to receive back on the webhook (as `whatsapp_reference`). This is for your use only, so you can recognize your client. Letters, numbers, spaces, hyphens and underscores are allowed. | 50 | No | | `basic_templates` | After your client finishes the onboarding, we can submit for approval 3 default basic Hebrew templates for you: a start a conversation template, a welcome template and a send a file template, so it will be easier to start sending templates later on. The default is off. `1` — create the 3 basic Hebrew templates; `0` — don't create. | 1 | No | ## Response ```json { "status": "OK", "whatsapp": "972501234567", "onboarding_link": "https://onboarding.direct/123456", "landing_page": "https://landing.example.com/123456", "reason": 1 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the onboarding link has been created. "FAIL" means error. | | `whatsapp` | The WhatsApp number you provided. If this is a "coexistence" onboarding, you will see the temporary number we allocated to this onboarding (it starts with `97257`) until the client finishes the onboarding process and gets a final WhatsApp number. | | `onboarding_link` | The onboarding link to share with your client to connect the WhatsApp. | | `landing_page` | The landing page we created for your customer. You can share it with them. Empty unless you provided `business_name`, `business_address` and `business_id`. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | The WhatsApp number is invalid, or it is not registered (verified) under your account, or its 90 days have passed, or you already created an onboarding link with that number. | | 14 | `display_name` is invalid. | | 15 | Unknown error, please contact support. Also returned when the request body is not valid JSON. | | 16 | `business_name` is invalid. | | 17 | `business_email` is invalid. | | 18 | `onboarding_logo` is invalid. | | 19 | `onboarding_message` is invalid. | | 20 | `reference` is invalid. | | 21 | `business_id` is invalid. | | 22 | `business_address` is invalid. Use letters, numbers, commas and dots only (spaces and slashes are accepted too). | | 23 | `basic_templates` is invalid. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `whatsapp` | string | Yes | For a new WhatsApp, here is where you put the registered and verified number from your account (from [Step 1](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number)), with the country code, digits only (up to 20), without `+`. The number must be within its 90 days and must not have an onboarding link yet (reason 4). To use the coexistence feature, send `1` here — [read more about coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence). Example: `972501234567`. | | `business_name` | string | Yes | This is the official business name of your client, up to 100 characters. Letters, numbers and hyphens are allowed (spaces and underscores too). Min length: 1. Max length: 100. Example: `Acme Inc`. | | `business_email` | string (email) | No | This is the business email address, up to 200 characters. Provide this value if you wish to help your client create a business profile on Facebook, in case they don't have one. Example: `info@example.com`. | | `business_id` | string | No | This is the ID of the business, up to 20 digits. Provide this value if you wish to help your client create a business profile on Facebook, in case they don't have one. Numbers only. With `business_name` and `business_address`, it lets us generate a landing page for the business. Max length: 20. Pattern: `^[0-9]{1,20}$`. Example: `515123456`. | | `business_address` | string | No | This is the home/office address of the business, up to 300 characters. Provide this value if you wish to help your client create a business profile on Facebook, in case they don't have one. Provide here the full address of the business, in free text: letters, numbers, spaces, commas, dots and slashes only (no hyphens); quotes are removed. Example: `Grove Street 12, San Andreas`. | | `display_name` | string | Yes | The WhatsApp display name that your client's customers will see on WhatsApp, up to 50 characters. It is very important to choose the right name, one that matches the business brand name. For example, for the business name "Pizza Hut", the display name should be something similar to "Pizza Hut", "Pizza Hut - Customer Service" or "Pizza Hut - support". This value can't be changed later, only via our support. Letters, numbers and hyphens are allowed (spaces, underscores and parentheses too). Min length: 1. Max length: 50. Example: `Acme - Customer Service`. | | `onboarding_logo` | string (uri) | No | The onboarding link contains a logo image. In the [Business settings](https://docs.99digital.co.il/partners-api/settings/business-settings) API you can set the default logo of your onboarding links. Here, you can set a specific HTTPS URL of a different logo for this link: it overrides the account's onboarding logo from Business settings. The image size should be 200x60 px, in PNG/JPG format. Up to 1000 characters. The URL must start with `https://` (or `http://`) and end with `.png`, `.jpg`, `.jpeg`, `.gif`, `.bmp` or `.webp`. Example: `https://www.example.com/images/onboarding-logo.png`. | | `onboarding_message` | string | No | The onboarding link contains a welcome text before the client starts the onboarding. In the [Business settings](https://docs.99digital.co.il/partners-api/settings/business-settings) API you can set your default onboarding message text. Here, you can set a specific welcome text for this link: it overrides the account's onboarding text from Business settings. Up to 200 characters. Any letters, numbers and dashes are acceptable (also spaces, underscores, dots, commas, `!` and `?`). Max length: 200. Example: `Welcome! Connect your WhatsApp to Acme in a few clicks.`. | | `reference` | string | No | Any reference value (text/numbers only) you wish to receive back on the webhook (as `whatsapp_reference`), up to 50 characters. This is for your use only, so you can recognize your client. Letters, numbers, spaces, hyphens and underscores are allowed. Max length: 50. Example: `client-4711`. | | `basic_templates` | integer | No | After your client finishes the onboarding, we can submit for approval 3 default basic Hebrew templates for you: a start a conversation template, a welcome template and a send a file template, so it will be easier to start sending templates later on. The default is off (0). One of: `0` — Don't create the templates (the default); `1` — Create the 3 basic Hebrew templates (start a conversation, welcome, send a file) and submit them for approval after the onboarding. Default: `0`. Example: `1`. | ### Example: Registered number The simplest request: a number you registered and verified in Step 1, the business name and the display name. ```json { "whatsapp": "972501234567", "business_name": "Acme Inc", "display_name": "Acme - Customer Service" } ``` ### Example: With business details Help a client who has no business on Facebook yet: their details are filled in for them, and a landing page is generated. - `business_email`, `business_id` and `business_address` help the client create their business profile on Facebook. - With `business_name`, `business_address` and `business_id`, the response includes the `landing_page` we generated. - `reference` comes back on the webhook, and `basic_templates` submits the 3 basic Hebrew templates after the onboarding. ```json { "whatsapp": "972501234567", "business_name": "Acme Inc", "business_email": "info@example.com", "business_id": "515123456", "business_address": "Grove Street 12, San Andreas", "display_name": "Acme - Customer Service", "reference": "client-4711", "basic_templates": 1 } ``` ### Example: Coexistence Onboard a number that stays on the WhatsApp Business app: send `1` as `whatsapp`. No registered number is needed. ```json { "whatsapp": "1", "business_name": "Acme Inc", "display_name": "Acme", "reference": "client-4711" } ``` ### Example: Custom logo and message Override your default onboarding logo and welcome text for this link only. ```json { "whatsapp": "972501234567", "business_name": "Acme Inc", "display_name": "Acme - Customer Service", "onboarding_logo": "https://www.example.com/images/onboarding-logo.png", "onboarding_message": "Welcome! Connect your WhatsApp to Acme in a few clicks." } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK means the onboarding link has been created. Always `OK`. | | `whatsapp` | string | (one of: OK) The WhatsApp number you provided. If this is a "coexistence" onboarding, you will see the temporary number (starting with `97257`) that we allocated to this onboarding until the client finishes the onboarding process and gets a final WhatsApp number. Example: `972501234567`. | | `onboarding_link` | string | (one of: OK) The onboarding link to share with your client (the business owner), to connect the WhatsApp. Example: `https://onboarding.direct/123456`. | | `landing_page` | string | (one of: OK) The landing page we created for your customer; you can share it with them. Empty unless you provided `business_name`, `business_address` and `business_id`. Example: `https://landing.example.com/123456`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL means error — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API; `4` — The WhatsApp number is invalid, or it is not registered (verified) under your account, or its 90 days have passed, or you already created an onboarding link with that number; `14` — `display_name` is invalid; `15` — Unknown error, please contact support. Also returned when the request body is not valid JSON; `16` — `business_name` is invalid; `17` — `business_email` is invalid; `18` — `onboarding_logo` is invalid; `19` — `onboarding_message` is invalid; `20` — `reference` is invalid; `21` — `business_id` is invalid; `22` — `business_address` is invalid. Use letters, numbers, commas and dots only (spaces and slashes are accepted too); `23` — `basic_templates` is invalid. | #### Example: OK The onboarding link is ready to share with your client, with the landing page we generated. ```json { "status": "OK", "whatsapp": "972501234567", "onboarding_link": "https://onboarding.direct/123456", "landing_page": "https://landing.example.com/123456", "reason": 1 } ``` #### Example: OK + coexistence A coexistence onboarding: `whatsapp` is a temporary number until the client finishes the onboarding. ```json { "status": "OK", "whatsapp": "972571234567", "onboarding_link": "https://onboarding.direct/123457", "landing_page": "", "reason": 1 } ``` #### Example: Reason 4 The number is not verified under your account, or it already has an onboarding link. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 14 'display_name' is invalid. ```json { "status": "FAIL", "reason": 14 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Get Registered numbers Source: https://docs.99digital.co.il/partners-api/whatsapp/get-registered-numbers Markdown: https://docs.99digital.co.il/markdown/partners-api/whatsapp/get-registered-numbers.md Section: Partners API › WhatsApp `GET https://partners.99digital.co.il/api/whatsapp/getRegisteredNumbers` This API allows you to see all the available registered numbers that are waiting to be connected to an account. These are the numbers you registered under the [Step 1: Register a number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number) page. Once you create an account with a WhatsApp number, the number is removed from this list. This list only shows the available registered numbers that you verified with a code and that are still waiting to be connected to an account, within the 90 days. A number whose 90 days have passed is not listed: register it again. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/whatsapp/getRegisteredNumbers` | | Method | JSON via GET | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **View verified numbers page** permission (Verified Numbers). ## Body Nothing — leave it empty. ## Response ```json { "status": "OK", "reason": 1, "list": [ { "whatsapp": "972501234567", "expiration": 1739874663, "onboarding_link": "https://onboarding.direct/123456", "comment": "Reserved number for client A" }, { "whatsapp": "972551122334", "expiration": 1739874664, "onboarding_link": null, "comment": "" } ] } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `list` | An array of the registered numbers — see the table below. Empty when there are none. | | `reason` | The status explanation — see the table below. | Each item of `list`: | Name | Explanation | | --- | --- | | `whatsapp` | The registered WhatsApp number. | | `expiration` | The expiration time (Unix time, in seconds): create the WhatsApp account with this number before then. | | `onboarding_link` | If there is an onboarding link connected to this number (created with [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding)), it shows here. Otherwise, it shows `null`. | | `comment` | The comment you wrote when registering the number. Empty if you didn't write one. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Unknown error, please try again later. | | 13 | You need to use the GET method. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `list` | array of object | (one of: OK) The registered numbers. Empty when there are none. | | `list[].whatsapp` | string | (one of: OK) The registered WhatsApp number. Example: `972501234567`. | | `list[].expiration` | integer | (one of: OK) The expiration time (Unix time, in seconds): create the WhatsApp account with this number before then. Example: `1739874663`. | | `list[].onboarding_link` | string \| null | (one of: OK) If there is an onboarding link connected to this number (created with [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding)), it shows here. Otherwise, null. Example: `https://onboarding.direct/123456`. | | `list[].comment` | string | (one of: OK) The comment you wrote when registering the number. Empty if you didn't write one. Example: `Reserved number for client A`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Unknown error, please try again later; `13` — You need to use the GET method. | #### Example: OK Two registered numbers — the first already has an onboarding link. ```json { "status": "OK", "reason": 1, "list": [ { "whatsapp": "972501234567", "expiration": 1739874663, "onboarding_link": "https://onboarding.direct/123456", "comment": "Reserved number for client A" }, { "whatsapp": "972551122334", "expiration": 1739874664, "onboarding_link": null, "comment": "" } ] } ``` #### Example: Reason 3 The access token is wrong or expired. ```json { "status": "FAIL", "reason": 3 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Get WhatsApp Numbers Source: https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers Markdown: https://docs.99digital.co.il/markdown/partners-api/whatsapp/get-whatsapp-numbers.md Section: Partners API › WhatsApp `GET https://partners.99digital.co.il/api/whatsapp/getWhatsApp` Get WhatsApp Numbers allows you to view all the WhatsApp numbers you have added to the system that finished the onboarding process. For each number you get its API key for the [WhatsApp API](https://docs.99digital.co.il/whatsapp-api), its connection to our online omnichannel platform, and the conversations it generated in the current month; the totals sum the conversations of all your numbers. For earlier months, use [Get Conversations Statistics](https://docs.99digital.co.il/partners-api/whatsapp/get-conversations-statistics). ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/whatsapp/getWhatsApp` | | Method | JSON via GET | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **See the WhatsApp accounts page** permission (WhatsApp Accounts). ## Body Nothing — leave it empty. ## Response ```json { "status": "OK", "reason": 1, "totalWhatsApp": 2, "totalConversationsThisMonth": 10, "totalMarketingThisMonth": 4, "totalServiceThisMonth": 5, "totalIncomingThisMonth": 1, "totalOutgoingThisMonth": 120, "list": [ { "create_time": 1735811185, "whatsapp": "972501234567", "apiKey": "a1b2c3-d4e5f6-a7b8c9-d0e1f2-a3b4c5", "display_name": "Acme - Customer Service", "business_name": "Acme Inc", "status": 3, "isOnline": 1, "onlineAccount": 1, "onlineInbox": 2, "onlineServer": "online", "coexistence": 0, "conversationsThisMonth": 6, "marketingThisMonth": 3, "serviceThisMonth": 3, "incomingThisMonth": 0, "outgoingThisMonth": 80 }, { "create_time": 1735811185, "whatsapp": "972507654321", "apiKey": "f6e5d4-c3b2a1-f0e9d8-c7b6a5-f4e3d2", "display_name": "Pizza Place", "business_name": "Pizza Place Ltd", "status": 3, "isOnline": 0, "onlineAccount": 0, "onlineInbox": 0, "onlineServer": "noonline", "coexistence": 1, "conversationsThisMonth": 4, "marketingThisMonth": 1, "serviceThisMonth": 2, "incomingThisMonth": 1, "outgoingThisMonth": 40 } ] } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `totalWhatsApp` | The total number of WhatsApp accounts you manage. | | `totalConversationsThisMonth` | The total number of conversations that all your WhatsApp numbers generated in the current month. | | `totalMarketingThisMonth` | The total number of marketing conversations that all your WhatsApp numbers generated in the current month. | | `totalServiceThisMonth` | The total number of service conversations that all your WhatsApp numbers generated in the current month. | | `totalIncomingThisMonth` | The total number of incoming conversations that all your WhatsApp numbers generated in the current month. | | `totalOutgoingThisMonth` | The total number of outgoing messages that all your WhatsApp numbers sent in the current month. | | `list` | Your WhatsApp numbers — see the table below. Empty when there are none. | | `reason` | The status explanation — see the table below. | Each item of `list`: | Name | Explanation | | --- | --- | | `create_time` | The Unix time (in seconds) when this account was created. | | `whatsapp` | The WhatsApp number. | | `apiKey` | The API key of the service, to use on the [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) (WhatsApp V2) endpoints. | | `display_name` | The display name of the WhatsApp number. | | `business_name` | The business name that owns the WhatsApp number. | | `status` | The account's status, as the partners dashboard shows it: 3 — Active, 8 — Waiting, 1 — Onboarding, 0 — Inactive, 10 — Blocked, 11 — Limited, 12 — Spam. Any other value shows as Unknown. | | `isOnline` | If the WhatsApp number is connected to our online omnichannel platform, this is 1. Otherwise, it is 0. | | `onlineAccount` | If `isOnline` is 1, here you see the account number that the WhatsApp is connected to. Otherwise, 0. | | `onlineInbox` | If `isOnline` is 1, here you see the inbox number that the WhatsApp is connected to. Otherwise, 0. | | `onlineServer` | If `isOnline` is 1, here you see the server subdomain where this WhatsApp inbox is located. Otherwise, it is empty or `noonline`. | | `coexistence` | If this account is connected with the coexistence feature, it shows 1. For a regular account, it shows 0. | | `conversationsThisMonth` | The total number of conversations that this WhatsApp number generated in the current month. | | `marketingThisMonth` | The total number of marketing conversations that this WhatsApp number generated in the current month. | | `serviceThisMonth` | The total number of service conversations that this WhatsApp number generated in the current month. | | `incomingThisMonth` | The total number of incoming conversations that this WhatsApp number generated in the current month. | | `outgoingThisMonth` | The total number of outgoing messages that this WhatsApp number sent in the current month. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Unknown error, please try again later. | | 13 | You need to use the GET method. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `totalWhatsApp` | integer | (one of: OK) The total number of WhatsApp accounts you manage. Example: `2`. | | `totalConversationsThisMonth` | integer | (one of: OK) The total number of conversations that all your WhatsApp numbers generated in the current month. Example: `10`. | | `totalMarketingThisMonth` | integer | (one of: OK) The total number of marketing conversations that all your WhatsApp numbers generated in the current month. Example: `4`. | | `totalServiceThisMonth` | integer | (one of: OK) The total number of service conversations that all your WhatsApp numbers generated in the current month. Example: `5`. | | `totalIncomingThisMonth` | integer | (one of: OK) The total number of incoming conversations that all your WhatsApp numbers generated in the current month. Example: `1`. | | `totalOutgoingThisMonth` | integer | (one of: OK) The total number of outgoing messages that all your WhatsApp numbers sent in the current month. Example: `120`. | | `list` | array of object | (one of: OK) Your WhatsApp numbers. Empty when there are none. | | `list[].create_time` | integer | (one of: OK) The time this account was created (Unix time, in seconds). Example: `1735811185`. | | `list[].whatsapp` | string | (one of: OK) The WhatsApp number. Example: `972501234567`. | | `list[].apiKey` | string | (one of: OK) The API key of this number, to use with the [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) (WhatsApp V2 endpoints). Example: `a1b2c3-d4e5f6-a7b8c9-d0e1f2-a3b4c5`. | | `list[].display_name` | string | (one of: OK) The display name of the WhatsApp number. Example: `Acme - Customer Service`. | | `list[].business_name` | string | (one of: OK) The business name that owns the WhatsApp number. Example: `Acme Inc`. | | `list[].status` | integer | (one of: OK) The account's status, as the partners dashboard shows it: 3 — Active, 8 — Waiting, 1 — Onboarding, 0 — Inactive, 10 — Blocked, 11 — Limited, 12 — Spam. Any other value shows as Unknown. Example: `3`. | | `list[].isOnline` | integer | (one of: OK) Whether the WhatsApp number is connected to our online omni-channel platform. One of: `0` — Not connected; `1` — Connected — see `onlineAccount`, `onlineInbox` and `onlineServer`. Example: `1`. | | `list[].onlineAccount` | integer | (one of: OK) If `isOnline` is 1, the account number that the WhatsApp is connected to. Otherwise, 0. Example: `1`. | | `list[].onlineInbox` | integer | (one of: OK) If `isOnline` is 1, the inbox number that the WhatsApp is connected to. Otherwise, 0. Example: `2`. | | `list[].onlineServer` | string | (one of: OK) If `isOnline` is 1, the server subdomain where this WhatsApp inbox is located. Otherwise, empty or `noonline`. Example: `online`. | | `list[].coexistence` | integer | (one of: OK) Whether this account is connected with the coexistence feature. One of: `0` — A regular account; `1` — A coexistence account. Example: `0`. | | `list[].conversationsThisMonth` | integer | (one of: OK) The total number of conversations that this WhatsApp number generated in the current month. Example: `6`. | | `list[].marketingThisMonth` | integer | (one of: OK) The total number of marketing conversations that this WhatsApp number generated in the current month. Example: `3`. | | `list[].serviceThisMonth` | integer | (one of: OK) The total number of service conversations that this WhatsApp number generated in the current month. Example: `3`. | | `list[].incomingThisMonth` | integer | (one of: OK) The total number of incoming conversations that this WhatsApp number generated in the current month. Example: `0`. | | `list[].outgoingThisMonth` | integer | (one of: OK) The total number of outgoing messages that this WhatsApp number sent in the current month. Example: `80`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Unknown error, please try again later; `13` — You need to use the GET method. | #### Example: OK Two WhatsApp numbers — the first is connected to the online platform, the second is a coexistence account. ```json { "status": "OK", "reason": 1, "totalWhatsApp": 2, "totalConversationsThisMonth": 10, "totalMarketingThisMonth": 4, "totalServiceThisMonth": 5, "totalIncomingThisMonth": 1, "totalOutgoingThisMonth": 120, "list": [ { "create_time": 1735811185, "whatsapp": "972501234567", "apiKey": "a1b2c3-d4e5f6-a7b8c9-d0e1f2-a3b4c5", "display_name": "Acme - Customer Service", "business_name": "Acme Inc", "status": 3, "isOnline": 1, "onlineAccount": 1, "onlineInbox": 2, "onlineServer": "online", "coexistence": 0, "conversationsThisMonth": 6, "marketingThisMonth": 3, "serviceThisMonth": 3, "incomingThisMonth": 0, "outgoingThisMonth": 80 }, { "create_time": 1735811185, "whatsapp": "972507654321", "apiKey": "f6e5d4-c3b2a1-f0e9d8-c7b6a5-f4e3d2", "display_name": "Pizza Place", "business_name": "Pizza Place Ltd", "status": 3, "isOnline": 0, "onlineAccount": 0, "onlineInbox": 0, "onlineServer": "noonline", "coexistence": 1, "conversationsThisMonth": 4, "marketingThisMonth": 1, "serviceThisMonth": 2, "incomingThisMonth": 1, "outgoingThisMonth": 40 } ] } ``` #### Example: Reason 3 The access token is wrong or expired. ```json { "status": "FAIL", "reason": 3 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Delete WhatsApp Account Source: https://docs.99digital.co.il/partners-api/whatsapp/delete-whatsapp-account Markdown: https://docs.99digital.co.il/markdown/partners-api/whatsapp/delete-whatsapp-account.md Section: Partners API › WhatsApp `DELETE https://partners.99digital.co.il/api/whatsapp/deleteWhatsApp` Delete WhatsApp Account allows you to send a cancellation request for the WhatsApp numbers you have added through the Partner program. This operation is automatic. Here is what happens once you send this request: 1. The WhatsApp number will be canceled and removed immediately. 2. You won't receive any incoming messages, and won't be able to send outgoing messages from it. 3. You will lose all the message history, files, contacts and statistics about this number, including the conversations counter. 4. The number will be free to register again, either by API or with the WhatsApp mobile app. 5. **This operation is irreversible! Make sure this is really what you want.** Your [webhook](https://docs.99digital.co.il/partners-api/settings/webhook/whatsapp-event) also gets a `whatsapp` event with `whatsapp_extra_info` 4: the WhatsApp account has been deleted. To remove an onboarding link that the client hasn't finished, use [Delete Onboarding account](https://docs.99digital.co.il/partners-api/whatsapp/delete-onboarding-account) instead. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/whatsapp/deleteWhatsApp` | | Method | JSON via DELETE | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Delete WhatsApp account** permission (WhatsApp Accounts). ## Body | Parameter | Description / Example | Remarks | | --- | --- | --- | | `whatsapp` | The WhatsApp number you wish to delete. | Use the country code and the number, digits only, without `+`. For example: `972501234567` | ## Response ```json { "status": "OK", "whatsapp": "972501234567", "reason": 1 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the WhatsApp account has been deleted. "FAIL" means error. | | `whatsapp` | The WhatsApp number you provided. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | The WhatsApp number is empty or wrong. Also returned when the request body is not valid JSON, and on an unknown error — please try again later. | | 13 | You need to use the DELETE method. | | 27 | The WhatsApp number does not exist under your account. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `whatsapp` | string | Yes | The WhatsApp number you wish to delete. Use the country code and the number, digits only, without `+`. For example: `972501234567`. The number must exist under your account (reason 27). This operation is irreversible. Max length: 20. Pattern: `^[0-9]{1,20}$`. Example: `972501234567`. | ### Example (generated from the schema) ```json { "whatsapp": "972501234567" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The WhatsApp account has been deleted. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `whatsapp` | string | (one of: OK) The WhatsApp number you provided. Example: `972501234567`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — The WhatsApp number is empty or wrong. Also returned when the request body is not valid JSON, and on an unknown error — please try again later; `13` — You need to use the DELETE method; `27` — The WhatsApp number does not exist under your account. | #### Example: OK The WhatsApp account has been deleted. ```json { "status": "OK", "reason": 1, "whatsapp": "972501234567" } ``` #### Example: Reason 27 The WhatsApp number does not exist under your account. ```json { "status": "FAIL", "reason": 27 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Get Onboarding List Source: https://docs.99digital.co.il/partners-api/whatsapp/get-onboarding-list Markdown: https://docs.99digital.co.il/markdown/partners-api/whatsapp/get-onboarding-list.md Section: Partners API › WhatsApp `GET https://partners.99digital.co.il/api/whatsapp/getAccounts` This API allows you to see all the onboarding accounts that you have created and their status. These are the onboarding links you created with [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding), newest first. You can remove a link that wasn't finished with [Delete Onboarding account](https://docs.99digital.co.il/partners-api/whatsapp/delete-onboarding-account). ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/whatsapp/getAccounts` | | Method | JSON via GET | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **View onboarding links page** permission (Onboarding Links). ## Body Nothing — leave it empty. ## Response ```json { "status": "OK", "reason": 1, "list": [ { "create_time": 1739874663, "whatsapp": "972501234567", "coexistence": 0, "business_name": "Acme Inc", "business_email": "john@example.com", "business_id": "1234567", "business_address": "Grove Street, San Andreas", "landing_page": "https://landing.example.com/44124", "onboarding_link": "https://onboarding.direct/6235", "display_name": "Acme", "reference": "123123", "status": 1 } ] } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `list` | Your onboarding accounts, newest first — see the table below. Empty when there are none. | | `reason` | The status explanation — see the table below. | Each item of `list`: | Name | Explanation | | --- | --- | | `create_time` | The Unix timestamp (in seconds) when the account was created. | | `whatsapp` | The WhatsApp number related to this onboarding account. In case the `status` value is 0 and the `coexistence` value is 1, this `whatsapp` parameter shows a temporary number until the client finishes the onboarding. The number you see starts with `97257…`. Once the client finishes the onboarding (`status` 1), it shows the real number. | | `coexistence` | 0 — this onboarding link is not coexistence. 1 — this onboarding link is coexistence. | | `business_name` | The business name that was provided by you. | | `business_email` | The business email that was provided by you. Empty if you didn't provide one. | | `business_id` | The business ID that was provided by you. Empty if you didn't provide one. | | `business_address` | The business address that was provided by you. Empty if you didn't provide one. | | `landing_page` | The landing page we generated for your client. It can be used inside Facebook to create the WhatsApp onboarding, in case your client does not have any website or landing page for their business. Empty if no landing page was generated. | | `onboarding_link` | The onboarding link you should share with your client, for them to set up their WhatsApp account. | | `display_name` | The display name that will be used once your client finishes the onboarding process. | | `reference` | The reference that was provided by you. Empty if you didn't provide one. | | `status` | 0 — the client did not finish the onboarding process. 1 — the onboarding process was finished. **Important note:** you can't remove accounts whose status is 1. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Unknown error, please try again later. | | 13 | You need to use the GET method. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `list` | array of object | (one of: OK) Your onboarding accounts, newest first. Empty when there are none. | | `list[].create_time` | integer | (one of: OK) The time the onboarding account was created (Unix time, in seconds). Example: `1739874663`. | | `list[].whatsapp` | string | (one of: OK) The WhatsApp number related to this onboarding account. If `status` is 0 and `coexistence` is 1, this is a temporary number (starting with `97257`) until the client finishes the onboarding. Once the client finishes the onboarding (`status` 1), it shows the real number. Example: `972501234567`. | | `list[].coexistence` | integer | (one of: OK) Whether this onboarding link is a coexistence onboarding. One of: `0` — This onboarding link is not coexistence; `1` — This onboarding link is coexistence. Example: `0`. | | `list[].business_name` | string | (one of: OK) The business name that you provided. Example: `Acme Inc`. | | `list[].business_email` | string | (one of: OK) The business email that you provided. Empty if you didn't provide one. Example: `john@example.com`. | | `list[].business_id` | string | (one of: OK) The business ID that you provided. Empty if you didn't provide one. Example: `1234567`. | | `list[].business_address` | string | (one of: OK) The business address that you provided. Empty if you didn't provide one. Example: `Grove Street, San Andreas`. | | `list[].landing_page` | string | (one of: OK) The landing page we generated for your client. It can be used inside Facebook to create the WhatsApp onboarding, in case your client doesn't have any website or landing page for their business. Empty if no landing page was generated. Example: `https://landing.example.com/44124`. | | `list[].onboarding_link` | string | (one of: OK) The onboarding link you should share with your client, for them to set up their WhatsApp account. Example: `https://onboarding.direct/6235`. | | `list[].display_name` | string | (one of: OK) The display name that will be used once your client finishes the onboarding process. Example: `Acme`. | | `list[].reference` | string | (one of: OK) The reference that you provided. Empty if you didn't provide one. Example: `123123`. | | `list[].status` | integer | (one of: OK) Whether the client has finished the onboarding. Important: you can't remove an onboarding account whose status is 1. One of: `0` — The client did not finish the onboarding process; `1` — The onboarding process was finished. Example: `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Unknown error, please try again later; `13` — You need to use the GET method. | #### Example: OK Two onboarding accounts — a coexistence link the client hasn't finished yet, and a finished one. ```json { "status": "OK", "reason": 1, "list": [ { "create_time": 1739874700, "whatsapp": "972571234567", "coexistence": 1, "business_name": "Pizza Place Ltd", "business_email": "", "business_id": "", "business_address": "", "landing_page": "", "onboarding_link": "https://onboarding.direct/6236", "display_name": "Pizza Place", "reference": "123124", "status": 0 }, { "create_time": 1739874663, "whatsapp": "972501234567", "coexistence": 0, "business_name": "Acme Inc", "business_email": "john@example.com", "business_id": "1234567", "business_address": "Grove Street, San Andreas", "landing_page": "https://landing.example.com/44124", "onboarding_link": "https://onboarding.direct/6235", "display_name": "Acme", "reference": "123123", "status": 1 } ] } ``` #### Example: Reason 3 The access token is wrong or expired. ```json { "status": "FAIL", "reason": 3 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Delete Onboarding account Source: https://docs.99digital.co.il/partners-api/whatsapp/delete-onboarding-account Markdown: https://docs.99digital.co.il/markdown/partners-api/whatsapp/delete-onboarding-account.md Section: Partners API › WhatsApp `DELETE https://partners.99digital.co.il/api/whatsapp/deleteAccount` Delete onboarding account allows you to remove an onboarding link that you don't need anymore. **Important remarks** - After sending a request to delete the account, the link will be removed and won't be available anymore. This step is irreversible. - You can only remove a link that has not finished the onboarding process (in the [Get Onboarding List](https://docs.99digital.co.il/partners-api/whatsapp/get-onboarding-list) API, the link's `status` must be 0). - After deleting an account, the WhatsApp number will be released for you to create a new onboarding link with that number ([Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding)). To delete a WhatsApp account that finished the onboarding, use [Delete WhatsApp Account](https://docs.99digital.co.il/partners-api/whatsapp/delete-whatsapp-account) instead. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/whatsapp/deleteAccount` | | Method | JSON via DELETE | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Delete pending onboarding link** permission (Onboarding Links). ## Body | Parameter | Description / Example | Remarks | | --- | --- | --- | | `whatsapp` | The WhatsApp number that was associated with this onboarding link, as `whatsapp` shows it in [Get Onboarding List](https://docs.99digital.co.il/partners-api/whatsapp/get-onboarding-list) (for a coexistence link, the temporary number). | Use the country code and the number, without `+`. For example: `972501234567` | ## Response ```json { "status": "OK", "whatsapp": "972501234567", "reason": 1 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the onboarding link has been deleted. "FAIL" means error. | | `whatsapp` | The WhatsApp number you provided. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | The WhatsApp number is empty or wrong. Also returned when the request body is not valid JSON, and on an unknown error — please try again later. | | 13 | You need to use the DELETE method. | | 25 | You can't remove an onboarding account that already finished the onboarding. | | 26 | The onboarding account was not found (under your account). | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `whatsapp` | string | Yes | The WhatsApp number that was associated with this onboarding link, as `whatsapp` shows it in [Get Onboarding List](https://docs.99digital.co.il/partners-api/whatsapp/get-onboarding-list) (for a coexistence link, the temporary number). Country code and number, digits only, without `+`. For example: `972501234567`. Max length: 20. Pattern: `^[0-9]{1,20}$`. Example: `972501234567`. | ### Example (generated from the schema) ```json { "whatsapp": "972501234567" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The onboarding link has been deleted. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `whatsapp` | string | (one of: OK) The WhatsApp number you provided. Example: `972501234567`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — The WhatsApp number is empty or wrong. Also returned when the request body is not valid JSON, and on an unknown error — please try again later; `13` — You need to use the DELETE method; `25` — You can't remove an onboarding account that already finished the onboarding; `26` — The onboarding account was not found under your account. | #### Example: OK The onboarding link has been deleted. ```json { "status": "OK", "reason": 1, "whatsapp": "972501234567" } ``` #### Example: Reason 25 The client already finished this onboarding, so it can't be removed. ```json { "status": "FAIL", "reason": 25 } ``` #### Example: Reason 26 The onboarding account was not found. ```json { "status": "FAIL", "reason": 26 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Get Conversations Statistics Source: https://docs.99digital.co.il/partners-api/whatsapp/get-conversations-statistics Markdown: https://docs.99digital.co.il/markdown/partners-api/whatsapp/get-conversations-statistics.md Section: Partners API › WhatsApp `GET https://partners.99digital.co.il/api/whatsapp/getConversationsStatistics` Get Conversations Statistics allows you to see all the conversations your WhatsApp numbers had during a period of months. You get one entry per month, newest first, with the conversations of all your WhatsApp numbers together — or of one number, with `whatsapp`. The current month is included when it is in the range, with its conversations so far. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/whatsapp/getConversationsStatistics` | | Method | JSON via GET | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Access WhatsApp usage page** permission (WhatsApp Accounts). ## Body With GET, send the parameters as query parameters: `GET /whatsapp/getConversationsStatistics?start_date=032025&end_date=052025`. The endpoint also accepts **POST** with the same fields in a JSON body, for example `{"start_date": "032025", "end_date": "052025"}`. | Parameter | Description / Example | Remarks | | --- | --- | --- | | `start_date` | The starting time to get the data, in `mmyyyy` format. For example, `032025` for all the conversations from March 2025. | This is not mandatory. If you leave it empty, no starting date is considered. | | `end_date` | The ending time to get the data, in `mmyyyy` format. For example, `052025` for all the conversations until May 2025. | This is not mandatory. If you leave it empty, no ending date is considered. | | `whatsapp` | Filter by WhatsApp number: the country code and the number, digits only. | This is not mandatory. If you leave it empty, you get all of your WhatsApp numbers. A number that isn't yours returns an empty list. | :::info We started collecting data in December 2024 (`122024`), so there is no data before this month. ::: ## Response ```json { "status": "OK", "reason": 1, "totalWhatsApp": 2, "whatsapp": null, "list": [ { "monthYear": "012025", "totalConversations": 12530, "totalMarketing": 10200, "totalService": 1000, "totalIncoming": 1330, "totalOutgoing": 900 }, { "monthYear": "122024", "totalConversations": 154320, "totalMarketing": 72063, "totalService": 12650, "totalIncoming": 69607, "totalOutgoing": 15400 } ] } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `totalWhatsApp` | The total number of WhatsApp accounts you manage. This shows 1 in case you filter by WhatsApp number (or 0 if the number isn't yours). | | `whatsapp` | In case you filter by WhatsApp number, this shows the number. In case you don't filter by WhatsApp number, this shows `null`. | | `list` | One entry per month, newest first — see the table below. Empty when there is no data. | | `reason` | The status explanation — see the table below. | Each item of `list`: | Name | Explanation | | --- | --- | | `monthYear` | The month, in `mmyyyy` format. | | `totalConversations` | The total number of conversations in that month (this includes marketing, service and incoming, all together). | | `totalMarketing` | The total number of marketing conversations in that month. | | `totalService` | The total number of service conversations in that month. | | `totalIncoming` | The total number of incoming conversations in that month. | | `totalOutgoing` | The total number of outgoing messages in that month. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). Also returned when `whatsapp` is not digits only. | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Unknown error, please try again later. | | 28 | Either `start_date` or `end_date` is in the wrong format: it must be `mmyyyy`, with a month from 01 to 12 and a year from 2020 to 2100. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `start_date` | query | string | No | The starting time to get the data, in `mmyyyy` format: for example `032025` for all the conversations from March 2025. This is not mandatory: if you leave it empty, no starting date is considered. We started collecting data in December 2024 (`122024`), so there is no data before this month. Pattern: `^(0[1-9]\|1[0-2])[0-9]{4}$`. Example: `032025`. | | `end_date` | query | string | No | The ending time to get the data, in `mmyyyy` format: for example `052025` for all the conversations until May 2025. This is not mandatory: if you leave it empty, no ending date is considered. Pattern: `^(0[1-9]\|1[0-2])[0-9]{4}$`. Example: `052025`. | | `whatsapp` | query | string | No | Filter by WhatsApp number: the country code and the number, digits only. This is not mandatory: if you leave it empty, you get all of your WhatsApp numbers. A number that isn't yours returns an empty list. Pattern: `^[0-9]+$`. Example: `972501234567`. | ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `totalWhatsApp` | integer | (one of: OK) The total number of WhatsApp accounts you manage. When you filter by WhatsApp number, 1 (or 0 if the number isn't yours). Example: `2`. | | `whatsapp` | string \| null | (one of: OK) When you filter by WhatsApp number, the number. When you don't, null. Example: `null`. | | `list` | array of object | (one of: OK) One entry per month, newest first. Empty when there is no data. | | `list[].monthYear` | string | (one of: OK) The month, in `mmyyyy` format. Example: `012025`. | | `list[].totalConversations` | integer | (one of: OK) The total number of conversations in that month (marketing, service and incoming all together). Example: `12530`. | | `list[].totalMarketing` | integer | (one of: OK) The total number of marketing conversations in that month. Example: `10200`. | | `list[].totalService` | integer | (one of: OK) The total number of service conversations in that month. Example: `1000`. | | `list[].totalIncoming` | integer | (one of: OK) The total number of incoming conversations in that month. Example: `1330`. | | `list[].totalOutgoing` | integer | (one of: OK) The total number of outgoing messages in that month. Example: `900`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). Also returned when `whatsapp` is not digits only; `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Unknown error, please try again later; `28` — Either 'start_date' or 'end_date' is in the wrong format: it must be `mmyyyy`, with a month from 01 to 12 and a year from 2020 to 2100. | #### Example: OK All your WhatsApp numbers, month by month. ```json { "status": "OK", "reason": 1, "totalWhatsApp": 2, "whatsapp": null, "list": [ { "monthYear": "012025", "totalConversations": 12530, "totalMarketing": 10200, "totalService": 1000, "totalIncoming": 1330, "totalOutgoing": 900 }, { "monthYear": "122024", "totalConversations": 154320, "totalMarketing": 72063, "totalService": 12650, "totalIncoming": 69607, "totalOutgoing": 15400 } ] } ``` #### Example: OK + whatsapp Filtered by one WhatsApp number. ```json { "status": "OK", "reason": 1, "totalWhatsApp": 1, "whatsapp": "972501234567", "list": [ { "monthYear": "012025", "totalConversations": 230, "totalMarketing": 150, "totalService": 40, "totalIncoming": 40, "totalOutgoing": 310 } ] } ``` #### Example: Reason 28 'start_date' or 'end_date' is in the wrong format. ```json { "status": "FAIL", "reason": 28 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Get Stores list Source: https://docs.99digital.co.il/partners-api/whatsapp/get-stores-list Markdown: https://docs.99digital.co.il/markdown/partners-api/whatsapp/get-stores-list.md Section: Partners API › WhatsApp `GET https://partners.99digital.co.il/api/whatsapp/getStores` This API allows you to see all the WhatsApp stores you created. The stores are listed newest first, each with its onboarding status. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/whatsapp/getStores` | | Method | JSON via GET | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **View stores page** permission (WhatsApp Stores). ## Body Nothing — leave it empty. ## Response ```json { "status": "OK", "reason": 1, "totalStores": 1, "list": [ { "whatsapp": "972501234567", "business_name": "My Store", "token": "aB3dE5fG7hJ9kL2mN4pQ6rS8tU0vW1", "reference": "ref123", "status": 1, "onboarding_link": "https://onboarding.direct/abc123", "site_url": "https://mystore.example.com", "created_at": "1699999999" } ] } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `totalStores` | The number of stores in `list`. | | `list` | Your WhatsApp stores, newest first — see the table below. Empty when there are none. | | `reason` | The status explanation — see the table below. | Each item of `list`: | Name | Explanation | | --- | --- | | `created_at` | The Unix timestamp (in seconds) when the store was created — as a string. | | `whatsapp` | The WhatsApp number related to this store. | | `token` | The store token to share with the client. | | `onboarding_link` | The onboarding link you should share with your client, for them to set up their WhatsApp account. | | `site_url` | The store website of the client. Empty when there is none. | | `business_name` | The client's business name. | | `reference` | The reference that was provided by you. Empty if you didn't provide one. | | `status` | 0 — the client did not finish the store onboarding process. 1 — the store onboarding process was finished. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Unknown error, please try again later. | | 13 | You need to use the GET method. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `totalStores` | integer | (one of: OK) The number of stores in `list`. Example: `1`. | | `list` | array of object | (one of: OK) Your WhatsApp stores, newest first. Empty when there are none. | | `list[].whatsapp` | string | (one of: OK) The WhatsApp number related to this store. Example: `972501234567`. | | `list[].business_name` | string | (one of: OK) The client's business name. Example: `My Store`. | | `list[].token` | string | (one of: OK) The store token to share with the client. Example: `aB3dE5fG7hJ9kL2mN4pQ6rS8tU0vW1`. | | `list[].reference` | string | (one of: OK) The reference that you provided. Empty if you didn't provide one. Example: `ref123`. | | `list[].status` | integer | (one of: OK) Whether the client has finished the store onboarding. One of: `0` — The client did not finish the store onboarding process; `1` — The store onboarding process was finished. Example: `1`. | | `list[].onboarding_link` | string | (one of: OK) The onboarding link you should share with your client, for them to set up their WhatsApp account. Example: `https://onboarding.direct/abc123`. | | `list[].site_url` | string | (one of: OK) The store website of the client. Empty when there is none. Example: `https://mystore.example.com`. | | `list[].created_at` | string | (one of: OK) The time the store was created (Unix time, in seconds) — as a string. Example: `1699999999`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Unknown error, please try again later; `13` — You need to use the GET method. | #### Example: OK One store, whose onboarding the client has finished. ```json { "status": "OK", "reason": 1, "totalStores": 1, "list": [ { "whatsapp": "972501234567", "business_name": "My Store", "token": "aB3dE5fG7hJ9kL2mN4pQ6rS8tU0vW1", "reference": "ref123", "status": 1, "onboarding_link": "https://onboarding.direct/abc123", "site_url": "https://mystore.example.com", "created_at": "1699999999" } ] } ``` #### Example: Reason 3 The access token is wrong or expired. ```json { "status": "FAIL", "reason": 3 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Start Here! Source: https://docs.99digital.co.il/partners-api/facebook/start-here Markdown: https://docs.99digital.co.il/markdown/partners-api/facebook/start-here.md Section: Partners API › Facebook Creating a new Facebook integration starts here. Please read carefully the following steps on how the onboarding works. | Endpoint | What it does | | --- | --- | | [Create onboarding Link](https://docs.99digital.co.il/partners-api/facebook/create-onboarding-link) | Create an onboarding link that connects one Facebook or Instagram type. | ## What is the Facebook integration? The Facebook integration allows you to connect 4 types of inboxes, to use with our API or with an online omnichannel connection. The number of each type is the `type` you send to [Create onboarding Link](https://docs.99digital.co.il/partners-api/facebook/create-onboarding-link): 1. **Facebook Messenger** — allows people to contact you through Messenger with your business page. 2. **Instagram Messenger** — allows people to contact you through Instagram Messenger with your Instagram page. 3. **Facebook Post & Comment** — allows you to write new posts, and to read and write new comments on your posts. 4. **Instagram Post & Comment** — allows you to create Instagram posts, and to read and write comments and mentions. Those 4 types of API connections are similar, but they are separated in order to allow you an easy connection to the real usage you need. ## Creating onboarding Onboarding to any type of this API is done separately, for your needs. After the client finishes the onboarding, you can start using it: getting webhooks for incoming data, and using the API to send out data. ## The steps - Create the onboarding link using our API ([Create onboarding Link](https://docs.99digital.co.il/partners-api/facebook/create-onboarding-link)), or from the partners UI directly (**Facebook & Instagram → Onboarding** in the partners dashboard). - Open the onboarding link yourself (or send it to your customer who owns the Facebook page, and the Instagram account), so they can finish the onboarding. - Once the client finishes the onboarding, you will get a webhook notification about it. You can set and see the webhook information with the [Settings → Webhook](https://docs.99digital.co.il/partners-api/settings/webhook) API. --- # Create onboarding Link Source: https://docs.99digital.co.il/partners-api/facebook/create-onboarding-link Markdown: https://docs.99digital.co.il/markdown/partners-api/facebook/create-onboarding-link.md Section: Partners API › Facebook `POST https://partners.99digital.co.il/api/facebook/createOnboarding` Create a Facebook onboarding link. Please read carefully the following steps on how the onboarding works (see also [Start Here!](https://docs.99digital.co.il/partners-api/facebook/start-here)): 1. This API allows you to create a Facebook onboarding link. You can then send the link to your customer, or use it for your own Facebook page. 2. Once the client opens the onboarding link and follows the Facebook onboarding process, this will create a connection to the relevant `type` product. After the client opens the link, this is what they will be facing: - The client is asked to log in to their Facebook account. If their browser is already logged in, it will recognize it automatically. If the client doesn't have a Facebook account, the onboarding will create an account for them. - The client will be asked to choose which Facebook page or Instagram page they want to connect (either to the messenger, or to manage the page directly). - The client will be asked to allow the permissions to be shared. - Submit: the client clicks the "Confirm" button and the page closes itself. The process is completed, and you can start using the API to send information, or the webhook to receive information. 3. You will get a webhook once the client completes the process, using the partners [webhook](https://docs.99digital.co.il/partners-api/settings/webhook) (the `facebook` event in [Event: Facebook](https://docs.99digital.co.il/partners-api/settings/webhook/facebook-event)). 4. You can create as many onboarding links as you need. If you need to connect all 4 types, you must create 4 onboarding links (even if the process looks similar). :::info Important notice You don't need an Instagram account to connect a Facebook (page or Messenger). But you can't connect Instagram without having a Facebook page too. This means that the Instagram account must also have a Facebook page on hand: you don't necessarily have to connect the Facebook page during the onboarding, but you must have one, because an Instagram page is linked to a Facebook page in order to exist. ::: ## Remarks - Each link is `https://onboarding.direct/f/` followed by its `param`, a unique 10-character code of letters and digits. - Send your partner access token. A token created with an Online account's **Account API Credentials** is rejected with reason 2. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/facebook/createOnboarding` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Create Facebook/Instagram onboarding links** permission. ## Body | Parameter | Description / Example | Maximum length | Mandatory | | --- | --- | --- | --- | | `type` | `1` — to connect Facebook Messenger; `2` — to connect Instagram Messenger; `3` — to connect Facebook page management (posts and comments + ads leads); `4` — to connect an Instagram page (posts and comments). Must be an int (a string of digits, such as `"1"`, is accepted too). | 1 | Yes | | `reference` | Any reference you wish to get back on the webhook. This is for your own usage. Letters, digits, underscores, spaces and hyphens (`-`) only. | 50 | No | | `server` | Server URL (relevant for omnichannel users only). Letters, digits, underscores and `.` `-` `:` `/` only. | 200 | No | | `account_id` | Account id (relevant for Online omnichannel users only). Must be an int (a string of digits is accepted too). | 18 digits | No | | `inbox_id` | Inbox id (relevant for Online omnichannel users only). Must be an int (a string of digits is accepted too). | 18 digits | No | ## Response ```json { "status": "OK", "param": "Xk7pQ2mRtA", "onboarding_link": "https://onboarding.direct/f/Xk7pQ2mRtA", "type": 1, "reason": 1 } ``` `type` can be 1, 2, 3 or 4, depending on the type you chose. ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the onboarding link was created (the connection is made once the client completes the onboarding). "FAIL" means error. | | `param` | The onboarding link's param value — the last part of `onboarding_link`. | | `onboarding_link` | The onboarding link to share with your client to connect to Facebook. | | `type` | The type you chose. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, try again. | | 20 | `reference` is invalid — longer than 50 characters, or has characters other than letters, digits, underscores, spaces and hyphens. | | 40 | Missing or invalid `type` — it must be 1, 2, 3 or 4. Also returned when the request body isn't valid JSON. | | 41 | Invalid `server` name. | | 42 | Invalid `account_id` — digits only, up to 18 digits. | | 43 | Invalid `inbox_id` — digits only, up to 18 digits. | | 44 | Contact support, wrong credentials. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `type` | integer | Yes | The type of connection the onboarding link creates. Must be an int (a string of digits, such as `"1"`, is accepted too). One of: `1` — Facebook Messenger — connect Facebook Messenger; `2` — Instagram Messenger — connect Instagram Messenger; `3` — Facebook Post & Comment — connect Facebook page management (posts and comments + ads leads); `4` — Instagram Post & Comment — connect an Instagram page (posts and comments). Example: `1`. | | `reference` | string | No | Any reference you wish to get back on the webhook, for your own use. Letters, digits, underscores, spaces and hyphens (`-`) only. Max length: 50. Example: `client-4711`. | | `server` | string | No | Server URL — relevant for Online omnichannel users only. Letters, digits, underscores and `.` `-` `:` `/` only. Max length: 200. Example: `online.99digital.co.il`. | | `account_id` | integer | No | Account id — relevant for Online omnichannel users only. Must be an int: digits only, up to 18 digits (a string of digits is accepted too). Example: `1234`. | | `inbox_id` | integer | No | Inbox id — relevant for Online omnichannel users only. Must be an int: digits only, up to 18 digits (a string of digits is accepted too). Example: `5678`. | ### Example: Facebook Messenger The simplest request — a link that connects Facebook Messenger (`type` 1). ```json { "type": 1 } ``` ### Example: With reference An Instagram Messenger link (`type` 2), with a reference you get back on the webhook. ```json { "type": 2, "reference": "client-4711" } ``` ### Example: Online inbox For Online omnichannel users: a Facebook Post & Comment link (`type` 3) for an inbox of an Online account. ```json { "type": 3, "reference": "client-4711", "server": "online.99digital.co.il", "account_id": 1234, "inbox_id": 5678 } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK means the onboarding link was created. The connection is made once the client completes the onboarding. Always `OK`. | | `param` | string | (one of: OK) The onboarding link's param value — the last part of `onboarding_link`. Example: `Xk7pQ2mRtA`. | | `onboarding_link` | string | (one of: OK) The onboarding link to share with your client to connect to Facebook. Example: `https://onboarding.direct/f/Xk7pQ2mRtA`. | | `type` | integer | (one of: OK) The type you chose (1, 2, 3 or 4). Example: `1`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, try again; `20` — `reference` is invalid — longer than 50 characters, or has characters other than letters, digits, underscores, spaces and hyphens; `40` — Missing or invalid `type` — it must be 1, 2, 3 or 4. Also returned when the request body isn't valid JSON; `41` — Invalid `server`; `42` — Invalid `account_id` — digits only, up to 18 digits; `43` — Invalid `inbox_id` — digits only, up to 18 digits; `44` — Contact support, wrong credentials. | #### Example: OK The onboarding link was created. ```json { "status": "OK", "reason": 1, "param": "Xk7pQ2mRtA", "onboarding_link": "https://onboarding.direct/f/Xk7pQ2mRtA", "type": 1 } ``` #### Example: Reason 3 The access token is wrong or expired. ```json { "status": "FAIL", "reason": 3 } ``` #### Example: Reason 40 `type` is missing, or not 1, 2, 3 or 4. ```json { "status": "FAIL", "reason": 40 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Create a new Builder Source: https://docs.99digital.co.il/partners-api/builder/create-a-new-builder Markdown: https://docs.99digital.co.il/markdown/partners-api/builder/create-a-new-builder.md Section: Partners API › Builder `POST https://partners.99digital.co.il/api/builder/createBuilder` Create a new builder for your customers. After creating a builder, you will get the URL link for that builder. This URL can be used by your customers to log in, if you wish to share the access with them. You can always log in to that builder using the [Login to a Builder](https://docs.99digital.co.il/partners-api/builder/login-to-a-builder) API endpoint. ## Remarks - The `builderID` is assigned automatically. Keep it: every other Builder endpoint takes it, and [Get Builders list](https://docs.99digital.co.il/partners-api/builder/get-builders-list) returns it too. - When the builder is created, your partners [webhook](https://docs.99digital.co.il/partners-api/settings/webhook) gets a `builder` event with `builder_extra_info` 1 and your `reference` (see [Event: Builder](https://docs.99digital.co.il/partners-api/settings/webhook/builder-event)). ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/builder/createBuilder` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Create new builder** permission. ## Body | Parameter | Description / Example | Maximum length | Mandatory | | --- | --- | --- | --- | | `client_name` | A client name for your reference. Letters (English, Hebrew or Arabic), digits, spaces and hyphens (`-`) only. | 100 | Yes | | `reference` | Any reference value (text/numbers only) you wish to receive back on the webhook. This is for your use only, so you can recognize your client. Letters (English, Hebrew or Arabic), digits, spaces and hyphens (`-`) only. | 50 | No | ## Response ```json { "status": "OK", "builderID": 432, "client_name": "Mr James", "url": "https://builder5.99digital.co.il/432-xY7kQ2pLmN4rT8vWb3sZcA/", "reason": 1 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the builder was created. "FAIL" means error. | | `builderID` | The builderID that was automatically assigned to the builder. | | `client_name` | The client name you provided. | | `url` | The builder URL. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, or the request body isn't valid JSON — try again. | | 13 | You need to use the POST method. | | 20 | `reference` is invalid — longer than 50 characters, or has characters other than letters, digits, spaces and hyphens. | | 30 | `client_name` is invalid — empty, longer than 100 characters, or has characters other than letters, digits, spaces and hyphens. | | 31 | Error on creating a builder, please try again or contact support. | | 32 | No builder ID is available for a new builder, please contact support. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `client_name` | string | Yes | A client name for your reference. Letters (English, Hebrew or Arabic), digits, spaces and hyphens (`-`) only. Max length: 100. Example: `Mr James`. | | `reference` | string | No | Any reference value you wish to receive back on the webhook. This is for your use only, so you can recognize your client. Letters (English, Hebrew or Arabic), digits, spaces and hyphens (`-`) only. Max length: 50. Example: `client-4711`. | ### Example: Client name The simplest request — only the client name. ```json { "client_name": "Mr James" } ``` ### Example: With reference With a reference you get back on the webhook and in Get Builders list. ```json { "client_name": "Mr James", "reference": "client-4711" } ``` ### Example: Hebrew name The client name can be in Hebrew or Arabic too. ```json { "client_name": "המספרה של דנה", "reference": "4711" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK means the builder was created. Always `OK`. | | `builderID` | integer | (one of: OK) The builderID that was automatically assigned to the builder. Example: `432`. | | `client_name` | string | (one of: OK) The client name you provided. Example: `Mr James`. | | `url` | string | (one of: OK) The builder URL. Example: `https://builder5.99digital.co.il/432-xY7kQ2pLmN4rT8vWb3sZcA/`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, or the request body isn't valid JSON — try again; `13` — You need to use the POST method; `20` — `reference` is invalid — longer than 50 characters, or has characters other than letters, digits, spaces and hyphens; `30` — `client_name` is invalid — empty, longer than 100 characters, or has characters other than letters, digits, spaces and hyphens; `31` — Error on creating a builder, please try again or contact support; `32` — No builder ID is available for a new builder, please contact support. | #### Example: OK The builder was created. ```json { "status": "OK", "reason": 1, "builderID": 432, "client_name": "Mr James", "url": "https://builder5.99digital.co.il/432-xY7kQ2pLmN4rT8vWb3sZcA/" } ``` #### Example: Reason 30 `client_name` is empty, too long, or has characters that aren't allowed. ```json { "status": "FAIL", "reason": 30 } ``` #### Example: Reason 31 Error on creating a builder, please try again or contact support. ```json { "status": "FAIL", "reason": 31 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Get Builders list Source: https://docs.99digital.co.il/partners-api/builder/get-builders-list Markdown: https://docs.99digital.co.il/markdown/partners-api/builder/get-builders-list.md Section: Partners API › Builder `GET https://partners.99digital.co.il/api/builder/getBuilders` Get all Builders list. The list holds all the builders you manage, ordered by creation time, newest first. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/builder/getBuilders` | | Method | JSON via GET | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Access builders page** permission. ## Body Nothing — leave it empty. The request has no parameters either. ## Response ```json { "status": "OK", "reason": 1, "totalBuilders": 2, "list": [ { "create_time": 1735897585, "client": "My Client B", "builderID": 1874, "url": "https://builder5.99digital.co.il/1874-pR4tLm8QwZ2xNc7vKb5sYd/", "reference": "client-4711" }, { "create_time": 1735811185, "client": "My Client A", "builderID": 432, "url": "https://builder5.99digital.co.il/432-xY7kQ2pLmN4rT8vWb3sZcA/", "reference": "" } ] } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `totalBuilders` | The total number of builder accounts you manage. | | `list` | Your builders, newest first — each item is explained in the table below. | | `reason` | The status explanation — see the reason table below. | Each item of `list`: | Name | Explanation | | --- | --- | | `create_time` | The UNIX time (in seconds) when this builder was created. | | `client` | The client name you provided. | | `builderID` | The builder ID that was assigned to the builder when it was created. | | `url` | The URL to access the builder. | | `reference` | Your reference value, from when you created the builder. Empty if you didn't set one. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, try again. | | 13 | You need to use the GET method. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the request was successful. Always `OK`. | | `totalBuilders` | integer | (one of: OK) The total number of builder accounts you manage. Example: `2`. | | `list` | array of object | (one of: OK) Your builders, newest first. | | `list[].create_time` | integer | (one of: OK) The Unix time (in seconds) when this builder was created. Example: `1735811185`. | | `list[].client` | string | (one of: OK) The client name you provided. Example: `My Client B`. | | `list[].builderID` | integer | (one of: OK) The builderID that was assigned to the builder when it was created. Example: `1874`. | | `list[].url` | string | (one of: OK) The URL to access the builder. Example: `https://builder5.99digital.co.il/1874-pR4tLm8QwZ2xNc7vKb5sYd/`. | | `list[].reference` | string | (one of: OK) Your reference value, from when you created the builder. Empty if you didn't set one. Example: `client-4711`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, try again; `13` — You need to use the GET method. | #### Example: OK Your builders, newest first. ```json { "status": "OK", "reason": 1, "totalBuilders": 2, "list": [ { "create_time": 1735897585, "client": "My Client B", "builderID": 1874, "url": "https://builder5.99digital.co.il/1874-pR4tLm8QwZ2xNc7vKb5sYd/", "reference": "client-4711" }, { "create_time": 1735811185, "client": "My Client A", "builderID": 432, "url": "https://builder5.99digital.co.il/432-xY7kQ2pLmN4rT8vWb3sZcA/", "reference": "" } ] } ``` #### Example: Reason 3 The access token is wrong or expired. ```json { "status": "FAIL", "reason": 3 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Login to a Builder Source: https://docs.99digital.co.il/partners-api/builder/login-to-a-builder Markdown: https://docs.99digital.co.il/markdown/partners-api/builder/login-to-a-builder.md Section: Partners API › Builder `POST https://partners.99digital.co.il/api/builder/loginBuilder` After you create a builder, you get the builder URL to access it. Accessing the builder directly from the URL is mostly meant for your end user client to do. This will create an account for them with email, password and 2FA, so only your end user is able to access it directly from the URL. Alternatively, with this Login to a Builder endpoint, you can access any builder under your account by bypassing the login screen. This will create a temporary login link you can access from your browser, or using an iFrame, to open the builder without the need for email, password and 2FA. **Important remarks** - After creating a login link, you must access it within 5 minutes. - You can access only one builder link at a time from the same browser. If you wish to log in to more than one builder simultaneously, you must use incognito mode, or a different iFrame browser session. - If a login link can't be created for the builder, the response is still OK, and `login` is the builder's regular URL, which opens its login screen. - Every login link you create sends a `builder` event with `builder_extra_info` 4 to your partners [webhook](https://docs.99digital.co.il/partners-api/settings/webhook) (see [Event: Builder](https://docs.99digital.co.il/partners-api/settings/webhook/builder-event)). :::warning Whoever opens the login link gets into the builder without a password or 2FA. Treat it like a password: open it right away, and don't log it or share it. ::: ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/builder/loginBuilder` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Enter builder** permission. ## Body | Parameter | Description / Example | | --- | --- | | `builderID` | The builderID you wish to log in to — from [Create a new Builder](https://docs.99digital.co.il/partners-api/builder/create-a-new-builder) or [Get Builders list](https://docs.99digital.co.il/partners-api/builder/get-builders-list). Digits only (a string of digits is accepted too). | ## Response ```json { "status": "OK", "builderID": 4142, "login": "https://builder5.99digital.co.il/4142-hT6wQz3LpX9mKr2vNc8sBf/…", "reason": 1 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the builder was found, and `login` holds the URL to open it. "FAIL" means error. | | `builderID` | The builderID you log in to. | | `login` | The login URL for that builder. Open it within 5 minutes. If a login link couldn't be created, this is the builder's regular URL. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, or the request body isn't valid JSON — try again. | | 13 | You need to use the POST method. | | 29 | `builderID` is empty or wrong — not a number, or not one of your builders. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `builderID` | integer | Yes | The builderID you wish to log in to — from [Create a new Builder](https://docs.99digital.co.il/partners-api/builder/create-a-new-builder) or [Get Builders list](https://docs.99digital.co.il/partners-api/builder/get-builders-list). Digits only (a string of digits is accepted too). Example: `4142`. | ### Example (generated from the schema) ```json { "builderID": 4142 } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK means the builder was found, and `login` holds the URL to open it. Always `OK`. | | `builderID` | integer | (one of: OK) The builderID you log in to. Example: `4142`. | | `login` | string | (one of: OK) The login URL for that builder. Open it within 5 minutes. If a login link couldn't be created, this is the builder's regular URL. Example: `https://builder5.99digital.co.il/4142-hT6wQz3LpX9mKr2vNc8sBf/…`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, or the request body isn't valid JSON — try again; `13` — You need to use the POST method; `29` — `builderID` is empty or wrong — not a number, or not one of your builders. | #### Example: OK The login link was created. Open it within 5 minutes. ```json { "status": "OK", "reason": 1, "builderID": 4142, "login": "https://builder5.99digital.co.il/4142-hT6wQz3LpX9mKr2vNc8sBf/…" } ``` #### Example: Reason 29 `builderID` is empty, not a number, or not one of your builders. ```json { "status": "FAIL", "reason": 29 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Reset user access Source: https://docs.99digital.co.il/partners-api/builder/reset-user-access Markdown: https://docs.99digital.co.il/markdown/partners-api/builder/reset-user-access.md Section: Partners API › Builder `POST https://partners.99digital.co.il/api/builder/resetAccess` Reset user access endpoint allows you to reset access to the builder, in case your client forgot the email, password or 2FA. When you create a builder, you have two ways to access it: either with the [Login to a Builder](https://docs.99digital.co.il/partners-api/builder/login-to-a-builder) endpoint, or directly from the URL, using an email, password and 2FA access. This Reset user access endpoint only resets the access through the URL. - This reset of the user access **does not** delete the builder or its content. It only resets the login access, allowing you to create new login details when you access the URL of the builder after the reset. - Resetting the user access will revoke the old credentials of the builder, and will sign out the user who is logged in to that builder with the old credentials. ## Remarks - `status` OK means the reset was requested from the builder. The response doesn't confirm that the builder completed it. - Every reset sends a `builder` event with `builder_extra_info` 3 to your partners [webhook](https://docs.99digital.co.il/partners-api/settings/webhook) (see [Event: Builder](https://docs.99digital.co.il/partners-api/settings/webhook/builder-event)). ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/builder/resetAccess` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Reset builder access** permission. ## Body | Parameter | Description / Example | | --- | --- | | `builderID` | The builderID you wish to reset — from [Create a new Builder](https://docs.99digital.co.il/partners-api/builder/create-a-new-builder) or [Get Builders list](https://docs.99digital.co.il/partners-api/builder/get-builders-list). Digits only (a string of digits is accepted too). | ## Response ```json { "status": "OK", "builderID": 1234, "reason": 1 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the reset was requested from the builder (it doesn't confirm that the builder completed it). "FAIL" means error. | | `builderID` | The builder ID you provided. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, or the request body isn't valid JSON — try again. | | 13 | You need to use the POST method. | | 29 | `builderID` is empty or wrong — not a number, or not one of your builders. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `builderID` | integer | Yes | The builderID you wish to reset — from [Create a new Builder](https://docs.99digital.co.il/partners-api/builder/create-a-new-builder) or [Get Builders list](https://docs.99digital.co.il/partners-api/builder/get-builders-list). Digits only (a string of digits is accepted too). Example: `1234`. | ### Example (generated from the schema) ```json { "builderID": 1234 } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK means the reset was requested from the builder. It doesn't confirm that the builder completed it. Always `OK`. | | `builderID` | integer | (one of: OK) The builderID you provided. Example: `1234`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, or the request body isn't valid JSON — try again; `13` — You need to use the POST method; `29` — `builderID` is empty or wrong — not a number, or not one of your builders. | #### Example: OK The reset was requested from the builder. ```json { "status": "OK", "reason": 1, "builderID": 1234 } ``` #### Example: Reason 29 `builderID` is empty, not a number, or not one of your builders. ```json { "status": "FAIL", "reason": 29 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Delete a Builder Source: https://docs.99digital.co.il/partners-api/builder/delete-a-builder Markdown: https://docs.99digital.co.il/markdown/partners-api/builder/delete-a-builder.md Section: Partners API › Builder `DELETE https://partners.99digital.co.il/api/builder/deleteBuilder` Delete a builder allows you to remove a builder instance from your account and delete it completely. :::danger Please read carefully! 1. The builder ID URL will be canceled and removed immediately. 2. Any builder connections, webhooks and nodes will be removed and will stop working. 3. All workflows, data and saved information within this builder will be removed. Make sure you back up all the JSON workflows from within the builder if you need them. 4. Make sure there aren't any WhatsApp number webhooks or other systems that send webhooks to this builder. 5. **This operation is irreversible! Make sure this is really what you want.** ::: ## Remarks - The request is a `DELETE` with a JSON body. - When the builder is deleted, your partners [webhook](https://docs.99digital.co.il/partners-api/settings/webhook) gets a `builder` event with `builder_extra_info` 2 (see [Event: Builder](https://docs.99digital.co.il/partners-api/settings/webhook/builder-event)). - If the builder no longer exists on the builder server, it is removed from your builders list and the response is reason 29. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/builder/deleteBuilder` | | Method | JSON via DELETE | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Delete builder** permission. ## Body | Parameter | Description / Example | Remarks | | --- | --- | --- | | `builderID` | The builderID you wish to delete. Digits only (a string of digits is accepted too). | The builderID is the ID that was assigned to you when creating the builder, and it can also be found with the [Get Builders list](https://docs.99digital.co.il/partners-api/builder/get-builders-list) endpoint. | ## Response ```json { "status": "OK", "builderID": 512, "client_name": "Mr James", "reference": "client-4711", "url": "https://builder5.99digital.co.il/512-Gm3kRt7YqW2pLx9cNv4sHd/", "reason": 1 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the builder was deleted. "FAIL" means error. | | `builderID` | The builderID you provided. | | `client_name` | The client name of the deleted builder. | | `reference` | The reference of the deleted builder. Empty if you didn't set one. | | `url` | The URL of the deleted builder. It no longer works. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, or the request body isn't valid JSON — try again. | | 13 | You need to use the DELETE method. | | 29 | `builderID` is empty or wrong — not a number, or not one of your builders — or the builder couldn't be deleted; try again or contact support. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `builderID` | integer | Yes | The builderID you wish to delete. It is the ID that was assigned to you when creating the builder, and it can also be found with the [Get Builders list](https://docs.99digital.co.il/partners-api/builder/get-builders-list) endpoint. Digits only (a string of digits is accepted too). Example: `512`. | ### Example (generated from the schema) ```json { "builderID": 512 } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK means the builder was deleted. Always `OK`. | | `builderID` | integer | (one of: OK) The builderID you provided. Example: `512`. | | `client_name` | string | (one of: OK) The client name of the deleted builder. Example: `Mr James`. | | `reference` | string | (one of: OK) The reference of the deleted builder. Empty if you didn't set one. Example: `client-4711`. | | `url` | string | (one of: OK) The URL of the deleted builder. It no longer works. Example: `https://builder5.99digital.co.il/512-Gm3kRt7YqW2pLx9cNv4sHd/`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, or the request body isn't valid JSON — try again; `13` — You need to use the DELETE method; `29` — `builderID` is empty or wrong — not a number, or not one of your builders — or the builder couldn't be deleted; try again or contact support. | #### Example: OK The builder was deleted. ```json { "status": "OK", "reason": 1, "builderID": 512, "client_name": "Mr James", "reference": "client-4711", "url": "https://builder5.99digital.co.il/512-Gm3kRt7YqW2pLx9cNv4sHd/" } ``` #### Example: Reason 29 `builderID` is empty, not a number or not one of your builders, or the builder couldn't be deleted. ```json { "status": "FAIL", "reason": 29 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Create a new online account Source: https://docs.99digital.co.il/partners-api/online/create-a-new-online-account Markdown: https://docs.99digital.co.il/markdown/partners-api/online/create-a-new-online-account.md Section: Partners API › Online `POST https://partners.99digital.co.il/api/online/createAccount` Create a new online omnichannel account for your customers. After creating an online account, we also create your first admin account, and you can access it immediately — for example with [Login to an agent](https://docs.99digital.co.il/partners-api/online/login-to-an-agent) and the `agent_id` from the response. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/createAccount` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Create new account** permission. An account-scoped access token (created from the **Account API Credentials** of one account in your partners dashboard) can't use this endpoint: it gets reason 2. ## Body | Parameter | Description / Example | Maximum length | Mandatory | Example | | --- | --- | --- | --- | --- | | `account_name` | The account (business) name that will be created. Letters (English, Hebrew or Arabic), digits, spaces and hyphens only. | 100 | Yes | Acme inc | | `agents` | The total number of agents you allow this account to create, 1 to 9999. If you don't send it, 10 is used. | 4 | No (default 10) | 10 | | `inboxes` | The total number of inboxes you allow this account to create, 1 to 999. If you don't send it, 5 is used. | 3 | No (default 5) | 10 | | `admin_email` | The admin access email that will be created as agent number 1 for this account. If it already exists under one of your accounts, see the important notice below. | 50 | Yes | admin@example.com | | `admin_name` | The name of agent number 1. Letters (English, Hebrew or Arabic), digits, spaces and hyphens only. | 50 | Yes | Test Name | | `admin_displayName` | The display name of agent number 1 (the name that will appear in the online account). Letters (English, Hebrew or Arabic), digits, spaces and hyphens only. | 50 | Yes | Name | | `admin_password` | The password to create for logging in to the new admin account: a minimum length of 6 characters; at least 1 upper case letter (A-Z); at least 1 lower case letter (a-z); at least 1 special character — one of `` ! @ # $ % ^ & * ( ) \ _ + - = [ ] { } " / . , ` < > : ; ? ~ ' `` or the vertical bar. Spaces at the start or the end are removed. | 50 | Yes | Acme!2026pass | | `admin_2fa` | Whether to allow logging in to the admin account with 2FA or not. Values: `0` — no 2FA; `1` — email 2FA; `2` — SMS 2FA. The default, in case you don't send anything, is 0. | 1 | No | 1 | | `admin_2fa_value` | In case you used 1 or 2 in `admin_2fa`, here you provide the email address (for 1) or the phone number (for 2) that gets the 2FA code before you can log in with that new agent. The phone number is an international number, digits only, without `+`, at least 9 digits — for example `972501234567`. Ignored when `admin_2fa` is 0. | 50 | No (yes if `admin_2fa` is 1 or 2) | admin@example.com | | `server` | If you wish to install the account on a server other than the main server (online.99digital.co.il), provide the subdomain of that server here. This feature is only available for selected partners: a server that isn't enabled for your partner account is rejected with reason 34. If you don't send it, `online` is used. | 30 | No | online | | `reference` | Any reference value you wish to receive back on the webhook. This is for your use only, so you can recognize your client. Letters (English, Hebrew or Arabic), digits, spaces and hyphens only. | 50 | No | client-1234 | :::info **Important notice:** if you create `admin_email` with an email that already exists under any of your accounts, we will not try to re-create this email or change any of its parameters (`admin_name`, `admin_displayName` and `admin_password` won't be used). Instead, we will just allow this email address to also have access to the new account you are creating. This will not override its existing permissions; it will just add this existing agent email to the new account. ::: When the account is created, an `online` event with `online_extra_info` 1 and your `reference` is sent to your [webhook](https://docs.99digital.co.il/partners-api/settings/webhook/online-event). ## Response ```json { "status": "OK", "reason": 1, "account_id": 8, "agent_id": 100, "server": "online" } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `account_id` | The newly created account ID. | | `agent_id` | The newly created agent ID (agent number 1, the admin). This agent can now log in to the platform. | | `server` | The server subdomain that this account was created on: `https://{server}.99digital.co.il`. | | `reason` | The status explanation — see the table below. | | `error` | Only with reason 0 — a short technical description of the error. | | Reason | Explanation | | --- | --- | | 0 | The settings of the server couldn't be loaded — try again later or contact support. The `error` field has the details. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Internal error, or the body isn't valid JSON (send it with `Content-Type: application/json`) — please try again or contact support. | | 13 | You need to use the POST method. | | 20 | `reference` is invalid — longer than 50 characters, or characters other than letters, digits, spaces and hyphens. | | 31 | Error on creating an account, please try again or contact support. | | 34 | `server` is invalid or wrong, or it isn't enabled for your partner account. | | 36 | `account_name` is invalid or wrong — empty, longer than 100 characters, or characters other than letters, digits, spaces and hyphens. | | 37 | The `agents` / `inboxes` number is invalid or wrong (agents 1–9999, inboxes 1–999). | | 38 | The `admin_email` address is invalid or wrong. | | 39 | `admin_name` or `admin_displayName` is invalid or wrong. | | 40 | `admin_password` is invalid or wrong, or doesn't meet the minimum required. | | 41 | `admin_2fa` is invalid or wrong — it must be 0, 1 or 2. | | 42 | `admin_2fa_value` is wrong — it must be a valid email when `admin_2fa` is 1, or a phone number of at least 9 digits when it is 2. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `account_name` | string | Yes | The account (business) name that will be created. Letters (English, Hebrew or Arabic), digits, spaces and hyphens only. Max length: 100. Example: `Acme inc`. | | `agents` | integer | No | The total number of agents you allow this account to create, 1 to 9999. If you don't send it, 10 is used. Default: `10`. Minimum: 1. Maximum: 9999. Example: `10`. | | `inboxes` | integer | No | The total number of inboxes you allow this account to create, 1 to 999. If you don't send it, 5 is used. Default: `5`. Minimum: 1. Maximum: 999. Example: `10`. | | `admin_email` | string | Yes | The admin access email that will be created as agent number 1 for this account. Maximum length: 50. If it already exists under one of your accounts, we don't re-create it or change its details (`admin_name`, `admin_displayName` and `admin_password` are not used): the existing agent email just gets access to the new account as well, without overriding its existing permissions — see the important notice above. Example: `admin@example.com`. | | `admin_name` | string | Yes | The name of agent number 1. Letters (English, Hebrew or Arabic), digits, spaces and hyphens only. Max length: 50. Example: `Test Name`. | | `admin_displayName` | string | Yes | The display name of agent number 1 (the name that will appear in the online account). Letters (English, Hebrew or Arabic), digits, spaces and hyphens only. Max length: 50. Example: `Name`. | | `admin_password` | string | Yes | The password to create for logging in to the new admin account: at least 6 characters, with at least 1 upper case letter (A-Z), at least 1 lower case letter (a-z) and at least 1 special character — one of `` ! @ # $ % ^ & * ( ) \ _ + - = [ ] { } \| " / . , ` < > : ; ? ~ ' ``. Spaces at the start or the end are removed. Maximum length: 50. Min length: 6. Example: `Acme!2026pass`. | | `admin_2fa` | integer | No | Whether to allow logging in to the admin account with 2FA or not. The default, in case you don't send anything, is 0. One of: `0` — No 2FA; `1` — Email 2FA — the code is sent to the email in `admin_2fa_value`; `2` — SMS 2FA — the code is sent to the phone number in `admin_2fa_value`. Default: `0`. Example: `1`. | | `admin_2fa_value` | string | No | Required if `admin_2fa` is 1 or 2: the email address (for 1) or the phone number (for 2) that gets the 2FA code before you can log in with the new agent. A phone number is in international format, digits only, without `+` — at least 9 digits, for example `972501234567`. Ignored when `admin_2fa` is 0. Maximum length: 50. Example: `admin@example.com`. | | `server` | string | No | If you wish to install the account on a server other than the main server (online.99digital.co.il), provide the subdomain of that server here. This feature is only available to selected partners: a server that isn't enabled for your partner account is rejected with reason 34. If you don't send it, `online` is used. Default: `online`. Max length: 30. Example: `online`. | | `reference` | string | No | Any reference value you wish to receive back on the webhook. It is for your use only, so you can recognize your client. Letters (English, Hebrew or Arabic), digits, spaces and hyphens only. Max length: 50. Example: `client-1234`. | ### Example: Basic A new account and its admin, without 2FA. ```json { "account_name": "Acme inc", "agents": 10, "inboxes": 10, "admin_email": "admin@example.com", "admin_name": "Test Name", "admin_displayName": "Name", "admin_password": "Acme!2026pass" } ``` ### Example: Email 2FA The admin gets a 2FA code by email before logging in. ```json { "account_name": "Acme inc", "agents": 10, "inboxes": 10, "admin_email": "admin@example.com", "admin_name": "Test Name", "admin_displayName": "Name", "admin_password": "Acme!2026pass", "admin_2fa": 1, "admin_2fa_value": "admin@example.com" } ``` ### Example: SMS 2FA The admin gets a 2FA code by SMS before logging in — an international number, digits only. ```json { "account_name": "Acme inc", "agents": 10, "inboxes": 10, "admin_email": "admin@example.com", "admin_name": "Test Name", "admin_displayName": "Name", "admin_password": "Acme!2026pass", "admin_2fa": 2, "admin_2fa_value": "972501234567" } ``` ### Example: Server and reference Install the account on another server enabled for you, and get your reference back on the webhook. ```json { "account_name": "חנות הפרחים", "agents": 5, "inboxes": 2, "admin_email": "owner@example.com", "admin_name": "Dana Levi", "admin_displayName": "Dana", "admin_password": "Flowers#2026", "server": "online2", "reference": "client-1234" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `account_id` | integer | (one of: OK) The newly created account ID. Example: `8`. | | `agent_id` | integer | (one of: OK) The newly created agent ID (agent number 1, the admin). This agent can now log in to the platform. Example: `100`. | | `server` | string | (one of: OK) The server subdomain this account was created on: `https://{server}.99digital.co.il`. Example: `online`. | | `status` | string | (one of: FAIL) Error — see `reason`. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — The settings of the server couldn't be loaded — try again later or contact support. The `error` field has the details; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Internal error, or the body isn't valid JSON (send it with `Content-Type: application/json`) — please try again or contact support; `13` — You need to use the POST method; `20` — `reference` is invalid — longer than 50 characters, or characters other than letters, digits, spaces and hyphens; `31` — Error on creating an account, please try again or contact support; `34` — `server` is invalid or wrong, or it isn't enabled for your partner account; `36` — `account_name` is invalid or wrong — empty, longer than 100 characters, or characters other than letters, digits, spaces and hyphens; `37` — `agents` / `inboxes` number is invalid or wrong (agents 1–9999, inboxes 1–999); `38` — `admin_email` address is invalid or wrong; `39` — `admin_name` or `admin_displayName` is invalid or wrong; `40` — `admin_password` is invalid or wrong, or doesn't meet the minimum required; `41` — `admin_2fa` is invalid or wrong — it must be 0, 1 or 2; `42` — `admin_2fa_value` is wrong — it must be a valid email when `admin_2fa` is 1, or a phone number of at least 9 digits when it is 2. | | `error` | string | (one of: FAIL) Only with reason 0 — a short technical description of the error. | #### Example: OK The account and its admin agent were created. ```json { "status": "OK", "reason": 1, "account_id": 8, "agent_id": 100, "server": "online" } ``` #### Example: Reason 3 Access token does not exist or expired. ```json { "status": "FAIL", "reason": 3 } ``` #### Example: Reason 34 The server is invalid, or it isn't enabled for your partner account. ```json { "status": "FAIL", "reason": 34 } ``` #### Example: Reason 40 The admin password doesn't meet the minimum required. ```json { "status": "FAIL", "reason": 40 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Get accounts list Source: https://docs.99digital.co.il/partners-api/online/get-accounts-list Markdown: https://docs.99digital.co.il/markdown/partners-api/online/get-accounts-list.md Section: Partners API › Online `GET https://partners.99digital.co.il/api/online/getAccounts` Get the online accounts list. The list is sorted by creation time, newest first. Deleted accounts are not listed. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/getAccounts` | | Method | JSON via GET | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Access OmniChannel accounts page** permission. ## Account-scoped access tokens This endpoint also accepts an account-scoped access token — a token created from the **Account API Credentials** of one account (in your partners dashboard: OmniChannel Accounts → the key icon of the account). With such a token, the list holds only that account (`totalOnline` is 1, or 0 if the account was deleted), and the permission above isn't needed. ## Body Nothing — leave it empty. The request has no body and no parameters: send only the `Authorization` header. ## Response ```json { "status": "OK", "reason": 1, "totalOnline": 2, "list": [ { "create_time": 1735811186, "account_name": "My Business B", "account_id": 2, "server": "online", "account_status": "suspended", "reference": "12346" }, { "create_time": 1735811185, "account_name": "My Business A", "account_id": 1, "server": "online", "account_status": "active", "reference": "12345" } ] } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `totalOnline` | The total number of online accounts you manage. | | `list` | Your online accounts, newest first — see the table below. Empty when you have none. | | `reason` | The status explanation — see the table below. | | `error` | Only with reason 0 — a short technical description of the error. | Each item in `list`: | Name | Explanation | | --- | --- | | `create_time` | The Unix time when this account was created. | | `account_name` | The account name. | | `account_id` | The ID of the account (a number). | | `server` | The server subdomain hosting the account. | | `account_status` | The account status: `active` or `suspended`. A suspended account can't be logged in to; reactivate it with [Update account](https://docs.99digital.co.il/partners-api/online/update-account). | | `reference` | Your reference value, from when you created the account. Empty if you didn't send one. | | Reason | Explanation | | --- | --- | | 0 | Error getting the accounts list — try again or contact support. The `error` field has the details. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Internal error, please try again or contact support. | | 13 | You need to use the GET method. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `totalOnline` | integer | (one of: OK) The total number of online accounts you manage. Example: `2`. | | `list` | array of object | (one of: OK) Your online accounts, newest first. Empty when you have none. | | `list[].create_time` | integer | (one of: OK) The time this account was created (Unix time, in seconds). Example: `1735811186`. | | `list[].account_name` | string | (one of: OK) The account name. Example: `My Business B`. | | `list[].account_id` | integer | (one of: OK) The ID of the account. Example: `2`. | | `list[].server` | string | (one of: OK) The server subdomain hosting the account. Example: `online`. | | `list[].account_status` | string | (one of: OK) The account status. One of: `active` — The account is active; `suspended` — The account is suspended — no one can log in to it. Reactivate it with [Update account](https://docs.99digital.co.il/partners-api/online/update-account). | | `list[].reference` | string | (one of: OK) Your reference value, from when you created the account. Empty if you didn't send one. Example: `12345`. | | `status` | string | (one of: FAIL) Error — see `reason`. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — Error getting the accounts list — try again or contact support. The `error` field has the details; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Internal error, please try again or contact support; `13` — You need to use the GET method. | | `error` | string | (one of: FAIL) Only with reason 0 — a short technical description of the error. | #### Example: OK Two accounts, newest first. ```json { "status": "OK", "reason": 1, "totalOnline": 2, "list": [ { "create_time": 1735811186, "account_name": "My Business B", "account_id": 2, "server": "online", "account_status": "suspended", "reference": "12346" }, { "create_time": 1735811185, "account_name": "My Business A", "account_id": 1, "server": "online", "account_status": "active", "reference": "12345" } ] } ``` #### Example: Account-scoped token With an account-scoped access token, the list holds only that account. ```json { "status": "OK", "reason": 1, "totalOnline": 1, "list": [ { "create_time": 1735811185, "account_name": "My Business A", "account_id": 1, "server": "online", "account_status": "active", "reference": "12345" } ] } ``` #### Example: Reason 3 Access token does not exist or expired. ```json { "status": "FAIL", "reason": 3 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Update account Source: https://docs.99digital.co.il/partners-api/online/update-account Markdown: https://docs.99digital.co.il/markdown/partners-api/online/update-account.md Section: Partners API › Online `POST https://partners.99digital.co.il/api/online/updateAccount` Update account allows you to change and set a few things for your online omnichannel account. You can set and change only the relevant values that you want: send `account_id`, `server`, and only the fields you want to change. The response shows the account's values after the update. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/updateAccount` | | Method | JSON via POST (PATCH is accepted too, with the same body) | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Change account details** permission. An account-scoped access token (created from the **Account API Credentials** of one account in your partners dashboard) can't use this endpoint: it gets reason 2. ## Body | Parameter | Description / Example | Maximum length | Mandatory | Example | | --- | --- | --- | --- | --- | | `account_id` | The account ID you wish to update — one of your accounts on `server`. Digits only. | 20 | Yes | 8 | | `server` | The server subdomain of the account ID. If you don't send it, `online` is used. | 30 | No (default `online`) | online | | `account_name` | You can change the account name. Letters (English, Hebrew or Arabic), digits, spaces and hyphens only. | 100 | No | My Account | | `account_status` | `0` — disabled (suspended); `1` — active. You can enable or disable access to your account: if you set this to 0, no one can log in to the account. | 1 | No | 0 | | `builder_url` | If you have a builder, here is the place to put its link, so it will be available from the "Workflow Builder" section in the online. You must provide a valid builder URL (the builder login URL): it must start with `https://builder`. | 150 | No | `https://builder2.99digital.co.il/1234-aBcDeFgHiJkLmNoP/` | :::info **Important notice:** any other settings of the account can be changed from within the account settings inside the online. This updateAccount endpoint allows you to update `builder_url`, the account status and the account name, which are not available to you inside the online account directly; hence this API endpoint is the only way to update those parameters (besides your partners dashboard). ::: When you send `account_status`, an `online` event is sent to your [webhook](https://docs.99digital.co.il/partners-api/settings/webhook/online-event): `online_extra_info` 2 when the account is set to active, 3 when it is suspended. ## Response ```json { "status": "OK", "reason": 1, "account_id": 8, "server": "online", "account_name": "My Account", "account_status": 1, "builder_url": "https://builder2.99digital.co.il/1234-aBcDeFgHiJkLmNoP/" } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `account_id` | The account ID you used. | | `server` | The server subdomain of the account: `https://{server}.99digital.co.il`. | | `account_name` | The account name. This shows the new account name if you chose to update it, or the current account name if you didn't change this value. | | `account_status` | The account status: 1 for active, 0 for suspended. This shows the new account status if you chose to update it, or the current account status if you didn't change this value. | | `builder_url` | The builder URL link. This shows the new builder URL if you chose to update it, or the current builder URL if you didn't change this value (null when there is none). | | `reason` | The status explanation — see the table below. | | `error` | Only with some reason 0 failures — a short technical description of the error. | | Reason | Explanation | | --- | --- | | 0 | Error reaching the server of the account — try again later or contact support. When its settings couldn't be loaded, the `error` field has the details. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Internal error, or the body isn't valid JSON (send it with `Content-Type: application/json`) — please try again or contact support. | | 13 | You need to use the POST method. | | 20 | `reference` is invalid. (This endpoint has no `reference` parameter, so it doesn't return this reason.) | | 31 | Error on updating the account, please try again or contact support. | | 33 | `account_id` is invalid or wrong, or it isn't one of your accounts on this `server`. | | 34 | `server` is invalid or wrong. | | 36 | `account_name` is invalid or wrong. | | 46 | `account_status` is invalid or wrong — it must be 0 or 1. | | 47 | `builder_url` is invalid or wrong — it must start with `https://builder`. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | The account ID you wish to update — one of your accounts on `server`. Digits only, up to 20 digits (a string of digits is accepted too). Example: `8`. | | `server` | string | No | The server subdomain of the account ID. If you don't send it, `online` is used. Letters, digits, spaces and hyphens only. Default: `online`. Max length: 30. Example: `online`. | | `account_name` | string | No | You can change the account name. Letters (English, Hebrew or Arabic), digits, spaces and hyphens only. Max length: 100. Example: `My Account`. | | `account_status` | integer | No | You can enable or disable access to your account. If you set this to 0, no one can log into the account. One of: `0` — Disabled (suspended) — no one can log in to the account; `1` — Active. Example: `0`. | | `builder_url` | string | No | If you have a builder, here is the place to put its link, so it is available from the "Workflow Builder" section in the online. You must provide a valid builder URL (the builder login URL): it must start with `https://builder`. Maximum length: 150. Example: `https://builder2.99digital.co.il/1234-aBcDeFgHiJkLmNoP/`. | ### Example: Account name Change the account name only. ```json { "account_id": 8, "server": "online", "account_name": "My Account" } ``` ### Example: Suspend Disable access to the account — no one can log in to it. ```json { "account_id": 8, "server": "online", "account_status": 0 } ``` ### Example: Activate Enable access to a suspended account again. ```json { "account_id": 8, "server": "online", "account_status": 1 } ``` ### Example: Builder URL Make your builder available from the "Workflow Builder" section in the online. ```json { "account_id": 8, "server": "online", "builder_url": "https://builder2.99digital.co.il/1234-aBcDeFgHiJkLmNoP/" } ``` ### Example: All fields Change the name, the status and the builder URL together. ```json { "account_id": 8, "server": "online", "account_name": "חנות הפרחים", "account_status": 1, "builder_url": "https://builder2.99digital.co.il/1234-aBcDeFgHiJkLmNoP/" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `account_id` | integer | (one of: OK) The account ID you used. Example: `8`. | | `server` | string | (one of: OK) The server subdomain of the account: `https://{server}.99digital.co.il`. Example: `online`. | | `account_name` | string | (one of: OK) The account name — the new account name if you chose to update it, or the current account name if you didn't change this value. Example: `My Account`. | | `account_status` | integer | (one of: OK) The account status — the new account status if you chose to update it, or the current account status if you didn't change this value. One of: `0` — Suspended; `1` — Active. | | `builder_url` | string \| null | (one of: OK) The builder URL link — the new builder URL if you chose to update it, or the current builder URL if you didn't change this value. Example: `https://builder2.99digital.co.il/1234-aBcDeFgHiJkLmNoP/`. | | `status` | string | (one of: FAIL) Error — see `reason`. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — Error reaching the server of the account — try again later or contact support. When its settings couldn't be loaded, the `error` field has the details; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Internal error, or the body isn't valid JSON (send it with `Content-Type: application/json`) — please try again or contact support; `13` — You need to use the POST method; `20` — `reference` is invalid. (This endpoint has no `reference` parameter, so it doesn't return this reason.); `31` — Error on updating account, please try again or contact support; `33` — `account_id` is invalid or wrong, or it isn't one of your accounts on this `server`; `34` — `server` is invalid or wrong; `36` — `account_name` is invalid or wrong; `46` — `account_status` is invalid or wrong — it must be 0 or 1; `47` — `builder_url` is invalid or wrong — it must start with `https://builder`. | | `error` | string | (one of: FAIL) Only with some reason 0 failures — a short technical description of the error. | #### Example: OK The account was updated. Fields you didn't send show their current values. ```json { "status": "OK", "reason": 1, "account_id": 8, "server": "online", "account_name": "My Account", "account_status": 1, "builder_url": "https://builder2.99digital.co.il/1234-aBcDeFgHiJkLmNoP/" } ``` #### Example: Reason 33 The account ID is invalid, or it isn't one of your accounts on this server. ```json { "status": "FAIL", "reason": 33 } ``` #### Example: Reason 47 The builder URL must start with https://builder. ```json { "status": "FAIL", "reason": 47 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Get Inboxes List Source: https://docs.99digital.co.il/partners-api/online/get-inboxes-list Markdown: https://docs.99digital.co.il/markdown/partners-api/online/get-inboxes-list.md Section: Partners API › Online `POST https://partners.99digital.co.il/api/online/getInboxes` Get the inboxes list of an account. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/getInboxes` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **View inboxes list** permission. ## Account-scoped access tokens This endpoint also accepts an account-scoped access token — a token created from the **Account API Credentials** of one account (in your partners dashboard: OmniChannel Accounts → the key icon of the account). Such a token works for its own account only: `accountID` and `server` must be that account's — send `server` when the account isn't on `online` — otherwise the response is reason 33. It doesn't need the permission above. ## Body | Parameter | Description / Example | | --- | --- | | `accountID` | The account ID you wish to get the inboxes list of. Digits only, up to 20 digits. | | `server` | The server subdomain hosting the account (default: `online`). If not set, `online` will be used. | ## Response ```json { "status": "OK", "reason": 1, "accountID": 1, "server": "online", "totalInboxes": 2, "list": [ { "id": 1, "name": "Inbox name", "channel_type": "Channel::Api", "api_type": "wa_v2" }, { "id": 2, "name": "Telegram posts", "channel_type": "Channel::Api", "api_type": null } ] } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `accountID` | The account ID you used. | | `server` | The server subdomain hosting the account. | | `totalInboxes` | The total number of inboxes in the selected account. | | `list` | The inboxes of the account — see the table below. | | `reason` | The status explanation — see the table below. | Each item in `list`: | Name | Explanation | | --- | --- | | `id` | Inbox ID. | | `name` | The inbox name. | | `channel_type` | The channel type, for example `Channel::Api`. | | `api_type` | If `channel_type` is `Channel::Api`, here it shows the API type (for example `wa_v2`). Otherwise — or when an API inbox has no API type — it is null. | | Reason | Explanation | | --- | --- | | 0 | The settings of the account's server couldn't be loaded — try again later or contact support. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Internal error, or the body isn't valid JSON (send it with `Content-Type: application/json`) — please try again or contact support. | | 13 | You need to use the POST method. | | 31 | Error getting the inboxes list, please try again or contact support. | | 33 | `accountID` is invalid or wrong, or it isn't one of your accounts on this `server` — or, with an account-scoped access token, `accountID` and `server` aren't the token's own. | | 34 | `server` is invalid or wrong. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `accountID` | integer | Yes | The account ID you wish to get the inboxes list of. Digits only, up to 20 digits (a string of digits is accepted too). Example: `1`. | | `server` | string | No | The server subdomain hosting the account (default: `online`). If not set, `online` will be used. Default: `online`. Example: `online`. | ### Example (generated from the schema) ```json { "accountID": 1, "server": "online" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `accountID` | integer | (one of: OK) The account ID you used. Example: `1`. | | `server` | string | (one of: OK) The server subdomain hosting the account. Example: `online`. | | `totalInboxes` | integer | (one of: OK) The total number of inboxes in the selected account. Example: `2`. | | `list` | array of object | (one of: OK) The inboxes of the account. | | `list[].id` | integer | (one of: OK) Inbox ID. Example: `1`. | | `list[].name` | string | (one of: OK) The inbox name. Example: `Inbox name`. | | `list[].channel_type` | string | (one of: OK) The channel type, for example `Channel::Api`. Example: `Channel::Api`. | | `list[].api_type` | string \| null | (one of: OK) If `channel_type` is `Channel::Api`, here it shows the API type (for example `wa_v2`). Otherwise — or when an API inbox has no API type — it is null. Example: `wa_v2`. | | `status` | string | (one of: FAIL) Error — see `reason`. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — The settings of the account's server couldn't be loaded — try again later or contact support; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Internal error, or the body isn't valid JSON (send it with `Content-Type: application/json`) — please try again or contact support; `13` — You need to use the POST method; `31` — Error getting the inboxes list, please try again or contact support; `33` — `accountID` is invalid or wrong, or it isn't one of your accounts on this `server` — or, with an account-scoped access token, `accountID` and `server` aren't the token's own; `34` — `server` is invalid or wrong. | #### Example: OK An account with two inboxes. ```json { "status": "OK", "reason": 1, "accountID": 1, "server": "online", "totalInboxes": 2, "list": [ { "id": 1, "name": "Inbox name", "channel_type": "Channel::Api", "api_type": "wa_v2" }, { "id": 2, "name": "Telegram posts", "channel_type": "Channel::Api", "api_type": null } ] } ``` #### Example: Reason 33 The account ID is invalid, or it isn't one of your accounts on this server. ```json { "status": "FAIL", "reason": 33 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Get agents list Source: https://docs.99digital.co.il/partners-api/online/get-agents-list Markdown: https://docs.99digital.co.il/markdown/partners-api/online/get-agents-list.md Section: Partners API › Online `POST https://partners.99digital.co.il/api/online/getAgents` Get the agents list of an account. Use an agent's `id` to log in as that agent with [Login to an agent](https://docs.99digital.co.il/partners-api/online/login-to-an-agent) or [Login to a Conversation](https://docs.99digital.co.il/partners-api/online/login-to-a-conversation). ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/getAgents` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **View agents list** permission. ## Account-scoped access tokens This endpoint also accepts an account-scoped access token — a token created from the **Account API Credentials** of one account (in your partners dashboard: OmniChannel Accounts → the key icon of the account). Such a token works for its own account only: `accountID` and `server` must be that account's — send `server` when the account isn't on `online` — otherwise the response is reason 33. It doesn't need the permission above. ## Body | Parameter | Description / Example | | --- | --- | | `accountID` | The account ID you wish to get the agents list of. Digits only, up to 20 digits. | | `server` | The server subdomain hosting the account (default: `online`). If not set, `online` will be used. | ## Response ```json { "status": "OK", "reason": 1, "totalAgents": 2, "list": [ { "id": 1, "create_time": 1748168139, "email": "agent1@example.com", "agent_name": "agent name", "role": "Admin", "two_factor_type": "sms", "two_factor_phone": "+972501234567", "two_factor_email": null }, { "id": 2, "create_time": 1748168139, "email": "agent2@example.com", "agent_name": "agent name 2", "role": "Marketing", "two_factor_type": "email", "two_factor_phone": null, "two_factor_email": "my@example.com" } ] } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `totalAgents` | The total number of agents in the selected account. It also counts the account's operation bots, which `list` leaves out, so it can be higher than the number of agents in `list`. | | `list` | The agents of the account — see the table below. | | `reason` | The status explanation — see the table below. | | `error` | Only with reason 0 — a short technical description of the error. | Each item in `list`: | Name | Explanation | | --- | --- | | `create_time` | The Unix time when this agent was created. | | `id` | Agent ID. | | `email` | The email of the agent. | | `agent_name` | The agent name. | | `role` | The agent role. | | `two_factor_type` | If 2FA is enabled to log in to the account, it shows either `sms` or `email`. Otherwise, it shows null. | | `two_factor_phone` | If `two_factor_type` is set to `sms`, here is the SMS phone number. | | `two_factor_email` | If `two_factor_type` is set to `email`, here is the email address. | | Reason | Explanation | | --- | --- | | 0 | The settings of the account's server couldn't be loaded — try again later or contact support. The `error` field has the details. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Internal error, or the body isn't valid JSON (send it with `Content-Type: application/json`) — please try again or contact support. | | 13 | You need to use the POST method. | | 31 | Error getting the agents list, please try again or contact support. | | 33 | `accountID` is invalid or wrong, or it isn't one of your accounts on this `server` — or, with an account-scoped access token, `accountID` and `server` aren't the token's own. | | 34 | `server` is invalid or wrong. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `accountID` | integer | Yes | The account ID you wish to get the agents list of. Digits only, up to 20 digits (a string of digits is accepted too). Example: `1`. | | `server` | string | No | The server subdomain hosting the account (default: `online`). If not set, `online` will be used. Default: `online`. Example: `online`. | ### Example (generated from the schema) ```json { "accountID": 1, "server": "online" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `totalAgents` | integer | (one of: OK) The total number of agents in the selected account. It also counts the account's operation bots, which `list` leaves out, so it can be higher than the number of agents in `list`. Example: `2`. | | `list` | array of object | (one of: OK) The agents of the account. | | `list[].id` | integer | (one of: OK) Agent ID. Example: `1`. | | `list[].create_time` | integer | (one of: OK) The Unix time (in seconds) when this agent was created. Example: `1748168139`. | | `list[].email` | string | (one of: OK) The email of the agent. Example: `agent1@example.com`. | | `list[].agent_name` | string | (one of: OK) The agent name. Example: `agent name`. | | `list[].role` | string | (one of: OK) The agent role. Example: `Admin`. | | `list[].two_factor_type` | string \| null | (one of: OK) If 2FA is enabled to log in to the account, it shows either `sms` or `email`. Otherwise, it shows null. Example: `sms`. | | `list[].two_factor_phone` | string \| null | (one of: OK) If `two_factor_type` is set to `sms`, here is the SMS phone number. Example: `+972501234567`. | | `list[].two_factor_email` | string \| null | (one of: OK) If `two_factor_type` is set to `email`, here is the email address. Example: `null`. | | `status` | string | (one of: FAIL) Error — see `reason`. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — The settings of the account's server couldn't be loaded — try again later or contact support. The `error` field has the details; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Internal error, or the body isn't valid JSON (send it with `Content-Type: application/json`) — please try again or contact support; `13` — You need to use the POST method; `31` — Error getting the agents list, please try again or contact support; `33` — `accountID` is invalid or wrong, or it isn't one of your accounts on this `server` — or, with an account-scoped access token, `accountID` and `server` aren't the token's own; `34` — `server` is invalid or wrong. | | `error` | string | (one of: FAIL) Only with reason 0 — a short technical description of the error. | #### Example: OK An account with two agents — one with SMS 2FA, one with email 2FA. ```json { "status": "OK", "reason": 1, "totalAgents": 2, "list": [ { "id": 1, "create_time": 1748168139, "email": "agent1@example.com", "agent_name": "agent name", "role": "Admin", "two_factor_type": "sms", "two_factor_phone": "+972501234567", "two_factor_email": null }, { "id": 2, "create_time": 1748168139, "email": "agent2@example.com", "agent_name": "agent name 2", "role": "Marketing", "two_factor_type": "email", "two_factor_phone": null, "two_factor_email": "my@example.com" } ] } ``` #### Example: Reason 33 The account ID is invalid, or it isn't one of your accounts on this server. ```json { "status": "FAIL", "reason": 33 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Login to an agent Source: https://docs.99digital.co.il/partners-api/online/login-to-an-agent Markdown: https://docs.99digital.co.il/markdown/partners-api/online/login-to-an-agent.md Section: Partners API › Online `POST https://partners.99digital.co.il/api/online/loginAgent` You can log in to any agent of an account. Accessing the account directly from this API endpoint is mostly meant for your end-user client to do: they can log in with the credentials you created for them, bypassing the username/password and 2FA of accessing the online account directly. This is SSO login. Moreover, you can build this solution over an iFrame inside your own platform, to allow accessing the system directly from your app. **Important remarks** - After creating a login link, you must access it within 5 minutes, and you can only access it once. If you need to access the same URL again, you must create a new link. - The URL you will get can be opened directly in your browser or in an iFrame solution, or implemented in your own application. - Whoever opens the link is logged in as that agent: treat it like a password, and don't store, log or share it. - You can't log in to a suspended account (reason 33). Get the agent IDs with [Get agents list](https://docs.99digital.co.il/partners-api/online/get-agents-list). To open a specific conversation right after the login, use [Login to a Conversation](https://docs.99digital.co.il/partners-api/online/login-to-a-conversation). Every login link you create sends an `online` event with `online_extra_info` 7 to your [webhook](https://docs.99digital.co.il/partners-api/settings/webhook/online-event). ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/loginAgent` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Login as an agent** permission. ## Account-scoped access tokens This endpoint also accepts an account-scoped access token — a token created from the **Account API Credentials** of one account (in your partners dashboard: OmniChannel Accounts → the key icon of the account). Such a token works for its own account only: `accountID` and `server` must be that account's — send `server` when the account isn't on `online` — otherwise the response is reason 29. It doesn't need the permission above, and it can log in to any agent of its account. :::warning Anyone who has the Account API Credentials of an account can log in to any agent of that account, including its admins, without a password or 2FA. Give them only to someone you trust with the whole account. These credentials are permanent and can't be changed. ::: ## Body | Parameter | Description / Example | | --- | --- | | `accountID` | The account ID you wish to log in to. Digits only, up to 20 digits. | | `agentID` | The agent ID you wish to log in to — the agent's `id` in [Get agents list](https://docs.99digital.co.il/partners-api/online/get-agents-list). Digits only, up to 20 digits. | | `server` | The server subdomain hosting the account — letters and digits only. If you don't send it, `online` is used. | ## Response ```json { "status": "OK", "reason": 1, "accountID": 4142, "agentID": 3142, "server": "online", "login": "https://online.99digital.co.il/…" } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `accountID` | The account ID you log in to. | | `agentID` | The agent ID you log in to. | | `server` | The server subdomain you log in to. | | `login` | The login URL for that account and agent (always `https://`). Open it within 5 minutes; it works only once. | | `reason` | The status explanation — see the table below. | | `error` | Only with reason 0 — a short technical description of the error. | | Reason | Explanation | | --- | --- | | 0 | The settings of the account's server couldn't be loaded — try again later or contact support. The `error` field has the details. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Internal error, or the body isn't valid JSON (send it with `Content-Type: application/json`) — please try again or contact support. | | 13 | You need to use the POST method. | | 29 | `accountID` is invalid or wrong, or it isn't one of your accounts on this `server` — or, with an account-scoped access token, `accountID` and `server` aren't the token's own. | | 32 | You can't connect to a suspended account. (Not returned any more: a suspended account answers with reason 33.) | | 33 | The account is suspended — you can't connect to a suspended account. | | 34 | `server` is invalid or wrong — letters and digits only. | | 35 | `agentID` is invalid or wrong, or the login link couldn't be created for it. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `accountID` | integer | Yes | The account ID you wish to log in to. Digits only, up to 20 digits (a string of digits is accepted too). Example: `4142`. | | `agentID` | integer | Yes | The agent ID you wish to log in to — the agent's `id` in [Get agents list](https://docs.99digital.co.il/partners-api/online/get-agents-list). Digits only, up to 20 digits (a string of digits is accepted too). Example: `3142`. | | `server` | string | No | The server subdomain hosting the account — letters and digits only. If you don't send it, `online` is used. Default: `online`. Example: `online`. | ### Example (generated from the schema) ```json { "accountID": 4142, "agentID": 3142, "server": "online" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `accountID` | integer | (one of: OK) The account ID you log in to. Example: `4142`. | | `agentID` | integer | (one of: OK) The agent ID you log in to. Example: `3142`. | | `server` | string | (one of: OK) The server subdomain you log in to. Example: `online`. | | `login` | string | (one of: OK) The login URL for that account and agent (always `https://`). Open it within 5 minutes; it works only once. Example: `https://online.99digital.co.il/…`. | | `status` | string | (one of: FAIL) Error — see `reason`. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — The settings of the account's server couldn't be loaded — try again later or contact support. The `error` field has the details; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Internal error, or the body isn't valid JSON (send it with `Content-Type: application/json`) — please try again or contact support; `13` — You need to use the POST method; `29` — `accountID` is invalid or wrong, or it isn't one of your accounts on this `server` — or, with an account-scoped access token, `accountID` and `server` aren't the token's own; `32` — You can't connect to a suspended account. (Not returned any more: a suspended account answers with reason 33.); `33` — The account is suspended — you can't connect to a suspended account; `34` — `server` is invalid or wrong — letters and digits only; `35` — `agentID` is invalid or wrong, or the login link couldn't be created for it. | | `error` | string | (one of: FAIL) Only with reason 0 — a short technical description of the error. | #### Example: OK The login link — open it within 5 minutes, once. ```json { "status": "OK", "reason": 1, "accountID": 4142, "agentID": 3142, "server": "online", "login": "https://online.99digital.co.il/…" } ``` #### Example: Reason 29 The account ID is invalid, or it isn't one of your accounts on this server. ```json { "status": "FAIL", "reason": 29 } ``` #### Example: Reason 33 The account is suspended. ```json { "status": "FAIL", "reason": 33 } ``` #### Example: Reason 35 The agent ID is invalid, or the login link couldn't be created for it. ```json { "status": "FAIL", "reason": 35 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Login to a Conversation Source: https://docs.99digital.co.il/partners-api/online/login-to-a-conversation Markdown: https://docs.99digital.co.il/markdown/partners-api/online/login-to-a-conversation.md Section: Partners API › Online `POST https://partners.99digital.co.il/api/online/loginConversation` You can log in to any agent of an account, into a specific conversation inside a specific inbox. Accessing the account directly from this API endpoint is mostly meant for your end-user clients to do: you can log in with the credentials you created for them, bypassing the username/password and 2FA of accessing the online account directly. This is SSO login. Moreover, you can build this solution over an iFrame inside your own platform, to allow accessing the system directly from your app. **Important remarks** - After creating a login link, you must access it within 5 minutes, and you can only access it once. If you need to access the same URL again, you must create a new link. - The URL you will get can be opened directly in your browser or in an iFrame solution, or implemented in your own application. - Using this endpoint will not only open the account: it will take you to the specific conversation with the end user. - Whoever opens the link is logged in as that agent: treat it like a password, and don't store, log or share it. - You can't log in to a suspended account (reason 33). To log in without opening a conversation, use [Login to an agent](https://docs.99digital.co.il/partners-api/online/login-to-an-agent). Get the agent IDs with [Get agents list](https://docs.99digital.co.il/partners-api/online/get-agents-list), and the inbox IDs with [Get Inboxes List](https://docs.99digital.co.il/partners-api/online/get-inboxes-list). ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/loginConversation` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Requires the **Login to a conversation** permission. ## Account-scoped access tokens This endpoint also accepts an account-scoped access token — a token created from the **Account API Credentials** of one account (in your partners dashboard: OmniChannel Accounts → the key icon of the account). Such a token works for its own account only: `accountID` and `server` must be that account's — send `server` when the account isn't on `online` — otherwise the response is reason 29. It doesn't need the permission above, and it can log in to any agent of its account. :::warning Anyone who has the Account API Credentials of an account can log in to any agent of that account, including its admins, without a password or 2FA. Give them only to someone you trust with the whole account. These credentials are permanent and can't be changed. ::: ## Body | Parameter | Description / Example | | --- | --- | | `accountID` | The account ID you wish to log in to. Digits only, up to 20 digits. | | `agentID` | The agent ID you wish to log in to — the agent's `id` in [Get agents list](https://docs.99digital.co.il/partners-api/online/get-agents-list). Digits only, up to 20 digits. | | `server` | The server subdomain hosting the account — letters and digits only. If you don't send it, `online` is used. | | `inbox_id` | The inbox ID to open. Either this or `conversation_id` is mandatory. Sent without `conversation_id`, it opens the conversation with the contact inside that inbox. Digits only. | | `conversation_id` | The conversation ID to open. Either this or `inbox_id` is mandatory. If `inbox_id` is provided along with `conversation_id`, the `inbox_id` will be ignored. Digits only. | | `phone_number` | The phone number of the contact, to open the conversation window with. Either this or `email` is mandatory. International format: 7 to 20 digits, with or without a leading `+` (it is added if missing). | | `email` | The email of the contact. Either this or `phone_number` is mandatory. Up to 254 characters; it is converted to lower case. | | `name` | The name of the contact. Not mandatory. Up to 100 characters. | ## Response ```json { "status": "OK", "reason": 1, "accountID": 4142, "agentID": 3142, "server": "online", "inbox_id": 12, "conversation_id": 165, "login": "https://online.99digital.co.il/…" } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `accountID` | The account ID you log in to. | | `agentID` | The agent ID you log in to. | | `server` | The server subdomain you log in to. | | `inbox_id` | The `inbox_id` provided (even when it was ignored because you sent `conversation_id`), or null if you didn't send one. | | `conversation_id` | The `conversation_id` provided, or null if you didn't send one. | | `login` | The login URL for that account, agent and conversation (always `https://`). Open it within 5 minutes; it works only once. | | `reason` | The status explanation — see the table below. | | `error` | Only with reason 0 — a short technical description of the error. | | Reason | Explanation | | --- | --- | | 0 | The settings of the account's server couldn't be loaded — try again later or contact support. The `error` field has the details. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Internal error, or the body isn't valid JSON (send it with `Content-Type: application/json`) — please try again or contact support. | | 13 | You need to use the POST method. | | 29 | `accountID` is invalid or wrong, or it isn't one of your accounts on this `server` — or, with an account-scoped access token, `accountID` and `server` aren't the token's own. | | 32 | You can't connect to a suspended account. (Not returned any more: a suspended account answers with reason 33.) | | 33 | The account is suspended — you can't connect to a suspended account. | | 34 | `server` is invalid or wrong — letters and digits only. | | 35 | `agentID` is invalid or wrong, or the login link couldn't be created for it. | | 36 | `inbox_id` or `conversation_id` is invalid or wrong — send at least one of them, digits only. | | 37 | `phone_number` or `email` is invalid or wrong — send at least one of them — or `name` is longer than 100 characters. | ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `accountID` | integer | Yes | The account ID you wish to log in to. Digits only, up to 20 digits (a string of digits is accepted too). Example: `4142`. | | `agentID` | integer | Yes | The agent ID you wish to log in to — the agent's `id` in [Get agents list](https://docs.99digital.co.il/partners-api/online/get-agents-list). Digits only, up to 20 digits (a string of digits is accepted too). Example: `3142`. | | `server` | string | No | The server subdomain hosting the account — letters and digits only. If you don't send it, `online` is used. Default: `online`. Example: `online`. | | `inbox_id` | integer | No | The inbox ID to open. Either this or `conversation_id` is mandatory. Sent without `conversation_id`, it opens the conversation with the contact (`phone_number` or `email`) inside that inbox. Digits only. Example: `12`. | | `conversation_id` | integer | No | The conversation ID to open. Either this or `inbox_id` is mandatory. If `inbox_id` is provided along with `conversation_id`, the `inbox_id` is ignored. Digits only. Example: `165`. | | `phone_number` | string | No | The phone number of the contact, to open the conversation window with, in international format: 7 to 20 digits, with or without a leading `+` (it is added if missing). Either this or `email` is mandatory. Example: `972501234567`. | | `email` | string | No | The email of the contact. Either this or `phone_number` is mandatory. It is converted to lower case. Max length: 254. Example: `client@example.com`. | | `name` | string | No | The name of the contact. Not mandatory. Max length: 100. Example: `ישראל ישראלי`. | ### Example: Conversation Open a specific conversation by its ID. ```json { "accountID": 4142, "agentID": 3142, "server": "online", "conversation_id": 165, "phone_number": "972501234567" } ``` ### Example: Inbox and phone Open the conversation with the contact, by phone number, inside a specific inbox. ```json { "accountID": 4142, "agentID": 3142, "server": "online", "inbox_id": 12, "phone_number": "972501234567", "name": "ישראל ישראלי" } ``` ### Example: Inbox and email Open the conversation with the contact, by email, inside a specific inbox. ```json { "accountID": 4142, "agentID": 3142, "server": "online", "inbox_id": 12, "email": "client@example.com", "name": "Israel Israeli" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `accountID` | integer | (one of: OK) The account ID you log in to. Example: `4142`. | | `agentID` | integer | (one of: OK) The agent ID you log in to. Example: `3142`. | | `server` | string | (one of: OK) The server subdomain you log in to. Example: `online`. | | `inbox_id` | integer \| null | (one of: OK) The `inbox_id` provided (even when it was ignored because you sent `conversation_id`), or null if you didn't send one. Example: `null`. | | `conversation_id` | integer \| null | (one of: OK) The `conversation_id` provided, or null if you didn't send one. Example: `165`. | | `login` | string | (one of: OK) The login URL for that account, agent and conversation (always `https://`). Open it within 5 minutes; it works only once. Example: `https://online.99digital.co.il/…`. | | `status` | string | (one of: FAIL) Error — see `reason`. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — The settings of the account's server couldn't be loaded — try again later or contact support. The `error` field has the details; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Internal error, or the body isn't valid JSON (send it with `Content-Type: application/json`) — please try again or contact support; `13` — You need to use the POST method; `29` — `accountID` is invalid or wrong, or it isn't one of your accounts on this `server` — or, with an account-scoped access token, `accountID` and `server` aren't the token's own; `32` — You can't connect to a suspended account. (Not returned any more: a suspended account answers with reason 33.); `33` — The account is suspended — you can't connect to a suspended account; `34` — `server` is invalid or wrong — letters and digits only; `35` — `agentID` is invalid or wrong, or the login link couldn't be created for it; `36` — `inbox_id` or `conversation_id` is invalid or wrong — send at least one of them, digits only; `37` — `phone_number` or `email` is invalid or wrong — send at least one of them — or `name` is longer than 100 characters. | | `error` | string | (one of: FAIL) Only with reason 0 — a short technical description of the error. | #### Example: OK The login link — open it within 5 minutes, once. ```json { "status": "OK", "reason": 1, "accountID": 4142, "agentID": 3142, "server": "online", "inbox_id": null, "conversation_id": 165, "login": "https://online.99digital.co.il/…" } ``` #### Example: OK by inbox The link for a login by `inbox_id` — `conversation_id` is null. ```json { "status": "OK", "reason": 1, "accountID": 4142, "agentID": 3142, "server": "online", "inbox_id": 12, "conversation_id": null, "login": "https://online.99digital.co.il/…" } ``` #### Example: Reason 36 Neither `inbox_id` nor `conversation_id` was sent, or one of them isn't a number. ```json { "status": "FAIL", "reason": 36 } ``` #### Example: Reason 37 Neither `phone_number` nor `email` was sent, one of them is invalid, or `name` is longer than 100 characters. ```json { "status": "FAIL", "reason": 37 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Delete an account Source: https://docs.99digital.co.il/partners-api/online/delete-an-account Markdown: https://docs.99digital.co.il/markdown/partners-api/online/delete-an-account.md Section: Partners API › Online `DELETE https://partners.99digital.co.il/api/online/deleteAccount` Delete an account removes and deletes an account from the server. :::danger[Please read carefully!] 1. The account ID will be canceled and removed immediately. 2. All messages, conversations, contacts, files, webhooks, labels — everything will be deleted. 3. All Studio data, reports, inbox data and saved information within this account will be removed. Make sure you back up all the data you need from within the account. 4. All WhatsApp inboxes connected to this account will be released, in case you want to connect them to another account. 5. **This operation is irreversible! Make sure this is really what you want.** ::: ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/deleteAccount` | | Method | JSON via DELETE | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | ## Body | Parameter | Description / Example | | --- | --- | | `accountID` | The account ID you wish to delete. Digits only, up to 20 digits (a string of digits is accepted too). | | `server` | The server subdomain of the account ID. The default is `online`. | ## Response ```json { "status": "OK", "reason": 1, "accountID": 1234, "server": "online" } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful — the account is deleted. "FAIL" means error. | | `accountID` | The account ID you provided. | | `server` | The server subdomain where the account was hosted. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 0 | The settings of the account's server couldn't be loaded — contact support. The response also has an `error` text. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, or the body isn't valid JSON (send it with `Content-Type: application/json`). Try again. | | 13 | You need to use the DELETE method. | | 33 | `accountID` is empty or wrong: not a number, not one of your accounts on this `server`, or unknown to the server. | | 34 | `server` is invalid or wrong. | ## What happens - The account is deleted on its server (`server`). If the server doesn't know the account, the response is reason 33 and nothing changes. - Every WhatsApp number connected to one of the account's inboxes is released: in [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers) its `isOnline` goes back to 0, and you can connect it to an inbox in another account with [Create a new WhatsApp Inbox](https://docs.99digital.co.il/partners-api/online/create-a-new-whatsapp-inbox). The WhatsApp number itself is not canceled or disabled. - The account no longer appears in [Get Accounts List](https://docs.99digital.co.il/partners-api/online/get-accounts-list), and the other Online endpoints no longer accept its ID. - Its usage history is kept: [Online Usage](https://docs.99digital.co.il/partners-api/online/online-usage) still returns the account for the months that were collected before the deletion. - If you set a [webhook](https://docs.99digital.co.il/partners-api/settings/webhook), you get an `online` event with `online_extra_info` 4, "account was deleted" (see [Event: Online](https://docs.99digital.co.il/partners-api/settings/webhook/online-event)). ## Access Requires the **Delete online account** permission. Account-scoped access tokens — created from an account's **Account API Credentials** in the partners dashboard — can't use this endpoint: they get reason 2. When the access token has expired (reason 3), create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token). ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `accountID` | integer | Yes | The account ID you wish to delete. Digits only, up to 20 digits (a string of digits is accepted too). Example: `1234`. | | `server` | string | No | The server subdomain of the account ID — the server the account is on. The default is `online`. Default: `online`. Example: `online`. | ### Example (generated from the schema) ```json { "accountID": 1234, "server": "online" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful — the account is deleted. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `accountID` | integer | (one of: OK) The account ID you provided. Example: `1234`. | | `server` | string | (one of: OK) The server subdomain where the account was hosted. Example: `online`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — The settings of the account's server couldn't be loaded — contact support. The response also has an `error` text; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, or the body isn't valid JSON (send it with `Content-Type: application/json`). Try again; `13` — You need to use the DELETE method; `33` — `accountID` is empty or wrong: not a number, not one of your accounts on this `server`, or unknown to the server; `34` — `server` is invalid or wrong. | | `error` | string | (one of: FAIL) Only with reason 0 — a short technical description of the problem. | #### Example: OK The account is deleted. ```json { "status": "OK", "reason": 1, "accountID": 1234, "server": "online" } ``` #### Example: Reason 33 `accountID` is not one of your accounts on this `server`, or it was already deleted. ```json { "status": "FAIL", "reason": 33 } ``` #### Example: Reason 2 An account-scoped access token was used. ```json { "status": "FAIL", "reason": 2 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Create a new WhatsApp Inbox Source: https://docs.99digital.co.il/partners-api/online/create-a-new-whatsapp-inbox Markdown: https://docs.99digital.co.il/markdown/partners-api/online/create-a-new-whatsapp-inbox.md Section: Partners API › Online `POST https://partners.99digital.co.il/api/online/createInbox` Create a new WhatsApp Inbox inside an account. - This endpoint allows you to add a WhatsApp inbox to your online account. - This endpoint does not create a new WhatsApp number; it only assigns your existing WhatsApp number to a new inbox in your account. - You can only use a WhatsApp number (the `whatsapp_number` parameter) for numbers that are available to use as an inbox (meaning, there are no other inboxes created for this WhatsApp number). To see the available list, use the Partners API endpoint [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers) and look for the value of `isOnline`: 0 means the number is available. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/createInbox` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | ## Body | Parameter | Description / Example | Maximum length | Mandatory | Example | | --- | --- | --- | --- | --- | | `inbox_type` | `whatsapp` — a fixed value: it is the only inbox type. | 8 | Yes | `whatsapp` (fixed value) | | `inbox_name` | The name of the WhatsApp inbox. Letters (English, Hebrew or Arabic), digits, spaces and hyphens. | 50 | Yes | `My WhatsApp Inbox` | | `whatsapp_number` | The WhatsApp number that you wish to connect to an inbox. This number must not be part of an inbox already. This number must be a working (active) WhatsApp V2 API number. This number must be in international format, without `+` (digits only, at least 9). This number must be a number under your partner account (see [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers)). | 20 | Yes | `972501234567` | | `account_id` | The account ID you wish to add the new WhatsApp inbox to. Digits only (a string of digits is accepted too). | 20 digits | Yes | `8` | | `server` | The server subdomain of the account ID — the server the account is on. If you don't send it, `online` is used. | 30 | No (default `online`) | `online` | | `reference` | Any reference value (letters, numbers, spaces and hyphens only) you wish to receive back on the webhook (as `online_reference`). This is for your use only, so you can recognize your inbox. | 50 | No | `crm-4711` | | `import_history` | If the `whatsapp_number` you want to create the inbox with is a coexistence account, you can ask the system to import all its history (if available) into the newly created inbox. `1` — to move the history; `0` — not to move the history. The history will only move to the inbox if this is a coexistence onboarding and the end user allowed the history to be shared. The default is 0. | 1 | No | `1` | :::info[Important notice — one WhatsApp number per inbox] After you create a new inbox with this WhatsApp number, the inbox will be created inside the relevant online account and will be ready to use. You will not be able to create a new inbox with the same WhatsApp number unless you delete the inbox with the [Delete a WhatsApp Inbox](https://docs.99digital.co.il/partners-api/online/delete-a-whatsapp-inbox) endpoint first. ::: ## Import the history (coexistence) If the WhatsApp number was onboarded as a coexistence account (`coexistence` is 1 in Get WhatsApp Numbers) and you set `import_history` to 1, the contacts are created in the inbox, and the history messages — incoming and outgoing — are added to their conversations in chronological order. For a number that is not a coexistence account, `import_history` is ignored and the inbox is created without history. The import runs before the response is sent, so with a long history the request can take a while. The response then includes `coexistence`, with the number of contacts and messages imported. ## Response ```json { "status": "OK", "reason": 1, "account_id": 8, "inbox_id": 100, "server": "online", "whatsapp": "972501234567" } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful — the inbox is created and ready to use. "FAIL" means error. | | `account_id` | The account ID you used. | | `inbox_id` | The newly created inbox ID. The WhatsApp number is now connected to this inbox. | | `server` | The server subdomain that this inbox was created on: `https://{server}.99digital.co.il`. | | `whatsapp` | The WhatsApp number that belongs to the new inbox. | | `coexistence` | Only when the history was imported (`import_history` 1 for a coexistence number): the result of the import — `contacts_imported` (the number of contacts created in the inbox), `messages_imported` (the number of history messages added to the inbox) and `success` (`false` if the import stopped with an error, or the inbox's connection to the WhatsApp number couldn't be restored after the import — contact support). | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 0 | The settings of the account's server couldn't be loaded — contact support. The response also has an `error` text. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, or the body isn't valid JSON (send it with `Content-Type: application/json`), or `import_history` isn't a number. Try again. | | 13 | You need to use the POST method. | | 20 | `reference` is invalid: longer than 50 characters, or has characters other than letters, digits, spaces and hyphens. | | 31 | Error on creating an inbox (on the account's server), please try again or contact support. | | 33 | `account_id` is invalid or wrong: not a number, or not one of your accounts on this `server`. | | 34 | `server` is invalid or wrong: empty, longer than 30 characters, or has characters other than letters, digits, spaces and hyphens. | | 43 | `inbox_type` is invalid or wrong — it must be `whatsapp`. | | 44 | `inbox_name` is invalid or wrong: empty, longer than 50 characters, or has characters other than letters, digits, spaces and hyphens. | | 45 | `whatsapp_number` is invalid or does not exist under your account: not digits only (at least 9), not one of your WhatsApp numbers, already connected to an inbox, or not active. | ## Webhook If you set a [webhook](https://docs.99digital.co.il/partners-api/settings/webhook), you get an `online` event with `online_extra_info` 5, "new WhatsApp inbox was created", with your `reference` in `online_reference` (see [Event: Online](https://docs.99digital.co.il/partners-api/settings/webhook/online-event)). ## Access Requires the **Access create WhatsApp inbox page** permission. Account-scoped access tokens — created from an account's **Account API Credentials** in the partners dashboard — can't use this endpoint: they get reason 2. When the access token has expired (reason 3), create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token). ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `inbox_type` | string | Yes | The inbox type. A fixed value — `whatsapp` is the only type. One of: `whatsapp` — A WhatsApp inbox, connected to one of your WhatsApp numbers. Example: `whatsapp`. | | `inbox_name` | string | Yes | The name of the WhatsApp inbox. Letters (English, Hebrew or Arabic), digits, spaces and hyphens. Max length: 50. Example: `My WhatsApp Inbox`. | | `whatsapp_number` | string | Yes | The WhatsApp number that you wish to connect to the inbox, in international format without `+` (digits only, at least 9, up to 20). The number must not be part of an inbox already, must be a working WhatsApp V2 API number (active), and must be a number under your partner account — see [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers), where `isOnline` 0 means the number is available. Min length: 9. Example: `972501234567`. | | `account_id` | integer | Yes | The account ID you wish to add the new WhatsApp inbox to. Digits only, up to 20 digits (a string of digits is accepted too). Example: `8`. | | `server` | string | No | The server subdomain of the account ID — the server the account is on. The default is `online`. Default: `online`. Max length: 30. Example: `online`. | | `reference` | string | No | Any reference value you wish to receive back on the webhook (`online_reference`). This is for your use only, so you can recognize your inbox. Letters, digits, spaces and hyphens. Max length: 50. Example: `crm-4711`. | | `import_history` | integer | No | If the `whatsapp_number` you want to create the inbox with is a coexistence account, you can ask the system to import all its history (if available) into the newly created inbox. The history will only move to the inbox if this is a coexistence onboarding and the end user allowed the history to be shared. Ignored for any other number. The default is 0. One of: `0` — Not to move the history (default); `1` — To move the history — only if this is a coexistence onboarding and the end user allowed the history to be shared. Default: `0`. Example: `1`. | ### Example: WhatsApp inbox Connect a WhatsApp number to a new inbox in account 8. ```json { "inbox_type": "whatsapp", "inbox_name": "My WhatsApp Inbox", "whatsapp_number": "972501234567", "account_id": 8, "server": "online" } ``` ### Example: With history import A coexistence number: import its history into the new inbox, and get `crm-4711` back on the webhook. ```json { "inbox_type": "whatsapp", "inbox_name": "שירות לקוחות", "whatsapp_number": "972501234567", "account_id": 8, "server": "online", "reference": "crm-4711", "import_history": 1 } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful — the inbox is created and ready to use. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `account_id` | integer | (one of: OK) The account ID you used. Example: `8`. | | `inbox_id` | integer | (one of: OK) The newly created inbox ID. The WhatsApp number is now connected to this inbox. Example: `100`. | | `server` | string | (one of: OK) The server subdomain that this inbox was created on (`https://.99digital.co.il`). Example: `online`. | | `whatsapp` | string | (one of: OK) The WhatsApp number that belongs to the new inbox. Example: `972501234567`. | | `coexistence` | object | (one of: OK) Only when the history was imported (`import_history` 1 for a coexistence number): the result of the import. | | `coexistence.contacts_imported` | integer | (one of: OK) The number of contacts created in the inbox. Example: `120`. | | `coexistence.messages_imported` | integer | (one of: OK) The number of history messages added to the inbox. Example: `3480`. | | `coexistence.success` | boolean | (one of: OK) `false` if the import stopped with an error, or the inbox's connection to the WhatsApp number couldn't be restored after the import — contact support. Single contacts or messages that fail to import don't change it. Example: `true`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — The settings of the account's server couldn't be loaded — contact support. The response also has an `error` text; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, or the body isn't valid JSON (send it with `Content-Type: application/json`), or `import_history` isn't a number. Try again; `13` — You need to use the POST method; `20` — `reference` is invalid: longer than 50 characters, or has characters other than letters, digits, spaces and hyphens; `31` — Error creating the inbox on the account's server — please try again or contact support; `33` — `account_id` is invalid or wrong: not a number, or not one of your accounts on this `server`; `34` — `server` is invalid or wrong: empty, longer than 30 characters, or has characters other than letters, digits, spaces and hyphens; `43` — `inbox_type` is invalid or wrong — it must be `whatsapp`; `44` — `inbox_name` is invalid or wrong: empty, longer than 50 characters, or has characters other than letters, digits, spaces and hyphens; `45` — `whatsapp_number` is invalid or does not exist under your account: not digits only (at least 9), not one of your WhatsApp numbers, already connected to an inbox, or not active. | | `error` | string | (one of: FAIL) Only with reason 0 — a short technical description of the problem. | #### Example: OK The inbox is created, and the WhatsApp number is connected to it. ```json { "status": "OK", "reason": 1, "account_id": 8, "inbox_id": 100, "server": "online", "whatsapp": "972501234567" } ``` #### Example: OK + history import With `import_history` 1 for a coexistence number, the response includes the result of the import. ```json { "status": "OK", "reason": 1, "account_id": 8, "inbox_id": 100, "server": "online", "whatsapp": "972501234567", "coexistence": { "contacts_imported": 120, "messages_imported": 3480, "success": true } } ``` #### Example: Reason 45 The WhatsApp number is not yours, is already connected to an inbox, or is not active. ```json { "status": "FAIL", "reason": 45 } ``` #### Example: Reason 33 `account_id` is not one of your accounts on this `server`. ```json { "status": "FAIL", "reason": 33 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Delete a WhatsApp Inbox Source: https://docs.99digital.co.il/partners-api/online/delete-a-whatsapp-inbox Markdown: https://docs.99digital.co.il/markdown/partners-api/online/delete-a-whatsapp-inbox.md Section: Partners API › Online `DELETE https://partners.99digital.co.il/api/online/deleteInbox` Delete an inbox removes and deletes the inbox from your online account. :::danger[Please read carefully!] 1. The inbox ID will be canceled and removed immediately. 2. All messages, conversations, contacts, files, webhooks, labels — everything inside that inbox will be deleted. 3. All Studio data, reports and saved information within this inbox will be removed. Make sure you back up all the data you need from within the inbox. 4. The WhatsApp number connected to this inbox will be released, in case you want to connect it to another account. This operation does not cancel or disable the WhatsApp number; it only removes the WhatsApp inbox. 5. **This operation is irreversible! Make sure this is really what you want.** ::: ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/deleteInbox` | | Method | JSON via DELETE | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | ## Body | Parameter | Description / Example | | --- | --- | | `accountID` | The account ID where the inbox is located. Digits only, up to 20 digits (a string of digits is accepted too). | | `server` | The server subdomain of the account ID. The default is `online`. | | `inboxID` | The WhatsApp inbox ID within the account. Digits only, up to 20 digits. You can get this value from the Partners API endpoint [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers): it is the number's `onlineInbox`. | ## Response ```json { "status": "OK", "reason": 1, "accountID": 1234, "server": "online", "inboxID": 10, "whatsapp_number": "972501234567" } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful — the inbox is deleted. "FAIL" means error. | | `accountID` | The account ID you provided. | | `server` | The server subdomain where the account is hosted. | | `inboxID` | The inbox ID you requested to delete. | | `whatsapp_number` | The WhatsApp number that was connected to this inbox. It is now free to connect to a new inbox. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 0 | The settings of the account's server couldn't be loaded — contact support. The response also has an `error` text. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, or the body isn't valid JSON (send it with `Content-Type: application/json`). Try again. | | 13 | You need to use the DELETE method. | | 33 | `accountID` is empty or wrong: not a number, or not one of your accounts on this `server`. | | 34 | `server` is invalid or wrong. | | 47 | `inboxID` is invalid or wrong: not a number, not a WhatsApp inbox of this account (an inbox that a WhatsApp number is connected to), or unknown to the server. | :::note You can only remove a WhatsApp inbox using this endpoint — an inbox that a WhatsApp number is connected to. Any other inbox gets reason 47. ::: ## What happens - The inbox is deleted on the account's server. If the server doesn't know the inbox, the response is reason 47 and nothing changes. - The WhatsApp number that was connected to the inbox is released: in [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers) its `isOnline` goes back to 0, and you can connect it to a new inbox — in this account or in another one — with [Create a new WhatsApp Inbox](https://docs.99digital.co.il/partners-api/online/create-a-new-whatsapp-inbox). - If you set a [webhook](https://docs.99digital.co.il/partners-api/settings/webhook), you get an `online` event with `online_extra_info` 6, "WhatsApp inbox was deleted" (see [Event: Online](https://docs.99digital.co.il/partners-api/settings/webhook/online-event)). ## Access Requires the **Access delete WhatsApp inbox page** permission. Account-scoped access tokens — created from an account's **Account API Credentials** in the partners dashboard — can't use this endpoint: they get reason 2. When the access token has expired (reason 3), create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token). ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `accountID` | integer | Yes | The account ID where the inbox is located. Digits only, up to 20 digits (a string of digits is accepted too). Example: `1234`. | | `server` | string | No | The server subdomain of the account ID — the server the account is on. The default is `online`. Default: `online`. Example: `online`. | | `inboxID` | integer | Yes | The WhatsApp inbox ID within the account. Digits only, up to 20 digits. You can get this value from [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers): it is the number's `onlineInbox`. Example: `10`. | ### Example (generated from the schema) ```json { "accountID": 1234, "server": "online", "inboxID": 10 } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful — the inbox is deleted. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `accountID` | integer | (one of: OK) The account ID you provided. Example: `1234`. | | `server` | string | (one of: OK) The server subdomain where the account is hosted. Example: `online`. | | `inboxID` | integer | (one of: OK) The inbox ID you requested to delete. Example: `10`. | | `whatsapp_number` | string | (one of: OK) The WhatsApp number that was connected to this inbox. It is now free to connect to a new inbox. Example: `972501234567`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — The settings of the account's server couldn't be loaded — contact support. The response also has an `error` text; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, or the body isn't valid JSON (send it with `Content-Type: application/json`). Try again; `13` — You need to use the DELETE method; `33` — `accountID` is empty or wrong: not a number, or not one of your accounts on this `server`; `34` — `server` is invalid or wrong; `47` — `inboxID` is invalid or wrong: not a number, not a WhatsApp inbox of this account (an inbox that a WhatsApp number is connected to), or unknown to the server. | | `error` | string | (one of: FAIL) Only with reason 0 — a short technical description of the problem. | #### Example: OK The inbox is deleted and its WhatsApp number is released. ```json { "status": "OK", "reason": 1, "accountID": 1234, "server": "online", "inboxID": 10, "whatsapp_number": "972501234567" } ``` #### Example: Reason 47 `inboxID` is not a WhatsApp inbox of this account (or it was already deleted). ```json { "status": "FAIL", "reason": 47 } ``` #### Example: Reason 33 `accountID` is not one of your accounts on this `server`. ```json { "status": "FAIL", "reason": 33 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Get Notifications for Agent Source: https://docs.99digital.co.il/partners-api/online/get-notifications-for-agent Markdown: https://docs.99digital.co.il/markdown/partners-api/online/get-notifications-for-agent.md Section: Partners API › Online `POST https://partners.99digital.co.il/api/online/getNotifications` You can get a list of all the notifications for an agent. Every page contains 15 notifications: send `page` to get the next ones. The notifications in `payload` are passed on exactly as the account's server returns them, and `meta` tells you how many there are and how many are unread. To mark them as read, use [Mark Notification](https://docs.99digital.co.il/partners-api/online/mark-notification) (one notification, by its `id`) or [Mark All Notifications](https://docs.99digital.co.il/partners-api/online/mark-all-notifications). ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/getNotifications` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | ## Body | Parameter | Description / Example | | --- | --- | | `accountID` | The account ID you wish to do the action on. Digits only, up to 20 digits (a string of digits is accepted too). | | `agentID` | The agent ID — the agent's `id` in [Get Agents List](https://docs.99digital.co.il/partners-api/online/get-agents-list). Digits only, up to 20 digits. | | `server` | The server subdomain hosting the account. English letters and digits only, up to 30 characters. The default is `online`. | | `page` | Every page contains 15 notifications. Provide a whole number (1 or more), for example `1`. The default is 1. | ## Response ```json { "status": "OK", "reason": 1, "accountID": 4142, "agentID": 3142, "server": "online", "page": 1, "meta": { "unread_count": 38, "count": 41, "current_page": "1" }, "payload": [ { "id": 67770133, "notification_type": "conversation_mention", "push_message_title": "[#7404] @Dana can you check this order?", "primary_actor_type": "Conversation", "primary_actor_id": 8743400, "read_at": null, "created_at": 1784613835 } ] } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `accountID` | The account ID you provided. | | `agentID` | The agent ID you provided. | | `server` | The server you provided. | | `page` | The page you asked for. | | `meta` | The counters of the agent's notifications, as the account's server returns them: `unread_count` (the notifications the agent hasn't read yet), `count` (all the agent's notifications) and `current_page` (the page in this response, as a string). | | `payload` | The full data of the notifications of this page, exactly as the account's server returns them. Each notification's `id` is the `notification_id` to send to [Mark Notification](https://docs.99digital.co.il/partners-api/online/mark-notification). | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 0 | The settings of the account's server couldn't be loaded — contact support. The response also has an `error` text. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, or the body isn't valid JSON (send it with `Content-Type: application/json`). Try again. | | 13 | You need to use the POST method. | | 29 | `accountID` is invalid or wrong. | | 31 | The account's server didn't return the notifications — try again or contact support. | | 32 | You can't connect to a suspended account. | | 33 | `accountID` is invalid or wrong: not a number, not one of your accounts on this `server`, or — with an account-scoped token — not the token's own account and server. | | 34 | `server` is invalid or wrong: empty, longer than 30 characters, or not English letters and digits only. | | 35 | `agentID` is invalid or wrong: missing or not a number. | | 37 | Wrong `page`: not a whole number of 1 or more. | ## Access With a partner access token, requires the **View user notifications** permission. An account-scoped access token — created from an account's **Account API Credentials** in the partners dashboard — works here too, but only for its own account: `accountID` and `server` must be the token's account and server (`server` defaults to `online`), otherwise the response is reason 33. Permissions don't apply to an account-scoped token. When the access token has expired (reason 3), create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token). ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `accountID` | integer | Yes | The account ID you wish to do the action on. Digits only, up to 20 digits (a string of digits is accepted too). Example: `4142`. | | `agentID` | integer | Yes | The agent ID — the agent's `id` in [Get Agents List](https://docs.99digital.co.il/partners-api/online/get-agents-list). Digits only, up to 20 digits. Example: `3142`. | | `server` | string | No | The server subdomain hosting the account. English letters and digits only. The default is `online`. Default: `online`. Max length: 30. Example: `online`. | | `page` | integer | No | The page number. Every page contains 15 notifications; provide a whole number, for example 1. Default: `1`. Minimum: 1. Example: `1`. | ### Example (generated from the schema) ```json { "accountID": 4142, "agentID": 3142, "server": "online", "page": 1 } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `accountID` | integer | (one of: OK) The account ID you provided. Example: `4142`. | | `agentID` | integer | (one of: OK) The agent ID you provided. Example: `3142`. | | `server` | string | (one of: OK) The server you provided. Example: `online`. | | `page` | integer | (one of: OK) The page you asked for. Example: `1`. | | `meta` | object | (one of: OK) The counters of the agent's notifications, as the account's server returns them. | | `meta.unread_count` | integer | (one of: OK) The number of notifications the agent hasn't read yet. Example: `38`. | | `meta.count` | integer | (one of: OK) The number of notifications the agent has. Example: `41`. | | `meta.current_page` | string | (one of: OK) The page in this response (a string). Example: `1`. | | `payload` | array of object | (one of: OK) The notifications of this page — the full notification objects, exactly as the account's server returns them. The main fields are listed here. | | `payload[].id` | integer | (one of: OK) The notification ID — the `notification_id` to send to Mark Notification. Example: `67770133`. | | `payload[].notification_type` | string | (one of: OK) The kind of notification, for example `conversation_mention`. Example: `conversation_mention`. | | `payload[].push_message_title` | string | (one of: OK) The notification text. Example: `[#7404] @Dana can you check this order?`. | | `payload[].primary_actor_type` | string | (one of: OK) What the notification is about, for example `Conversation`. Example: `Conversation`. | | `payload[].primary_actor_id` | integer | (one of: OK) The ID of what the notification is about (for a conversation, its ID). Example: `8743400`. | | `payload[].read_at` | any | (one of: OK) When the agent read the notification; `null` while it is unread. Example: `null`. | | `payload[].created_at` | integer | (one of: OK) When the notification was created (Unix time). Example: `1784613835`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — The settings of the account's server couldn't be loaded — contact support. The response also has an `error` text; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, or the body isn't valid JSON (send it with `Content-Type: application/json`). Try again; `13` — You need to use the POST method; `29` — `accountID` is invalid or wrong; `31` — The account's server didn't return the notifications — try again or contact support; `32` — You can't connect to a suspended account; `33` — `accountID` is invalid or wrong: not a number, not one of your accounts on this `server`, or — with an account-scoped token — not the token's own account and server; `34` — `server` is invalid or wrong: empty, longer than 30 characters, or not English letters and digits only; `35` — `agentID` is invalid or wrong: missing or not a number; `37` — Wrong `page`: not a whole number of 1 or more. | | `error` | string | (one of: FAIL) Only with reason 0 — a short technical description of the problem. | #### Example: OK The first page of the agent's notifications. ```json { "status": "OK", "reason": 1, "accountID": 4142, "agentID": 3142, "server": "online", "page": 1, "meta": { "unread_count": 38, "count": 41, "current_page": "1" }, "payload": [ { "id": 67770133, "notification_type": "conversation_mention", "push_message_title": "[#7404] @Dana can you check this order?", "primary_actor_type": "Conversation", "primary_actor_id": 8743400, "read_at": null, "created_at": 1784613835 }, { "id": 67770098, "notification_type": "conversation_mention", "push_message_title": "[#7398] @Dana the client is waiting for a reply", "primary_actor_type": "Conversation", "primary_actor_id": 8743391, "read_at": null, "created_at": 1784612950 } ] } ``` #### Example: Reason 33 `accountID` is not one of your accounts on this `server`, or not the account of the account-scoped token. ```json { "status": "FAIL", "reason": 33 } ``` #### Example: Reason 37 `page` is not a whole number of 1 or more. ```json { "status": "FAIL", "reason": 37 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Mark Notification Source: https://docs.99digital.co.il/partners-api/online/mark-notification Markdown: https://docs.99digital.co.il/markdown/partners-api/online/mark-notification.md Section: Partners API › Online `POST https://partners.99digital.co.il/api/online/markNotificationRead` Mark a notification as read, by notification ID. The notification ID is the `id` of a notification in [Get Notifications for Agent](https://docs.99digital.co.il/partners-api/online/get-notifications-for-agent). To mark all the notifications of an agent at once, use [Mark All Notifications](https://docs.99digital.co.il/partners-api/online/mark-all-notifications). ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/markNotificationRead` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | ## Body | Parameter | Description / Example | | --- | --- | | `accountID` | The account ID you wish to do the action on. Digits only, up to 20 digits (a string of digits is accepted too). | | `notification_id` | The ID of the notification you want to mark as read — its `id` in [Get Notifications for Agent](https://docs.99digital.co.il/partners-api/online/get-notifications-for-agent). Digits only, up to 20 digits. | | `server` | The server subdomain hosting the account. English letters and digits only, up to 30 characters. The default is `online`. | ## Response ```json { "status": "OK", "reason": 1, "accountID": 4142, "server": "online", "notification_id": 67770133 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful — the notification is marked as read. "FAIL" means error. | | `accountID` | The account ID you provided. | | `server` | The server you provided. | | `notification_id` | The notification ID you provided. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 0 | The settings of the account's server couldn't be loaded — contact support. The response also has an `error` text. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, or the body isn't valid JSON (send it with `Content-Type: application/json`). Try again. | | 13 | You need to use the POST method. | | 29 | `accountID` is invalid or wrong. | | 31 | The account's server didn't mark the notification as read (it answered with an error, or didn't confirm) — check `notification_id` and try again, or contact support. | | 32 | You can't connect to a suspended account. | | 33 | `accountID` is invalid or wrong: not a number, not one of your accounts on this `server`, or — with an account-scoped token — not the token's own account and server. | | 34 | `server` is invalid or wrong: empty, longer than 30 characters, or not English letters and digits only. | | 35 | `agentID` is invalid or wrong. | | 36 | Wrong `notification_id`: missing or not a number. | ## Access With a partner access token, requires the **Mark notifications as read** permission. An account-scoped access token — created from an account's **Account API Credentials** in the partners dashboard — works here too, but only for its own account: `accountID` and `server` must be the token's account and server (`server` defaults to `online`), otherwise the response is reason 33. Permissions don't apply to an account-scoped token. When the access token has expired (reason 3), create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token). ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `accountID` | integer | Yes | The account ID you wish to do the action on. Digits only, up to 20 digits (a string of digits is accepted too). Example: `4142`. | | `notification_id` | integer | Yes | The ID of the notification you want to mark as read — its `id` in [Get Notifications for Agent](https://docs.99digital.co.il/partners-api/online/get-notifications-for-agent). Digits only, up to 20 digits. Example: `67770133`. | | `server` | string | No | The server subdomain hosting the account. English letters and digits only. The default is `online`. Default: `online`. Max length: 30. Example: `online`. | ### Example (generated from the schema) ```json { "accountID": 4142, "notification_id": 67770133, "server": "online" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful — the notification is marked as read. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `accountID` | integer | (one of: OK) The account ID you provided. Example: `4142`. | | `server` | string | (one of: OK) The server you provided. Example: `online`. | | `notification_id` | integer | (one of: OK) The notification ID you provided. Example: `67770133`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — The settings of the account's server couldn't be loaded — contact support. The response also has an `error` text; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, or the body isn't valid JSON (send it with `Content-Type: application/json`). Try again; `13` — You need to use the POST method; `29` — `accountID` is invalid or wrong; `31` — The account's server didn't mark the notification as read (it answered with an error, or didn't confirm) — check `notification_id` and try again, or contact support; `32` — You can't connect to a suspended account; `33` — `accountID` is invalid or wrong: not a number, not one of your accounts on this `server`, or — with an account-scoped token — not the token's own account and server; `34` — `server` is invalid or wrong: empty, longer than 30 characters, or not English letters and digits only; `35` — `agentID` is invalid or wrong; `36` — Wrong `notification_id`: missing or not a number. | | `error` | string | (one of: FAIL) Only with reason 0 — a short technical description of the problem. | #### Example: OK The notification is marked as read. ```json { "status": "OK", "reason": 1, "accountID": 4142, "server": "online", "notification_id": 67770133 } ``` #### Example: Reason 31 The account's server didn't mark the notification as read. ```json { "status": "FAIL", "reason": 31 } ``` #### Example: Reason 36 `notification_id` is missing or not a number. ```json { "status": "FAIL", "reason": 36 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Mark All Notifications Source: https://docs.99digital.co.il/partners-api/online/mark-all-notifications Markdown: https://docs.99digital.co.il/markdown/partners-api/online/mark-all-notifications.md Section: Partners API › Online `POST https://partners.99digital.co.il/api/online/markAllNotificationsRead` Mark all notifications as read for an agent ID. To mark a single notification, use [Mark Notification](https://docs.99digital.co.il/partners-api/online/mark-notification). To see the agent's notifications, use [Get Notifications for Agent](https://docs.99digital.co.il/partners-api/online/get-notifications-for-agent). ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/markAllNotificationsRead` | | Method | JSON via POST | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | ## Body | Parameter | Description / Example | | --- | --- | | `accountID` | The account ID of the agent. Digits only, up to 20 digits (a string of digits is accepted too). | | `agentID` | The agent ID whose notifications you wish to mark as read — the agent's `id` in [Get Agents List](https://docs.99digital.co.il/partners-api/online/get-agents-list). Digits only, up to 20 digits. | | `server` | The server subdomain hosting the account. English letters and digits only, up to 30 characters. The default is `online`. | ## Response ```json { "status": "OK", "reason": 1, "accountID": 4142, "server": "online", "agentID": 12 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful — all the agent's notifications are marked as read. "FAIL" means error. | | `accountID` | The account ID you provided. | | `agentID` | The agent ID you provided. | | `server` | The server address (subdomain) you provided. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 0 | The settings of the account's server couldn't be loaded — contact support. The response also has an `error` text. | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, or the body isn't valid JSON (send it with `Content-Type: application/json`). Try again. | | 13 | You need to use the POST method. | | 29 | `accountID` is invalid or wrong. | | 31 | The account's server didn't mark the notifications as read (it answered with an error, or didn't confirm) — try again or contact support. | | 32 | You can't connect to a suspended account. | | 33 | `accountID` is invalid or wrong: not a number, not one of your accounts on this `server`, or — with an account-scoped token — not the token's own account and server. | | 34 | `server` is invalid or wrong: empty, longer than 30 characters, or not English letters and digits only. | | 35 | `agentID` is invalid or wrong: missing or not a number. | ## Access With a partner access token, requires the **Mark notifications as read** permission. An account-scoped access token — created from an account's **Account API Credentials** in the partners dashboard — works here too, but only for its own account: `accountID` and `server` must be the token's account and server (`server` defaults to `online`), otherwise the response is reason 33. Permissions don't apply to an account-scoped token. When the access token has expired (reason 3), create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token). ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `accountID` | integer | Yes | The account ID of the agent. Digits only, up to 20 digits (a string of digits is accepted too). Example: `4142`. | | `agentID` | integer | Yes | The agent ID whose notifications you wish to mark as read — the agent's `id` in [Get Agents List](https://docs.99digital.co.il/partners-api/online/get-agents-list). Digits only, up to 20 digits. Example: `12`. | | `server` | string | No | The server subdomain hosting the account. English letters and digits only. The default is `online`. Default: `online`. Max length: 30. Example: `online`. | ### Example (generated from the schema) ```json { "accountID": 4142, "agentID": 12, "server": "online" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful — all the agent's notifications are marked as read. Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `accountID` | integer | (one of: OK) The account ID you provided. Example: `4142`. | | `agentID` | integer | (one of: OK) The agent ID you provided. Example: `12`. | | `server` | string | (one of: OK) The server you provided. Example: `online`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `0` — The settings of the account's server couldn't be loaded — contact support. The response also has an `error` text; `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, or the body isn't valid JSON (send it with `Content-Type: application/json`). Try again; `13` — You need to use the POST method; `29` — `accountID` is invalid or wrong; `31` — The account's server didn't mark the notifications as read (it answered with an error, or didn't confirm) — try again or contact support; `32` — You can't connect to a suspended account; `33` — `accountID` is invalid or wrong: not a number, not one of your accounts on this `server`, or — with an account-scoped token — not the token's own account and server; `34` — `server` is invalid or wrong: empty, longer than 30 characters, or not English letters and digits only; `35` — `agentID` is invalid or wrong: missing or not a number. | | `error` | string | (one of: FAIL) Only with reason 0 — a short technical description of the problem. | #### Example: OK All the agent's notifications are marked as read. ```json { "status": "OK", "reason": 1, "accountID": 4142, "agentID": 12, "server": "online" } ``` #### Example: Reason 35 `agentID` is missing or not a number. ```json { "status": "FAIL", "reason": 35 } ``` #### Example: Reason 33 `accountID` is not one of your accounts on this `server`, or not the account of the account-scoped token. ```json { "status": "FAIL", "reason": 33 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` --- # Online Usage Source: https://docs.99digital.co.il/partners-api/online/online-usage Markdown: https://docs.99digital.co.il/markdown/partners-api/online/online-usage.md Section: Partners API › Online `POST https://partners.99digital.co.il/api/online/getUsage` This endpoint allows you to get your account's online usage data. The data is always updated to yesterday. There is a rate limit of 10 requests per minute to avoid abuse. It is the same data as the **Online Usage** page of the partners dashboard. You get only the accounts that belong to your partner account, one item per account per server, sorted by `server` and then by `account_id`. An `account_id` or `server` that isn't yours is not an error: the `list` is simply empty. One month per request: to get several months, call the endpoint once per month. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/online/getUsage` | | Method | JSON via POST. GET works too, with the same fields as query parameters: `GET /online/getUsage?month=0926&server=online&account_id=123`. With POST, the fields are read from the JSON body; a field that is not in the body is read from the query string. | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | ## Body | Parameter | Description / Example | Maximum length | Mandatory | Example | | --- | --- | --- | --- | --- | | `month` | The month + year in `mmyy` format, for example `1026` for October 2026. Only the current month or an earlier month (Israel time). Send it as a string, so a leading zero is kept (`0926`). | 4 | Yes | `1026` | | `server` | The server name, if relevant: return only the accounts on this server. Letters, digits, spaces and hyphens. Empty or left out — all servers. | 30 | No | `online` | | `account_id` | In case you want to get the data of a specific account ID (exact match). Digits only. Empty or left out — all accounts. | 20 digits | No | `1` | ## Response ```json { "status": "OK", "reason": 1, "month": "0926", "month_label": "09/2026", "is_current_month": false, "server": null, "account_id": null, "totalAccounts": 1, "list": [ { "month": "0926", "month_label": "09/2026", "year": 2026, "account_id": 123, "account_name": "Client Name", "online_name": "Client Name Ltd", "server": "online", "server_name": "online", "total_agents": 5, "data_amount": "74.3GB", "data_amount_gb": 74.3, "total_inboxes": 6, "inboxes": { "whatsapp": 2, "sms": 1, "facebook": 1, "api": 1, "website": 1, "email": 0, "line": 0, "tiktok": 0 }, "sms_packages": { "1": 1, "2": 0, "3": 0 }, "chat_gpt": true, "builder": false, "mobile_app": true, "docal_enabled": false, "collected_at": 1790805612, "collected_at_israel": "01-10-2026 01:00:12" } ] } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful (also when `list` is empty). "FAIL" means error. | | `month` | String — the same as the request (`mmyy`). | | `month_label` | String — the requested month, in `mm/yyyy` format. | | `is_current_month` | Boolean. `true` = the current month (still updated every night); `false` = an old month (its numbers are final). | | `server` | String or null — the server filter you provided, or `null` for all servers. | | `account_id` | Number or null — the account filter you provided, or `null` for all accounts. | | `totalAccounts` | Number — the total number of items inside `list`. | | `list` | One item per account per server — see the table below. Empty when there is no data. | | `reason` | The status explanation — see the reason table below. | Each item in `list`: | Field | Type | Description | | --- | --- | --- | | `month` / `month_label` / `year` | string / string / number | The month of the record (`mmyy`, `mm/yyyy`, `yyyy`). | | `account_id` | number | The online account ID. | | `account_name` | string | The account name, as saved in the partners system. | | `online_name` | string | The account name as it appears on the online server. | | `server` | string | The server the account is on. | | `server_name` | string | The display name of the server. | | `total_agents` | number | The number of agents in the account. | | `data_amount` | string | The data used, as text, for example `74.2GB`. | | `data_amount_gb` | number | The same value as `data_amount`, just as a number in GB. | | `total_inboxes` | number | The total number of inboxes this account has. | | `inboxes` → `whatsapp` / `sms` / `facebook` / `api` / `website` / `email` / `line` / `tiktok` | number | The number of inboxes of each type (`facebook` counts Facebook and Instagram inboxes; `website` is live chat). | | `sms_packages` | object | The number of SMS inboxes per SMS package. The keys are package numbers as strings, for example `"1"` / `"2"` / `"3"`; these three are always present, 0 if unused. Any other package in use is added as an extra key. | | `chat_gpt` | boolean | Whether ChatGPT is enabled in the account. | | `builder` | boolean | Whether a Builder is connected to the account. | | `mobile_app` | boolean | Whether the mobile app is enabled for the account. | | `docal_enabled` | boolean | Whether Docal is enabled for the account. | | `collected_at` | number | The Unix timestamp of when the data was collected. | | `collected_at_israel` | string | The same time as `collected_at`, just in Israel time (`dd-mm-yyyy HH:MM:SS`). | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, try again. | | 33 | Invalid `account_id`: not digits only (up to 20 digits). | | 34 | Invalid `server` format: longer than 30 characters, or has characters other than letters, digits, spaces and hyphens. | | 48 | `month` is missing or not in `mmyy` format (the month must be 01–12). | | 49 | `month` can't be a future time — only the current month or an old month is accepted (Israel time). | | 403 | Permission denied (HTTP 403): the user the access token was created for doesn't have the **Access Online usage page** permission. | | 429 | Too many requests (HTTP 429): more than 10 requests in this clock minute. Wait for the next minute and try again. | ## When the numbers update The usage is collected once a night (at about 01:00 Israel time) from every online server, and each collection saves the state of every account at that moment into the month of the previous day (Israel time): - **Current month** (`is_current_month` true): the numbers are replaced every night with the latest collection — they are not added up. `collected_at` tells you when the record was last collected. - **A new month**: the collection on the 1st (at about 01:00) still belongs to the last day of the previous month, so it closes the previous month. The new month's records first appear after the collection on the 2nd; until then, the current month returns an empty `list`. - **Previous months** (`is_current_month` false): the last collection of the month — normally the one on the 1st of the next month — is final. These numbers don't change any more. - A deleted account keeps its usage: it is still returned for the months that were collected before it was deleted. ## Rate limit The rate limit of 10 requests per minute counts the requests of your partner account — all its access tokens together — per clock minute; a request over the limit gets HTTP 429 (reason 429). ## Access Requires the **Access Online usage page** permission. Account-scoped access tokens — created from an account's **Account API Credentials** in the partners dashboard — can't use this endpoint: they get reason 2. When the access token has expired (reason 3), create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token). ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `month` | string | Yes | The month and year in `mmyy` format, for example `1026` for October 2026. Only the current month or an earlier month (Israel time). Send it as a string, so a leading zero is kept (`0926`). Pattern: `^[0-9]{4}$`. Example: `1026`. | | `server` | string | No | The server name, if relevant: return only the accounts on this server. Letters, digits, spaces and hyphens. Empty or left out — all servers. Max length: 30. Example: `online`. | | `account_id` | integer | No | In case you want to get the data of a specific account ID (exact match). Digits only, up to 20 digits. Empty or left out — all accounts. Example: `1`. | ### Example: One month All your accounts, on all servers, for September 2026. ```json { "month": "0926" } ``` ### Example: One account One account on the `online` server, for November 2026. ```json { "month": "1126", "server": "online", "account_id": 123 } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) The request was successful (also when `list` is empty). Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `month` | string | (one of: OK) The month you asked for, the same as the request (`mmyy`). Example: `0926`. | | `month_label` | string | (one of: OK) The month you asked for, in `mm/yyyy` format. Example: `09/2026`. | | `is_current_month` | boolean | (one of: OK) `true` — the current month, still updated every night. `false` — an earlier month; its numbers are final. Example: `false`. | | `server` | string \| null | (one of: OK) The server filter you provided, or `null` for all servers. Example: `null`. | | `account_id` | integer \| null | (one of: OK) The account filter you provided, or `null` for all accounts. Example: `null`. | | `totalAccounts` | integer | (one of: OK) The number of items in `list`. Example: `1`. | | `list` | array of object | (one of: OK) One item per account per server, sorted by `server` and then by `account_id`. Empty when there is no data. | | `list[].month` | string | (one of: OK) The month of the record (`mmyy`). Example: `0926`. | | `list[].month_label` | string | (one of: OK) The month of the record (`mm/yyyy`). Example: `09/2026`. | | `list[].year` | integer | (one of: OK) The year of the record (`yyyy`). Example: `2026`. | | `list[].account_id` | integer | (one of: OK) The online account ID. Example: `123`. | | `list[].account_name` | string | (one of: OK) The account name, as saved in the partners system. Example: `Client Name`. | | `list[].online_name` | string | (one of: OK) The account name as it appears on the online server. Example: `Client Name Ltd`. | | `list[].server` | string | (one of: OK) The server the account is on. Example: `online`. | | `list[].server_name` | string | (one of: OK) The display name of the server. Example: `online`. | | `list[].total_agents` | integer | (one of: OK) The number of agents in the account. Example: `5`. | | `list[].data_amount` | string | (one of: OK) The data used, as text, for example `74.3GB`. Example: `74.3GB`. | | `list[].data_amount_gb` | number | (one of: OK) The same value as `data_amount`, as a number in GB. Example: `74.3`. | | `list[].total_inboxes` | integer | (one of: OK) The total number of inboxes this account has. Example: `6`. | | `list[].inboxes` | object | (one of: OK) The number of inboxes of each type. | | `list[].inboxes.whatsapp` | integer | (one of: OK) WhatsApp inboxes. Example: `2`. | | `list[].inboxes.sms` | integer | (one of: OK) SMS inboxes. Example: `1`. | | `list[].inboxes.facebook` | integer | (one of: OK) Facebook and Instagram inboxes. Example: `1`. | | `list[].inboxes.api` | integer | (one of: OK) API inboxes. Example: `1`. | | `list[].inboxes.website` | integer | (one of: OK) Website (live chat) inboxes. Example: `1`. | | `list[].inboxes.email` | integer | (one of: OK) Email inboxes. Example: `0`. | | `list[].inboxes.line` | integer | (one of: OK) Line inboxes. Example: `0`. | | `list[].inboxes.tiktok` | integer | (one of: OK) TikTok inboxes. Example: `0`. | | `list[].sms_packages` | object | (one of: OK) The number of SMS inboxes per SMS package. The keys are package numbers as strings: `"1"`, `"2"` and `"3"` are always present (0 if unused), and any other package in use is added as an extra key. | | `list[].chat_gpt` | boolean | (one of: OK) Whether ChatGPT is enabled in the account. Example: `true`. | | `list[].builder` | boolean | (one of: OK) Whether a Builder is connected to the account. Example: `false`. | | `list[].mobile_app` | boolean | (one of: OK) Whether the mobile app is enabled for the account. Example: `true`. | | `list[].docal_enabled` | boolean | (one of: OK) Whether Docal is enabled for the account. Example: `false`. | | `list[].collected_at` | integer | (one of: OK) When the data was collected (Unix time). Example: `1790805612`. | | `list[].collected_at_israel` | string | (one of: OK) The same time as `collected_at`, in Israel time (`dd-mm-yyyy HH:MM:SS`). Example: `01-10-2026 01:00:12`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, try again; `33` — Invalid `account_id`: not digits only (up to 20 digits); `34` — Invalid `server` format: longer than 30 characters, or has characters other than letters, digits, spaces and hyphens; `48` — `month` is missing or not in `mmyy` format (the month must be 01–12); `49` — `month` can't be a future time — only the current month or an earlier month is accepted (Israel time). | #### Example: OK The usage of all your accounts for September 2026 — a closed month. ```json { "status": "OK", "reason": 1, "month": "0926", "month_label": "09/2026", "is_current_month": false, "server": null, "account_id": null, "totalAccounts": 1, "list": [ { "month": "0926", "month_label": "09/2026", "year": 2026, "account_id": 123, "account_name": "Client Name", "online_name": "Client Name Ltd", "server": "online", "server_name": "online", "total_agents": 5, "data_amount": "74.3GB", "data_amount_gb": 74.3, "total_inboxes": 6, "inboxes": { "whatsapp": 2, "sms": 1, "facebook": 1, "api": 1, "website": 1, "email": 0, "line": 0, "tiktok": 0 }, "sms_packages": { "1": 1, "2": 0, "3": 0 }, "chat_gpt": true, "builder": false, "mobile_app": true, "docal_enabled": false, "collected_at": 1790805612, "collected_at_israel": "01-10-2026 01:00:12" } ] } ``` #### Example: Current month One account, in the current month: updated to yesterday, and replaced again in the next nightly collection. ```json { "status": "OK", "reason": 1, "month": "1126", "month_label": "11/2026", "is_current_month": true, "server": "online", "account_id": 123, "totalAccounts": 1, "list": [ { "month": "1126", "month_label": "11/2026", "year": 2026, "account_id": 123, "account_name": "Client Name", "online_name": "Client Name Ltd", "server": "online", "server_name": "online", "total_agents": 6, "data_amount": "81.9GB", "data_amount_gb": 81.9, "total_inboxes": 6, "inboxes": { "whatsapp": 2, "sms": 1, "facebook": 1, "api": 1, "website": 1, "email": 0, "line": 0, "tiktok": 0 }, "sms_packages": { "1": 1, "2": 0, "3": 0 }, "chat_gpt": true, "builder": false, "mobile_app": true, "docal_enabled": false, "collected_at": 1795647609, "collected_at_israel": "26-11-2026 01:00:09" } ] } ``` #### Example: No data No records for the filter — for example an `account_id` that isn't yours, or the current month on its 1st day. ```json { "status": "OK", "reason": 1, "month": "1126", "month_label": "11/2026", "is_current_month": true, "server": null, "account_id": 9999, "totalAccounts": 0, "list": [] } ``` #### Example: Reason 48 `month` is missing or not in `mmyy` format. ```json { "status": "FAIL", "reason": 48 } ``` #### Example: Reason 49 `month` is in the future. ```json { "status": "FAIL", "reason": 49 } ``` ### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out. Always `FAIL`. | | `reason` | integer | Always 403. Always `403`. | | `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. | #### Example ```json { "status": "FAIL", "reason": 403, "error": "Permission denied" } ``` ### 429 — Too many requests (HTTP 429): your partner account made more than 10 requests in this clock minute. Wait for the next minute and try again. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — the request was not carried out, because of the rate limit. Always `FAIL`. | | `reason` | integer | Always 429 — too many requests. Always `429`. | | `error` | string | Always `Too many requests`: more than 10 requests in this clock minute. Wait for the next minute and try again. Always `Too many requests`. | #### Example ```json { "status": "FAIL", "reason": 429, "error": "Too many requests" } ``` --- # Access Token Source: https://docs.99digital.co.il/partners-api/settings/access-token Markdown: https://docs.99digital.co.il/markdown/partners-api/settings/access-token.md Section: Partners API › Settings `POST https://partners.99digital.co.il/api/settings/accessToken` This endpoint allows you to create an access token from your client id and client secret. The client id and client secret can be obtained from your partners dashboard (see "Client id and client secret" below). The access token is valid for 1 hour, and should be sent with any request inside the Partners API, as the header: ```http Authorization: Bearer XXXXXX ``` ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/settings/accessToken` | | Method | JSON via POST | This endpoint is called without an access token: it is the one that creates it. ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | `client_id` | Your client id — 32 characters, English letters and digits only. | Yes | | `client_secret` | Your client secret. | Yes | ## Response ```json { "access_token": "pK7vQ2xR9mLwT4bZ8nC1sD6fG3hJ0aE5yU-iO_qW2eR7tY4uI9oP1aS6dF3gH8jK…", "expiration_time": 1789903600, "token_type": "Bearer", "reason": 1 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | Only in a failed answer: FAIL means error — see `reason`. A successful answer has no `status`: it has the access token, and `reason` 1. | | `access_token` | This is the access token you should use with any other call to the Partners API. Use this access token in the header of the call, as `Authorization: Bearer XXXX` (where XXXX is the access token). It is a random string of 171 characters: English letters, digits, `-` and `_`. | | `expiration_time` | The access token is valid for 1 hour. Here is the time when it will expire (Unix time, in seconds). | | `token_type` | `Bearer`. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK — the token was created. | | 2 | The client id or client secret is incorrect: one of them is missing or empty, the client id isn't 32 English letters and digits, or the pair doesn't match. | | 3 | You have tried too many times to get an access token with wrong information. Your IP is blocked, try again later. | | 4 | Server error, try again. Also returned when the body isn't valid JSON, or isn't sent with `Content-Type: application/json`. | ## Client id and client secret The client id and client secret can be obtained from your partners dashboard. There are two kinds: - **Your user's credentials.** Every user of your partners dashboard has their own client id, shown on the **Users** page, and a client secret that is emailed to the user when the user is created. The secret can't be shown again, only replaced with **Reset Client Secret** (a new secret is emailed, and the previous one stops working immediately). A token created with these credentials acts as that user: it is accepted by every Partners API endpoint, and has the permissions the user has in the partners dashboard. An endpoint that needs a permission the user doesn't have answers with HTTP 403 (Permission denied). - **Account API Credentials of an Online account.** Every Online account has its own permanent client id and client secret (the account's **API Credentials** button on the **Online Systems** page of the dashboard). A token created with them is limited to that one Online account, and only these endpoints accept it: [Get accounts list](https://docs.99digital.co.il/partners-api/online/get-accounts-list), [Get agents list](https://docs.99digital.co.il/partners-api/online/get-agents-list), [Get Inboxes List](https://docs.99digital.co.il/partners-api/online/get-inboxes-list), [Login to an agent](https://docs.99digital.co.il/partners-api/online/login-to-an-agent), [Login to a Conversation](https://docs.99digital.co.il/partners-api/online/login-to-a-conversation), [Get Notifications for Agent](https://docs.99digital.co.il/partners-api/online/get-notifications-for-agent), [Mark Notification](https://docs.99digital.co.il/partners-api/online/mark-notification) and [Mark All Notifications](https://docs.99digital.co.il/partners-api/online/mark-all-notifications). Every other endpoint rejects it with reason 2. ## Remarks - The token expires 1 hour after it is created: `expiration_time` is that moment, in Unix time. A token can't be extended or refreshed. Once it expires, every endpoint answers with reason 3, so create a new token before then. - You can create as many tokens as you need. Creating a new token doesn't cancel the tokens you created before; each one stays valid until its own expiration time, also after the client secret is reset. - The user's permissions are copied into the token when it is created. After a user's permissions are changed, create a new token for the change to apply. - Keep the client secret on your server, never in a web page or a mobile app. ## Authentication None. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `client_id` | string | Yes | Your client id, from your partners dashboard — 32 characters, English letters and digits only. Mandatory. Min length: 32. Max length: 32. Example: `7f3a9c2e5b8d1f4a6c0e9b2d5a8f1c3e`. | | `client_secret` | string | Yes | Your client secret, from your partners dashboard. Mandatory. Example: `your-client-secret`. | ### Example (generated from the schema) ```json { "client_id": "7f3a9c2e5b8d1f4a6c0e9b2d5a8f1c3e", "client_secret": "your-client-secret" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — a successful answer has the token and `reason` 1; a failed one has `status` FAIL and the `reason`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `access_token` | string | (one of: OK) This is the access token you should use with any other call to the Partners API. Send it in the header of the call, as `Authorization: Bearer XXXX` (where XXXX is the access token). It is a random string of 171 characters: English letters, digits, `-` and `_`. Example: `pK7vQ2xR9mLwT4bZ8nC1sD6fG3hJ0aE5yU-iO_qW2eR7tY4uI9oP1aS6dF3gH8jK…`. | | `expiration_time` | integer | (one of: OK) The access token is valid for 1 hour. This is the time when it expires (Unix time, in seconds). Example: `1789903600`. | | `token_type` | string | (one of: OK) "Bearer" always. Always `Bearer`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the token was created. Always `1`. | | `status` | string | (one of: FAIL) FAIL means error: the request was not carried out, and `reason` says why. A successful answer has no `status` field. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — The client id or client secret is incorrect: one of them is missing or empty, the client id isn't 32 English letters and digits, or the pair doesn't match; `3` — You have tried too many times to get an access token with wrong information. Your IP is blocked, try again later; `4` — Server error, try again. Also returned when the body isn't valid JSON, or isn't sent with `Content-Type: application/json`. | #### Example: OK The token was created. It expires in 1 hour. ```json { "access_token": "pK7vQ2xR9mLwT4bZ8nC1sD6fG3hJ0aE5yU-iO_qW2eR7tY4uI9oP1aS6dF3gH8jK…", "expiration_time": 1789903600, "token_type": "Bearer", "reason": 1 } ``` #### Example: Reason 2 The client id or client secret is incorrect. ```json { "status": "FAIL", "reason": 2 } ``` #### Example: Reason 4 Server error, or the body isn't valid JSON. ```json { "status": "FAIL", "reason": 4 } ``` --- # Webhook Source: https://docs.99digital.co.il/partners-api/settings/webhook Markdown: https://docs.99digital.co.il/markdown/partners-api/settings/webhook.md Section: Partners API › Settings › Webhook Partner Webhook API allows you to determine the webhook URL callback to receive notifications and updates about your partner account. Webhooks can arrive from the following IP address: **34.165.99.212** This API has 3 parts: | Part | Page | What it does | | --- | --- | --- | | Part 1 | [Set Webhook](https://docs.99digital.co.il/partners-api/settings/webhook/set-webhook) | How to set the partner webhook to get notifications. | | Part 2 | [Get Webhook](https://docs.99digital.co.il/partners-api/settings/webhook/get-webhook) | How to see the webhook you set. | | Part 3 | [Event: WhatsApp](https://docs.99digital.co.il/partners-api/settings/webhook/whatsapp-event), [Event: Builder](https://docs.99digital.co.il/partners-api/settings/webhook/builder-event), [Event: Online](https://docs.99digital.co.il/partners-api/settings/webhook/online-event), [Event: Facebook](https://docs.99digital.co.il/partners-api/settings/webhook/facebook-event) | How the data is sent to you: one page per event, with every field explained. | **Part 3 settings:** | Setting | Value | | --- | --- | | URL | Your URL | | Method | JSON via POST | Your partner account has one webhook URL, shared by all its users. Setting a new URL replaces the previous one, and the webhook can't be removed with the API. ## When is a webhook sent? For every event that happens in the partners system, you will get a webhook. `event` tells you what it is about, and a number tells you what happened: | `event` | When it is sent | | --- | --- | | [`whatsapp`](https://docs.99digital.co.il/partners-api/settings/webhook/whatsapp-event) | For everything that is related to WhatsApp: during the onboarding of a WhatsApp number through an onboarding link — the client finished it, the account is ready, or the onboarding failed — and when a WhatsApp account is deleted. | | [`builder`](https://docs.99digital.co.il/partners-api/settings/webhook/builder-event) | For everything that is related to our builder system: a builder is created or deleted, its user access is reset, or a builder login link is created. | | [`online`](https://docs.99digital.co.il/partners-api/settings/webhook/online-event) | For everything that is related to our Online omnichannel: an Online account is created, activated, suspended or deleted; a WhatsApp inbox is created or deleted; an agent login link is created. | | [`facebook`](https://docs.99digital.co.il/partners-api/settings/webhook/facebook-event) | Facebook and Instagram onboarding: a client completed a Facebook or Instagram onboarding link. It carries the details of the connected page and the credentials to use it. | Future events, not sent yet: `partners`, for everything that is related to thresholds you set in our partners portal, and `package`, for everything that is related to a package purchased. Webhooks are sent for actions made with the Partners API, and for most of the same actions in the partners dashboard. The page of each event lists exactly what sends it, and every field. Check `event` and its number (`whatsapp_extra_info`, `builder_extra_info`, `online_extra_info`) before you act on a webhook: fields that don't belong to an event are empty. ## Delivery - Every webhook is a POST request with a JSON body (`Content-Type: application/json`), one event per request. - Webhooks arrive from the IP address **34.165.99.212**. - Answer with a 2xx status (200 OK) within 10 seconds, and process the webhook afterwards. The body of your answer is ignored. - Each webhook is sent once. There are no retries: if your server can't be reached, doesn't answer in time or answers with an error, that webhook is not sent again. To catch up, read the current state with the list endpoints, such as [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers), [Get Onboarding List](https://docs.99digital.co.il/partners-api/whatsapp/get-onboarding-list), [Get Builders list](https://docs.99digital.co.il/partners-api/builder/get-builders-list), [Get accounts list](https://docs.99digital.co.il/partners-api/online/get-accounts-list) and [Get Inboxes List](https://docs.99digital.co.il/partners-api/online/get-inboxes-list). - For an action you make with the Partners API, the webhook is sent while your request is processed, before the API answers you. It can therefore arrive before the API response, and a slow webhook endpoint also slows these API calls down. ## Security - The webhook has no signature or authentication header. Accept webhooks only from our IP address, and keep your webhook URL secret. - Use an `https://` URL: the `whatsapp` and `facebook` events carry API keys (`whatsapp_apiKey` and `apiKey`). --- # Set Webhook Source: https://docs.99digital.co.il/partners-api/settings/webhook/set-webhook Markdown: https://docs.99digital.co.il/markdown/partners-api/settings/webhook/set-webhook.md Section: Partners API › Settings › Webhook `POST https://partners.99digital.co.il/api/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](https://docs.99digital.co.il/partners-api/settings/webhook) for how it works, and the page of each event for its payload: [Event: WhatsApp](https://docs.99digital.co.il/partners-api/settings/webhook/whatsapp-event), [Event: Builder](https://docs.99digital.co.il/partners-api/settings/webhook/builder-event), [Event: Online](https://docs.99digital.co.il/partners-api/settings/webhook/online-event) and [Event: Facebook](https://docs.99digital.co.il/partners-api/settings/webhook/facebook-event). 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 ` — the access token is received from [Access Token](https://docs.99digital.co.il/partners-api/settings/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:** ```json { "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 `, 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](https://docs.99digital.co.il/partners-api/settings/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 `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. ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `url` | string | Yes | The webhook URL — a full URL that must start with `https://` or `http://`, 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. Example: `https://your-server.example.com/99digital/partners-webhook`. | ### Example (generated from the schema) ```json { "url": "https://your-server.example.com/99digital/partners-webhook" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK means the webhook URL is saved. Always `OK`. | | `url` | string | (one of: OK) The webhook URL you provided. Example: `https://your-server.example.com/99digital/partners-webhook`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL means error; `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/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` — `url` is missing or invalid. | #### Example: OK The webhook URL is saved. ```json { "status": "OK", "url": "https://your-server.example.com/99digital/partners-webhook", "reason": 1 } ``` #### Example: Reason 3 The access token is wrong or expired. ```json { "status": "FAIL", "reason": 3 } ``` #### Example: Reason 24 `url` is missing or invalid. ```json { "status": "FAIL", "reason": 24 } ``` --- # Get Webhook Source: https://docs.99digital.co.il/partners-api/settings/webhook/get-webhook Markdown: https://docs.99digital.co.il/markdown/partners-api/settings/webhook/get-webhook.md Section: Partners API › Settings › Webhook `GET https://partners.99digital.co.il/api/settings/getWebhook` Part 2: get the webhook address. Get Webhook allows you to see the partner webhook URL you set. The URL is empty until you set one with [Set Webhook](https://docs.99digital.co.il/partners-api/settings/webhook/set-webhook). See [Webhook](https://docs.99digital.co.il/partners-api/settings/webhook) for what is sent to it. **Settings:** | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/settings/getWebhook` | | Method | GET | | Header | `Authorization: Bearer ` — the access token is received from [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token). | **Body:** nothing, leave it empty. There are no parameters either: the access token tells us your partner account. **Response:** ```json { "status": "OK", "url": "https://your-server.example.com/99digital/partners-webhook", "reason": 1 } ``` **Response explained:** | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `url` | The webhook URL. Empty when no webhook is set. | | `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 `, 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](https://docs.99digital.co.il/partners-api/settings/access-token). | | 4 | Server error, try again. | | 13 | You need to use the GET method. | ## Remarks - Call it with GET. Other methods answer with HTTP 405 (Method Not Allowed). - Send your partner access token. A token created with an Online account's **Account API Credentials** is rejected with reason 2. ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK means the request was successful. Always `OK`. | | `url` | string | (one of: OK) The webhook URL. Empty when no webhook is set. Example: `https://your-server.example.com/99digital/partners-webhook`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL means error; `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, try again; `13` — You need to use the GET method. | #### Example: OK Your webhook URL. ```json { "status": "OK", "url": "https://your-server.example.com/99digital/partners-webhook", "reason": 1 } ``` #### Example: No webhook No webhook is set yet — `url` is empty. ```json { "status": "OK", "url": "", "reason": 1 } ``` #### Example: Reason 3 The access token is wrong or expired. ```json { "status": "FAIL", "reason": 3 } ``` --- # Event: WhatsApp Source: https://docs.99digital.co.il/partners-api/settings/webhook/whatsapp-event Markdown: https://docs.99digital.co.il/markdown/partners-api/settings/webhook/whatsapp-event.md Section: Partners API › Settings › Webhook **Webhook.** Sent to the webhook URL you configure. For every WhatsApp event that happens in the partners system, you will get a webhook (`event` "whatsapp"): during the onboarding of a WhatsApp number through an onboarding link, and when a WhatsApp account is deleted. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/partners-api/settings/webhook/set-webhook) | | Method | JSON via POST | `whatsapp_extra_info` tells you what happened: - **1, 2 and 3** are sent during the onboarding of a number through the link you created with [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding). They include `daily_limit` and `whatsapp_apiKey`. - **4** is sent when the WhatsApp account is deleted, with [Delete WhatsApp Account](https://docs.99digital.co.il/partners-api/whatsapp/delete-whatsapp-account) or in the partners dashboard. - **5** is sent when there was an error in the client's onboarding process, also when the client cancels or closes the Facebook login window of the onboarding. The first webhook you will get after your client finishes the onboarding will be with `whatsapp_extra_info` 1 or 2, and it will include the `whatsapp_apiKey`. We recommend that you use it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) of the WhatsApp API (V2), in order to start getting webhook updates regarding this WhatsApp account. **With every WhatsApp event, you will get some of the following:** ```json { "status": "OK", "event": "whatsapp", "whatsapp": "972501234567", "whatsapp_reference": "1234567", "whatsapp_extra_info": 2, "daily_limit": 250, "whatsapp_apiKey": "3f9a1c-7b2e4d-c8a05f-61d9e2-b47c3a" } ``` ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `event` | "whatsapp" always. | | `whatsapp` | The WhatsApp number that is relevant, in international format. | | `whatsapp_reference` | The reference value that was provided by you when creating the account (`reference` in [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding)). Empty when you didn't provide one; when such an account is deleted (`whatsapp_extra_info` 4), it is "0". | | `whatsapp_extra_info` | A number related to the WhatsApp update — when will you get this webhook. See the values below. | | `daily_limit` | The daily business conversations limit this line can have right from the start. Sent only with `whatsapp_extra_info` 1, 2 or 3. See the values below. | | `whatsapp_apiKey` | The apiKey that was created for you, to use the [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) (V2) with this number. Sent only with `whatsapp_extra_info` 1, 2 or 3. | #### `whatsapp_extra_info` | Value | Explanation | | --- | --- | | 1 | The client has finished the onboarding process through the link, but the account is not yet ready to start messaging at all. | | 2 | The client has finished the onboarding process through the link, and the account is ready to start receiving and replying to messages only. | | 3 | The WhatsApp account is ready to start sending templates and receiving messages. Onboarding completed. | | 4 | The WhatsApp account has been deleted. | | 5 | There was an error on the client's onboarding process (also sent when the client cancels or closes the Facebook login window). Please contact your client to provide support. | #### `daily_limit` | Value | Explanation | | --- | --- | | 0 | The daily messages limit was not determined yet. Please send your first outgoing message or template and you will get a webhook with an update. | | 50 | 50 daily conversations. | | 250 | 250 daily conversations (this is usually the default when the business is not verified). | | 1000 | 1,000 daily conversations. | | 2000 | 2,000 daily conversations (this is usually the default when the business is verified). | | 10000 | 10,000 daily conversations. | | 100000 | 100,000 daily conversations. | | 1000000 | If you get this number, it means unlimited. | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `event` | string | Yes | "whatsapp" always. Always `whatsapp`. | | `whatsapp` | string | Yes | The WhatsApp number that is relevant, in international format. Example: `972501234567`. | | `whatsapp_reference` | string | Yes | The reference value that was provided by you when creating the account (`reference` in [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding)). Empty when you didn't provide one; when such an account is deleted (`whatsapp_extra_info` 4), it is "0". Example: `1234567`. | | `whatsapp_extra_info` | integer | Yes | A number related to the WhatsApp update — when will you get this webhook. One of: `1` — The client has finished the onboarding process through the link, but the account is not yet ready to start messaging at all; `2` — The client has finished the onboarding process through the link, and the account is ready to start receiving and replying to messages only; `3` — The WhatsApp account is ready to start sending templates and receiving messages. Onboarding completed; `4` — The WhatsApp account has been deleted; `5` — There was an error on the client's onboarding process (also sent when the client cancels or closes the Facebook login window). Please contact your client to provide support. Example: `2`. | | `daily_limit` | integer | No | The daily business conversations limit this line can have right from the start. Sent only with `whatsapp_extra_info` 1, 2 or 3. One of: `0` — The daily messages limit was not determined yet. Please send your first outgoing message or template and you will get a webhook with an update; `50` — 50 daily conversations; `250` — 250 daily conversations (this is usually the default when the business is not verified); `1000` — 1,000 daily conversations; `2000` — 2,000 daily conversations (this is usually the default when the business is verified); `10000` — 10,000 daily conversations; `100000` — 100,000 daily conversations; `1000000` — If you get this number, it means unlimited. Example: `250`. | | `whatsapp_apiKey` | string | No | The apiKey that was created for you, to use the [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) (V2) with this number. Sent only with `whatsapp_extra_info` 1, 2 or 3. Example: `3f9a1c-7b2e4d-c8a05f-61d9e2-b47c3a`. | ### Example: WhatsApp The client finished the onboarding, and the account is ready to receive and reply to messages (`whatsapp_extra_info` 2). - `daily_limit` and `whatsapp_apiKey` come only with `whatsapp_extra_info` 1, 2 and 3. - When the account is deleted (4) or the onboarding failed (5), the webhook has only `status`, `event`, `whatsapp`, `whatsapp_reference` and `whatsapp_extra_info`. ```json { "status": "OK", "event": "whatsapp", "whatsapp": "972501234567", "whatsapp_reference": "1234567", "whatsapp_extra_info": 2, "daily_limit": 250, "whatsapp_apiKey": "3f9a1c-7b2e4d-c8a05f-61d9e2-b47c3a" } ``` ## Responses ### 200 — Received. Answer with a 2xx status (200 OK) within 10 seconds, and process the webhook afterwards. The body of your answer is ignored. ### default — Any other answer, or no answer in time, is a failed delivery. There are no retries: a webhook that was not delivered is not sent again. --- # Event: Builder Source: https://docs.99digital.co.il/partners-api/settings/webhook/builder-event Markdown: https://docs.99digital.co.il/markdown/partners-api/settings/webhook/builder-event.md Section: Partners API › Settings › Webhook **Webhook.** Sent to the webhook URL you configure. For every Builder event, you will get a webhook (`event` "builder"). It is sent for the actions made with the Partners API — [Create a new Builder](https://docs.99digital.co.il/partners-api/builder/create-a-new-builder), [Delete a Builder](https://docs.99digital.co.il/partners-api/builder/delete-a-builder), [Reset user access](https://docs.99digital.co.il/partners-api/builder/reset-user-access) and [Login to a Builder](https://docs.99digital.co.il/partners-api/builder/login-to-a-builder) — and for the same actions in the partners dashboard. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/partners-api/settings/webhook/set-webhook) | | Method | JSON via POST | **With every Builder event, you will get the following:** ```json { "status": "OK", "event": "builder", "builderID": 432, "builder_url": "https://builder5.99digital.co.il/432-xY7kQ2pLmN4rT8vWb3sZcA/", "builder_reference": "63f563", "builder_extra_info": 1 } ``` ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `event` | "builder" always. | | `builderID` | The builderID of the builder. | | `builder_url` | The builder URL. | | `builder_reference` | The reference value that was provided by you when creating the builder. Sent with `builder_extra_info` 1 and 2; empty with 3 and 4. | | `builder_extra_info` | A number related to the builder update — when will you get this webhook. See the values below. | #### `builder_extra_info` | Value | Explanation | | --- | --- | | 1 | A new builder was created. | | 2 | The builder was deleted. | | 3 | The builder's user access was reset. | | 4 | A builder login request link was created. | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `event` | string | Yes | "builder" always. Always `builder`. | | `builderID` | integer | Yes | The builderID of the builder. Example: `432`. | | `builder_url` | string | Yes | The builder URL. Example: `https://builder5.99digital.co.il/432-xY7kQ2pLmN4rT8vWb3sZcA/`. | | `builder_reference` | string | Yes | The reference value that was provided by you when creating the builder. Sent with `builder_extra_info` 1 and 2; empty with 3 and 4. Example: `63f563`. | | `builder_extra_info` | integer | Yes | A number related to the builder update — when will you get this webhook. One of: `1` — A new builder was created; `2` — The builder was deleted; `3` — The builder's user access was reset; `4` — A builder login request link was created. Example: `1`. | ### Example: Builder A new builder was created (`builder_extra_info` 1). ```json { "status": "OK", "event": "builder", "builderID": 432, "builder_url": "https://builder5.99digital.co.il/432-xY7kQ2pLmN4rT8vWb3sZcA/", "builder_reference": "63f563", "builder_extra_info": 1 } ``` ## Responses ### 200 — Received. Answer with a 2xx status (200 OK) within 10 seconds, and process the webhook afterwards. The body of your answer is ignored. ### default — Any other answer, or no answer in time, is a failed delivery. There are no retries: a webhook that was not delivered is not sent again. --- # Event: Online Source: https://docs.99digital.co.il/partners-api/settings/webhook/online-event Markdown: https://docs.99digital.co.il/markdown/partners-api/settings/webhook/online-event.md Section: Partners API › Settings › Webhook **Webhook.** Sent to the webhook URL you configure. For every Online omnichannel event, you will get a webhook (`event` "online"). Fields that don't belong to the event (for example `inboxID` when an account is created) are empty strings. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/partners-api/settings/webhook/set-webhook) | | Method | JSON via POST | | `online_extra_info` | Sent by | | --- | --- | | 1 — new account | [Create a new online account](https://docs.99digital.co.il/partners-api/online/create-a-new-online-account), or the partners dashboard | | 2 — active, 3 — suspended | [Update account](https://docs.99digital.co.il/partners-api/online/update-account) with `account_status` 1 or 0 | | 4 — account deleted | [Delete an account](https://docs.99digital.co.il/partners-api/online/delete-an-account), or the partners dashboard | | 5 — new WhatsApp inbox | [Create a new WhatsApp Inbox](https://docs.99digital.co.il/partners-api/online/create-a-new-whatsapp-inbox), or the partners dashboard | | 6 — WhatsApp inbox deleted | [Delete a WhatsApp Inbox](https://docs.99digital.co.il/partners-api/online/delete-a-whatsapp-inbox), or the partners dashboard | | 7 — agent login link | [Login to an agent](https://docs.99digital.co.il/partners-api/online/login-to-an-agent) | **With every Online omnichannel event, you will get some of the following:** ```json { "status": "OK", "event": "online", "accountID": 523, "inboxID": "", "agentID": 14, "server": "online", "online_reference": "5234-my-code", "online_extra_info": 1 } ``` ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `event` | "online" always. | | `accountID` | The account ID. | | `inboxID` | The inbox ID — with `online_extra_info` 5 and 6. An empty string with the other events. | | `agentID` | The agent ID — with `online_extra_info` 1 (the account's admin agent) and 7 (the agent of the login link). An empty string with the other events. | | `server` | The server subdomain of the account. | | `online_reference` | The reference value that was provided by you when creating the Online account (`online_extra_info` 1) or the WhatsApp inbox (5). An empty string with the other events. | | `online_extra_info` | A number related to the Online update event — when will you get this webhook. See the values below. | #### `online_extra_info` | Value | Explanation | | --- | --- | | 1 | A new account was created. | | 2 | The account status changed to "active". | | 3 | The account status changed to "suspended". | | 4 | The account was deleted. | | 5 | A new WhatsApp inbox was created. | | 6 | A WhatsApp inbox was deleted. | | 7 | A new agent login link was created. | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `event` | string | Yes | "online" always. Always `online`. | | `accountID` | integer | Yes | The account ID. Example: `523`. | | `inboxID` | integer \| string | Yes | The inbox ID — with `online_extra_info` 5 and 6. An empty string with the other events. Example: `3`. | | `agentID` | integer \| string | Yes | The agent ID — with `online_extra_info` 1 (the account's admin agent) and 7 (the agent of the login link). An empty string with the other events. Example: `14`. | | `server` | string | Yes | The server subdomain of the account. Example: `online`. | | `online_reference` | string | Yes | The reference value that was provided by you when creating the Online account (`online_extra_info` 1) or the WhatsApp inbox (5). An empty string with the other events. Example: `5234-my-code`. | | `online_extra_info` | integer | Yes | A number related to the Online update event — when will you get this webhook. One of: `1` — A new account was created; `2` — The account status changed to "active"; `3` — The account status changed to "suspended"; `4` — The account was deleted; `5` — A new WhatsApp inbox was created; `6` — A WhatsApp inbox was deleted; `7` — A new agent login link was created. Example: `1`. | ### Example: Online A new Online account was created (`online_extra_info` 1): `agentID` is its admin agent, and `inboxID` is empty. ```json { "status": "OK", "event": "online", "accountID": 523, "inboxID": "", "agentID": 14, "server": "online", "online_reference": "5234-my-code", "online_extra_info": 1 } ``` ## Responses ### 200 — Received. Answer with a 2xx status (200 OK) within 10 seconds, and process the webhook afterwards. The body of your answer is ignored. ### default — Any other answer, or no answer in time, is a failed delivery. There are no retries: a webhook that was not delivered is not sent again. --- # Event: Facebook Source: https://docs.99digital.co.il/partners-api/settings/webhook/facebook-event Markdown: https://docs.99digital.co.il/markdown/partners-api/settings/webhook/facebook-event.md Section: Partners API › Settings › Webhook **Webhook.** Sent to the webhook URL you configure. For every Facebook event, you will get a webhook (`event` "facebook"). It is sent once, when your client completes the onboarding of a link you created with [Create onboarding Link](https://docs.99digital.co.il/partners-api/facebook/create-onboarding-link) — see [Start Here!](https://docs.99digital.co.il/partners-api/facebook/start-here). `facebook_type` is the type that was onboarded. - `from` and `apiKey` are the credentials to send outgoing messages and data of this connection with our [Facebook API](https://docs.99digital.co.il/facebook-api). If the same Facebook page or Instagram account is onboarded again with the same type, you get the same `from` and `apiKey`. - The `instagram_…` fields are sent only for `facebook_type` 2 or 4. - The page, Instagram and admin details are as they were at the onboarding time. A detail that Facebook didn't provide is empty (or 0). **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/partners-api/settings/webhook/set-webhook) | | Method | JSON via POST | **With every Facebook event, you will get some of the following:** ```json { "status": "OK", "event": "facebook", "facebook_type": 2, "facebook_type_name": "Instagram Messenger", "facebook_reference": "my-reference", "from": "623748845667358", "apiKey": "5e2b8d-a1c4f7-09d3e6-b8f2a5-c7e1d4", "server": "online.99digital.co.il", "account_id": 1, "inbox_id": 2, "business_id": "184736291045832", "business_name": "My Flowers Business Ltd", "page_id": "123637468573457", "page_name": "My Flowers Business", "page_category": "Retail Company", "page_link": "https://www.facebook.com/123637468573457", "page_about": "Fresh flowers, delivered every day", "page_fan_count": 400, "page_picture": "https://www.example.com/images/page-picture.jpg", "admin_name": "George Levi", "admin_email": "george@example.com", "instagram_id": "17841463464574680", "instagram_username": "george_flowers", "instagram_name": "My Flowers Business", "instagram_profile_picture": "https://www.example.com/images/instagram-profile.jpg", "instagram_followers_count": 530, "instagram_media_count": 54, "instagram_biography": "This is my flowers shop", "instagram_website": "https://www.flowersshop.example.com" } ``` ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `event` | "facebook" always. | | `facebook_type` | The type that was onboarded. See the values below. | | `facebook_type_name` | The same as `facebook_type`, in text. | | `facebook_reference` | The reference value that was provided by you when creating the onboarding link. Empty when you didn't provide one. | | `from` | The ID we generate for you, that comes together with the `apiKey` in order to send outgoing messages. It contains 15 digits. | | `apiKey` | The apiKey for the service — this is how you initiate outgoing messages and data with our Facebook API, together with `from`. | | `server` | The Online server, if provided when creating the onboarding link. Empty otherwise. | | `account_id` | The Online account id, if provided when creating the onboarding link. 0 otherwise. | | `inbox_id` | The Online inbox id, if provided when creating the onboarding link. 0 otherwise. | | `business_id` | The id of the client's business on Facebook (Meta Business Portfolio). Empty when it isn't available. | | `business_name` | The name of the client's business on Facebook (Meta Business Portfolio). Empty when it isn't available. | | `page_id` | The page id of the Facebook account (relevant for all 4 types of onboarding). Even when you connect an Instagram account only, there is still a Facebook page id, since an Instagram account is always connected to a Facebook page. | | `page_name` | The Facebook page name (of that `page_id`). | | `page_category` | The category of the page. | | `page_link` | The Facebook page link URL. | | `page_about` | The Facebook page about information. | | `page_fan_count` | The number of fans (followers) of the Facebook page at the onboarding time. | | `page_picture` | The profile picture of the Facebook page. | | `admin_name` | The Facebook page admin name — the admin of the client's business on Facebook when it is available, otherwise the Facebook user who completed the onboarding. | | `admin_email` | The Facebook page admin email address — of the same admin as `admin_name`. Empty when Facebook doesn't provide it. | | `instagram_id` | The Instagram page id. Sent only for `facebook_type` 2 or 4. | | `instagram_username` | The Instagram username, without `@`. Sent only for `facebook_type` 2 or 4. | | `instagram_name` | The Instagram page name. Sent only for `facebook_type` 2 or 4. | | `instagram_profile_picture` | The Instagram page profile picture. Sent only for `facebook_type` 2 or 4. | | `instagram_followers_count` | The Instagram page total followers count at the onboarding time. Sent only for `facebook_type` 2 or 4. | | `instagram_media_count` | Total media uploaded to the Instagram page (total posts). Sent only for `facebook_type` 2 or 4. | | `instagram_biography` | The biography written on the Instagram page. Sent only for `facebook_type` 2 or 4. | | `instagram_website` | The website provided on the Instagram page. Sent only for `facebook_type` 2 or 4. | #### `facebook_type` | Value | Explanation | | --- | --- | | 1 | Facebook Messenger. | | 2 | Instagram Messenger. | | 3 | Facebook Page (posts and comments). | | 4 | Instagram Page (posts and comments). | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `event` | string | Yes | "facebook" always. Always `facebook`. | | `facebook_type` | integer | Yes | The type that was onboarded. One of: `1` — Facebook Messenger; `2` — Instagram Messenger; `3` — Facebook Page (posts and comments); `4` — Instagram Page (posts and comments). Example: `1`. | | `facebook_type_name` | string | Yes | The same as `facebook_type`, in text. One of: `Facebook Messenger`, `Instagram Messenger`, `Facebook Page (posts & comments)`, `Instagram Page (posts & comments)`. Example: `Facebook Messenger`. | | `facebook_reference` | string | Yes | The reference value that was provided by you when creating the onboarding link. Empty when you didn't provide one. Example: `my-reference`. | | `from` | string | Yes | The ID we generate for you, that comes together with the `apiKey` in order to send outgoing messages. It contains 15 digits. Example: `623748845667358`. | | `apiKey` | string | Yes | The apiKey for the service — this is how you initiate outgoing messages and data with our Facebook API, together with `from`. Example: `5e2b8d-a1c4f7-09d3e6-b8f2a5-c7e1d4`. | | `server` | string | Yes | The Online server, if provided when creating the onboarding link. Empty otherwise. Example: `online.99digital.co.il`. | | `account_id` | integer | Yes | The Online account id, if provided when creating the onboarding link. 0 otherwise. Example: `1`. | | `inbox_id` | integer | Yes | The Online inbox id, if provided when creating the onboarding link. 0 otherwise. Example: `2`. | | `business_id` | string | Yes | The id of the client's business on Facebook (Meta Business Portfolio). Empty when it isn't available. Example: `184736291045832`. | | `business_name` | string | Yes | The name of the client's business on Facebook (Meta Business Portfolio). Empty when it isn't available. Example: `My Business Ltd`. | | `page_id` | string | Yes | The page id of the Facebook account (relevant for all 4 types of onboarding). Even when you connect an Instagram account only, there is still a Facebook page id, since an Instagram account is always connected to a Facebook page. Example: `123637468573457`. | | `page_name` | string | Yes | The Facebook page name (of that `page_id`). Example: `My Business`. | | `page_category` | string | Yes | The category of the page. Example: `Retail Company`. | | `page_link` | string | Yes | The Facebook page link URL. Example: `https://www.facebook.com/123637468573457`. | | `page_about` | string | Yes | The Facebook page about information. Example: `About my business`. | | `page_fan_count` | integer | Yes | The number of fans (followers) of the Facebook page at the onboarding time. Example: `400`. | | `page_picture` | string | Yes | The profile picture of the Facebook page. Example: `https://www.example.com/images/page-picture.jpg`. | | `admin_name` | string | Yes | The Facebook page admin name — the admin of the client's business on Facebook when it is available, otherwise the Facebook user who completed the onboarding. Example: `George Levi`. | | `admin_email` | string | Yes | The Facebook page admin email address — of the same admin as `admin_name`. Empty when Facebook doesn't provide it. Example: `george@example.com`. | | `instagram_id` | string | No | The Instagram page id. Sent only for `facebook_type` 2 or 4. Example: `17841463464574680`. | | `instagram_username` | string | No | The Instagram username, without `@`. Sent only for `facebook_type` 2 or 4. Example: `george_flowers`. | | `instagram_name` | string | No | The Instagram page name. Sent only for `facebook_type` 2 or 4. Example: `My Flowers Business`. | | `instagram_profile_picture` | string | No | The Instagram page profile picture. Sent only for `facebook_type` 2 or 4. Example: `https://www.example.com/images/instagram-profile.jpg`. | | `instagram_followers_count` | integer | No | The Instagram page total followers count at the onboarding time. Sent only for `facebook_type` 2 or 4. Example: `530`. | | `instagram_media_count` | integer | No | Total media uploaded to the Instagram page (total posts). Sent only for `facebook_type` 2 or 4. Example: `54`. | | `instagram_biography` | string | No | The biography written on the Instagram page. Sent only for `facebook_type` 2 or 4. Example: `This is my flowers shop`. | | `instagram_website` | string | No | The website provided on the Instagram page. Sent only for `facebook_type` 2 or 4. Example: `https://www.flowersshop.example.com`. | ### Example: Facebook The client connected Instagram Messenger (`facebook_type` 2), so the `instagram_…` fields are included. For Facebook Messenger (1) and Facebook Page (3), the `instagram_…` fields are not sent. Here the onboarding link was created with the `server`, `account_id` and `inbox_id` of an Online inbox. ```json { "status": "OK", "event": "facebook", "facebook_type": 2, "facebook_type_name": "Instagram Messenger", "facebook_reference": "my-reference", "from": "623748845667358", "apiKey": "5e2b8d-a1c4f7-09d3e6-b8f2a5-c7e1d4", "server": "online.99digital.co.il", "account_id": 1, "inbox_id": 2, "business_id": "184736291045832", "business_name": "My Flowers Business Ltd", "page_id": "123637468573457", "page_name": "My Flowers Business", "page_category": "Retail Company", "page_link": "https://www.facebook.com/123637468573457", "page_about": "Fresh flowers, delivered every day", "page_fan_count": 400, "page_picture": "https://www.example.com/images/page-picture.jpg", "admin_name": "George Levi", "admin_email": "george@example.com", "instagram_id": "17841463464574680", "instagram_username": "george_flowers", "instagram_name": "My Flowers Business", "instagram_profile_picture": "https://www.example.com/images/instagram-profile.jpg", "instagram_followers_count": 530, "instagram_media_count": 54, "instagram_biography": "This is my flowers shop", "instagram_website": "https://www.flowersshop.example.com" } ``` ## Responses ### 200 — Received. Answer with a 2xx status (200 OK) within 10 seconds, and process the webhook afterwards. The body of your answer is ignored. ### default — Any other answer, or no answer in time, is a failed delivery. There are no retries: a webhook that was not delivered is not sent again. --- # Business settings Source: https://docs.99digital.co.il/partners-api/settings/business-settings Markdown: https://docs.99digital.co.il/markdown/partners-api/settings/business-settings.md Section: Partners API › Settings › Business settings You can modify some business settings using this API endpoint: the default logo and texts that your clients see when they open your onboarding links. You can edit any of the parameters you wish. | Endpoint | What it does | | --- | --- | | [Set business settings](https://docs.99digital.co.il/partners-api/settings/business-settings/set-business) | Change one or more of the settings. | | [Get business settings](https://docs.99digital.co.il/partners-api/settings/business-settings/get-business) | Get the business data: your business name and the current settings. | ## Set the business settings ### Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/settings/setBusiness` | | Method | JSON via PATCH | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | ### Body | Parameter | Description / Example | Maximum length | Remarks | | --- | --- | --- | --- | | `onboarding_logo` | HTTPS link for the onboarding logo, shown by default on any onboarding link that was not set a specific onboarding logo. The image size should be 200x60 px, in PNG or JPG format. | 512 | The full URL here: it must start with `https://` (`http://` is accepted too), 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. | | `onboarding_message` | Text to show by default on the WhatsApp onboarding link, above the onboarding button, in case you did not set any specific text for the onboarding link. | 200 | The full text here. Facebook and Instagram onboarding links don't use it. | | `onboarding_button` | The button text to show by default on the onboarding link. | 50 | The button text here. | | `onboarding_success` | After the client finished the onboarding process successfully, here you can set the default text to show them. | 200 | The text goes here. | | `onboarding_failed` | This text appears if the onboarding was not completed successfully: here you can set the default text to show them. | 200 | The text goes here. | ### Response ```json { "status": "OK", "reason": 1, "onboarding_message": "ברוכים הבאים! לחצו על הכפתור כדי לחבר את הוואטסאפ של העסק.", "onboarding_button": "לחץ כאן להתחלה" } ``` ### Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the settings are saved. "FAIL" means error. | | Any of the parameters | The response returns the parameters you provided, with the values you provided. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, try again. Also returned when the body isn't valid JSON, or isn't sent with `Content-Type: application/json`. | | 27 | You need to use the PATCH method. | | 28 | `onboarding_logo` is invalid. | | 29 | `onboarding_message` is invalid (longer than 200 characters). | | 30 | `onboarding_button` is invalid (longer than 50 characters). | | 31 | `onboarding_success` or `onboarding_failed` is invalid (longer than 200 characters). | ## Get the business data ### Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/settings/getBusiness` | | Method | JSON via GET | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | ### Body Nothing — leave it empty. ### Response ```json { "status": "OK", "business_name": "Your business name", "onboarding_logo": "https://www.example.com/images/onboarding-logo.png", "onboarding_message": "ברוכים הבאים! לחצו על הכפתור כדי לחבר את הוואטסאפ של העסק.", "onboarding_button": "לחץ כאן להתחלה", "onboarding_success": "הפעלת הקו הושלמה בהצלחה", "onboarding_failed": "תקלה. אנא נסה שנית", "reason": 1 } ``` ### Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `business_name` | The business name. This value can't be changed with the setBusiness API. | | `onboarding_logo` | The onboarding logo HTTPS link that is used by default. | | `onboarding_message` | The onboarding message that shows by default. | | `onboarding_button` | The button text that shows by default. | | `onboarding_success` | The success message, when the onboarding completed successfully. | | `onboarding_failed` | The failed message, when the onboarding failed. | | `reason` | The status explanation — see the table below. | A setting that was never set is empty (`""`), and the onboarding page shows its built-in default instead (see [Built-in defaults](#built-in-defaults)). | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, try again. | | 13 | You need to use the GET method. | ## Built-in defaults | Setting | Built-in default | | --- | --- | | `onboarding_logo` | None | | `onboarding_message` | None | | `onboarding_button` | לחץ כאן להתחלה | | `onboarding_success` | הפעלת הקו הושלמה בהצלחה — on Facebook and Instagram links: החיבור הושלם בהצלחה | | `onboarding_failed` | תקלה. אנא נסה שנית | ## Where they are shown - **WhatsApp onboarding links** — [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding) — show all five settings. Store onboarding links show the logo and the success and failed texts. - **Facebook and Instagram onboarding links** — [Create onboarding Link](https://docs.99digital.co.il/partners-api/facebook/create-onboarding-link) — show the logo, the button text and the success and failed texts. They don't use `onboarding_message`: their heading text is fixed per type. A WhatsApp onboarding link can have its own logo and welcome text: `onboarding_logo` and `onboarding_message` in [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding) are shown instead of these defaults, on that link only. ## Remarks - The settings are read when a client opens an onboarding link, so a change applies to every link of your partner account, including links you already sent. - A setting you leave out, or send empty, keeps its current value: a setting can't be cleared with the API. - Your business name is part of the business data that [Get business settings](https://docs.99digital.co.il/partners-api/settings/business-settings/get-business) returns, but it can't be changed with the API. - Calling an endpoint with another method answers with HTTP 405 (Method Not Allowed). --- # Set business settings Source: https://docs.99digital.co.il/partners-api/settings/business-settings/set-business Markdown: https://docs.99digital.co.il/markdown/partners-api/settings/business-settings/set-business.md Section: Partners API › Settings › Business settings `PATCH https://partners.99digital.co.il/api/settings/setBusiness` You can modify some business settings using this API endpoint: the default logo and texts of your onboarding links. You can edit any of the parameters you wish — send only the ones you want to change. [Business settings](https://docs.99digital.co.il/partners-api/settings/business-settings) explains where each setting is shown, and its built-in default; see your current settings with [Get business settings](https://docs.99digital.co.il/partners-api/settings/business-settings/get-business). ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/settings/setBusiness` | | Method | JSON via PATCH | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Send your partner access token. A token created with an Online account's **Account API Credentials** is rejected with reason 2. ## Body | Parameter | Description / Example | Maximum length | Remarks | | --- | --- | --- | --- | | `onboarding_logo` | HTTPS link for the onboarding logo, shown by default on any onboarding link that was not set a specific onboarding logo. The image size should be 200x60 px, in PNG or JPG format. | 512 | The full URL here: it must start with `https://` (`http://` is accepted too), 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. | | `onboarding_message` | Text to show by default on the WhatsApp onboarding link, above the onboarding button, in case you did not set any specific text for the onboarding link. | 200 | The full text here. Facebook and Instagram onboarding links don't use it. | | `onboarding_button` | The button text to show by default on the onboarding link. | 50 | The button text here. | | `onboarding_success` | After the client finished the onboarding process successfully, here you can set the default text to show them. | 200 | The text goes here. | | `onboarding_failed` | This text appears if the onboarding was not completed successfully: here you can set the default text to show them. | 200 | The text goes here. | ## Response ```json { "status": "OK", "reason": 1, "onboarding_message": "ברוכים הבאים! לחצו על הכפתור כדי לחבר את הוואטסאפ של העסק.", "onboarding_button": "לחץ כאן להתחלה" } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the settings are saved. "FAIL" means error. | | Any of the parameters | The response returns the parameters you provided, with the values you provided. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, try again. Also returned when the body isn't valid JSON, or isn't sent with `Content-Type: application/json`. | | 27 | You need to use the PATCH method. | | 28 | `onboarding_logo` is invalid. | | 29 | `onboarding_message` is invalid (longer than 200 characters). | | 30 | `onboarding_button` is invalid (longer than 50 characters). | | 31 | `onboarding_success` or `onboarding_failed` is invalid (longer than 200 characters). | ## Remarks - A parameter you leave out, or send empty, keeps its current value. You can't clear a setting with this endpoint. - A logo or a message set on a specific onboarding link (`onboarding_logo` and `onboarding_message` in [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding)) is shown instead of these defaults, on that link only. - Your business name can't be changed with this endpoint. - Call it with PATCH. Other methods answer with HTTP 405 (Method Not Allowed). - Every change is recorded in the **Audit Log** of your partners dashboard. ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `onboarding_logo` | string | No | HTTPS link for the onboarding logo, shown by default on any onboarding link that was not set a specific onboarding logo. The image size should be 200x60 px, in PNG or JPG format. A full URL: it must start with `https://` (`http://` is accepted too), 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. Maximum length: 512 characters. Example: `https://www.example.com/images/onboarding-logo.png`. | | `onboarding_message` | string | No | Text to show by default on the WhatsApp onboarding link, above the onboarding button, in case you did not set any specific text for the onboarding link. Maximum length: 200 characters. Facebook and Instagram onboarding links don't use it. Max length: 200. Example: `ברוכים הבאים! לחצו על הכפתור כדי לחבר את הוואטסאפ של העסק.`. | | `onboarding_button` | string | No | The button text to show by default on the onboarding link. Maximum length: 50 characters. Max length: 50. Example: `לחץ כאן להתחלה`. | | `onboarding_success` | string | No | After the client finished the onboarding process successfully, here you can set the default text to show them. Maximum length: 200 characters. Max length: 200. Example: `הפעלת הקו הושלמה בהצלחה`. | | `onboarding_failed` | string | No | This text appears if the onboarding was not completed successfully: here you can set the default text to show the client. Maximum length: 200 characters. Max length: 200. Example: `תקלה. אנא נסה שנית`. | ### Example: Texts Change the default welcome text and button text; the other settings keep their current values. ```json { "onboarding_message": "ברוכים הבאים! לחצו על הכפתור כדי לחבר את הוואטסאפ של העסק.", "onboarding_button": "לחץ כאן להתחלה" } ``` ### Example: Logo Change only the default logo — a 200x60 px PNG or JPG, by HTTPS link. ```json { "onboarding_logo": "https://www.example.com/images/onboarding-logo.png" } ``` ### Example: All settings Set every setting at once. ```json { "onboarding_logo": "https://www.example.com/images/onboarding-logo.png", "onboarding_message": "ברוכים הבאים! לחצו על הכפתור כדי לחבר את הוואטסאפ של העסק.", "onboarding_button": "לחץ כאן להתחלה", "onboarding_success": "הפעלת הקו הושלמה בהצלחה", "onboarding_failed": "תקלה. אנא נסה שנית" } ``` ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK means the settings are saved. The response also returns the parameters you provided. Always `OK`. | | `onboarding_logo` | string | (one of: OK) The onboarding logo you provided — only if you sent one. Example: `https://www.example.com/images/onboarding-logo.png`. | | `onboarding_message` | string | (one of: OK) The onboarding message you provided — only if you sent one. Example: `ברוכים הבאים! לחצו על הכפתור כדי לחבר את הוואטסאפ של העסק.`. | | `onboarding_button` | string | (one of: OK) The button text you provided — only if you sent one. Example: `לחץ כאן להתחלה`. | | `onboarding_success` | string | (one of: OK) The success text you provided — only if you sent one. Example: `הפעלת הקו הושלמה בהצלחה`. | | `onboarding_failed` | string | (one of: OK) The failed text you provided — only if you sent one. Example: `תקלה. אנא נסה שנית`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL means error — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/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`; `27` — You need to use the PATCH method; `28` — `onboarding_logo` is invalid; `29` — `onboarding_message` is invalid — longer than 200 characters; `30` — `onboarding_button` is invalid — longer than 50 characters; `31` — `onboarding_success` or `onboarding_failed` is invalid — longer than 200 characters. | #### Example: OK The settings are saved; the response returns the parameters you changed. ```json { "status": "OK", "reason": 1, "onboarding_message": "ברוכים הבאים! לחצו על הכפתור כדי לחבר את הוואטסאפ של העסק.", "onboarding_button": "לחץ כאן להתחלה" } ``` #### Example: Reason 28 `onboarding_logo` is invalid. ```json { "status": "FAIL", "reason": 28 } ``` #### Example: Reason 29 `onboarding_message` is longer than 200 characters. ```json { "status": "FAIL", "reason": 29 } ``` --- # Get business settings Source: https://docs.99digital.co.il/partners-api/settings/business-settings/get-business Markdown: https://docs.99digital.co.il/markdown/partners-api/settings/business-settings/get-business.md Section: Partners API › Settings › Business settings `GET https://partners.99digital.co.il/api/settings/getBusiness` Get the business data of your partner account: your business name and the default texts and logo of your onboarding links. Change the settings with [Set business settings](https://docs.99digital.co.il/partners-api/settings/business-settings/set-business); [Business settings](https://docs.99digital.co.il/partners-api/settings/business-settings) explains where each one is shown. ## Settings | Setting | Value | | --- | --- | | URL | `https://partners.99digital.co.il/api/settings/getBusiness` | | Method | JSON via GET | | Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | Send your partner access token. A token created with an Online account's **Account API Credentials** is rejected with reason 2. ## Body Nothing — leave it empty. There are no parameters either: the access token tells us your partner account. ## Response ```json { "status": "OK", "business_name": "Your business name", "onboarding_logo": "https://www.example.com/images/onboarding-logo.png", "onboarding_message": "ברוכים הבאים! לחצו על הכפתור כדי לחבר את הוואטסאפ של העסק.", "onboarding_button": "לחץ כאן להתחלה", "onboarding_success": "הפעלת הקו הושלמה בהצלחה", "onboarding_failed": "תקלה. אנא נסה שנית", "reason": 1 } ``` ## Response explained | Parameter | Description | | --- | --- | | `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. | | `business_name` | The business name. This value can't be changed with the setBusiness API. | | `onboarding_logo` | The onboarding logo HTTPS link that is used by default. | | `onboarding_message` | The onboarding message that shows by default. | | `onboarding_button` | The button text that shows by default. | | `onboarding_success` | The success message, when the onboarding completed successfully. | | `onboarding_failed` | The failed message, when the onboarding failed. | | `reason` | The status explanation — see the table below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL: the status is OK. | | 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). | | 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. | | 4 | Server error, try again. | | 13 | You need to use the GET method. | ## Remarks - A setting that was never set is empty, and the onboarding page shows its built-in default instead (see [Business settings](https://docs.99digital.co.il/partners-api/settings/business-settings)). - Call it with GET. Other methods answer with HTTP 405 (Method Not Allowed). ## Authentication `Authorization: Bearer ` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour. ## 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. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the request was successful. Always `OK`. | | `business_name` | string | (one of: OK) The business name. This value can't be changed with the setBusiness API. Example: `Your business name`. | | `onboarding_logo` | string | (one of: OK) The onboarding logo HTTPS link that is used by default. Empty if it was never set. Example: `https://www.example.com/images/onboarding-logo.png`. | | `onboarding_message` | string | (one of: OK) The onboarding message that shows by default. Example: `ברוכים הבאים! לחצו על הכפתור כדי לחבר את הוואטסאפ של העסק.`. | | `onboarding_button` | string | (one of: OK) The button text that shows by default. Example: `לחץ כאן להתחלה`. | | `onboarding_success` | string | (one of: OK) The success message, when the onboarding completed successfully. Example: `הפעלת הקו הושלמה בהצלחה`. | | `onboarding_failed` | string | (one of: OK) The failed message, when the onboarding failed. Example: `תקלה. אנא נסה שנית`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL means error — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer `, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, try again; `13` — You need to use the GET method. | #### Example: OK Your business data. ```json { "status": "OK", "business_name": "Your business name", "onboarding_logo": "https://www.example.com/images/onboarding-logo.png", "onboarding_message": "ברוכים הבאים! לחצו על הכפתור כדי לחבר את הוואטסאפ של העסק.", "onboarding_button": "לחץ כאן להתחלה", "onboarding_success": "הפעלת הקו הושלמה בהצלחה", "onboarding_failed": "תקלה. אנא נסה שנית", "reason": 1 } ``` #### Example: Nothing set yet No setting was set yet — they are empty, and the onboarding pages show their built-in defaults. ```json { "status": "OK", "business_name": "Your business name", "onboarding_logo": "", "onboarding_message": "", "onboarding_button": "", "onboarding_success": "", "onboarding_failed": "", "reason": 1 } ``` #### Example: Reason 3 The access token is wrong or expired. ```json { "status": "FAIL", "reason": 3 } ```