# 99 Digital API Documentation — complete documentation Generated: 2026-11-29T20:03:58.741Z Canonical documentation: https://docs.99digital.co.il/ Documentation index: https://docs.99digital.co.il/llms.txt > This file is generated from every public documentation page during the production build. Do not edit it manually. --- # 99 Digital API Source: https://docs.99digital.co.il/ Markdown: https://docs.99digital.co.il/markdown/index.md Section: Overview The official API documentation of 99 Digital. Choose the API you are integrating with: | API | What it covers | | --- | --- | | [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) | Messages, files, interactive messages and templates on WhatsApp, your business profile, webhooks and WhatsApp Calls. | | [Partners API](https://docs.99digital.co.il/partners-api) | For partners: registering and onboarding WhatsApp numbers, Facebook onboarding, and managing Builder and Online accounts. | | [SMS API](https://docs.99digital.co.il/sms-api) | Sending SMS to Israeli numbers, delivery status, verification codes and incoming-message webhooks. | | [Online API](https://docs.99digital.co.il/online-api) | The Online omni-channel inbox: agents, contacts, conversations, messages, teams, labels, forms and webhooks. | | [Facebook API](https://docs.99digital.co.il/facebook-api) | Posts and comments on your Facebook Pages and Instagram accounts. | ## Stay up to date Every change to this documentation is listed in the [Change Log](https://docs.99digital.co.il/changelog). To get an email whenever it is updated, [register for documentation updates](https://marketing99.minisite.ms/21/6). --- # WhatsApp API Source: https://docs.99digital.co.il/whatsapp-api Markdown: https://docs.99digital.co.il/markdown/whatsapp-api.md Section: WhatsApp API Send WhatsApp messages, files, interactive messages and templates from your own systems, manage your business profile, and receive messages and delivery events by webhook. ## Base URL ```text https://api.99digital.co.il/whatsapp/v2 ``` ## Authentication Every request carries your API key in the `apiKey` header: ```http apiKey: ``` --- # Postman Collection Source: https://docs.99digital.co.il/whatsapp-api/postman-collection Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/postman-collection.md Section: WhatsApp API [Click here to download the WhatsApp API Postman Collection](https://api.99digital.co.il/whatsapp-postman). The Postman collection is always updated with every change to the API, so make sure you always download the latest version. To use it, select **Import** in Postman and choose the downloaded file, then fill in `apiKey` and `from` in the collection's **Variables** tab. --- # Send Message Source: https://docs.99digital.co.il/whatsapp-api/send-message Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-message.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendMessage` Send a normal text message to a client who wrote to you within the last 24 hours. :::info You can use the "Send Message" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send Template Message](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available for a template message, therefore sending a contact message can only be done when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. ::: ## Explanation Sending a message means sending a normal text message to your clients. ## Remarks - You can only send a message to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session time of a conversation. - The 24-hour conversation session starts when you send a message to the client. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendMessage` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the message to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4).
or
The user id you want to send the message to. For example: `IL.1605856887361213` — for a client who hides their number behind a WhatsApp [username](https://docs.99digital.co.il/whatsapp-api/information/username); it arrives as `from_id` in your webhook. | yes | | body | Your message goes here (up to 4096 characters).
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough
`` ```text``` `` for monospace | yes | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | ## Response ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "your message", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** OK status doesn't mean the message arrived to the end user. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | body | The text you sent | | timestamp | Time stamp of the message (Unix time, in seconds) | | from | Your WhatsApp account | | to | The number or the user id that the message was sent to | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | No longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is either empty or wrong number format | | 5 | `body` can't be empty | | 6 | WhatsApp error - try again | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead. | | 8 | You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead. | | 9 | Rate limit error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the message to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `body` | string | Yes | Your message goes here. Use `\n` for a new line, `*text*` for bold, `_text_` for italic, `~text~` for strikethrough and `` ```text``` `` for monospace. Max length: 4096. Example: `Hi! Thanks for writing to us. How can we help today?`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: Text A plain text message. ```json { "from": "972771234567", "to": "972501234567", "body": "Hi! Thanks for writing to us. How can we help today?" } ``` ### Example: Formatting New lines and WhatsApp formatting — `*bold*`, `_italic_` and `~strikethrough~`. ```json { "from": "972771234567", "to": "972501234567", "body": "*Order #4711 confirmed*\n\nPickup: _today until 18:00_\nAddress: Herzl 1, Tel Aviv\n~Delivery fee 20 NIS~ Free delivery this week!" } ``` ### Example: Reply to client Quote the client's message: `replyTo` is the unique ID of their message, from your webhook. The client sees it quoted above your reply. ```json { "from": "972771234567", "to": "972501234567", "body": "Yes, that item is in stock.", "replyTo": "92E004B950CCEA3C386FCFA2AAF8558A" } ``` ### Example: Quote own message Quote one of your own messages: `replyTo` is the `unique` you received when you sent it. ```json { "from": "972771234567", "to": "972501234567", "body": "Small correction to the message above: pickup is until 19:00.", "replyTo": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ" } ``` ### Example: To user id For a client who hides their number behind a WhatsApp username: send to the user id from your webhook. ```json { "from": "972771234567", "to": "IL.1605856887361213", "body": "Hi! We received your message and will get back to you shortly." } ``` ### Example: showRequest Get the request back in the response, as `originalRequest`. ```json { "from": "972771234567", "to": "972501234567", "body": "Hi! Thanks for writing to us. How can we help today?", "showRequest": 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) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `body` | string | (one of: OK) The text you sent. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.body` | string | (one of: OK) The `body` you sent — the message text. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. Left out when you did not quote a message. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'body' can't be empty; `6` — WhatsApp error — try again; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — Rate limit error, try again. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "Hi! Thanks for writing to us. How can we help today?", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: OK + showRequest With `showRequest` set to 1, the response includes `originalRequest`. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "Hi! Thanks for writing to us. How can we help today?", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "originalRequest": { "from": "972771234567", "to": "972501234567", "body": "Hi! Thanks for writing to us. How can we help today?" }, "reason": 1 } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` #### Example: Reason 4 'to' is either empty or wrong number format. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 5 'body' can't be empty. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` --- # Send File Source: https://docs.99digital.co.il/whatsapp-api/send-file Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-file.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendFile` Send an image, a video, an audio file or a document to your client, from a link to the file. :::info You can use the "Send File" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available as a template message, therefore a contact can only be sent when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send them another message, you must use a template message again. ::: ## Files you can send | Media Type | Supported Format | Maximum file size | | --- | --- | --- | | image | png, jpg, jpeg | 5 MB | | video | mp4, avi, 3gpp | 16 MB | | audio | mp3, ogg (PTT only), amr, aac | 16 MB | | document | pdf, doc, docx, xls, xlsx, ppt, pptx, zip, txt, rar | 100 MB | The media type is taken from the file extension in the link (for a link without one, from the file's content type). Any other file — a gif, for example — is sent as a document. ## More Remarks - You can only send a file to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session of a conversation. - The 24-hour conversation session starts when *you* send a message to the client. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendFile` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the file to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4). Or: the user id you want to send the file to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | | body | An https link to the file. For example: `https://pubs.usgs.gov/dds/dds-057/ReadMe.pdf`. WhatsApp downloads the file from this link, so it must be open to the internet (or see `localStorage`). | yes | | caption | The caption text that will be sent with the file. Audio files are sent without a caption. | no | | fileName | For the document media type, you can specify the file name that will be used. If not provided, the file name is taken from the `body` URL. Don't add the file extension: it is added from the link. For example: `yourFile` | no | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`). Default is off (`0`). `1` — enable. | no | | localStorage | Whenever you provide a `body` URL, we deliver this URL to WhatsApp, and WhatsApp downloads the file from it in order to deliver it with your message. If for any reason your file link is not accessible to WhatsApp or not open to the internet, you can ask us to fetch the file instead, so that WhatsApp does not use your own link: we download the file and upload it to WhatsApp directly. We don't keep a copy of the file on our servers. Default value is `0` (disable). Enable — `1`. **Please note that using this feature may delay the response from our server, due to the operation described above.** It does not apply to audio files, and if the upload fails, your link is used. | no | ## Response ```json { "status": "OK", "unique": "65dfd4r4dref34rdfxd34r", "body": "Your link", "caption": "The text you sent", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | OK or FAIL. **Note:** OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | body | The link you sent. | | caption | The caption you sent (empty when you sent none). | | timestamp | Time stamp of the message (Unix time, in seconds). | | from | Your WhatsApp account. | | to | The number or the user id that the message was sent to. | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | **Deprecated.** This value is no longer in use: the conversation time left is now part of the webhook instead. This parameter will be removed in a future update; until then, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | Description | | --- | --- | | 1 | Not FAIL, the status is OK. | | 2 | `from` is missing, or JSON syntax error. | | 3 | Wrong apiKey, or the `from` number is not registered with us. | | 4 | `to` is either empty or wrong number format. | | 5 | `body` is empty or not a valid link. | | 6 | Your WhatsApp number is not set up for sending files. Please contact support. | | 7 | You are trying to send a file but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead. | | 8 | You are trying to send a file for the first time to a contact. Please use 'Send Template' message instead. | | 10 | Not in use anymore. | | 11 | Rate limit error, try again. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the file to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the file to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `body` | string (uri) | Yes | An https link to the file. WhatsApp downloads the file from this link, so it must be open to the internet — or see `localStorage`. Example: `https://pubs.usgs.gov/dds/dds-057/ReadMe.pdf`. | | `caption` | string | No | The caption text that will be sent with the file. Audio files are sent without a caption. Example: `Here is the photo you asked for 📸`. | | `fileName` | string | No | For a document, you can specify the file name the client sees. If not provided, the file name is taken from the `body` link. Don't add the file extension: it is added from the link. Example: `yourFile`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | | `localStorage` | integer | No | We deliver your `body` link to WhatsApp, and WhatsApp downloads the file from it in order to deliver it with your message. If your link is not accessible to WhatsApp or not open to the internet, enable this: we download the file ourselves and upload it to WhatsApp, so WhatsApp doesn't need your link. Please note that using this feature may delay the response from our server. We don't keep a copy of the file: it is passed on to WhatsApp and not stored on our servers. It does not apply to audio files, and if the upload fails, your link is used. One of: `0` — Off — WhatsApp downloads the file from your link; `1` — Enable — we upload the file to WhatsApp for you. Default: `0`. | ### Example: Image An image with a caption. ```json { "from": "972771234567", "to": "972501234567", "body": "https://storage.99digital.online/samples/hello.png", "caption": "Here is the photo you asked for 📸" } ``` ### Example: Video A video with a caption. ```json { "from": "972771234567", "to": "972501234567", "body": "https://storage.99digital.online/samples/meditation.mp4", "caption": "A short demo of the product" } ``` ### Example: Audio An audio file or a voice note. Audio is sent without a caption. ```json { "from": "972771234567", "to": "972501234567", "body": "https://www.example.com/files/voice-note.mp3" } ``` ### Example: Document A PDF with the file name the client sees. The extension is added from the link. ```json { "from": "972771234567", "to": "972501234567", "body": "https://storage.99digital.online/samples/headerSample.pdf", "fileName": "Invoice 4711", "caption": "Your invoice for August is attached." } ``` ### Example: Any other file An Excel, Word or any other file is sent as a document. ```json { "from": "972771234567", "to": "972501234567", "body": "https://www.example.com/files/price-list.xlsx", "fileName": "Price list September 2026" } ``` ### Example: localStorage We upload the file to WhatsApp for you, for a link that WhatsApp can't reach. ```json { "from": "972771234567", "to": "972501234567", "body": "https://storage.99digital.online/samples/hello.png", "caption": "Here is the photo you asked for 📸", "localStorage": 1 } ``` ### Example: Reply to client Quote the client's message: `replyTo` is the unique ID of their message, from your webhook. ```json { "from": "972771234567", "to": "972501234567", "body": "https://storage.99digital.online/samples/hello.png", "caption": "This one?", "replyTo": "92E004B950CCEA3C386FCFA2AAF8558A" } ``` ## 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 status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `body` | string | (one of: OK) The link you sent. | | `caption` | string | (one of: OK) The caption you sent (empty when you sent none). | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.body` | string | (one of: OK) The `body` you sent — the link to the file. | | `originalRequest.caption` | string | (one of: OK) The `caption` you sent. Left out when you sent no caption. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. Left out when you did not quote a message. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'body' is empty or not a valid link; `6` — Your WhatsApp number is not set up for sending files. Please contact support; `7` — You are trying to send a file but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a file for the first time to a contact. Please use 'Send Template' message instead; `11` — Rate limit error, try again. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "https://storage.99digital.online/samples/hello.png", "caption": "Here is the photo you asked for 📸", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 5 'body' is empty or not a valid link. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` --- # Send Location Source: https://docs.99digital.co.il/whatsapp-api/send-location Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-location.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendLocation` Send a location pin to your client, by latitude and longitude, with an optional name or address. :::info You can use the "Send Location" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available as a template message, therefore a contact can only be sent when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send them another message, you must use a template message again. ::: ## More Remarks - You can only send a location to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session of a conversation. - The 24-hour conversation session starts when *you* send a message to the client. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendLocation` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the location to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4). Or: the user id you want to send the location to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | | lat | Latitude of the location. For example: `"37.422"` | yes | | lng | Longitude of the location. For example: `"-122.084"` | yes | | caption | The text that will be shown next to the location of the lat/lng. Usually this is the address or the place name. For example: `"Big Ben, London"` | no | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`). Default is off (`0`). `1` — enable. | no | ## Response ```json { "status": "OK", "unique": "65dfd4r4dref34rdfxd34r", "lat": "37.422", "lng": "-122.084", "caption": "Big Ben, London", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | OK or FAIL. **Note:** OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | lat | The latitude, as you sent it. | | lng | The longitude, as you sent it. | | caption | The caption you sent (empty when you sent none). | | timestamp | Time stamp of the message (Unix time, in seconds). | | from | Your WhatsApp account. | | to | The number or the user id that the message was sent to. | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | **Deprecated.** This value is no longer in use: the conversation time left is now part of the webhook instead. This parameter will be removed in a future update; until then, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | Description | | --- | --- | | 1 | Not FAIL, the status is OK. | | 2 | `from` is missing, or JSON syntax error. | | 3 | Wrong apiKey, or the `from` number is not registered with us. | | 4 | `to` is either empty or wrong number format. | | 5 | `lat` or `lng` is missing. | | 6 | WhatsApp error — try again. | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead. | | 8 | You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead. | | 9 | Rate limit error, try again. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the location to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the location to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `lat` | string | Yes | Latitude of the location. Example: `37.422`. | | `lng` | string | Yes | Longitude of the location. Example: `-122.084`. | | `caption` | string | No | The text shown next to the location pin — usually the place name or the address. Example: `Big Ben, London`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: Location A location pin with the place name. ```json { "from": "972771234567", "to": "972501234567", "lat": "32.0853", "lng": "34.7818", "caption": "Our store - Azrieli Center, Tel Aviv" } ``` ### Example: Without caption Only the pin. ```json { "from": "972771234567", "to": "972501234567", "lat": "51.5007", "lng": "-0.1246" } ``` ## 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 status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `lat` | string | (one of: OK) The latitude, as you sent it. | | `lng` | string | (one of: OK) The longitude, as you sent it. | | `caption` | string | (one of: OK) The caption you sent (empty when you sent none). | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.lat` | string | (one of: OK) The `lat` you sent — the latitude of the location. | | `originalRequest.lng` | string | (one of: OK) The `lng` you sent — the longitude of the location. | | `originalRequest.caption` | string | (one of: OK) The `caption` you sent — the place name or address. Left out when you sent no caption. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. Left out when you did not quote a message. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'lat' or 'lng' is missing; `6` — WhatsApp error — try again; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — Rate limit error, try again. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "lat": "32.0853", "lng": "34.7818", "caption": "Our store - Azrieli Center, Tel Aviv", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 5 'lat' or 'lng' is missing. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` --- # Request Location Source: https://docs.99digital.co.il/whatsapp-api/request-location Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/request-location.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/requestLocation` Send your client a message with a button that asks them to share their location. :::info You can use the "Request Location" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available as a template message, therefore a contact can only be sent when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send them another message, you must use a template message again. ::: ## Explanation - Requesting a location means you send a message to your client which asks them to share their location. - After the client clicks the location button and shares their location, the location data will be sent as the `location` type inside the [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/incoming-messages) (Incoming Messages). ## Remarks - You can use the "Request Location" API in one case only: for a reply to a message that the client sent, within 24 hours since the client sent their last message. If you send a message to a new client, or try to send a message to an old client (old client means that 24 hours since the client's last message have passed), you must use the "Send Template Message" API instead. If you sent a template message to the client, the client did not reply yet, and you want to send them another message, you must use a template message again. - You can only send a message to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session of a conversation. - The 24-hour conversation session starts when *you* send a message to the client. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/requestLocation` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the message to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4). Or: the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | | body | Your message goes here — the text shown above the location button. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. | yes | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`). Default is off (`0`). `1` — enable. | no | ## Response ```json { "status": "OK", "unique": "d1e113e0-a8e3-4c8f-8958-rx83zj39", "body": "Please click to provide your location", "timestamp": 1705225312, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1372, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | OK or FAIL. **Note:** OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | body | The text you sent. | | timestamp | Time stamp of the message (Unix time, in seconds). | | from | Your WhatsApp account. | | to | The number or the user id that the message was sent to. | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | **Deprecated.** This value is no longer in use: the conversation time left is now part of the webhook instead. This parameter will be removed in a future update; until then, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | Description | | --- | --- | | 1 | Not FAIL, the status is OK. | | 2 | `from` is missing, or JSON syntax error. | | 3 | Wrong apiKey, or the `from` number is not registered with us. | | 4 | `to` is either empty or wrong number format. | | 5 | `body` is empty or wrong. | | 6 | WhatsApp error — try again. | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead. | | 8 | You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead. | | 9 | Rate limit error, try again. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the message to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `body` | string | Yes | The message shown above the location button. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. Example: `Please click to provide your location`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: Request location The client gets your message with a button to share their location. ```json { "from": "972771234567", "to": "972501234567", "body": "Where should we deliver? Tap the button to share your location." } ``` ### Example: Reply to client Quote the client's message: `replyTo` is the unique ID of their message, from your webhook. ```json { "from": "972771234567", "to": "972501234567", "body": "Sure! *Tap the button* to share your location and we'll send the nearest branch.", "replyTo": "92E004B950CCEA3C386FCFA2AAF8558A" } ``` ## 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 status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `body` | string | (one of: OK) The text you sent. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.body` | string | (one of: OK) The `body` you sent — the message shown above the location button. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. Left out when you did not quote a message. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'body' is empty or wrong; `6` — WhatsApp error — try again; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — Rate limit error, try again. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "Where should we deliver? Tap the button to share your location.", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 5 'body' is empty or wrong. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` --- # Send Buttons Source: https://docs.99digital.co.il/whatsapp-api/send-buttons Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-buttons.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendButtons` Send a message with up to 3 reply buttons, or one external button that opens a website, starts a phone call or opens an email. :::info You can use the "Send Buttons" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send Template Message](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available for a template message, therefore sending a contact message can only be done when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. ::: ## Explanation The Send Buttons API allows you to send a message that includes up to 3 buttons OR an external button: website / phone / email. ## Remarks - You can use the "Send Buttons" API in one case only: to reply to a message that the client sent, within 24 hours since the client sent their last message. If you send a message to a new client, or try to send a message to an old client (old client means that 24 hours have passed since the client's last message), you must use the "Send Template Message" API instead. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. - You can only send a message to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session time of a conversation. - The 24-hour conversation session starts when you send a message to the client. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. - **When the end user clicks on the button, you will get it in the webhook as type "button", and the content of the button will be inside "body".** - **External button means that instead of the normal 3 buttons, you can initiate an action to open a website, a phone call or an email. If `buttonExternal` is in use, `button1` will be the text for the button, while `button2` and `button3` will be ignored.** ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendButtons` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the message to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4).
or
The user id you want to send the message to. For example: `IL.1605856887361213` — for a client who hides their number behind a WhatsApp [username](https://docs.99digital.co.il/whatsapp-api/information/username); it arrives as `from_id` in your webhook. | yes | | header | Header allows you to choose extra content as media:
`1` - none
`2` - image
`3` - video
`4` - document | yes | | headerURL | If you choose image / video / document as a header, here you must provide an https URL of the file to be sent with the buttons:
image - jpg / png (up to 5 MB)
video - mp4 (up to 16 MB)
document - pdf (up to 100 MB) | Only if `header` is 2 / 3 / 4 | | body | Your message goes here.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough | yes | | footer | You can provide a footer text that will be at the bottom of the message.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough
Maximum 60 characters. | no | | fileName | When the header is a document (`header` = 4), you can specify the file name that will arrive. If not provided, the file name is taken from the `headerURL`.
The file extension is not required here: it is added from the link.
Example: `yourFile` | no | | button1 | The text of button 1. Maximum 20 characters. With `buttonExternal`, this is the text of the external button (no emoji). | yes | | button2 | The text of button 2. Maximum 20 characters. | no | | button3 | The text of button 3. Maximum 20 characters. | no | | button1_id | The id of `button1`.
You can set a unique id that will be returned on the webhook. Letters, digits, `_` and `-`.
Maximum 256 characters. Example: `my_button_1` | no
If not set, the default is `1` | | button2_id | The id of `button2`.
You can set a unique id that will be returned on the webhook. Letters, digits, `_` and `-`.
Maximum 256 characters. Example: `my_button_2` | no
If not set, the default is `2` | | button3_id | The id of `button3`.
You can set a unique id that will be returned on the webhook. Letters, digits, `_` and `-`.
Maximum 256 characters. Example: `my_button_3` | no
If not set, the default is `3` | | buttonExternal | In case you want `button1` to be an external button, here is the place you put the value — see the table below. `button1` is the text for the button; `button2` and `button3` are ignored. | no | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | | localStorage | Whenever you provide `headerURL`, we deliver this URL to WhatsApp. They download the link in order to deliver it with your message.
If for any reason your file link is not accessible by WhatsApp and open to the internet, you can ask us to download the file and upload it to WhatsApp ourselves, so WhatsApp does not need your own link. If the upload fails, your link is used.
Default value is `0` (disable)
`1` - enable
**Please note** that using this feature may delay the response from our server, due to the operation described above.
`localStorage` does not work when `buttonExternal` is provided: your link is used instead. | no | `buttonExternal` values: | Input | Example | What will happen? | | --- | --- | --- | | phone number (numbers only) | `972501234567` | The system will create a button that will initiate a phone call | | link (must start with `http` or `https`) | `https://www.google.com` | The system will create a button that will open the website | | email address | `john@example.com` | The system will create a button that will open the default email app to send an email | | anything else | `abcdefg` | Will be rejected with error code 14 | ## Response ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "header": 1, "body": "your body", "footer": "your footer", "button1": "button 1 text", "button2": "button 2 text", "button3": "button 3 text", "buttonExternal": "", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** OK status doesn't mean the message arrived to the end user. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | header | Your header selection (1 / 2 / 3 / 4) | | body | The text you sent | | footer | Footer text (empty when you sent none) | | button1 | Text for button 1 | | button2 | Text for button 2 (empty when unused) | | button3 | Text for button 3 (empty when unused) | | buttonExternal | The external button value you sent (empty when unused) | | timestamp | Time stamp of the message (Unix time, in seconds) | | from | Your WhatsApp account | | to | The number or the user id that the message was sent to | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | No longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is either empty or wrong number format | | 5 | `body` can't be empty | | 6 | Your WhatsApp number is not set up for sending. Please contact support. | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use Send Template instead. | | 8 | You are trying to send a message for the first time to a contact. Please use Send Template Message instead. | | 9 | `header` is mandatory (and must be 1, 2, 3 or 4) | | 10 | `footer` is too long | | 11 | `button1` is missing or too long | | 12 | `button2` or `button3` is too long | | 13 | `headerURL` is mandatory for a media `header` | | 14 | `buttonExternal` has invalid input | | 15 | Rate limit error, try again | | 16 | `button1_id`, `button2_id` or `button3_id` is invalid, wrong, not unique or exceeded the maximum length. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the message to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `header` | integer | Yes | Header allows you to choose extra content as media, shown above the message. One of: `1` — None; `2` — Image; `3` — Video; `4` — Document. Example: `1`. | | `headerURL` | string (uri) | No | Required when `header` is 2, 3 or 4: an https link to the file to be sent with the buttons. Image — jpg / png (up to 5 MB); video — mp4 (up to 16 MB); document — pdf (up to 100 MB). Example: `https://storage.99digital.online/samples/hello.png`. | | `body` | string | Yes | Your message goes here. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. Example: `How can we help you today?`. | | `footer` | string | No | You can provide a footer text that will be at the bottom of the message. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. Maximum 60 characters. Max length: 60. Example: `Reply anytime, we are here 08:00-20:00`. | | `fileName` | string | No | When the header is a document (`header` = 4), you can specify the file name the client sees. If not provided, the file name is taken from the `headerURL`. The file extension is not required here: it is added from the link. Example: `yourFile`. | | `button1` | string | Yes | The text of button 1. Maximum 20 characters. With `buttonExternal`, this is the text of the external button (no emoji). Max length: 20. Example: `Track my order`. | | `button2` | string | No | The text of button 2. Maximum 20 characters. Max length: 20. Example: `Talk to an agent`. | | `button3` | string | No | The text of button 3. Maximum 20 characters. Max length: 20. Example: `Opening hours`. | | `button1_id` | string | No | The id of `button1`. You can set a unique id that will be returned on the webhook. Letters, digits, `_` and `-`, maximum 256 characters. If not set, the default is `1`. Default: `1`. Max length: 256. Example: `my_button_1`. | | `button2_id` | string | No | The id of `button2`. You can set a unique id that will be returned on the webhook. Letters, digits, `_` and `-`, maximum 256 characters. If not set, the default is `2`. Default: `2`. Max length: 256. Example: `my_button_2`. | | `button3_id` | string | No | The id of `button3`. You can set a unique id that will be returned on the webhook. Letters, digits, `_` and `-`, maximum 256 characters. If not set, the default is `3`. Default: `3`. Max length: 256. Example: `my_button_3`. | | `buttonExternal` | string | No | In case you want `button1` to be an external button, here is the place you put the value. `button1` is the text for the button; `button2` and `button3` are ignored. - A phone number, digits only (`972501234567`) — a button that starts a phone call. - A link starting with `http` or `https` (`https://www.google.com`) — a button that opens the website. - An email address (`john@example.com`) — a button that opens the email app to send an email. Anything else is rejected with reason 14. Example: `https://www.google.com`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | | `localStorage` | integer | No | Whenever you provide `headerURL`, we deliver this URL to WhatsApp. They download the link in order to deliver it with your message. If for any reason your file link is not accessible by WhatsApp and open to the internet, you can ask us to download the file and upload it to WhatsApp ourselves, so WhatsApp does not need your own link. If the upload fails, your link is used. Please note that using this feature may delay the response from our server, due to the operation described above. `localStorage` does not work when `buttonExternal` is provided: your link is used instead. One of: `0` — Off — WhatsApp downloads the file from your link; `1` — Enable — we upload the file to WhatsApp for you. Default: `0`. | ### Example: Reply buttons Three buttons with your own ids. The id of the button the client clicks comes back in the webhook. ```json { "from": "972771234567", "to": "972501234567", "header": 1, "body": "How can we help you today?", "footer": "Reply anytime, we are here 08:00-20:00", "button1": "Track my order", "button1_id": "TRACK_ORDER", "button2": "Talk to an agent", "button2_id": "AGENT", "button3": "Opening hours", "button3_id": "HOURS" } ``` ### Example: Image header An image above the message, with two buttons. ```json { "from": "972771234567", "to": "972501234567", "header": 2, "headerURL": "https://storage.99digital.online/samples/hello.png", "body": "The item you asked about is back in stock.", "button1": "Reserve it", "button1_id": "RESERVE", "button2": "Show me more", "button2_id": "MORE" } ``` ### Example: Video header A video above the message. ```json { "from": "972771234567", "to": "972501234567", "header": 3, "headerURL": "https://storage.99digital.online/samples/meditation.mp4", "body": "Here is how to set up your new device. Did it work?", "button1": "Yes, all good", "button1_id": "OK", "button2": "I need help", "button2_id": "HELP" } ``` ### Example: Document header A PDF above the message, with the file name the client sees. ```json { "from": "972771234567", "to": "972501234567", "header": 4, "headerURL": "https://storage.99digital.online/samples/headerSample.pdf", "fileName": "Quote 2026-0917", "body": "Here is your quote. Would you like to approve it?", "footer": "Prices include VAT", "button1": "Approve quote", "button1_id": "APPROVE", "button2": "Request changes", "button2_id": "CHANGES" } ``` ### Example: Website button One external button that opens a website. `button1` is its text. ```json { "from": "972771234567", "to": "972501234567", "header": 2, "headerURL": "https://storage.99digital.online/samples/hello.png", "body": "Your personal offer is ready.", "button1": "Open my offer", "buttonExternal": "https://www.example.com/offer/4711" } ``` ### Example: Call button One external button that starts a phone call. ```json { "from": "972771234567", "to": "972501234567", "header": 1, "body": "Prefer to talk? Our team is available until 20:00.", "button1": "Call us", "buttonExternal": "97231234567" } ``` ### Example: Email button One external button that opens the email app. ```json { "from": "972771234567", "to": "972501234567", "header": 1, "body": "Questions about your invoice? Write to our billing team.", "button1": "Email billing", "buttonExternal": "billing@example.com" } ``` ### Example: localStorage We upload the header image to WhatsApp for you, for a link that WhatsApp can't reach. ```json { "from": "972771234567", "to": "972501234567", "header": 2, "headerURL": "https://storage.99digital.online/samples/hello.png", "body": "Is this the item you meant?", "button1": "Yes", "button1_id": "YES", "button2": "No", "button2_id": "NO", "localStorage": 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) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `header` | integer | (one of: OK) Your header selection (1/2/3/4). Example: `1`. | | `body` | string | (one of: OK) The text you sent. | | `footer` | string | (one of: OK) Footer text (empty when you sent none). | | `button1` | string | (one of: OK) Text for button 1. | | `button2` | string | (one of: OK) Text for button 2 (empty when unused). | | `button3` | string | (one of: OK) Text for button 3 (empty when unused). | | `buttonExternal` | string | (one of: OK) The external button value you sent (empty when unused). | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.header` | integer | (one of: OK) The `header` you sent — 1 none, 2 image, 3 video, 4 document. | | `originalRequest.headerURL` | string | (one of: OK) The `headerURL` you sent — the link to the header file. | | `originalRequest.body` | string | (one of: OK) The `body` you sent — the message text. | | `originalRequest.footer` | string | (one of: OK) The `footer` you sent — the footer text. | | `originalRequest.button1` | string | (one of: OK) The `button1` you sent — the text of button 1, or of the external button. | | `originalRequest.button2` | string | (one of: OK) The `button2` you sent — the text of button 2. | | `originalRequest.button3` | string | (one of: OK) The `button3` you sent — the text of button 3. | | `originalRequest.buttonExternal` | string | (one of: OK) The `buttonExternal` you sent — the phone number, link or email of the external button. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'body' can't be empty; `6` — Your WhatsApp number is not set up for sending. Please contact support; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — 'header' is missing or not 1, 2, 3 or 4; `10` — 'footer' is too long; `11` — 'button1' is missing or too long; `12` — 'button2' or 'button3' is too long; `13` — 'headerURL' is mandatory for a media 'header'; `14` — 'buttonExternal' has invalid input; `15` — Rate limit error, try again; `16` — 'button1_id', 'button2_id' or 'button3_id' is invalid, not unique or longer than the maximum length. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "header": 1, "body": "How can we help you today?", "footer": "Reply anytime, we are here 08:00-20:00", "button1": "Track my order", "button2": "Talk to an agent", "button3": "Opening hours", "buttonExternal": "", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: OK — external button With `buttonExternal`, the unused buttons come back empty. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "header": 1, "body": "Prefer to talk? Our team is available until 20:00.", "footer": "", "button1": "Call us", "button2": "", "button3": "", "buttonExternal": "97231234567", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` #### Example: Reason 11 'button1' is missing or too long. ```json { "status": "FAIL", "reason": 11 } ``` #### Example: Reason 16 Two buttons have the same id. ```json { "status": "FAIL", "reason": 16 } ``` --- # Send List Source: https://docs.99digital.co.il/whatsapp-api/send-list Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-list.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendList` Send a message with a list of up to 10 choices that the client opens with a button and picks from. :::info You can use the "Send List" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send Template Message](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available for a template message, therefore sending a contact message can only be done when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. ::: ## Explanation The Send List API allows you to send a message that includes a list of up to 10 choices. ## Remarks - You can use the "Send List" API in one case only: to reply to a message that the client sent, within 24 hours since the client sent their last message. If you send a message to a new client, or try to send a message to an old client (old client means that 24 hours have passed since the client's last message), you must use the "Send Template Message" API instead. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. - You can only send a message to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session time of a conversation. - The 24-hour conversation session starts when you send a message to the client. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. - **When the end user clicks on any of the list options, you will get it in the webhook as type "list", and the content of the option will be inside "body".** ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendList` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body Each list item has a number from 1 to 10 in its field names: `itemTitle1`, `itemDescription1` and `itemId1` describe the first item, `itemTitle2` and so on the second, up to `itemTitle10`. | Parameter | Description / Example | Mandatory | Max length | | --- | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | | to | The number you want to send the message to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4).
or
The user id you want to send the message to. For example: `IL.1605856887361213` — for a client who hides their number behind a WhatsApp [username](https://docs.99digital.co.il/whatsapp-api/information/username); it arrives as `from_id` in your webhook. | yes | | | header | The title of the list box. You can use emoji. | no | 60 | | body | The body text of the list box. It is usually used to describe what this list is about.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough | yes | 1024 | | footer | Some footer message, shown at the bottom of the list box | no | 60 | | buttonText | The text of the button that will appear on the list box. You can use emoji. | yes | 20 | | itemTitle1-10 | List of items: minimum is 1, maximum is 10. | At least 1 item is mandatory (`itemTitle1`) | 24 | | itemDescription1-10 | Extra description for the item. It will show below the title. | no | 72 | | itemId1-10 | You can provide an id for each item you provide in the list. This id will be returned in the webhook.
For example:
`itemId1` = `"id_for_sales"`
`itemId2` = `"id_for_support"`
It must be unique for each item. Letters, digits, `_` and `-`. `itemID1` (capital D) works too. | no
If not provided, 1-10 will be set | 200 | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | 1 | ## Sample request ```json { "from": "972771234567", "to": "972501234567", "header": "This is header", "body": "this is body", "footer": "Footer goes here", "buttonText": "Click to open", "itemTitle1": "Customer service", "itemDescription1": "Choose me for customer service", "itemTitle2": "Sales", "itemDescription2": "Sales enquiries? click here", "itemTitle3": "Support" } ``` ## Sample screenshot of the message ![A WhatsApp list message: header, body, footer and the "Click to open" button](https://storage.99digital.online/docs/list1.jpg) ## Sample screenshot after the "Click to open" ![The list opened, showing the items with their titles and descriptions](https://storage.99digital.online/docs/list2.png) ## Response ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "header": "your header", "body": "your body", "footer": "your footer", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** OK status doesn't mean the message arrived to the end user. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | header | Your header text (empty when you sent none) | | body | The text you sent | | footer | Footer text (empty when you sent none) | | timestamp | Time stamp of the message (Unix time, in seconds) | | from | Your WhatsApp account | | to | The number or the user id that the message was sent to | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | No longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request: `from`, `to`, `header`, `footer`, `buttonText`, `replyTo` and the item titles and descriptions. Empty fields are left out. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is either empty or wrong number format | | 5 | `body` can't be empty | | 6 | Your WhatsApp number is not set up for sending. Please contact support. | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use Send Template instead. | | 8 | You are trying to send a message for the first time to a contact. Please use Send Template Message instead. | | 9 | `header` is too long | | 10 | `footer` is too long | | 11 | `buttonText` is mandatory and can be up to 20 characters | | 12 | `itemTitle1` is mandatory, and can be up to 24 characters | | 13 | One (or more) of your `itemTitle` is more than 24 characters | | 14 | One (or more) of your `itemDescription` is more than 72 characters | | 15 | Rate limit error, try again | | 16 | `itemId1-10` is not valid, not unique, exceeded the maximum length, or was given for an item without a title | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the message to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `header` | string | No | The title of the list box. You can use emoji. Max length: 60. Example: `This is header`. | | `body` | string | Yes | The body text of the list box, usually used to describe what this list is about. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. Max length: 1024. Example: `this is body`. | | `footer` | string | No | Some footer message, shown at the bottom of the list box. Max length: 60. Example: `Footer goes here`. | | `buttonText` | string | Yes | The text of the button that will appear on the list box. You can use emoji. Max length: 20. Example: `Click to open`. | | `itemTitle1` | string | Yes | The title of item 1. The list has items: minimum is 1, maximum is 10 — items 2 to 10 are `itemTitle2` … `itemTitle10`. At least 1 item is mandatory. Max length: 24. Example: `Customer service`. | | `itemDescription1` | string | No | Extra description for item 1, shown below its title. Items 2 to 10: `itemDescription2` … `itemDescription10`. Max length: 72. Example: `Choose me for customer service`. | | `itemId1` | string | No | An id for item 1, returned in the webhook when the client chooses it — for example `id_for_sales`. It must be unique for each item; letters, digits, `_` and `-`. If not provided, the item number (1-10) is used. Items 2 to 10: `itemId2` … `itemId10`. `itemID1` (capital D) works too. Max length: 200. Example: `id_for_sales`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: List with ids Three items with descriptions and your own ids. The id of the item the client chooses comes back in the webhook. ```json { "from": "972771234567", "to": "972501234567", "header": "Customer service", "body": "Please choose a department and we will connect you.", "footer": "Available Sun-Thu 08:00-18:00", "buttonText": "Choose department", "itemTitle1": "Sales", "itemDescription1": "Quotes, orders and pricing", "itemId1": "SALES", "itemTitle2": "Support", "itemDescription2": "Help with an existing product", "itemId2": "SUPPORT", "itemTitle3": "Billing", "itemDescription3": "Invoices and payments", "itemId3": "BILLING" } ``` ### Example: 10 items The maximum of 10 items, titles only. ```json { "from": "972771234567", "to": "972501234567", "body": "Which day suits you for the delivery?", "buttonText": "Pick a day", "itemTitle1": "Sunday", "itemId1": "DAY_SUN", "itemTitle2": "Monday", "itemId2": "DAY_MON", "itemTitle3": "Tuesday", "itemId3": "DAY_TUE", "itemTitle4": "Wednesday", "itemId4": "DAY_WED", "itemTitle5": "Thursday", "itemId5": "DAY_THU", "itemTitle6": "Friday", "itemId6": "DAY_FRI", "itemTitle7": "Next Sunday", "itemId7": "NEXT_SUN", "itemTitle8": "Next Monday", "itemId8": "NEXT_MON", "itemTitle9": "Next Tuesday", "itemId9": "NEXT_TUE", "itemTitle10": "Call me to arrange", "itemId10": "CALL_ME" } ``` ## 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 status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `header` | string | (one of: OK) Your header text (empty when you sent none). | | `body` | string | (one of: OK) The text you sent. | | `footer` | string | (one of: OK) Footer text (empty when you sent none). | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request: the fields below and the item titles and descriptions. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.header` | string | (one of: OK) The `header` you sent — the title of the list box. | | `originalRequest.footer` | string | (one of: OK) The `footer` you sent — the footer text. | | `originalRequest.buttonText` | string | (one of: OK) The `buttonText` you sent — the text of the button that opens the list. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'body' can't be empty; `6` — Your WhatsApp number is not set up for sending. Please contact support; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — 'header' is too long; `10` — 'footer' is too long; `11` — 'buttonText' is mandatory and can be up to 20 characters; `12` — 'itemTitle1' is mandatory and can be up to 24 characters; `13` — One (or more) of your item titles is more than 24 characters; `14` — One (or more) of your item descriptions is more than 72 characters; `15` — Rate limit error, try again; `16` — An item id is not valid, not unique, longer than 200 characters, or given for an item without a title. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "header": "Customer service", "body": "Please choose a department and we will connect you.", "footer": "Available Sun-Thu 08:00-18:00", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` #### Example: Reason 11 'buttonText' is missing or longer than 20 characters. ```json { "status": "FAIL", "reason": 11 } ``` --- # Send Contact Source: https://docs.99digital.co.il/whatsapp-api/send-contact Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-contact.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendContact` Send a contact card to your client, with a name, a phone number and optional details. :::info You can use the "Send Contact" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available as a template message, therefore a contact can only be sent when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send them another message, you must use a template message again. ::: ## More Remarks - You can only send a contact to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session of a conversation. - The 24-hour conversation session starts when *you* send a message to the client. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendContact` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the contact to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4). Or: the user id you want to send the contact to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | | contact_name | Contact name (first name or full name). | yes | | contact_phone | Contact phone number, in any format you like (`0501234567` or `972501234567`). We recommend the international number format (`972501234567`), so WhatsApp can link the card to the contact's WhatsApp account. | yes | | contact_email | Email address (`example@example.com`). | no | | contact_birthday | Birthday, in the format `YYYY-MM-DD`. | no | | address_street | Street address. | no | | address_city | City. | no | | address_country | Country. | no | | website | Any website URL. | no | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`). Default is off (`0`). `1` — enable. | no | ## Response ```json { "status": "OK", "unique": "65dfd4r4dref34rdfxd34r", "contact_name": "The contact name you sent", "contact_phone": "The contact phone you sent", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | OK or FAIL. **Note:** OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | contact_name | The contact name you sent. | | contact_phone | The contact phone you sent. | | timestamp | Time stamp of the message (Unix time, in seconds). | | from | Your WhatsApp account. | | to | The number or the user id that the message was sent to. | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | **Deprecated.** This value is no longer in use: the conversation time left is now part of the webhook instead. This parameter will be removed in a future update; until then, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | Description | | --- | --- | | 1 | Not FAIL, the status is OK. | | 2 | `from` is missing, or JSON syntax error. | | 3 | Wrong apiKey, or the `from` number is not registered with us. | | 4 | `to` is either empty or wrong number format. | | 5 | `contact_name` can't be empty. | | 6 | `contact_phone` can't be empty. | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead. | | 8 | You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead. | | 9 | WhatsApp error, please try again or contact support. | | 10 | Rate limit error, try again. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the contact to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the contact to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `contact_name` | string | Yes | Contact name (first name or full name). Example: `Dana Levi`. | | `contact_phone` | string | Yes | Contact phone number. Any format works (`0501234567` or `972501234567`), but we recommend the international format (`972501234567`), so WhatsApp can link the card to the contact's WhatsApp account. Example: `972521234567`. | | `contact_email` | string (email) | No | Email address. Example: `example@example.com`. | | `contact_birthday` | string (date) | No | Birthday, in the format `YYYY-MM-DD`. Example: `1990-05-14`. | | `address_street` | string | No | Street address. Example: `Herzl 1`. | | `address_city` | string | No | City. Example: `Tel Aviv`. | | `address_country` | string | No | Country. Example: `Israel`. | | `website` | string | No | Any website URL. Example: `https://www.example.com`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: Name and phone The minimum — a name and a phone number. ```json { "from": "972771234567", "to": "972501234567", "contact_name": "Dana Levi - Sales", "contact_phone": "972521234567" } ``` ### Example: Full card Every detail a contact card can hold. ```json { "from": "972771234567", "to": "972501234567", "contact_name": "Dana Levi - Sales", "contact_phone": "972521234567", "contact_email": "dana@example.com", "contact_birthday": "1990-05-14", "address_street": "Herzl 1", "address_city": "Tel Aviv", "address_country": "Israel", "website": "https://www.example.com" } ``` ## 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 status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `contact_name` | string | (one of: OK) The contact name you sent. | | `contact_phone` | string | (one of: OK) The contact phone you sent. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.contact_name` | string | (one of: OK) The `contact_name` you sent — the name on the contact card. | | `originalRequest.contact_phone` | string | (one of: OK) The `contact_phone` you sent — the phone number on the contact card. | | `originalRequest.contact_email` | string | (one of: OK) The `contact_email` you sent — the contact's email address. | | `originalRequest.contact_birthday` | string | (one of: OK) The `contact_birthday` you sent — the contact's birthday (`YYYY-MM-DD`). | | `originalRequest.address_street` | string | (one of: OK) The `address_street` you sent — the contact's street address. | | `originalRequest.address_city` | string | (one of: OK) The `address_city` you sent — the contact's city. | | `originalRequest.address_country` | string | (one of: OK) The `address_country` you sent — the contact's country. | | `originalRequest.website` | string | (one of: OK) The `website` you sent — the contact's website URL. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. Left out when you did not quote a message. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'contact_name' can't be empty; `6` — 'contact_phone' can't be empty; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — WhatsApp error, please try again or contact support; `10` — Rate limit error, try again. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "contact_name": "Dana Levi - Sales", "contact_phone": "972521234567", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 6 'contact_phone' can't be empty. ```json { "status": "FAIL", "reason": 6 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` --- # Send Reaction Source: https://docs.99digital.co.il/whatsapp-api/send-reaction Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-reaction.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendReaction` React with an emoji to a message your client sent you, or remove your reaction. Reactions are emoji responses to an incoming message: ![A WhatsApp message with an emoji reaction under it](https://storage.99digital.online/docs/reaction.png) For every incoming message you get to your webhook, you can send a reaction emoji. ## More Remarks - You can only have one reaction per message. - The emoji can be any emoji you want. You can send a rendered emoji (🧐) or its escaped source code form, as in Java or JSON (`"\uD83D\uDE00"`). - You can send a reaction to the messages your client sent you: `unique` is the message's unique ID from your webhook. - You can send a reaction within 24 hours since the client's last message. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendReaction` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the reaction to, in international format, digits only. For example: `972501234567`. Or: the user id you want to send the reaction to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | | unique | The unique ID of the message you wish to attach the reaction to. | yes | | reaction | The emoji you wish to react with. If you want to remove the emoji, just send an empty value. | yes | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`). Default is off (`0`). `1` — enable. | no | ## Response ```json { "status": "OK", "unique": "65dfd4r4dref34rdfxd34r", "reaction": "😀", "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | OK or FAIL. **Note:** OK status doesn't mean the reaction arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | The unique ID of the reaction message. | | reaction | The emoji you used. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | Description | | --- | --- | | 1 | Not FAIL, the status is OK. | | 2 | `from` is missing, or JSON syntax error. | | 3 | Wrong apiKey, or the `from` number is not registered with us. | | 4 | `unique` is empty or does not exist, or `to` is empty or wrong. | | 5 | Error in the emoji you used. | | 7 | You are trying to send a reaction but it has been more than 24 hours since the client's last message. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the reaction to, in international format, digits only — or the user id you want to send the reaction to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `unique` | string | Yes | The unique ID of the message you wish to attach the reaction to. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `reaction` | string | Yes | The emoji you wish to react with. To remove your reaction, send an empty value. Example: `😀`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: React React to the client's message. ```json { "from": "972771234567", "to": "972501234567", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "reaction": "👍" } ``` ### Example: Remove reaction An empty `reaction` removes your reaction from the message. ```json { "from": "972771234567", "to": "972501234567", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "reaction": "" } ``` ## 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 status doesn't mean the reaction arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) The unique ID of the reaction message. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `reaction` | string | (one of: OK) The emoji you used. Example: `👍`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.unique` | string | (one of: OK) The `unique` you sent — the ID of the message you reacted to. | | `originalRequest.reaction` | string | (one of: OK) The `reaction` you sent — the emoji. Left out when you removed a reaction (empty value). | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'unique' is empty or does not exist, or 'to' is empty or wrong; `5` — Error in the emoji you used; `7` — You are trying to send a reaction but it has been more than 24 hours since the client's last message. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "reaction": "👍", "reason": 1 } ``` #### Example: Reason 4 'unique' is empty or does not exist. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. ```json { "status": "FAIL", "reason": 7 } ``` --- # Send Carousel Source: https://docs.99digital.co.il/whatsapp-api/send-carousel Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-carousel.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendCarousel` Send a row of 2 to 10 media cards that your client scrolls through, each with its own buttons. :::info You can use the "Send Carousel" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send Template Message](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available for a template message, therefore sending a contact message can only be done when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. ::: Sending a carousel means sending a carousel of media cards to the client. This looks like this: ![A WhatsApp carousel: a message followed by image cards side by side, each with a button](https://storage.99digital.online/docs/carousel1.png) ## Remarks - You can use the "Send Carousel" API in one case only: to reply to a message that the client sent, within 24 hours since the client sent their last message. If you send a message to a new client, or try to send a message to an old client (old client means that 24 hours have passed since the client's last message), you must use the "Send Template Message" API instead. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. - You can only send a message to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session time of a conversation. - The 24-hour conversation session starts when you send a message to the client. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. - The message must include between 2 and 10 cards. - Header and footer are not supported. - Cards must include either an image or a video. - A card must include either a URL button (external button) or one / two reply buttons. - All cards must look the same regarding the buttons type (either 1 with `buttonExternal`, or 2 / 3 with `button1` / `button2`). - All cards must look the same regarding the card body. If you choose to use a body, all cards must have a body. - All cards must have the same `headerLink` type, either an image or a video. - Make sure you follow the cards numbering right. Do not send `card5` data without sending `card1`, `card2`, `card3` and `card4` too. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendCarousel` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body Each card has a number from 1 to 10 in its field names (the `X` below): `card1_headerLink`, `card1_body` and so on describe the first card, `card2_headerLink` the second, up to `card10_`. Every card has the same fields. | Parameter | Description / Example | Mandatory | Max length | Example | | --- | --- | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. | yes | | `972771234567` | | to | The number you want to send the message to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4).
or
The user id you want to send the message to — for a client who hides their number behind a WhatsApp [username](https://docs.99digital.co.il/whatsapp-api/information/username); it arrives as `from_id` in your webhook. | yes | | `972501234567`
or
`IL.1605856887361213` | | body | Your message goes here, that comes with all the cards.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough | yes | 1024 | `hello, please choose a product you like!` | | buttons | Here you need to choose how the buttons of all cards will be:
`1` - buttonExternal type
`2` - one 'reply' button type
`3` - two 'reply' buttons type | yes | 1 | `1` | | cardX_headerLink | The headerLink URL for card X. X can be 1 to 10.
The media must be either an image or a video; you must provide a valid URL, starting with `https://`.
Maximum 5 MB for an image, 16 MB for a video. | yes
minimum 2, maximum 10 | 2000 | `card8_headerLink` = `"https://www.example.com/file.png"` | | cardX_body | The body content of a card. X can be between 1 to 10.
If one card has a body, all the cards must have one. | no | 160 characters and up to 2 new lines (`\n`) | `card8_body` = `"Here is our blue flower\n\nclick to buy"` | | cardX_buttonExternal | In case you selected the `buttons` parameter to 1, here is the external button of card X — a phone number, a link or an email address, see the table below. X can be between 1 to 10. | only if `buttons` is set to 1 | 1000 | `https://www.google.com` | | cardX_buttonExternalText | The text that will appear for `cardX_buttonExternal`. X can be between 1 to 10. | only if `buttons` is set to 1 | 20 characters | `Click here` | | cardX_button1 | In case you selected the `buttons` parameter to 2 or 3, here is the first button text. X can be between 1 to 10. | only if `buttons` is set to 2 or 3 | 20 characters | `Click here one` | | cardX_button1ID | In case you selected the `buttons` parameter to 2 or 3, here you can provide an ID for that button, that will be sent back to you on the webhook. If you choose not to provide this value, the value will be set to 1. X can be between 1 to 10. | Not mandatory, only if `buttons` is set to 2 or 3.
If not provided, 1 will be set | 256 | `id-for-button-one` | | cardX_button2 | In case you selected the `buttons` parameter to 3, here is the second button text. X can be between 1 to 10. | only if `buttons` is set to 3 | 20 characters | `Click here two` | | cardX_button2ID | In case you selected the `buttons` parameter to 3, here you can provide an ID for that button, that will be sent back to you on the webhook. If you choose not to provide this value, the value will be set to 2. X can be between 1 to 10. | Not mandatory, only if `buttons` is set to 3.
If not provided, 2 will be set | 256 characters | `id-for-button-two` | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | 1 | `0` | `cardX_buttonExternal` values: | Input | Example | What will happen? | | --- | --- | --- | | phone number (numbers only) | `972501234567` | The system will create a button that will initiate a phone call | | link (must start with `http` or `https`) | `https://www.google.com` | The system will create a button that will open the website | | email address | `john@example.com` | The system will create a button that will open the default email app to send an email | ## Sample request A message with two cards, an image header and `buttonExternal`: ```json { "from": "972771234567", "to": "972501234567", "body": "hello", "buttons": 1, "card1_headerLink": "https://www.example.com/image.png", "card1_buttonExternal": "972501234567", "card1_buttonExternalText": "Call us", "card2_headerLink": "https://www.example.com/imagetwo.png", "card2_buttonExternal": "https://www.example.com", "card2_buttonExternalText": "Our website" } ``` ## Response ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "hello", "timestamp": 1771932645, "from": "972771234567", "to": "972501234567", "reason": 1, "templateTimeLeft": 1431, "card1_headerLink": "https://www.example.com/image.png", "card2_headerLink": "https://www.example.com/imagetwo.png" } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** OK status doesn't mean the message arrived to the end user. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | body | The text you sent | | timestamp | Time stamp of the message (Unix time, in seconds) | | from | Your WhatsApp account | | to | The number or the user id that the message was sent to | | cardX_headerLink | The link you provided for any of the cards | | cardX_body | The body text you provided for any of the cards (if provided) | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is either empty or wrong number format | | 5 | `body` can't be empty | | 6 | Your WhatsApp number is not set up for sending. Please contact support. | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead. | | 8 | You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead. | | 9 | Rate limit error, try again | | 10 | The cards are not in the right format or order, or `card1` + `card2` do not exist. Make sure you have the right order of cards. This also covers a card whose `headerLink` is missing or does not start with `https://`, and a card with buttons that don't match `buttons`. | | 11 | `buttons` is incorrect or wrong (missing, or not 1, 2 or 3) | | 12 | The cards mix images and videos: all cards must have the same `headerLink` type | | 13 | `cardX_body` is too long or incorrect for one or more of the cards (more than 160 characters or more than 2 new lines), or only some of the cards have a body | | 14 | `cardX_buttonExternal` is required for the selected `buttons` type. Make sure `cardX_buttonExternal` is in the correct format (a phone number, a link or an email address). The issue can be in one or more of the cards provided. | | 15 | `cardX_buttonExternalText` is required since `cardX_buttonExternal` is in use. Make sure `cardX_buttonExternalText` is in the correct format (up to 20 characters). The issue can be in one or more of the cards provided. | | 16 | `cardX_button1` is required for the selected `buttons` type. Make sure `cardX_button1` is in the correct format (up to 20 characters). The issue can be in one or more of the cards provided. | | 17 | `cardX_button1ID` is wrong or not in the correct format (longer than 256 characters). The issue can be in one or more of the cards provided. | | 18 | `cardX_button2` is required for the selected `buttons` type. Make sure `cardX_button2` is in the correct format (up to 20 characters). The issue can be in one or more of the cards provided. | | 19 | `cardX_button2ID` is wrong or not in the correct format (longer than 256 characters). The issue can be in one or more of the cards provided. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the message to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `body` | string | Yes | Your message, which comes with all the cards. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. Max length: 1024. Example: `Hello, please choose a product you like!`. | | `buttons` | integer | Yes | Here you need to choose how the buttons of all the cards will be. One of: `1` — buttonExternal type — one external button per card (`cardX_buttonExternal`); `2` — One 'reply' button type — one reply button per card (`cardX_button1`); `3` — Two 'reply' buttons type — two reply buttons per card (`cardX_button1` and `cardX_button2`). Example: `1`. | | `card1_headerLink` | string (uri) | Yes | The headerLink URL of card 1: the media must be either an image or a video, and you must provide a valid URL starting with `https://` — up to 5 MB for an image, 16 MB for a video. All cards must use the same media type. Every card needs one, and there are at least 2 cards: `card1_headerLink`, `card2_headerLink`, and up to `card10_headerLink`. Example: `https://storage.image.com/file.png`. | | `card1_body` | string | No | The text of card 1: up to 160 characters and up to 2 new lines (`\n`). If one card has a body, all the cards must have one. Max length: 160. Example: `Here is our blue flower click to buy`. | | `card1_buttonExternal` | string | No | Required when `buttons` is 1: the external button of card 1. - A phone number, digits only (`972501234567`) — a button that starts a phone call. - A link starting with `http` or `https` (`https://www.google.com`) — a button that opens the website. - An email address (`john@example.com`) — a button that opens the email app to send an email. Example: `https://www.google.com`. | | `card1_buttonExternalText` | string | No | Required when `buttons` is 1: the text that will appear on `card1_buttonExternal`. Max length: 20. Example: `Click here`. | | `card1_button1` | string | No | Required when `buttons` is 2 or 3 — the text of the first button. Max length: 20. Example: `Click here one`. | | `card1_button1ID` | string | No | When `buttons` is 2 or 3, an id for the first button, which will be sent back to you on the webhook. If you choose not to provide this value, it will be set to 1. Default: `1`. Max length: 256. Example: `id-for-button-one`. | | `card1_button2` | string | No | Required when `buttons` is 3 — the text of the second button. Max length: 20. Example: `Click here two`. | | `card1_button2ID` | string | No | When `buttons` is 3, an id for the second button, which will be sent back to you on the webhook. If you choose not to provide this value, it will be set to 2. Default: `2`. Max length: 256. Example: `id-for-button-two`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: External buttons `buttons` 1 — each card has one button that opens a website, starts a call or opens an email. ```json { "from": "972771234567", "to": "972501234567", "body": "Hello, please choose a product you like!", "buttons": 1, "card1_headerLink": "https://storage.99digital.online/samples/hello.png", "card1_body": "Browse the full catalogue online.", "card1_buttonExternal": "https://www.example.com/catalogue", "card1_buttonExternalText": "Open catalogue", "card2_headerLink": "https://storage.99digital.online/samples/hello.png", "card2_body": "Or talk to a human - we pick up fast.", "card2_buttonExternal": "97231234567", "card2_buttonExternalText": "Call us" } ``` ### Example: One reply button `buttons` 2 — each card has one reply button with your own id, which comes back in the webhook. ```json { "from": "972771234567", "to": "972501234567", "body": "Which one would you like?", "buttons": 2, "card1_headerLink": "https://storage.99digital.online/samples/hello.png", "card1_body": "Leather wallet - 149 NIS", "card1_button1": "I want this", "card1_button1ID": "WANT_WALLET", "card2_headerLink": "https://storage.99digital.online/samples/hello.png", "card2_body": "Travel backpack - 349 NIS", "card2_button1": "I want this", "card2_button1ID": "WANT_BACKPACK", "card3_headerLink": "https://storage.99digital.online/samples/hello.png", "card3_body": "Ceramic mug - 59 NIS", "card3_button1": "I want this", "card3_button1ID": "WANT_MUG" } ``` ### Example: Two reply buttons `buttons` 3 — each card has two reply buttons. These cards are videos. ```json { "from": "972771234567", "to": "972501234567", "body": "Pick a show and a seat.", "buttons": 3, "card1_headerLink": "https://storage.99digital.online/samples/meditation.mp4", "card1_body": "Sunday 20:00", "card1_button1": "Standard seat", "card1_button1ID": "SUN_STD", "card1_button2": "Front row", "card1_button2ID": "SUN_FRONT", "card2_headerLink": "https://storage.99digital.online/samples/meditation.mp4", "card2_body": "Tuesday 20:00", "card2_button1": "Standard seat", "card2_button1ID": "TUE_STD", "card2_button2": "Front row", "card2_button2ID": "TUE_FRONT" } ``` ### Example: Cards without text No `cardX_body` — the cards show only the media and the button. ```json { "from": "972771234567", "to": "972501234567", "body": "Tap the item you want to know more about.", "buttons": 2, "card1_headerLink": "https://storage.99digital.online/samples/hello.png", "card1_button1": "Details", "card1_button1ID": "ITEM_1", "card2_headerLink": "https://storage.99digital.online/samples/hello.png", "card2_button1": "Details", "card2_button1ID": "ITEM_2" } ``` ## 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 status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `body` | string | (one of: OK) The text you sent. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `card1_headerLink` | string | (one of: OK) The link you provided for each of the cards: `card1_headerLink`, `card2_headerLink` and so on. | | `card1_body` | string | (one of: OK) The body text you provided for each of the cards, if provided: `card1_body`, `card2_body` and so on. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request: the fields below and every card field you sent. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.body` | string | (one of: OK) The `body` you sent — the message text that comes with the cards. | | `originalRequest.buttons` | integer | (one of: OK) The `buttons` you sent — 1 external button, 2 one reply button, 3 two reply buttons per card. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'body' can't be empty; `6` — Your WhatsApp number is not set up for sending. Please contact support; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — Rate limit error, try again; `10` — The cards are not in the right format or order: there are fewer than 2 cards, a card number is skipped, a card's `headerLink` is missing or is not an https link, or a card has buttons that don't match `buttons`; `11` — 'buttons' is missing or not 1, 2 or 3; `12` — The cards mix images and videos. All cards must use the same media type; `13` — A card body is longer than 160 characters or has more than 2 new lines, or only some of the cards have a body; `14` — `cardX_buttonExternal` is required for the selected 'buttons' type, and must be a phone number, a link or an email address. The issue can be in one or more of the cards; `15` — `cardX_buttonExternalText` is required since `cardX_buttonExternal` is in use, up to 20 characters. The issue can be in one or more of the cards; `16` — `cardX_button1` is required for the selected 'buttons' type, up to 20 characters. The issue can be in one or more of the cards; `17` — `cardX_button1ID` is wrong or too long. The issue can be in one or more of the cards; `18` — `cardX_button2` is required for the selected 'buttons' type, up to 20 characters. The issue can be in one or more of the cards; `19` — `cardX_button2ID` is wrong or too long. The issue can be in one or more of the cards. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "Hello, please choose a product you like!", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "reason": 1, "templateTimeLeft": 1200, "card1_headerLink": "https://storage.99digital.online/samples/hello.png", "card1_body": "Browse the full catalogue online.", "card2_headerLink": "https://storage.99digital.online/samples/hello.png", "card2_body": "Or talk to a human - we pick up fast." } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` #### Example: Reason 10 Only one card was sent, or the cards are not numbered in order. ```json { "status": "FAIL", "reason": 10 } ``` --- # Type Effect Source: https://docs.99digital.co.il/whatsapp-api/type-effect Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/type-effect.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/typing` Type effect allows you to send a "typing..." indicator to your client. ![The "typing..." indicator under the client's message, which shows two blue check marks](https://storage.99digital.online/docs/typing.png) The "typing..." indicator gives a more live feeling to the conversation, especially if you are building a chat bot. ## More Remarks - The typing effect will be dismissed once you send an actual message ([Send Message](https://docs.99digital.co.il/whatsapp-api/send-message) or any other) or once 20 seconds have passed, whichever comes first. - To prevent your client from waiting in the chat, it is better to use the typing indicator just a few moments before you are actually going to send a response. - The typing indicator is not an on/off feature for your entire WhatsApp number: this endpoint needs to be called every time you wish to create this effect. - This can only be sent when a session is open between you and the client (24-hour session), meaning that the client has sent you a message in the last 24 hours. - When using the type effect, it will automatically mark the message that the client sent you as "read" (two blue check marks, as shown in the picture above), so the client knows your API has read the message and is preparing a response. - Best practice is to use this when you are using an AI bot and the answers take a bit of time to generate, or when you wish to keep the client in the chat while preparing an answer. - Typing effect is not yet supported for all WhatsApp API accounts. - Avoid sending too many typing effects to the same client without sending an actual message, for a better user experience (no hard limit, just a suggestion). - Avoid sending a typing effect if you reply within less than 1 second, for a better user experience (no hard limit, just a suggestion). ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/typing` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the typing effect to, in international format, digits only. For example: `972501234567`. Or: the user id you want to send the typing effect to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | ## Response ```json { "status": "OK", "from": "972771234567", "to": "972501234567", "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | OK or FAIL. OK means the system received your request and sends the typing effect to the client. | | from | Your WhatsApp account. | | to | The number or the user id you sent the typing effect to. | | reason | Description | | --- | --- | | 1 | Not FAIL, the status is OK. | | 2 | `from` is missing, or JSON syntax error. | | 3 | Wrong apiKey, or the `from` number is not registered with us. | | 4 | `to` is empty or wrong. | | 6 | Error sending typing effect, please contact support. | | 7 | You are trying to use typing effect but it has been more than 24 hours since the client's last message. Please wait for a message from the client. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the typing effect to, in international format, digits only — or the user id, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | ### Example (generated from the schema) ```json { "from": "972771234567", "to": "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 system received your request and sends the typing effect to the client. It shows until you send an actual message, or for up to 20 seconds. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id you sent the typing effect to. Example: `972501234567`. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is empty or wrong; `6` — Error sending typing effect, please contact support; `7` — You are trying to use typing effect but it has been more than 24 hours since the client's last message. Please wait for a message from the client. | #### Example: OK The client sees "typing...". ```json { "status": "OK", "from": "972771234567", "to": "972501234567", "reason": 1 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. ```json { "status": "FAIL", "reason": 7 } ``` --- # Get History Source: https://docs.99digital.co.il/whatsapp-api/get-history Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/get-history.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/getHistory` Get history allows you to see all chat history per conversation or for your entire WhatsApp number. We keep the chat history for 1 year: every message that is stored for more than 1 year is deleted. The files are stored as links, which are deleted after 7 days. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getHistory` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | | to | You can choose which contact to get the chat history for: the number, or the user id for a client who hides their number, exactly as it appears in your webhook. If you leave this empty, you will get the history for all your WhatsApp account. For example: `972501234567` | | page | Mandatory. Integer number. Every page shows the last 50 messages, newest first.
For example, page `1` will show the last known messages from 1 to 50; page `2` will show the last known messages from message 51 to 100.
A page past the end returns an empty list. | ## Response ```json [ { "unique": "3EB08F941940DDC30F58", "timestamp": 1614198777, "direction": 2, "from": "972771234567", "from_id": null, "to": "972501234567", "to_id": null, "type": "text", "state": 1, "message": "outgoing message" }, { "unique": "3EB08F941940DDCFGF58", "timestamp": 1614198211, "direction": 1, "from": "972501234568", "from_id": null, "to": "972771234567", "to_id": null, "type": "text", "state": 0, "message": "incoming message" } ] ``` A failed request answers with `status` FAIL and a `reason` instead of the list, for example `{"status": "FAIL", "reason": 11}`. ## Response-Explain | Parameter | Description | | --- | --- | | unique | The unique ID of the message | | timestamp | The timestamp of the message (Unix time, in seconds) | | direction | `1` for an incoming message, `2` for an outgoing message (incoming messages are messages that come to the webhook; outgoing messages are messages you sent using the API) | | from | The chat that sent the message | | from_id | In case the message came from an end user under hidden identity, this is the user id; otherwise `null` | | to | The chat that received the message | | to_id | In case the message was sent to an end user under hidden identity, this is the user id; otherwise `null` | | type | The message type. The available types depend on the direction — see the table below. | | state | The delivery state of the message — see the table below. The state is only relevant for outgoing messages. | | message | The message that was sent | | direction | Available message types | | --- | --- | | 1 | text, image, audio, video, location, ptt, document | | 2 | text, file, location, ptt | | value | Information | | --- | --- | | 0 | Acknowledge that the message failed to deliver | | 1 | Acknowledge that the message was received by the server (1 gray check mark) | | 2 | Acknowledge that the message was delivered (2 gray check marks) | | 3 | Acknowledge that the message was read (2 blue check marks) | | reason | Description | | --- | --- | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `from` is either empty or wrong number format | | 11 | `page` is invalid or empty | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | No | You can choose which contact to get the chat history for — the number, or the user id for a client who hides their number, exactly as it appears in your webhook. If you leave this empty, you will get the history for all your WhatsApp account. Example: `972509876543`. | | `page` | integer | Yes | Every page shows 50 messages, newest first: page 1 shows the last known messages 1 to 50, page 2 messages 51 to 100, and so on. A page past the end returns an empty list. Minimum: 1. Example: `1`. | ### Example: Whole account The last 50 messages of your WhatsApp number, with every contact. ```json { "from": "972771234567", "page": 1 } ``` ### Example: One contact The last 50 messages with one contact. ```json { "from": "972771234567", "to": "972501234567", "page": 1 } ``` ## Responses ### 200 — The request was processed. A successful request answers with the list of messages; a failed one with `status` FAIL and a `reason`. Both are HTTP 200. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].unique` | string | (one of: Messages) The unique ID of the message. | | `[].timestamp` | integer | (one of: Messages) The timestamp of the message (Unix time, in seconds). | | `[].direction` | integer | (one of: Messages) Incoming messages are messages that come to your webhook; outgoing messages are messages you sent using the API. One of: `1` — Incoming message; `2` — Outgoing message. | | `[].from` | string | (one of: Messages) The chat that sent the message. | | `[].from_id` | string \| null | (one of: Messages) In case the message came from an end user under hidden identity, this is the user id; otherwise null. | | `[].to` | string | (one of: Messages) The chat that received the message. | | `[].to_id` | string \| null | (one of: Messages) In case the message was sent to an end user under hidden identity, this is the user id; otherwise null. | | `[].type` | string | (one of: Messages) The message type, which depends on the direction. Incoming (1): text, image, audio, video, location, ptt, document. Outgoing (2): text, file, location, ptt. | | `[].state` | integer | (one of: Messages) This state is only relevant for outgoing messages. One of: `0` — The message failed to deliver; `1` — The message was received by the server (1 gray check mark); `2` — The message was delivered (2 gray check marks); `3` — The message was read (2 blue check marks). | | `[].message` | string | (one of: Messages) The message that was sent. | | `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. It does not explain the state 0 of a failed message. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'from' is either empty or wrong number format; `11` — 'page' is invalid or empty. | #### Example: Messages An outgoing and an incoming message. ```json [ { "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "timestamp": 1614198777, "direction": 2, "from": "972771234567", "from_id": null, "to": "972501234567", "to_id": null, "type": "text", "state": 3, "message": "outgoing message" }, { "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "timestamp": 1614198211, "direction": 1, "from": "972501234567", "from_id": null, "to": "972771234567", "to_id": null, "type": "text", "state": 0, "message": "incoming message" } ] ``` #### Example: No messages Nothing on this page. ```json [] ``` #### Example: Reason 11 'page' is invalid or empty. ```json { "status": "FAIL", "reason": 11 } ``` --- # Get Contacts Source: https://docs.99digital.co.il/whatsapp-api/get-contacts Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/get-contacts.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/getContacts` Get Contacts allows you to see all contacts that messaged you and that you messaged. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getContacts` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | | page | Integer number. Every page shows the last 50 contacts, most recent first.
For example, page `1` will show the last known contacts from 1 to 50; page `2` will show the last known contacts from contact 51 to 100.
If you leave it out, you get page `1`. A page past the end returns an empty list. | ## Response ```json [ { "contact_phone": "972501234567", "contact_phone_id": null, "contact_name": "John", "update_time": 1770196687, "online_contact_id": 1, "online_conversation_id": 2, "contact_profilePic": "https://storage.99digital.online/samples/hello.png" }, { "contact_phone": "972501234568", "contact_phone_id": null, "contact_name": "Smith", "update_time": 1770196600, "online_contact_id": 3, "online_conversation_id": 4, "contact_profilePic": null } ] ``` A failed request answers with `status` FAIL and a `reason` instead of the list, for example `{"status": "FAIL", "reason": 3}`. ## Response-Explain | Parameter | Description | | --- | --- | | contact_phone | The end user's phone number — or their user id, for a client who hides their number | | contact_name | The end user's contact name | | update_time | The time when this contact was created / updated (Unix time, in seconds). This is based on your last interaction with them. | | online_contact_id | If you are using 99 Digital omni channel, this is the contact ID | | online_conversation_id | If you are using 99 Digital omni channel, this is the conversation ID | | contact_profilePic | If the contact ever sent you a message, and the profile picture arrived, you will find the link here (the same as in the webhook message when the incoming message arrived). If empty, you will get `null`. | | contact_phone_id | The user id of the contact (available for new contacts after May 28, 2026). Any contact before that will return `null`. | | reason | Description | | --- | --- | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 11 | `page` is invalid | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `page` | integer | No | Every page shows 50 contacts, most recent first: page 1 shows the last known contacts 1 to 50, page 2 contacts 51 to 100, and so on. A page past the end returns an empty list. Default: `1`. Minimum: 1. Example: `1`. | ### Example (generated from the schema) ```json { "from": "972771234567", "page": 1 } ``` ## Responses ### 200 — The request was processed. A successful request answers with the list of contacts; a failed one with `status` FAIL and a `reason`. Both are HTTP 200. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].contact_phone` | string | (one of: Contacts) The end user's phone number — or their user id, for a client who hides their number. | | `[].contact_phone_id` | string \| null | (one of: Contacts) The user id of the contact. Available for contacts created after May 28, 2026; null for any contact before that. | | `[].contact_name` | string | (one of: Contacts) The end user's contact name. | | `[].update_time` | integer | (one of: Contacts) The time when this contact was created or updated (Unix time, in seconds), based on your last interaction with them. | | `[].online_contact_id` | integer | (one of: Contacts) If you are using 99 Digital omni channel, this is the contact ID. | | `[].online_conversation_id` | integer | (one of: Contacts) If you are using 99 Digital omni channel, this is the conversation ID. | | `[].contact_profilePic` | string \| null | (one of: Contacts) If the contact ever sent you a message and the profile picture arrived, you will find the link here (the same as in the webhook of that message). If there is none, null. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `11` — 'page' is invalid. | #### Example: Contacts Two contacts — the second hides their number behind a WhatsApp username. ```json [ { "contact_phone": "972501234567", "contact_phone_id": null, "contact_name": "John", "update_time": 1770196687, "online_contact_id": 1, "online_conversation_id": 2, "contact_profilePic": "https://storage.99digital.online/samples/hello.png" }, { "contact_phone": "IL.1605856887361213", "contact_phone_id": "IL.1605856887361213", "contact_name": "Smith", "update_time": 1770196600, "online_contact_id": 3, "online_conversation_id": 4, "contact_profilePic": null } ] ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` --- # Get Timers Source: https://docs.99digital.co.il/whatsapp-api/get-timers Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/get-timers.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/getTimers` Get Timers API allows you to see the templateTimeLeft for a specific number. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getTimers` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | | number | The phone number you want to check. International number, digits only — or the user id, for a client who hides their number. For example: `972501234567` | ## Response ```json { "status": "OK", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | templateTimeLeft | Amount of minutes left since the client's last message. If passed (`0`), you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | No longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always `0`. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `number` is either empty or wrong number format | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `number` | string | Yes | The phone number you want to check, in international format, digits only — or the user id, for a client who hides their number. Example: `972551234567`. | ### Example (generated from the schema) ```json { "from": "972771234567", "number": "972551234567" } ``` ## 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 succeeded; `templateTimeLeft` shows the time left for this number. Always `OK`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed (0), you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'number' is either empty or wrong number format. | #### Example: OK The client wrote recently — you can still reply without a template. ```json { "status": "OK", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Window closed More than 24 hours have passed — use a template message. ```json { "status": "OK", "templateTimeLeft": 0, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 4 'number' is empty. ```json { "status": "FAIL", "reason": 4 } ``` --- # Mark as Read Source: https://docs.99digital.co.il/whatsapp-api/mark-as-read Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/mark-as-read.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/readStatus` Mark as read allows you to send "read" status for incoming messages. The default is always to show the client 2 gray check marks; this endpoint allows you to set the read status for messages. For every incoming message you get to your webhook, you can send the status read, which is two blue check marks, like this: ![Two blue check marks under a WhatsApp message](https://storage.99digital.online/docs/ticks.png) so your client can know you read the message. The system will automatically mark the client's last message as read once you use this endpoint. ## More Remarks - Marking a message as read will also mark earlier messages in the conversation as read. - This operation is irreversible: once you marked a message as read, you can't change it back. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/readStatus` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number whose messages you want to mark as read, in international format, digits only. For example: `972501234567`
or
The user id of the client, for a client who hides their number behind a WhatsApp [username](https://docs.99digital.co.il/whatsapp-api/information/username) (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | ## Response ```json { "status": "OK", "reason": 1, "from": "972771234567", "to": "972501234567" } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp number | | to | The destination number or destination user id | | reason | The status explanation — see the table below. | | error | Details, with some of the reason 2 failures (for example `No HB message found in history` when there is no message from this client to mark as read). Only in a FAIL response. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, JSON syntax error, or there is no message from this client to mark as read | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is empty or wrong (not a valid number or user id) | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number whose messages you want to mark as read, in international format, digits only — or the user id, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | ### Example (generated from the schema) ```json { "from": "972771234567", "to": "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 client's messages are marked as read (two blue check marks). Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `from` | string | (one of: OK) Your WhatsApp number. Example: `972771234567`. | | `to` | string | (one of: OK) The destination number or destination user id. 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` — 'from' is missing, JSON syntax error, or there is no message from this client to mark as read; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is empty or wrong (not a valid number or user id). | | `error` | string | (one of: FAIL) Details, with some of the reason 2 failures. | #### Example: OK The client's messages show two blue check marks. ```json { "status": "OK", "reason": 1, "from": "972771234567", "to": "972501234567" } ``` #### Example: Reason 2 There is no message from this client to mark as read. ```json { "status": "FAIL", "reason": 2, "error": "No HB message found in history" } ``` --- # Black List (Block) Source: https://docs.99digital.co.il/whatsapp-api/black-list-block Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/black-list-block.md Section: WhatsApp API › Black list (Block) These endpoints allow you to block, unblock and get the list of blocked WhatsApp user numbers. | Endpoint | What it does | | --- | --- | | [Block](https://docs.99digital.co.il/whatsapp-api/black-list-block/block) | This endpoint allows you to block a number. | | [Unblock](https://docs.99digital.co.il/whatsapp-api/black-list-block/unblock) | This endpoint allows you to unblock a number you previously blocked. | | [Get Blocked List](https://docs.99digital.co.il/whatsapp-api/black-list-block/get-blocked-list) | This endpoint allows you to see all the numbers you blocked. | ## What happens here? Sometimes you wish to block a contact number (WhatsApp number) from sending you a message, for any kind of reason. When you do this, this will happen: - The user cannot contact your WhatsApp number at all: they won't be able to send you any message (they will see 1 grey check mark). - You can't message that user either. If you try to send, you will get an error. ## More Remarks - You can only block users that have messaged you in the last 24 hours. - The maximum limit is 64,000 numbers that you can have in your "block list". ## Best Practice - how to use This blacklist can be used, for example, when you send a template to the user with one of the buttons being "Unsubscribe": when the user clicks on it, you can add them to the block list. This endpoint is not only blocking incoming, but also outgoing messages: it will prevent, from your end, any future templates you might accidentally try to send them again. A real blacklist. Another use case: if a client sends you unwanted messages (or files), triggering your chat bot or other processes and integrations, you can stop their messages by blocking their number. --- # Block Source: https://docs.99digital.co.il/whatsapp-api/black-list-block/block Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/black-list-block/block.md Section: WhatsApp API › Black list (Block) `POST https://api.99digital.co.il/whatsapp/v2/block` This endpoint allows you to block a number. The user cannot contact your WhatsApp number at all (they will see 1 grey check mark), and you can't message that user either: if you try to send, you will get an error. You can only block users that have messaged you in the last 24 hours, and the maximum is 64,000 numbers in your block list. See [Black List (Block)](https://docs.99digital.co.il/whatsapp-api/black-list-block) for how it works and when to use it. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/block` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | whatsapp | The number you want to block, in international format, digits only. For example: `972501234567` | yes | ## Response ```json { "status": "OK", "from": "972771234567", "whatsapp": "972501234567", "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp account | | whatsapp | The number that you blocked | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `whatsapp` is either empty or wrong number format | | 6 | Error blocking the number, please try again | | 7 | You are trying to block a number, but it has been more than 24 hours since the user sent you a message. You need to wait for their next message. | | 8 | The 64,000 block limit has been reached | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `whatsapp` | string | Yes | The number you want to block, in international format, digits only. Example: `972501234567`. | ### Example (generated from the schema) ```json { "from": "972771234567", "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) OK — the number is blocked. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `whatsapp` | string | (one of: OK) The number that you blocked. Example: `972501234567`. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'whatsapp' is either empty or wrong number format; `6` — Error blocking the number, please try again; `7` — You are trying to block a number, but it has been more than 24 hours since the user sent you a message. You need to wait for their next message; `8` — The 64,000 block limit has been reached. | #### Example: OK The number is blocked. ```json { "status": "OK", "from": "972771234567", "whatsapp": "972501234567", "reason": 1 } ``` #### Example: Reason 7 The user hasn't messaged you in the last 24 hours. ```json { "status": "FAIL", "reason": 7 } ``` --- # Unblock Source: https://docs.99digital.co.il/whatsapp-api/black-list-block/unblock Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/black-list-block/unblock.md Section: WhatsApp API › Black list (Block) `POST https://api.99digital.co.il/whatsapp/v2/unblock` This endpoint allows you to unblock a number you previously blocked. See [Black List (Block)](https://docs.99digital.co.il/whatsapp-api/black-list-block) for how blocking works. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/unblock` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | whatsapp | The number you want to unblock, in international format, digits only. For example: `972501234567` | yes | ## Response ```json { "status": "OK", "from": "972771234567", "whatsapp": "972501234567", "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp account | | whatsapp | The number that you unblocked | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `whatsapp` is either empty or wrong number format | | 6 | Error unblocking the number, please try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `whatsapp` | string | Yes | The number you want to unblock, in international format, digits only. Example: `972501234567`. | ### Example (generated from the schema) ```json { "from": "972771234567", "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) OK — the number is unblocked. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `whatsapp` | string | (one of: OK) The number that you unblocked. Example: `972501234567`. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'whatsapp' is either empty or wrong number format; `6` — Error unblocking the number, please try again. | #### Example: OK The number is unblocked. ```json { "status": "OK", "from": "972771234567", "whatsapp": "972501234567", "reason": 1 } ``` #### Example: Reason 4 'whatsapp' is either empty or wrong number format. ```json { "status": "FAIL", "reason": 4 } ``` --- # Get Blocked List Source: https://docs.99digital.co.il/whatsapp-api/black-list-block/get-blocked-list Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/black-list-block/get-blocked-list.md Section: WhatsApp API › Black list (Block) `POST https://api.99digital.co.il/whatsapp/v2/blockedList` This endpoint allows you to see all the numbers you blocked. See [Black List (Block)](https://docs.99digital.co.il/whatsapp-api/black-list-block) for how blocking works. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/blockedList` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | ## Response ```json { "status": "OK", "from": "972771234567", "numbers": ["972501234567", "972501234568"] } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp account | | numbers | Array of the numbers that were blocked by you | | reason | Only in a FAIL response: the status explanation — see the table below. | | reason | Description | | --- | --- | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | ### Example (generated from the schema) ```json { "from": "972771234567" } ``` ## 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 — `numbers` lists the numbers you blocked. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `numbers` | array of string | (one of: OK) The numbers that you blocked. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us. | #### Example: OK Every number you blocked. ```json { "status": "OK", "from": "972771234567", "numbers": [ "972501234567", "972502958372" ] } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` --- # Request Phone Source: https://docs.99digital.co.il/whatsapp-api/request-phone Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/request-phone.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/requestPhone` Ask a client who hides their phone number behind a WhatsApp username to share their phone number and name with you. :::info You can use the "Request Phone" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: ## Explanation - Requesting a phone is used only when the client is using the "username" feature, and hides their phone number on WhatsApp. When a client is hiding their phone number and their name, you can use Request Phone to ask the client to reveal their phone number to you. Read more about [usernames](https://docs.99digital.co.il/whatsapp-api/information/username). - The user will get a message with a button (you can't control its text), asking whether they want to reveal their phone number and their name to you. After the client confirms and clicks the button, the new phone number data will be sent as a `phone` type inside the webhook. ## Remarks - You can use the "Request Phone" API in one case only: to reply to a message that the client sent, within 24 hours since the client sent their last message. - The billing is per message: when sending this message, you will be billed. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/requestPhone` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The user id you want to send the message to (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | | body | Your message goes here.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough | yes | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | ## Response ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "Please click to share your phone number", "timestamp": 1705225312, "from": "972771234567", "to": "IL.1605856887361213", "templateTimeLeft": 1372, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** OK status doesn't mean the message arrived to the end user. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | body | The text you sent | | timestamp | Time stamp of the message (Unix time, in seconds) | | from | Your WhatsApp account | | to | The number or the user id that the message was sent to | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is either empty or wrong format | | 5 | `body` is empty or wrong | | 6 | WhatsApp error - try again | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use Send Template instead. | | 8 | You are trying to send a message for the first time to a contact. Please use Send Template Message instead. | | 9 | Rate limit error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The user id you want to send the message to (it arrives as `from_id` in your webhook). Example: `IL.1605856887361213`. | | `body` | string | Yes | Your message goes here. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. Example: `To complete your order we need your phone number - please tap the button to share it.`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example (generated from the schema) ```json { "from": "972771234567", "to": "IL.1605856887361213", "body": "To complete your order we need your phone number - please tap the button to share it." } ``` ## 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 status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `body` | string | (one of: OK) The text you sent. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The user id that the message was sent to. Example: `IL.1605856887361213`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the user id of the client. | | `originalRequest.body` | string | (one of: OK) The `body` you sent — the message text. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong format; `5` — 'body' is empty or wrong; `6` — WhatsApp error — try again; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — Rate limit error, try again. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "To complete your order we need your phone number - please tap the button to share it.", "timestamp": 1600115719, "from": "972771234567", "to": "IL.1605856887361213", "templateTimeLeft": 1200, "reason": 1 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` --- # Set Webhook Source: https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/set-webhook.md Section: WhatsApp API › Webhook `POST https://api.99digital.co.il/whatsapp/v2/setWebhook` Set Webhook allows you to set the webhook URL you want for all incoming messages and acknowledges. What we send to this URL, and when, is explained on the [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) page: one page for every kind of webhook — [Incoming Messages](https://docs.99digital.co.il/whatsapp-api/webhook/incoming-messages), [Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge), [System Messages](https://docs.99digital.co.il/whatsapp-api/webhook/system-messages), [Contacts Update](https://docs.99digital.co.il/whatsapp-api/webhook/contacts-update) and [Outgoing Messages](https://docs.99digital.co.il/whatsapp-api/webhook/outgoing-messages). **Settings:** | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/setWebhook` | | Method | JSON via POST | | Header | Value | | --- | --- | | `apiKey` | Your API key for the service | **Body:** | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | `from` | Your WhatsApp account. International number without `+`, for example: `972771234567`. | yes | `972771234567` | | `url` | The webhook URL. It must start with `http://` or `https://`. If you need to clear this data, you can send `" "` (space): the webhook is turned off and nothing is sent until you set a URL again. | no | `https://your-server.example.com/99digital/whatsapp-webhook` | | `system` | System messages notifications ([System Messages](https://docs.99digital.co.il/whatsapp-api/webhook/system-messages)). 0 for off, 1 for on. Default is off. | no | `1` | | `systemPhoneAlert` | You can receive all system notifications via WhatsApp message directly from us. Here you can specify the phone you wish us to send the messages to (starting with 972). The messages will be sent in Hebrew. A list of phone numbers is accepted by providing comma separation, up to 5 numbers — digits and commas only, without spaces or `+`. If you need to clear this data, you can send `" "` (space). | no | `972502211234,972527788695` | | `readStatus` | Read status notification — sent / delivered / read / failed ([Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge)). 0 is off, 1 is on. Default is off. | no | `1` | | `retry` | Retry mechanism for webhook sending — see "Retry mechanism" below. 1 — enable this feature. 0 — disable this feature. By default, this feature is disabled (0). | no | `1` | Every field except `from` is optional: a field you leave out keeps its current value, so you can change one setting at a time. Changes take effect immediately. Use [Get Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/get-webhook) to see all your current settings. ### Retry mechanism Whenever we have a new update that we need to deliver to you, we will try to deliver it to your webhook. Your webhook must respond with a 2xx status (200 OK, 201, 204 …): we wait up to 5 seconds to connect to your server and up to 15 seconds for its answer. If this happens, we assume the message was received successfully. If this does not happen, we will initiate more retries in the following sequence (the same payload every time): - retry 1 — immediately after the first attempt - retry 2 — after 5 minutes - retry 3 — after 20 minutes - retry 4 — after 1 hour - retry 5 — after 4 hours - retry 6 — after 24 hours After that, we will stop trying to deliver the webhook message. By default, this feature is disabled (0), which means that we try to send only once, without any retries. **Response:** ```json { "status": "OK", "url": "https://your-server.example.com/99digital/whatsapp-webhook", "system": 1, "systemPhoneAlert": "972502211234", "readStatus": 1, "retry": 0, "reason": 1 } ``` **Response explained:** | Parameter | Description | | --- | --- | | `status` | OK or FAIL | | `url` | The webhook url you provided | | `system` | The system messages setting you provided | | `systemPhoneAlert` | The phone numbers you provided | | `readStatus` | The read status setting you provided | | `retry` | The retry setting you provided | | `reason` | The status explanation — see below | A field you did not send in this request comes back as `null` and keeps its saved value. | Reason | Explanation | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or a JSON syntax error. | | 3 | Wrong apiKey, or your "from" number account does not exist. | | 4 | `system` must be 0 or 1. | | 5 | `systemPhoneAlert` list is invalid — digits and commas only. | | 6 | `readStatus` is invalid — it must be 0 or 1. | | 7 | `retry` is invalid — it must be 0 or 1. | | 9 | The url is invalid — it must start with `http://` or `https://`. | ## Remarks - Incoming messages, contacts updates and outgoing messages (coexistence) are sent whenever a `url` is set. Acknowledges (sent / delivered / read / failed) are sent only with `readStatus` 1, and system messages only with `system` 1. - Webhook messages come from the IP address **34.165.99.212**. In case you are required to whitelist, please whitelist this IP. ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `url` | string | No | The webhook URL. It must start with `http://` or `https://`. If you need to clear this data, you can send `" "` (space): the webhook is turned off and nothing is sent until you set a URL again. Example: `https://your-server.example.com/99digital/whatsapp-webhook`. | | `system` | integer | No | System messages notifications: updates about your account, your templates and messages that failed — see [System Messages](https://docs.99digital.co.il/whatsapp-api/webhook/system-messages). 0 for off, 1 for on. Default is off. One of: `0` — Off; `1` — On. Default: `0`. Example: `1`. | | `systemPhoneAlert` | string | No | You can receive all system notifications via WhatsApp message directly from us. Here you can specify the phone you wish us to send the messages to, in international format (starting with 972). The messages will be sent in Hebrew. A list of phone numbers is accepted by providing comma separation, up to 5 numbers — digits and commas only, without spaces or `+`. If you need to clear this data, you can send `" "` (space). Example: `972502211234,972527788695`. | | `readStatus` | integer | No | Read status notification: the acknowledge webhooks (sent / delivered / read / failed) of the messages you send — see [Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge). 0 is off, 1 is on. Default is off. One of: `0` — Off; `1` — On. Default: `0`. Example: `1`. | | `retry` | integer | No | Retry mechanism for webhook sending. Whenever we have a new update that we need to deliver to you, we will try to deliver it to your webhook. Your webhook must respond with a 2xx status (200 OK, 201, 204 …): we wait up to 5 seconds to connect to your server and up to 15 seconds for its answer. If this happens, we assume the message was received successfully. If this does not happen, we will initiate more retries in the following sequence (the same payload every time): - retry 1 — immediately after the first attempt - retry 2 — after 5 minutes - retry 3 — after 20 minutes - retry 4 — after 1 hour - retry 5 — after 4 hours - retry 6 — after 24 hours After that, we will stop trying to deliver the webhook message. By default, this feature is disabled (0), which means that we try to send only once, without the retries above. One of: `0` — Disable this feature — one attempt only; `1` — Enable this feature. Default: `0`. Example: `1`. | ### Example: URL Set the webhook URL; the other settings keep their current values. ```json { "from": "972771234567", "url": "https://your-server.example.com/99digital/whatsapp-webhook" } ``` ### Example: URL + all notifications The recommended production setup: incoming messages, acknowledges, system messages and retries all on. ```json { "from": "972771234567", "url": "https://your-server.example.com/99digital/whatsapp-webhook", "system": 1, "readStatus": 1, "retry": 1 } ``` ### Example: System alerts to my phone Receive the system notifications as WhatsApp messages (in Hebrew) on up to 5 phone numbers. ```json { "from": "972771234567", "system": 1, "systemPhoneAlert": "972502211234,972527788695" } ``` ### Example: Turn off the webhook A space as `url` clears it — nothing is sent until you set a URL again. ```json { "from": "972771234567", "url": " " } ``` ### Example: Clear alert phones A space as `systemPhoneAlert` clears the phone numbers. ```json { "from": "972771234567", "systemPhoneAlert": " " } ``` ## 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 settings were saved. Always `OK`. | | `url` | string \| null | (one of: OK) The webhook url you provided, as you sent it. Example: `https://your-server.example.com/99digital/whatsapp-webhook`. | | `system` | integer \| null | (one of: OK) The system messages setting you provided. Example: `1`. | | `systemPhoneAlert` | string \| null | (one of: OK) The phone numbers you provided, as you sent them. Example: `972502211234,972527788695`. | | `readStatus` | integer \| null | (one of: OK) The read status setting you provided. Example: `1`. | | `retry` | integer \| null | (one of: OK) The retry setting you provided. Example: `1`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — nothing was saved; `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'system' must be 0 or 1; `5` — 'systemPhoneAlert' list is invalid — digits and commas only; `6` — 'readStatus' is invalid — it must be 0 or 1; `7` — 'retry' is invalid — it must be 0 or 1; `9` — The url is invalid — it must start with http:// or https://. | #### Example: OK The settings of "URL + all notifications" are saved. ```json { "status": "OK", "url": "https://your-server.example.com/99digital/whatsapp-webhook", "system": 1, "systemPhoneAlert": null, "readStatus": 1, "retry": 1, "reason": 1 } ``` #### Example: OK — some fields Only `system` and `systemPhoneAlert` were sent; the fields you left out are `null` and keep their saved values. ```json { "status": "OK", "url": null, "system": 1, "systemPhoneAlert": "972502211234,972527788695", "readStatus": null, "retry": null, "reason": 1 } ``` #### Example: Webhook turned off The `url` you sent (a space) is echoed as is. ```json { "status": "OK", "url": " ", "system": null, "systemPhoneAlert": null, "readStatus": null, "retry": null, "reason": 1 } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` #### Example: Reason 5 'systemPhoneAlert' contains something other than digits and commas. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 9 The url does not start with http:// or https://. ```json { "status": "FAIL", "reason": 9 } ``` --- # Webhook Source: https://docs.99digital.co.il/whatsapp-api/webhook/webhook Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/webhook.md Section: WhatsApp API › Webhook › Webhook Webhook allows you to get a callback push to your server whenever there is an incoming message or status. - You need to set the webhook URL with the [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) API. [Get Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/get-webhook) shows your current settings. - Every webhook is sent to your URL as JSON via POST (`Content-Type: application/json`), and `hook` tells you what arrived. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL | | Method | JSON via POST | ## Webhook types Every kind of webhook has its own page, with its explanation, an example, and every parameter explained: | Webhook | `hook` | What arrives | When it is sent | | --- | --- | --- | --- | | [Incoming Messages](https://docs.99digital.co.il/whatsapp-api/webhook/incoming-messages) | `new` | Every incoming message from a client: text, media, location, contacts, button and list replies, reactions, store orders and more. | Always, once a webhook URL is set. | | [Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge) | `update` | For every message or template you send: failed, sent, delivered or read. | Turned off by default — enable with `readStatus` 1 in Set Webhook. | | [System Messages](https://docs.99digital.co.il/whatsapp-api/webhook/system-messages) | `system` | Updates about your account: daily limit, spam flags, account blocked, templates approved or rejected, failed messages, display name. | Turned off by default — enable with `system` 1 in Set Webhook. | | [Contacts Update](https://docs.99digital.co.il/whatsapp-api/webhook/contacts-update) | `contact` | A contact was added or changed in the WhatsApp Business app ([coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) accounts). | Turned on by default. | | [Outgoing Messages](https://docs.99digital.co.il/whatsapp-api/webhook/outgoing-messages) | `outgoing` | A message the user sent from the WhatsApp Business app on their phone, outside the API (coexistence accounts). | Turned on by default. | ## IP addresses Note! Webhook messages come from the following IP address. In case you are required to whitelist, please whitelist this: **34.165.99.212** If you wish to whitelist the IP of the API endpoints too (`https://api.99digital.co.il/whatsapp/v2/`, the address your own requests go to), you should whitelist this IP: **130.211.28.127**. You need it only if your firewall also limits outgoing traffic. ## Delivery and retries - Your webhook must respond with a 2xx status (200 OK, 201, 204 …). We wait up to 5 seconds to connect to your server and up to 15 seconds for its answer, so answer first and process the webhook afterwards. Any other answer counts as a failed delivery. The body of your answer is ignored. - With `retry` 1 in [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook), a failed delivery is retried immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours, with the same payload. After that, we stop trying to deliver the webhook message. Without it, we try once. - When your server can't be reached or answers 429, 500, 502, 503 or 504, each attempt is repeated up to 3 more times within a few seconds. The same webhook can therefore arrive more than once, even with `retry` 0: use `hook` and `unique` (and `ack` for acknowledges) to ignore duplicates. - The order of the webhooks is not guaranteed. For example, a delivered acknowledge (`ack` 2) may arrive before the sent one (`ack` 1). - There is no signature header: restrict your endpoint to our IP address and keep its URL secret. ## Remarks - You must download the link files (images, audio, video, documents) to your server. We delete all files within 7 days. - In the text of `text`, `button` and `list` messages, in `senderName` and in contact names, a single quote (`'`) arrives as a backtick (`` ` ``). --- # Incoming Messages Source: https://docs.99digital.co.il/whatsapp-api/webhook/incoming-messages Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/incoming-messages.md Section: WhatsApp API › Webhook › Webhook **Webhook.** Sent to the webhook URL you configure. With every incoming message, you will receive the following webhook (`hook` "new"). **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) | | Method | JSON via POST | Incoming messages webhooks are always sent once a webhook URL is set. How webhooks are delivered and retried, and the IP address they come from, is explained on [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook). ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": "IL.1605856887361213", "username": null, "country": "IL", "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "text", "body": "Hi, is the store open today?", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1435, "isNewConversation": 1, "referral": { "ref_type": "none" } } ``` :::warning You must download the link files to your server. We delete all files within 7 days. ::: ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `hook` | "new" always, for a new incoming message. | | `unique` | Unique ID for the incoming message. Use it as `replyTo` to quote the message in your reply, or to react to it with [Send Reaction](https://docs.99digital.co.il/whatsapp-api/send-reaction). | | `from` | The contact person that sent you the message, in international format: `972501234567`. If the person is hiding their identity (enabled the [username](https://docs.99digital.co.il/whatsapp-api/information/username) feature), this value will return the `from_id`, for example `IL.1605856887361213`. | | `from_id` | The contact person (sender) user id. It arrives whenever WhatsApp provides it, also when the client did not hide their identity; otherwise null. The format is always 2 letters country code + dot + 16 digits, for example `IL.1605856887361213`. This value is fixed per end user per WhatsApp API account. You can use this value to send messages to the client. | | `username` | The username the client chose for their WhatsApp. This feature is not available yet and will return null until officially released by Meta. | | `country` | The country code (two letters) of the contact person (sender), taken from their user id. Null when there is no user id. | | `phone` | The contact person phone number, in international format, for example `972501234567`. If the phone number is not available (the client hides their identity), this will return null. | | `to` | Your WhatsApp account. | | `senderName` | The name of the person that sent the message. For type `phone`, the name they shared. | | `type` | Message type. Can be one of the following: `text`, `image`, `audio`, `video`, `location`, `ptt`, `document`, `button`, `contacts`, `list`, `reaction`, `order`, `phone`. What arrives in `body` and `caption` for each type is in the tables below. | | `body` | The content of the 'body' depends on the 'type' of the message — see "`body` by message type" below. | | `caption` | The content of the 'caption' depends on the 'type' of the message — see "`caption` by message type" below. | | `template` | The template name, if the client clicked on a quick reply button when getting the template ([Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template)). For everything else, this will return null. | | `isForwarded` | Shows if the incoming message is forwarded — true or false. | | `timestamp` | Time stamp of the incoming message (Unix time, in seconds, as a string). | | `timestampMS` | The sub-second part of the timestamp (the digits after the decimal point of the time we processed the message), in case you need it. | | `media` | If this message contains any media file, it will be true; otherwise false. | | `quote` | If this message is a quoted message, it will be true; otherwise false. A reaction is always quoted: it points to the message the client reacted to. | | `quoteUnique` | In case the message is quoted (it means that someone replied to your outgoing message), this will be the original message unique ID — for your own message, the `unique` you received when you sent it. For a reaction, the message the client reacted to. If the message is not quoted, this will be false. | | `profilePic` | jpg file link to the client's profile picture, if the user has a profile picture and their privacy settings allow it; otherwise a link to a default image. Profile picture links are generated once per number. | | `conversationTimeLeft` | Amount of minutes left for the incoming conversation session to end (up to 1435). If passed, any incoming message after that will be considered as a new incoming conversation, and the timer will reset. | | `isNewConversation` | Whether this message started a new incoming message conversation session or not. 0 — this new message does not open a new conversation. 1 — this new message opens a new conversation. | | `referral` | Object of items that describes the original referral that initiated the incoming WhatsApp message — see "`referral`" below. | | `order` | Only for type `order`: the list of products of the order summary that was sent from your WhatsApp store — see "`order`" below. | #### `body` by message type | Type | The data that will come | | --- | --- | | text | Regular incoming message | | image | A link to download the image file (jpg) | | audio | A link to download the audio file (ogg) | | video | A link to download the video file (mp4) | | location | A location text in format `latitude,longitude` | | ptt | A link to download the push to talk audio (voice message, ogg) | | document | A link to download the document file | | button | The text of the button that was selected | | contacts | The phone number that was shared | | list | The selection text from the list | | reaction | The emoji that was sent — empty when the client removed their reaction | | order | The note the client wrote with the order — the items are in `order` | | phone | The phone number that was shared when the client revealed their phone number ([Request Phone](https://docs.99digital.co.il/whatsapp-api/request-phone)) | You must download the link files to your server: we delete all files within 7 days. Documents are kept as pdf, zip, xls, xlsx, doc, docx, csv, apk, rar, ppt, pptx or wav; a jpg, png or mp4 sent as a document arrives as `image` or `video`. If a file could not be kept (for example a document of another file type), `body` is empty and `media` is false. #### `caption` by message type | Type | The data that will come | | --- | --- | | text | Nothing, empty | | image | Caption text with the image | | audio | Nothing, empty | | video | Caption text with the video | | location | The name and address of the place (`name - address`), when the client shared a place; otherwise empty | | ptt | Nothing, empty | | document | Caption text with the document | | button | The ID of the button that was selected. This ID arrives for the [Send Buttons](https://docs.99digital.co.il/whatsapp-api/send-buttons) and [Send Carousel](https://docs.99digital.co.il/whatsapp-api/send-carousel) button IDs, and for a template quick reply button (if you provided a quickReply button id) | | contacts | The name of the contact | | list | The item list ID that was selected ([Send List](https://docs.99digital.co.il/whatsapp-api/send-list)) | | reaction | Nothing, empty | | order | The store (catalog) ID number | | phone | The name of the person that revealed their phone number | The answer to [Request Location](https://docs.99digital.co.il/whatsapp-api/request-location) arrives as type `location`. #### `referral` Object of items that describes the original referral that initiated the incoming WhatsApp message. Available data: | Field | Description | | --- | --- | | `ref_type` | `none` (for a non-referral incoming message), `post` (Facebook / Instagram post) or `ad` (Facebook / Instagram campaign). | If the `ref_type` is `post` or `ad`, more information will be available: | Field | Description | | --- | --- | | `ref_title` | The title of the post / ad. | | `ref_body` | The message of the post / ad. | | `ref_id` | ID of the post / ad. | | `ref_link` | Link to the post / ad. | | `ref_image` | Image of the original post / ad (the link will be deleted in 7 days). Null when there is no image. | ```json "referral": { "ref_type": "ad", "ref_title": "Summer sale", "ref_body": "20% off everything", "ref_id": "120210000000000000", "ref_link": "https://fb.me/xyz123", "ref_image": "https://storage.99digital.online/files/1789900000Qw3Er4Ty5U.jpg" } ``` #### `order` This is the list of products of the order summary that was sent from your WhatsApp store. This parameter is an array of items, and looks like this: ```json "order": [ { "product_retailer_id": "woo_92", "quantity": 2, "item_price": 24, "currency": "ILS" }, { "product_retailer_id": "woo_70", "quantity": 3, "item_price": 10, "currency": "ILS" } ] ``` | Field | Description | | --- | --- | | `product_retailer_id` | The product ID of the item. | | `quantity` | The quantity of that product. | | `item_price` | The price of each product. | | `currency` | The currency of that product. | ### Remarks - Stickers and other message kinds that are not listed in `type` are not forwarded. - In the text of `text`, `button` and `list` messages, in `senderName` and in contact names, a single quote (`'`) arrives as a backtick (`` ` ``). - An example of every message type is under **Webhook payload** below. ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `hook` | string | Yes | "new" always, for a new incoming message. Always `new`. | | `unique` | string | Yes | Unique ID for the incoming message. Use it as `replyTo` to quote the message in your reply, or to react to it with [Send Reaction](https://docs.99digital.co.il/whatsapp-api/send-reaction). Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `from` | string | Yes | The contact person that sent you the message, in international format: `972501234567`. If the person is hiding their identity (enabled the [username](https://docs.99digital.co.il/whatsapp-api/information/username) feature), this value will return the `from_id`, for example `IL.1605856887361213`. Example: `972501234567`. | | `from_id` | string \| null | Yes | The contact person (sender) user id. It arrives whenever WhatsApp provides it, also when the client did not hide their identity; otherwise null. The format is always 2 letters country code + dot + 16 digits, for example `IL.1605856887361213`. This value is fixed per end user per WhatsApp API account. You can use this value to send messages to the client. Example: `IL.1605856887361213`. | | `username` | null | Yes | The username the client chose for their WhatsApp. This feature is not available yet and will return null until officially released by Meta. | | `country` | string \| null | Yes | The country code (two letters) of the contact person (sender), taken from their user id. Null when there is no user id. Example: `IL`. | | `phone` | string \| null | Yes | The contact person phone number, in international format, for example `972501234567`. If the phone number is not available (the client hides their identity), this will return null. Example: `972501234567`. | | `to` | string | Yes | Your WhatsApp account. Example: `972771234567`. | | `senderName` | string | Yes | The name of the person that sent the message. For type `phone`, the name they shared. Example: `Dana Cohen`. | | `type` | string | Yes | Message type. `ptt` is a voice message (push to talk). `button` and `list` are the client's choice in [Send Buttons](https://docs.99digital.co.il/whatsapp-api/send-buttons), [Send Carousel](https://docs.99digital.co.il/whatsapp-api/send-carousel), [Send List](https://docs.99digital.co.il/whatsapp-api/send-list) or a template quick reply button. `order` is a cart from your WhatsApp store. `phone` is the client's phone number, shared through [Request Phone](https://docs.99digital.co.il/whatsapp-api/request-phone). The answer to [Request Location](https://docs.99digital.co.il/whatsapp-api/request-location) arrives as `location`. One of: `text`, `image`, `audio`, `video`, `location`, `ptt`, `document`, `button`, `contacts`, `list`, `reaction`, `order`, `phone`. Example: `text`. | | `body` | string | Yes | The content of the 'body' depends on the 'type' of the message: \| Type \| The data that will come \| \| --- \| --- \| \| text \| Regular incoming message \| \| image \| A link to download the image file (jpg) \| \| audio \| A link to download the audio file (ogg) \| \| video \| A link to download the video file (mp4) \| \| location \| A location text in format `latitude,longitude` \| \| ptt \| A link to download the push to talk audio (ogg) \| \| document \| A link to download the document file \| \| button \| The text of the button that was selected \| \| contacts \| The phone number that was shared \| \| list \| The selection text from the list \| \| reaction \| The emoji that was sent — empty when the client removed their reaction \| \| order \| The note the client wrote with the order — the items are in `order` \| \| phone \| The phone number that was shared when the client revealed their phone number \| You must download the link files to your server: we delete all files within 7 days. Documents are kept as pdf, zip, xls, xlsx, doc, docx, csv, apk, rar, ppt, pptx or wav; a jpg, png or mp4 sent as a document arrives as `image` or `video`. If a file could not be kept (for example a document of another file type), `body` is empty and `media` is false. Example: `Hi, is the store open today?`. | | `caption` | string | Yes | The content of the 'caption' depends on the 'type' of the message: \| Type \| The data that will come \| \| --- \| --- \| \| text \| Nothing, empty \| \| image \| Caption text with the image \| \| audio \| Nothing, empty \| \| video \| Caption text with the video \| \| location \| The name and address of the place (`name - address`), when the client shared a place; otherwise empty \| \| ptt \| Nothing, empty \| \| document \| Caption text with the document \| \| button \| The ID of the button that was selected. This ID arrives for the `sendButtons` and `sendCarousel` button IDs, and for a template quick reply button (if you provided a quickReply button id) \| \| contacts \| The name of the contact \| \| list \| The item list ID that was selected \| \| reaction \| Nothing, empty \| \| order \| The store (catalog) ID number \| \| phone \| The name of the person that revealed their phone number \|. Example: ``. | | `template` | string \| null | Yes | The template name, if the client clicked on a quick reply button of a template you sent ([Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template)). For everything else, this will return null. Example: `null`. | | `isForwarded` | boolean | Yes | Shows if the incoming message is forwarded — true or false. Example: `false`. | | `timestamp` | string | Yes | Time stamp of the incoming message (Unix time, in seconds, as a string). Example: `1789900000`. | | `timestampMS` | integer | Yes | The sub-second part of the time we processed the message (the digits after the decimal point), in case you need it. Example: `483921`. | | `media` | boolean | Yes | If this message contains a media file (`body` is a link to it), it will be true; otherwise false. Example: `false`. | | `quote` | boolean | Yes | If this message is a quoted message, it will be true; otherwise false. A reaction is always quoted: it points to the message the client reacted to. Example: `false`. | | `quoteUnique` | string \| boolean | Yes | In case the message is quoted (it means that someone replied to your outgoing message), this will be the original message unique ID — for your own message, the `unique` you received when you sent it. For a reaction, the message the client reacted to. If the message is not quoted, this will be false. Example: `false`. | | `profilePic` | string | Yes | jpg file link to the client's profile picture, if the user has a profile picture and their privacy settings allow it; otherwise a link to a default image. Profile picture links are generated once per number. Example: `https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg`. | | `conversationTimeLeft` | integer | Yes | Amount of minutes left for the incoming conversation session to end (up to 1435). If passed, any incoming message after that will be considered as a new incoming conversation, and the timer will reset. Example: `1435`. | | `isNewConversation` | integer | Yes | Whether this message started a new incoming message conversation session or not. One of: `0` — This new message does not open a new conversation; `1` — This new message opens a new conversation. Example: `1`. | | `referral` | object | Yes | Object of items that describes the original referral that initiated the incoming WhatsApp message. If the `ref_type` is 'post' or 'ad', more information is available. | | `referral.ref_type` | string | Yes | The referral type. One of: `none` — Not a referral incoming message; `post` — Facebook / Instagram post; `ad` — Facebook / Instagram campaign. | | `referral.ref_title` | string | No | The title of the post / ad. | | `referral.ref_body` | string | No | The message of the post / ad. | | `referral.ref_id` | string | No | ID of the post / ad. | | `referral.ref_link` | string | No | Link to the post / ad. | | `referral.ref_image` | string \| null | No | Image of the original post / ad (the link will be deleted in 7 days). Null when there is no image. | | `order` | array of object | No | Only for type `order`: the list of products of the order summary that was sent from your WhatsApp store. | | `order[].product_retailer_id` | string | No | The product ID of the item. Example: `woo_92`. | | `order[].quantity` | integer | No | The quantity of that product. Example: `2`. | | `order[].item_price` | number | No | The price of each product. Example: `24`. | | `order[].currency` | string | No | The currency of that product. Example: `ILS`. | ### Example: Text A regular incoming text message — here the first one of a new conversation. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "text", "body": "Hi, is the store open today?", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1435, "isNewConversation": 1, "referral": { "ref_type": "none" } } ``` ### Example: Quoted reply The client quoted your message: `quoteUnique` is the `unique` you received when you sent it. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "text", "body": "Yes, tomorrow at 10:00 works for me", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": true, "quoteUnique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Image `body` is a link to the image file (jpg), `caption` the text with it. Download it — we delete files within 7 days. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "image", "body": "https://storage.99digital.online/files/1789900000Ab3dE9fGh1.jpg", "caption": "My receipt", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": true, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Video `body` is a link to the video file (mp4). ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "video", "body": "https://storage.99digital.online/files/1789900000Kp4LmN7qRs.mp4", "caption": "This is the noise it makes", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": true, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Audio `body` is a link to the audio file (ogg); `caption` is empty. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "audio", "body": "https://storage.99digital.online/files/1789900000Wq2Er5TyUi.ogg", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": true, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Voice message (ptt) A voice message (push to talk): `body` is a link to the audio (ogg); `caption` is empty. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "ptt", "body": "https://storage.99digital.online/files/1789900000Hj8Kl3ZxCv.ogg", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": true, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Document `body` is a link to the document file, `caption` the text with it. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "document", "body": "https://storage.99digital.online/files/1789900000Zx9Yw8Vu7T.pdf", "caption": "Signed contract", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": true, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Location `body` is `latitude,longitude`; `caption` is the name and address of the place the client shared. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "location", "body": "32.0853,34.7818", "caption": "Azrieli Center - Menachem Begin 132, Tel Aviv", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Location (Request Location) The client shared their current location after Request Location: `caption` is empty. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "location", "body": "32.0853,34.7818", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Contact A shared contact: `body` is the phone number, `caption` the name. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "contacts", "body": "972521112233", "caption": "Yossi Levi", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Button reply A tap on a button of Send Buttons or Send Carousel: `body` is the button text, `caption` its ID. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "button", "body": "Track my order", "caption": "track_order", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": true, "quoteUnique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Template quick reply A tap on a quick reply button of a template: `caption` is the quickReply button id, `template` the template name. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "button", "body": "Confirm", "caption": "confirm", "template": "appointment_reminder", "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": true, "quoteUnique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: List reply A choice from Send List: `body` is the selection text, `caption` the item ID. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "list", "body": "Support", "caption": "support", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": true, "quoteUnique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Reaction `body` is the emoji; `quoteUnique` is the message the client reacted to. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "reaction", "body": "👍", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": true, "quoteUnique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Order A cart from your WhatsApp store: `order` lists the items, `body` is the client's note, `caption` the store ID. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "order", "body": "Please deliver after 18:00", "caption": "1234567890123456", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" }, "order": [ { "product_retailer_id": "woo_92", "quantity": 2, "item_price": 24, "currency": "ILS" }, { "product_retailer_id": "woo_70", "quantity": 3, "item_price": 10, "currency": "ILS" } ] } ``` ### Example: Phone (Request Phone) A client who hides their number shared it after Request Phone: `body` is the phone number, `caption` and `senderName` the name they shared. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "IL.1605856887361213", "from_id": "IL.1605856887361213", "username": null, "country": "IL", "phone": null, "to": "972771234567", "senderName": "Dana Cohen", "type": "phone", "body": "972501234567", "caption": "Dana Cohen", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/noprofile.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Hidden number A client who hides their number: `from` is their user id and `phone` is null. Reply to the user id. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "IL.1605856887361213", "from_id": "IL.1605856887361213", "username": null, "country": "IL", "phone": null, "to": "972771234567", "senderName": "Dana", "type": "text", "body": "Hi, I saw your ad", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/noprofile.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Ad referral The conversation started from a Facebook / Instagram ad: `referral` describes it. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "text", "body": "I would like to know more about the offer", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1435, "isNewConversation": 1, "referral": { "ref_type": "ad", "ref_title": "Summer sale", "ref_body": "20% off everything", "ref_id": "120210000000000000", "ref_link": "https://fb.me/xyz123", "ref_image": "https://storage.99digital.online/files/1789900000Qw3Er4Ty5U.jpg" } } ``` ## Responses ### 200 — Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored. ### default — Any other status, or no answer in time, counts as a failed delivery. With `retry` 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again. --- # Acknowledge Source: https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/acknowledge.md Section: WhatsApp API › Webhook › Webhook **Webhook.** Sent to the webhook URL you configure. For every message or template you send, you can get an acknowledge if the recipient received your message or not (`hook` "update"). There are four available statuses: failed, sent, delivered, read. Acknowledges are turned off by default. You can enable them with `readStatus` in the [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) endpoint. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) | | Method | JSON via POST | **With every acknowledge message, you will receive the following:** ```json { "status": "OK", "hook": "update", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972771234567", "from": "972501234567", "from_id": "IL.1605856887361213", "country": "IL", "timestamp": "1789900061", "conversationTimeLeft": 1380, "isBilledTemplate": 0, "newTemplateType": 0, "isNewConversation": 0, "newConversationType": 0, "ack": 3 } ``` ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `hook` | "update" always, for an acknowledge update message. | | `unique` | The same unique ID as the original message — the `unique` you received when you sent it. This parameter allows you to know which message was seen. | | `to` | Your WhatsApp account. | | `from` | The contact that you sent the message to. If you messaged a normal international number, this will return the number. If you messaged a user id (2 letters country code + dot + 16 digits), this will return this value. | | `from_id` | The user id of the contact that you sent the message to. Null when it is not known. | | `country` | The country code (two letters) of the contact that you sent the message to, taken from their user id. Null when there is no user id. | | `timestamp` | The timestamp of the ack (Unix time, in seconds, as a string). | | `conversationTimeLeft` | The time (in minutes) that is left for the conversation between you and the end user to finish, in case an incoming conversation is open between you and the client; otherwise 0. A conversation is a 24 hours session. | | `isBilledTemplate` | This value shows if a new billed template was sent to the client — see below. | | `newTemplateType` | In case a new billed template is created under `isBilledTemplate`, here you can know the type of the template — see below. | | `isNewConversation` | This value is no longer in use. It is always 0. | | `newConversationType` | This value is no longer in use. It is always 0. | | `ack` | Acknowledge type — see below. | #### `isBilledTemplate` This value shows if a new billed template was sent to the client. You will get this only once per new billed template: 1 arrives on its first delivered (`ack` 2) or read (`ack` 3) update. - If this value is 1, it means a new template is billed. - If this value is 0, it means there is no new billing event. A billed template is: - any marketing template you send. - any utility template you send if no incoming 24 hours session is open with the client. - any authentication template you send. #### `newTemplateType` | Value | Explanation | | --- | --- | | 0 | No billing template | | 1 | Utility template. Authentication templates currently arrive as 1 too. | | 2 | Marketing template | | 3 | Authentication template (not sent at the moment — see 1) | #### `ack` | Value | Explanation | | --- | --- | | 0 | Message failed to deliver. For more information, check the [System Messages](https://docs.99digital.co.il/whatsapp-api/webhook/system-messages) of type "messages" with the same `unique` (needs `system` 1 in Set Webhook). | | 1 | Acknowledge that the message was **sent** (one gray check mark). | | 2 | Acknowledge that the recipient received the message (two gray check marks). Message marked as **delivered**. | | 3 | Acknowledge that the recipient read the message (two blue check marks). Message marked as **read**. This ack is only available if the recipient allowed it within their WhatsApp privacy settings inside the mobile app. | :::info[Important note] The word "conversation" can be a little confusing regarding how it is counted and billed. Please see this page for more information: [Template, conversation and Message](https://docs.99digital.co.il/whatsapp-api/information/template-conversation-and-message). ::: ### Remarks - The order of the acknowledges is not guaranteed: a delivered acknowledge (`ack` 2) may arrive before the sent one (`ack` 1). - The acknowledges of messages sent from the WhatsApp Business app of a coexistence account ([Outgoing Messages](https://docs.99digital.co.il/whatsapp-api/webhook/outgoing-messages)) arrive here too, with the same `unique`. - An example of every acknowledge is under **Webhook payload** below. ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `hook` | string | Yes | "update" always, for an acknowledge update message. Always `update`. | | `unique` | string | Yes | The same unique ID as the original message — the `unique` you received when you sent it. This parameter allows you to know which message was seen. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `to` | string | Yes | Your WhatsApp account. Example: `972771234567`. | | `from` | string | Yes | The contact that you sent the message to. If you messaged a normal international number, this will return the number. If you messaged a user id (2 letters country code + dot + 16 digits), this will return this value. Example: `972501234567`. | | `from_id` | string \| null | Yes | The user id of the contact that you sent the message to. Null when it is not known. Example: `null`. | | `country` | string \| null | Yes | The country code (two letters) of the contact that you sent the message to, taken from their user id. Null when there is no user id. Example: `null`. | | `timestamp` | string | Yes | The timestamp of the ack (Unix time, in seconds, as a string). Example: `1789900061`. | | `conversationTimeLeft` | integer | Yes | The time (in minutes) that is left for the conversation between you and the end user to finish, in case an incoming conversation is open between you and the client; otherwise 0. A conversation is a 24 hours session. Example: `1380`. | | `isBilledTemplate` | integer | Yes | This value shows if a new billed template was sent to the client. You will get 1 only once per new billed template: on its first delivered (`ack` 2) or read (`ack` 3) update. A billed template is: - any marketing template you send. - any utility template you send if no incoming 24 hours session is open with the client. - any authentication template you send. One of: `0` — No new billing event; `1` — A new template is billed — see `newTemplateType`. Example: `0`. | | `newTemplateType` | integer | Yes | In case a new billed template is created under `isBilledTemplate`, here you can know the type of the template. One of: `0` — No billing template; `1` — Utility template. Authentication templates currently arrive as 1 too; `2` — Marketing template; `3` — Authentication template (not sent at the moment — see 1). Example: `0`. | | `isNewConversation` | integer | Yes | **Deprecated.** This value is no longer in use. It is always 0. Example: `0`. | | `newConversationType` | integer | Yes | **Deprecated.** This value is no longer in use. It is always 0. Example: `0`. | | `ack` | integer | Yes | Acknowledge type. One of: `0` — Message failed to deliver. For more information, check the system message of type "messages" with the same `unique` (needs `system` 1); `1` — Acknowledge that the message was **sent** (one gray check mark); `2` — Acknowledge that the recipient received the message (two gray check marks). Message marked as **delivered**; `3` — Acknowledge that the recipient read the message (two blue check marks). Message marked as **read**. This ack is only available if the recipient allowed it within their WhatsApp privacy settings inside the mobile app. Example: `3`. | ### Example: Ack 1 — sent The message was sent (one gray check mark). ```json { "status": "OK", "hook": "update", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972771234567", "from": "972501234567", "from_id": null, "country": null, "timestamp": "1789900061", "conversationTimeLeft": 1380, "isBilledTemplate": 0, "newTemplateType": 0, "isNewConversation": 0, "newConversationType": 0, "ack": 1 } ``` ### Example: Ack 2 — delivered The recipient received the message (two gray check marks). ```json { "status": "OK", "hook": "update", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972771234567", "from": "972501234567", "from_id": null, "country": null, "timestamp": "1789900061", "conversationTimeLeft": 1380, "isBilledTemplate": 0, "newTemplateType": 0, "isNewConversation": 0, "newConversationType": 0, "ack": 2 } ``` ### Example: Ack 3 — read The recipient read the message (two blue check marks). ```json { "status": "OK", "hook": "update", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972771234567", "from": "972501234567", "from_id": null, "country": null, "timestamp": "1789900061", "conversationTimeLeft": 1380, "isBilledTemplate": 0, "newTemplateType": 0, "isNewConversation": 0, "newConversationType": 0, "ack": 3 } ``` ### Example: Ack 0 — failed The message failed to deliver. The reason arrives as a system message of type "messages". ```json { "status": "OK", "hook": "update", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972771234567", "from": "972501234567", "from_id": null, "country": null, "timestamp": "1789900061", "conversationTimeLeft": 1380, "isBilledTemplate": 0, "newTemplateType": 0, "isNewConversation": 0, "newConversationType": 0, "ack": 0 } ``` ### Example: Billed template A marketing template opened a new billed conversation: sent once, with its first delivered or read update. ```json { "status": "OK", "hook": "update", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972771234567", "from": "972501234567", "from_id": null, "country": null, "timestamp": "1789900061", "conversationTimeLeft": 0, "isBilledTemplate": 1, "newTemplateType": 2, "isNewConversation": 0, "newConversationType": 0, "ack": 2 } ``` ## Responses ### 200 — Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored. ### default — Any other status, or no answer in time, counts as a failed delivery. With `retry` 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again. --- # System Messages Source: https://docs.99digital.co.il/whatsapp-api/webhook/system-messages Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/system-messages.md Section: WhatsApp API › Webhook › Webhook **Webhook.** Sent to the webhook URL you configure. System messages allow you to receive a webhook when there is a new update about your account (`hook` "system"). The types of system messages you can get are: - Daily limit of outgoing conversations (250, 2000, 10000 etc.). - Cases where your WhatsApp number is flagged due to spam reports. - Message template approved or rejected. - Message template ongoing spam reports. - Failed messages (messages that you tried to send but they failed). - Account blocked (due to spam or any other reason). - Display name approved or rejected. System messages are turned off by default. You can enable them with `system` in the [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) endpoint. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) | | Method | JSON via POST | **With every system message, you will get some of the following:** ```json { "status": "OK", "hook": "system", "type": "template", "to": "972771234567", "timestamp": 1789900000, "update": "", "issues": "", "template": "order_confirmation", "templateUpdate": 1, "templateCategory": 1, "unique": "", "messageUpdate": "", "messageTo": "" } ``` The fields that are not relevant to the message's `type` are empty (`""`). ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `hook` | "system" always, for a system update message. | | `type` | System message type. Values: for daily limit updates: "update"; for account issues: "issues"; for templates update: "template"; for messages update: "messages"; for names update: "name". Another change of the daily limit, such as a lower limit, arrives as "unknown". | | `to` | Your WhatsApp account. | | `timestamp` | The timestamp of the information (Unix time, in seconds). A number; for type "messages", a string with the time of the failed message's status. | | `update` | Relevant for "update" type only. Will show the new daily conversation limit for the WhatsApp account: 50, 250, 1000, 2000, 10000, 100000, or 1000000 for unlimited. An "issues" message about spam flags (codes 1 and 2) shows the current limit here too. | | `issues` | Relevant for "issues" type only. Here you can get account issues. If there is an account issue, one of the codes below will be returned. | | `template` | Relevant for "template" type only. Will show the template name. | | `templateUpdate` | Relevant for "template" type only. Will show the status code for the relevant template — see the codes below. | | `templateCategory` | Relevant for "template" type only, and will only come when `templateUpdate` is 1 or 8. Will show the category that this template is set to: 1 — utility, 2 — marketing, 3 — authentication. | | `unique` | Relevant for "messages" type only. This is the unique ID of the message that was sent. | | `messageUpdate` | Relevant for "messages" type only. Will show the status code for messages that failed to deliver — see the codes below. | | `messageTo` | Relevant for "messages" type only. The WhatsApp number (or user id) you tried to send the message to. | | `name` | Relevant for "name" type only (the field is sent only with it). This is the requested display name. | | `rejectReason` | Relevant for "name" type only (the field is sent only with it). This is the reason to reject the name, if any — see the codes below. | #### `issues` codes | Code | Explanation | | --- | --- | | 1 | Your account is flagged due to spam. Be careful! | | 2 | Your account is no longer flagged. | | 3 | Your account has been blocked from WhatsApp. | | 4 | Your account is back to be active again after being blocked / reviewed. | | 5 | The phone number has been removed from the business manager, please contact support. | | 6 | The account has been deleted, please contact support. | | 7 | Access to the account has been removed by the client, please contact support. | | 8 | Your account was sent to review by Meta. | #### `templateUpdate` codes | Code | Explanation | | --- | --- | | 1 | Your template has been approved and is available to use. | | 2 | Template rejected. Reason: wrong format template / too many variables / template is similar to another template that already exists in your account. | | 3 | Template rejected. Reason: the template contains content that is violating WhatsApp policy. | | 4 | Template rejected. Reason: the template contains content that is marked as spam. | | 5 | Template rejected. Reason unknown. | | 6 | Template received too many spam reports. You can't use this template for the next 6 hours. | | 7 | Template is banned to use due to too many spam reports. | | 8 | Template category has been changed. | | 9 | The template has been deleted. | | 10 | The template is flagged, it received a high amount of negative reports from users. Be careful! | | 11 | The template is no longer flagged. | #### `messageUpdate` codes | Code | Explanation | | --- | --- | | 1 | Server error, try to send the message again. | | 2 | Billing issue, please contact support to fix the billing. | | 3 | Attached file is incorrect, please try to re-send the message and fix the file. | | 4 | Account is blocked for sending messages. | | 5 | You have reached your daily limit for sending messages. | | 6 | The 'to' and 'from' parameters are the same. You can't send a message to yourself. | | 7 | The WhatsApp number you tried to send the message to is using an old WhatsApp app, or did not accept the WhatsApp 'terms of use' within their app. | | 8 | It's been more than 24 hours since the client's last reply, please use a template instead. | | 9 | Error unknown, please contact support. | | 10 | Variables error, please check the variables used in the template (either a body variable or the header link). | | 11 | Context issue in the body or header of the message. | | 12 | The template you tried to send was not approved to use by Meta. | | 13 | The client can't receive this template message now because their number is marked as "trial". Contact support for more information. | | 14 | You can't send more than two marketing templates to the same number within 24 hours. Please wait for the user to reply first. | | 15 | The template you tried to send does not exist. | | 16 | You are trying to send too many messages in a short period of time. Slow down. | | 17 | Permission issue, please contact support. | #### `rejectReason` codes | Code | Meaning | | --- | --- | | 0 | No rejection. The name was approved to use. | | 1 | The name does not relate to the business name. | | 2 | The name violates WhatsApp name policy. | | 3 | The name is related to alcohol, which is forbidden. | | 4 | The name is related to selling digital goods, which is forbidden. | | 10 | Rejection reason unknown. | ### Remarks - A failed message also arrives as an [Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge) with `ack` 0 and the same `unique`; the reason is in the system message above. - With `systemPhoneAlert` in [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook), you can also get system alerts to your phone. - An example of every system message type is under **Webhook payload** below. ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `hook` | string | Yes | "system" always, for a system update message. Always `system`. | | `type` | string | Yes | System message type. One of: `update` — Daily limit updates — see `update`; `issues` — Account issues — see `issues`; `template` — Templates update — see `template`, `templateUpdate` and `templateCategory`; `messages` — Messages update — a message you sent failed; see `unique`, `messageUpdate` and `messageTo`; `name` — Display name update — see `name` and `rejectReason`; `unknown` — Another change of the daily limit, such as a lower limit — see `update`. Example: `template`. | | `to` | string | Yes | Your WhatsApp account. Example: `972771234567`. | | `timestamp` | integer \| string | Yes | The timestamp of the information (Unix time, in seconds). A number; for type "messages", a string with the time of the failed message's status. Example: `1789900000`. | | `update` | integer \| string | Yes | Relevant for "update" type only. Will show the new daily conversation limit for the WhatsApp account: 50, 250, 1000, 2000, 10000, 100000, or 1000000 for unlimited. An "issues" message about spam flags (codes 1 and 2) shows the current limit here too. Example: ``. | | `issues` | integer \| string | Yes | Relevant for "issues" type only. Here you can get account issues. If there is an account issue, one of the following codes will be returned. One of: `1` — Your account is flagged due to spam. Be careful!; `2` — Your account is no longer flagged; `3` — Your account has been blocked from WhatsApp; `4` — Your account is back to be active again after being blocked / reviewed; `5` — The phone number has been removed from the business manager, please contact support; `6` — The account has been deleted, please contact support; `7` — Access to the account has been removed by the client, please contact support; `8` — Your account was sent to review by Meta; `` — Empty — another type, or an account update that needs no action. Example: ``. | | `template` | string | Yes | Relevant for "template" type only. Will show the template name. Example: `order_confirmation`. | | `templateUpdate` | integer \| string | Yes | Relevant for "template" type only. Will show the status code for the relevant template. One of: `1` — Your template has been approved and is available to use; `2` — Template rejected. Reason: wrong format template / too many variables / template is similar to another template that already exists in your account; `3` — Template rejected. Reason: the template contains content that is violating WhatsApp policy; `4` — Template rejected. Reason: the template contains content that is marked as spam; `5` — Template rejected. Reason unknown; `6` — Template received too many spam reports. You can't use this template for the next 6 hours; `7` — Template is banned to use due to too many spam reports; `8` — Template category has been changed; `9` — The template has been deleted; `10` — The template is flagged, it received a high amount of negative reports from users. Be careful!; `11` — The template is no longer flagged; `` — Empty — another type. Example: `1`. | | `templateCategory` | integer | No | Relevant for "template" type only, and will only come when `templateUpdate` is 1 or 8. Will show the category that this template is set to. One of: `1` — Utility; `2` — Marketing; `3` — Authentication. Example: `1`. | | `unique` | string | Yes | Relevant for "messages" type only. This is the unique ID of the message that was sent. Example: ``. | | `messageUpdate` | integer \| string | Yes | Relevant for "messages" type only. Will show the status code for messages that failed to deliver. One of: `1` — Server error, try to send the message again; `2` — Billing issue, please contact support to fix the billing; `3` — Attached file is incorrect, please try to re-send the message and fix the file; `4` — Account is blocked for sending messages; `5` — You have reached your daily limit for sending messages; `6` — The 'to' and 'from' parameters are the same. You can't send a message to yourself; `7` — The WhatsApp number you tried to send the message to is using an old WhatsApp app, or did not accept the WhatsApp 'terms of use' within their app; `8` — It's been more than 24 hours since the client's last reply, please use a template instead; `9` — Error unknown, please contact support; `10` — Variables error, please check the variables used in the template (either a body variable or the header link); `11` — Context issue in the body or header of the message; `12` — The template you tried to send was not approved to use by Meta; `13` — The client can't receive this template message now because their number is marked as "trial". Contact support for more information; `14` — You can't send more than two marketing templates to the same number within 24 hours. Please wait for the user to reply first; `15` — The template you tried to send does not exist; `16` — You are trying to send too many messages in a short period of time. Slow down; `17` — Permission issue, please contact support; `` — Empty — another type. Example: ``. | | `messageTo` | string | Yes | Relevant for "messages" type only. The WhatsApp number (or user id) you tried to send the message to. Example: ``. | | `name` | string | No | Relevant for "name" type only (the field is sent only with it). This is the requested display name. Example: `99 Digital`. | | `rejectReason` | integer | No | Relevant for "name" type only (the field is sent only with it). This is the reason to reject the name, if any. One of: `0` — No rejection. The name was approved to use; `1` — The name does not relate to the business name; `2` — The name violates WhatsApp name policy; `3` — The name is related to alcohol, which is forbidden; `4` — The name is related to selling digital goods, which is forbidden; `10` — Rejection reason unknown. Example: `0`. | ### Example: Message failed A message you sent failed: `messageUpdate` is the reason. Here, more than 24 hours since the client's last reply. ```json { "status": "OK", "hook": "system", "type": "messages", "to": "972771234567", "timestamp": "1789900061", "update": "", "issues": "", "template": "", "templateUpdate": "", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "messageUpdate": 8, "messageTo": "972501234567" } ``` ### Example: Template approved Your template was approved; `templateCategory` is its category. ```json { "status": "OK", "hook": "system", "type": "template", "to": "972771234567", "timestamp": 1789900000, "update": "", "issues": "", "template": "order_confirmation", "templateUpdate": 1, "unique": "", "messageUpdate": "", "messageTo": "", "templateCategory": 1 } ``` ### Example: Template rejected Your template was rejected (here: wrong format / too many variables / similar to another template). ```json { "status": "OK", "hook": "system", "type": "template", "to": "972771234567", "timestamp": 1789900000, "update": "", "issues": "", "template": "summer_sale", "templateUpdate": 2, "unique": "", "messageUpdate": "", "messageTo": "" } ``` ### Example: Template category Meta changed the category of your template; `templateCategory` is the new one. ```json { "status": "OK", "hook": "system", "type": "template", "to": "972771234567", "timestamp": 1789900000, "update": "", "issues": "", "template": "order_confirmation", "templateUpdate": 8, "unique": "", "messageUpdate": "", "messageTo": "", "templateCategory": 2 } ``` ### Example: Daily limit Your daily limit of new conversations changed; `update` is the new limit. ```json { "status": "OK", "hook": "system", "type": "update", "to": "972771234567", "timestamp": 1789900000, "update": 10000, "issues": "", "template": "", "templateUpdate": "", "unique": "", "messageUpdate": "", "messageTo": "" } ``` ### Example: Account flagged Your number is flagged due to spam reports; `update` shows the current daily limit. ```json { "status": "OK", "hook": "system", "type": "issues", "to": "972771234567", "timestamp": 1789900000, "update": 2000, "issues": 1, "template": "", "templateUpdate": "", "unique": "", "messageUpdate": "", "messageTo": "" } ``` ### Example: Account blocked Your account has been blocked from WhatsApp. ```json { "status": "OK", "hook": "system", "type": "issues", "to": "972771234567", "timestamp": 1789900000, "update": "", "issues": 3, "template": "", "templateUpdate": "", "unique": "", "messageUpdate": "", "messageTo": "" } ``` ### Example: Display name Your display name was approved (`rejectReason` 0). ```json { "status": "OK", "hook": "system", "type": "name", "to": "972771234567", "timestamp": 1789900000, "update": "", "issues": "", "template": "", "templateUpdate": "", "unique": "", "messageUpdate": "", "messageTo": "", "name": "99 Digital", "rejectReason": 0 } ``` ## Responses ### 200 — Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored. ### default — Any other status, or no answer in time, counts as a failed delivery. With `retry` 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again. --- # Contacts Update Source: https://docs.99digital.co.il/whatsapp-api/webhook/contacts-update Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/contacts-update.md Section: WhatsApp API › Webhook › Webhook **Webhook.** Sent to the webhook URL you configure. Contacts update allows you to receive a webhook when there is a new update about your WhatsApp contacts (`hook` "contact"). A contact is an end user WhatsApp number that you are chatting with. The types of contacts updates you can get are: - For [coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) accounts, when a contact is added or changed. - For coexistence accounts, when a contact is deleted (not sent at the moment). - When a contact asked to stop receiving marketing messages (future update, not on production now). - When a contact asked to keep receiving marketing messages (future update, not on production now). - When a contact accepted your WhatsApp API to call them using WhatsApp Calls (future update, not on production now). Contacts updates are turned on by default. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) | | Method | JSON via POST | **With every contacts update, you will get some of the following:** ```json { "status": "OK", "hook": "contact", "type": "coexistence", "to": "972771234567", "contact": "972501234567", "timestamp": "1789900000", "coexistence": "add", "contact_name": "Dana Cohen" } ``` ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `hook` | "contact" always, for contact webhooks. | | `type` | Contact webhook type. Values: for a coexistence contact update: "coexistence"; for marketing requests: "marketing" (future feature); for calls requests: "calls" (future feature). | | `to` | Your WhatsApp account. | | `contact` | The end user WhatsApp number. | | `timestamp` | The timestamp of the information (Unix time, in seconds, as a string). | | `coexistence` | Relevant for "coexistence" type only. This will show "add" if a new contact was saved to the WhatsApp Business app phone contact list, or an existing contact was changed. This will show "remove" if the WhatsApp Business app removed a phone from the contact list (not sent at the moment). | | `marketing` | Relevant for "marketing" type only. This will show "remove" if a contact asked to stop getting marketing messages. This will show "add" if the contact asked to resume getting marketing messages. (This is a future feature.) | | `calls` | Relevant for "calls" type only. This will show "add" if a contact allows your business to call them over WhatsApp. This will show "remove" if the contact no longer allows your business to call them over WhatsApp. (This is a future feature.) | | `contact_name` | Relevant for "coexistence" type with "add" only. This will show the contact name as it was saved in the WhatsApp Business app on the mobile phone. | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `hook` | string | Yes | "contact" always, for contact webhooks. Always `contact`. | | `type` | string | Yes | Contact webhook type. One of: `coexistence` — Coexistence contact update; `marketing` — Marketing requests (this is a future feature); `calls` — Calls requests (this is a future feature). Example: `coexistence`. | | `to` | string | Yes | Your WhatsApp account. Example: `972771234567`. | | `contact` | string | Yes | The end user WhatsApp number. Example: `972501234567`. | | `timestamp` | string | Yes | The timestamp of the information (Unix time, in seconds, as a string). Example: `1789900000`. | | `coexistence` | string | No | Relevant for "coexistence" type only. One of: `add` — A new contact was saved to the WhatsApp Business app phone contact list, or an existing contact was changed; `remove` — The WhatsApp Business app removed a phone from the contact list (not sent at the moment). Example: `add`. | | `marketing` | string | No | Relevant for "marketing" type only (this is a future feature). One of: `add` — The contact asked to resume getting marketing messages; `remove` — The contact asked to stop getting marketing messages. | | `calls` | string | No | Relevant for "calls" type only (this is a future feature). One of: `add` — The contact allows your business to call them over WhatsApp; `remove` — The contact no longer allows your business to call them over WhatsApp. | | `contact_name` | string | No | Relevant for "coexistence" type with "add" only. This will show the contact name as it was saved in the WhatsApp Business app on the mobile phone. Example: `Dana Cohen`. | ### Example: Contact saved (coexistence) A contact was saved or changed in the WhatsApp Business app on the phone. ```json { "status": "OK", "hook": "contact", "type": "coexistence", "to": "972771234567", "contact": "972501234567", "timestamp": "1789900000", "coexistence": "add", "contact_name": "Dana Cohen" } ``` ## Responses ### 200 — Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored. ### default — Any other status, or no answer in time, counts as a failed delivery. With `retry` 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again. --- # Outgoing Messages Source: https://docs.99digital.co.il/whatsapp-api/webhook/outgoing-messages Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/outgoing-messages.md Section: WhatsApp API › Webhook › Webhook **Webhook.** Sent to the webhook URL you configure. Outgoing messages webhooks are only relevant to [coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) WhatsApp accounts (`hook` "outgoing"). They show outgoing messages sent by the user themselves from their mobile phone WhatsApp Business app (or WhatsApp Web), outside of the API. This is only relevant to let you know the user sent a message, in case you want to show it as an outgoing message in your platform. - Note: any outgoing message sent from the API will not trigger an outgoing message webhook. - Outgoing messages webhooks are turned on by default. - Note 2: outgoing messages to groups are not supported. - The acknowledges of these messages arrive as [Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge) webhooks (`hook` "update") with the same `unique`. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) | | Method | JSON via POST | **With every outgoing message, you will get the following:** ```json { "status": "OK", "hook": "outgoing", "unique": "HBgMOTcyNTAxMjM0NTY3FQIAEhgUOEY0QzE2N0E5RDNCMDA5RkQ1QjIA", "from": "972771234567", "to": "972501234567", "type": "text", "body": "Sure, we are open until 20:00", "caption": "", "isForwarded": false, "timestamp": "1789900120", "timestampMS": 102938, "media": false, "quote": false, "quoteUnique": false } ``` ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `hook` | "outgoing" always, for a new outgoing message. | | `unique` | Unique ID for the outgoing message. Its acknowledges arrive with the same `unique`. | | `from` | Your WhatsApp account. | | `to` | The end user WhatsApp account that received the message. | | `type` | Message type. Can be one of the following: `text`, `image`, `audio`, `video`, `location`, `ptt`, `document`, `button`, `contacts`, `list`, `reaction`. | | `body` | The content of the 'body' depends on the 'type' of the message — see the table below. | | `caption` | The content of the 'caption' depends on the 'type' of the message — see the table below. | | `isForwarded` | Shows if the outgoing message is forwarded — true or false. | | `timestamp` | Time stamp of the outgoing message (Unix time, in seconds, as a string). | | `timestampMS` | The sub-second part of the timestamp (of the time we processed the message, in microseconds), in case you need it. | | `media` | If this message contains any media file, it will be true; otherwise false. | | `quote` | If this message is a quoted message, it will be true; otherwise false. | | `quoteUnique` | In case the message is quoted (it means that the user replied to an incoming message), this will be the original message unique ID. If the message is not quoted, this will be false. | #### `body` by message type | Type | The data that will come | | --- | --- | | text | Outgoing text message | | image | Link | | audio | Link | | video | Link | | location | `lat,lng` | | ptt | Link | | document | Link | | button | Button text | | contacts | Phone number | | list | The selection text | | reaction | The emoji | You must download the link files to your server: we delete all files within 7 days. #### `caption` by message type | Type | The data that will come | | --- | --- | | text | Nothing, empty | | image | Caption text with the image | | audio | Nothing, empty | | video | Caption text with the video | | location | The name and address of the place (`name - address`), if any | | ptt | Nothing, empty | | document | Caption text with the document | | button | Nothing, empty | | contacts | Name of the contact | | list | The item list ID that was selected | | reaction | Nothing, empty | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `hook` | string | Yes | "outgoing" always, for a new outgoing message. Always `outgoing`. | | `unique` | string | Yes | Unique ID for the outgoing message. Its acknowledges arrive with the same `unique`. Example: `HBgMOTcyNTAxMjM0NTY3FQIAEhgUOEY0QzE2N0E5RDNCMDA5RkQ1QjIA`. | | `from` | string | Yes | Your WhatsApp account. Example: `972771234567`. | | `to` | string | Yes | The end user WhatsApp account that received the message. Example: `972501234567`. | | `type` | string | Yes | Message type. One of: `text`, `image`, `audio`, `video`, `location`, `ptt`, `document`, `button`, `contacts`, `list`, `reaction`. Example: `text`. | | `body` | string | Yes | The content of the 'body' depends on the 'type' of the message: \| Type \| The data that will come \| \| --- \| --- \| \| text \| Outgoing text message \| \| image \| Link \| \| audio \| Link \| \| video \| Link \| \| location \| `lat,lng` \| \| ptt \| Link \| \| document \| Link \| \| button \| Button text \| \| contacts \| Phone number \| \| list \| The selection text \| \| reaction \| The emoji \| You must download the link files to your server: we delete all files within 7 days. Example: `Sure, we are open until 20:00`. | | `caption` | string | Yes | The content of the 'caption' depends on the 'type' of the message: \| Type \| The data that will come \| \| --- \| --- \| \| text \| Nothing, empty \| \| image \| Caption text with the image \| \| audio \| Nothing, empty \| \| video \| Caption text with the video \| \| location \| The name and address of the place (`name - address`), if any \| \| ptt \| Nothing, empty \| \| document \| Caption text with the document \| \| button \| Nothing, empty \| \| contacts \| Name of the contact \| \| list \| The item list ID that was selected \| \| reaction \| Nothing, empty \|. Example: ``. | | `isForwarded` | boolean | Yes | Shows if the outgoing message is forwarded — true or false. Example: `false`. | | `timestamp` | string | Yes | Time stamp of the outgoing message (Unix time, in seconds, as a string). Example: `1789900120`. | | `timestampMS` | integer | Yes | The sub-second part of the time we processed the message (in microseconds), in case you need it. Example: `102938`. | | `media` | boolean | Yes | If this message contains any media file, it will be true; otherwise false. Example: `false`. | | `quote` | boolean | Yes | If this message is a quoted message, it will be true; otherwise false. Example: `false`. | | `quoteUnique` | string \| boolean | Yes | In case the message is quoted (it means that the user replied to an incoming message), this will be the original message unique ID. If the message is not quoted, this will be false. Example: `false`. | ### Example: Text A message sent from the WhatsApp Business app on the phone, not through the API. ```json { "status": "OK", "hook": "outgoing", "unique": "HBgMOTcyNTAxMjM0NTY3FQIAEhgUOEY0QzE2N0E5RDNCMDA5RkQ1QjIA", "from": "972771234567", "to": "972501234567", "type": "text", "body": "Sure, we are open until 20:00", "caption": "", "isForwarded": false, "timestamp": "1789900120", "timestampMS": 102938, "media": false, "quote": false, "quoteUnique": false } ``` ## Responses ### 200 — Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored. ### default — Any other status, or no answer in time, counts as a failed delivery. With `retry` 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again. --- # Get Webhook Source: https://docs.99digital.co.il/whatsapp-api/webhook/get-webhook Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/get-webhook.md Section: WhatsApp API › Webhook `POST https://api.99digital.co.il/whatsapp/v2/getWebhook` Get Webhook allows you to see the webhook URL you have for incoming messages. The default is empty. It also shows your other webhook settings — the ones you set with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook): system messages, the phones for system alerts, retries and read status. **Settings:** | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getWebhook` | | Method | JSON via POST | | Header | Value | | --- | --- | | `apiKey` | Your API key for the service | **Body:** | Parameter | Description / Example | | --- | --- | | `from` | Your WhatsApp account. International number without `+`, for example: `972771234567`. | **Response:** ```json { "status": "OK", "url": "https://your-server.example.com/99digital/whatsapp-webhook", "system": 1, "systemPhoneAlert": "972502211234", "retry": 1, "readStatus": 1, "reason": 1 } ``` **Response explained:** | Parameter | Description | | --- | --- | | `status` | OK or FAIL | | `url` | Your webhook url. Empty when no webhook is set. | | `system` | System messages status: 1 — active, 0 — not active. | | `systemPhoneAlert` | List of phone numbers to receive system notifications via WhatsApp message, comma separated. `null` if you never set one, empty after you cleared it. | | `retry` | 0 if disabled, 1 if enabled. | | `readStatus` | 0 if disabled, 1 if enabled. | | `reason` | The status explanation — see below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or a JSON syntax error. | | 3 | Wrong apiKey, or your "from" number account does not exist. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | ### Example (generated from the schema) ```json { "from": "972771234567" } ``` ## 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`. | | `url` | string | (one of: OK) Your webhook url. Empty when no webhook is set. Example: `https://your-server.example.com/99digital/whatsapp-webhook`. | | `system` | integer | (one of: OK) System messages status. One of: `0` — Not active; `1` — Active. Example: `1`. | | `systemPhoneAlert` | string \| null | (one of: OK) List of phone numbers to receive system notifications via WhatsApp message, comma separated. `null` if you never set one, empty after you cleared it. Example: `972502211234,972527788695`. | | `retry` | integer | (one of: OK) The retry mechanism for webhook sending — see "Retry mechanism" on [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook). One of: `0` — Disabled; `1` — Enabled. Example: `1`. | | `readStatus` | integer | (one of: OK) Read status notification (the acknowledge webhooks). One of: `0` — Disabled; `1` — Enabled. Example: `1`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request failed; `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us. | #### Example: OK A webhook with every notification on. ```json { "status": "OK", "url": "https://your-server.example.com/99digital/whatsapp-webhook", "system": 1, "systemPhoneAlert": "972502211234,972527788695", "retry": 1, "readStatus": 1, "reason": 1 } ``` #### Example: No webhook The defaults — no webhook URL and every setting off. ```json { "status": "OK", "url": "", "system": 0, "systemPhoneAlert": null, "retry": 0, "readStatus": 0, "reason": 1 } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` --- # Get Templates Source: https://docs.99digital.co.il/whatsapp-api/templates/get-templates Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/templates/get-templates.md Section: WhatsApp API › Templates `POST https://api.99digital.co.il/whatsapp/v2/getTemplates` List all the templates in your WhatsApp account, with their language, category, status and content. Get Templates allows you to see all the templates you have in your account. Use a template's `name` to send it with [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template). ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getTemplates` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | ## Response The way that the response provides the information back is not the same as the way you submitted the template with [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template): the response shows each template as its parts — header, body, footer and buttons — the way WhatsApp stores them. ```json { "status": "OK", "list": [ { "name": "template_name", "language": "en_US", "category": 1, "status": "approved", "template": [ { "type": "HEADER", "format": "TEXT", "text": "hello {{1}}" }, { "type": "BODY", "text": "thank you for coming" }, { "type": "FOOTER", "text": "have a great day" } ] } ] } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | list | An array of information about your templates | | list->name | The name of the template, to use when you send a template message | | list->language | The language you chose, as WhatsApp writes it: `he` (Hebrew), `en_US` (English), `ar`, `ru`, `es`, `zh_CN`, `hi`, `th` or `fr` | | list->category | The template category — see the values below | | list->status | The template status — see the statuses below | | list->template | The parts of the template: `HEADER` (with its `format` — `TEXT`, `IMAGE`, `VIDEO` or `DOCUMENT` — and `text` for a text header), `BODY`, `FOOTER`, `BUTTONS` (with each button's `type`, `text`, and `url` or `phone_number`) and, for a carousel, `CAROUSEL` with its `cards` | | Value | Meaning | | --- | --- | | 1 | Utility template | | 2 | Marketing template | | 3 | Authentication template | | Status | Meaning | | --- | --- | | approved | Approved to use by Meta | | pending | Still under review | | rejected | Rejected by Meta. You must create a new one with a different name. | | paused | The template was approved before, but received spam reports, and therefore it is paused for 10 hours | | disabled | The template was approved before, but received massive spam reports for a period of time. This template is disabled and can't be used anymore. | WhatsApp may report other statuses as well. | reason | Description | | --- | --- | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | ### Example (generated from the schema) ```json { "from": "972771234567" } ``` ## 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 — your templates are listed in `list`. Always `OK`. | | `list` | array of object | (one of: OK) Information about each of your templates. | | `list[].name` | string | (one of: OK) The name of the template, to use when you send a template message. Example: `website_welcome`. | | `list[].language` | string | (one of: OK) The language you chose for the template, as WhatsApp writes it: `he` (Hebrew), `en_US` (English), `ar`, `ru`, `es`, `zh_CN`, `hi`, `th` or `fr`. Example: `en_US`. | | `list[].category` | integer | (one of: OK) The template category, as approved by WhatsApp. One of: `1` — Utility template; `2` — Marketing template; `3` — Authentication template. | | `list[].status` | string | (one of: OK) The template's status. WhatsApp may report other statuses as well. One of: `approved` — Approved to use by WhatsApp (Meta); `pending` — Still under review; `rejected` — Rejected by WhatsApp. You must create a new one with a different name; `paused` — The template was approved before, but received spam reports and therefore it is paused for 10 hours; `disabled` — The template was approved before, but received massive spam reports for a period of time. This template is disabled and can't be used anymore. | | `list[].template` | array of object | (one of: OK) The parts of the template: `HEADER` (with its `format` — `TEXT`, `IMAGE`, `VIDEO` or `DOCUMENT` — and `text` for a text header), `BODY`, `FOOTER`, `BUTTONS` (with each button's `type`, `text`, and `url` or `phone_number`) and, for a carousel, `CAROUSEL` with its `cards`. | | `list[].template[].type` | string | (one of: OK) The part — `HEADER`, `BODY`, `FOOTER`, `BUTTONS` or `CAROUSEL`. | | `list[].template[].format` | string | (one of: OK) For `HEADER`, its kind — `TEXT`, `IMAGE`, `VIDEO` or `DOCUMENT`. | | `list[].template[].text` | string | (one of: OK) The text of the part, with its `{{1}}` variables. | | `list[].template[].add_security_recommendation` | boolean | (one of: OK) For the `BODY` of an authentication template: whether WhatsApp adds its security recommendation (not to share the code) to the message. | | `list[].template[].code_expiration_minutes` | integer | (one of: OK) For the `FOOTER` of an authentication template: the number of minutes until the code expires, shown to the client. | | `list[].template[].buttons` | array of object | (one of: OK) For `BUTTONS`, the buttons. | | `list[].template[].buttons[].type` | string | (one of: OK) The kind of button, as WhatsApp writes it — for example `QUICK_REPLY`, `URL` (website), `PHONE_NUMBER`, `COPY_CODE` (coupon code) or `OTP` (authentication code). | | `list[].template[].buttons[].text` | string | (one of: OK) The text on the button. | | `list[].template[].buttons[].url` | string | (one of: OK) For a `URL` button: the website address. A dynamic website ends with `{{1}}`, which you fill in with `websiteVariable` when you send the template. | | `list[].template[].buttons[].phone_number` | string | (one of: OK) For a `PHONE_NUMBER` button, the phone number it calls. | | `list[].template[].buttons[].otp_type` | string | (one of: OK) For an `OTP` button: how the client gets the code — for example `COPY_CODE`, a button that copies it. | | `list[].template[].cards` | array of object | (one of: OK) For `CAROUSEL`: the cards, in order, each with its own `components` — its `HEADER` (image or video), `BODY` and `BUTTONS`. | | `list[].template[].cards[].components` | array of object | (one of: OK) The parts of this card, in the same form as the parts of the template. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us. | #### Example: OK A utility template with variables, a template with a document header and a website button that is still under review, and an authentication template. ```json { "status": "OK", "list": [ { "name": "postman_welcome_text", "language": "en_US", "category": 1, "status": "approved", "template": [ { "type": "BODY", "text": "Hi {{1}}, your order {{2}} was received. We will let you know when it ships." }, { "type": "FOOTER", "text": "Thank you for shopping with us" } ] }, { "name": "postman_invoice_pdf", "language": "en_US", "category": 1, "status": "pending", "template": [ { "type": "BODY", "text": "Dear {{1}}, your invoice for {{2}} is attached. The total amount is {{3}}. Thank you for your business." }, { "type": "HEADER", "format": "DOCUMENT" }, { "type": "BUTTONS", "buttons": [ { "type": "URL", "text": "Pay online", "url": "https://www.example.com/pay/{{1}}" } ] } ] }, { "name": "postman_login_code", "language": "en_US", "category": 3, "status": "approved", "template": [ { "type": "BODY", "add_security_recommendation": true }, { "type": "FOOTER", "code_expiration_minutes": 5 }, { "type": "BUTTONS", "buttons": [ { "type": "OTP", "otp_type": "COPY_CODE" } ] } ] } ] } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` --- # Create a Template Source: https://docs.99digital.co.il/whatsapp-api/templates/create-a-template Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/templates/create-a-template.md Section: WhatsApp API › Templates `POST https://api.99digital.co.il/whatsapp/v2/createTemplate` Submit a new WhatsApp template (utility, marketing, carousel or authentication) to WhatsApp (Meta) for approval. ## Explanation Template messages need to get approval by WhatsApp (Meta) before you can start using them. This API will guide you on submitting a new template. Every option below also has its own example tab under **Body**, with an explanation and a picture of the result. Once a template is approved, send it with [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template); check its status and final category with [Get Templates](https://docs.99digital.co.il/whatsapp-api/templates/get-templates). ## Create a Utility and Marketing template **(If you wish to create an authentication template, please scroll down to the last part of this page: "Create an Authentication template".)** ### Remarks - If the template body is too general, it will not be approved. - You can use variables in this way: `{{1}}` and `{{2}}` and so on (up to 10 variables). You set these variables later, when you send the template to your clients. - A variable can be used only once inside the body. It means that if you used `{{1}}` somewhere in your body, you should not use `{{1}}` again. - You must have a reasonable number of variables compared to the rest of the text. Usually, for every variable you need at least 3 words in your body. For example: if you have 5 variables, make sure the rest of the body has at least 15 words. - It usually takes up to 1 hour for a template to change its status to approved or rejected. You can't edit a rejected template; you must submit a new one with a new name. New accounts might get approved within 24 hours for their first template submissions. - The template name must be unique. If you delete a template, you can't use the same name for 30 days. - The template name must be lower case, English letters and numbers only. No spaces. - A template can contain more than just text. It can also have an image, a document or a video as part of the template. - You can have up to 6000 templates in your account. - A template can contain buttons for quick actions. You can have website / call / coupon / quick reply buttons, under these limitations: - A template can have a maximum of 10 buttons of all kinds. - You can have a maximum of 1 'Call' button. - You can have a maximum of 2 'Website' buttons. - You can have a maximum of 10 'Quick reply' buttons. - You can have a maximum of 1 'Coupon' button. - Quick reply buttons are buttons that, when the end user clicks on them, send you the text and the ID of the button. They must not contain variables, new lines, emoji or any design symbols. - A call button makes a phone call from the user's mobile phone to the number you requested. - Website buttons open a website link: a static link (fixed) or a dynamic link (with a variable). - A coupon button holds a code: when the user clicks on the button, the code is copied to their clipboard. - If you wish to create a template that you will not be able to delete afterwards (an important template you wish to protect against accidental deletion), use this as the start of the template name: `reserved_`. - The body of the template can't start with a variable and can't end with a variable. - A template that is created and not used even once for 12 months will automatically be deleted by Meta. You will get a delete webhook notification. - A carousel template must have between 2 and 10 cards, the header must be an image or a video, and each card can have up to 2 buttons. This template will be in the Marketing category. All cards must look the same (body, button types, variables). The card fields carry the card's number: `carouselCard1_…` for card 1, `carouselCard2_…` for card 2, up to `carouselCard10_…`; number the cards from 1 without gaps. ### Endpoint | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/createTemplate` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ### Template setup Each template needs to have a name and a language. | Content | Explanation | Mandatory | Example | Limit (characters) | | --- | --- | --- | --- | --- | | name | Name for your template, without spaces (use an underscore instead), lower case, English only. The template name must be unique. | yes | website_login_new_client | 512 | | language | The language of the template: the code to use, from the table below. | yes | 1 | | | Language name | Code to use | | --- | --- | | Hebrew | 1 | | English | 2 | | Arabic | 3 | | Russian | 4 | | Spanish | 5 | | Chinese | 6 | | Hindi | 7 | | Thai | 8 | | French | 9 | ### Template structure Each template contains 4 parts: - header (media is optional). - body (mandatory). - footer (optional). - buttons (optional). | Content | Explanation | Mandatory | Number of variables allowed | Example | Limit (characters) | | --- | --- | --- | --- | --- | --- | | header | Header allows you to choose media to be sent as part of the template:
1 - no media
2 - image
3 - video
4 - document
5 - carousel
WhatsApp reviews the template with a sample file that we provide; you send the real file each time you send the template. | yes | 0 | 1 | 1 | | body | Your template message goes here.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough
`{{1}}` - `{{10}}` for variables | yes | 10 | `Hello {{1}}, and welcome to our website! Thank you for buying {{2}}. Your order will be shipped on {{3}}.` | 1024 for the total body content, including the variables' data when sending the template (600 with a coupon code button) | | bodyVariableSample1-10 | For any given variable you used in `body`, you can provide a sample text, for example:
for `{{1}}` use `bodyVariableSample1`
for `{{2}}` use `bodyVariableSample2`
and so on.
WhatsApp reviews the template with these samples. | No, but if not provided, a variable sample will be generated for you automatically | 0 | This is a sample text | 500 | | footer | Any footer you want to add.
No emoji, no variables.
A footer does not work with a carousel header. | no | 0 | This is footer, optional | 60 | | buttons | 1 - No buttons
2 - for "call to action" only
3 - for "quick reply" only
4 - both call to action and quick reply combination | yes, you must select 1/2/3/4 (not needed for a carousel, `header` 5) | see below | see below | 1 | | carouselMedia | Only relevant if `header` is set to 5. You must choose the carousel cards: either an image for all cards, or a video for all cards.
1 - image cards
2 - video cards | yes, if `header` = 5 | 0 | 1 | 1 | | carouselButtons | Only relevant if `header` is set to 5. The buttons setup (the same on every card):
1 - one website only
2 - one quick reply only
3 - two quick replies only
4 - website + quick reply
5 - phone + website
6 - phone + quick reply only | yes, if `header` = 5 | 0 | 3 | 1 | For the `body` part, you can also use the following markups: ![WhatsApp text formatting: *bold*, _italic_, ~strikethrough~ and \`\`\`monospace\`\`\`](https://storage.99digital.online/docs/template1.png) ### Buttons setup If you wish to use buttons, you need to choose between "call to action" or "quick reply", or use both. - Call to action is a button that triggers an action. There are two types: url (which opens a website in the phone's browser) and call (which makes a regular phone call to a number). You can use up to 1 call button and 2 website buttons in your template. - Quick reply is a button that the user clicks, and it returns a webhook about the button text that was clicked. For example, a button named "sales" will return to your webhook URL a reply saying that "sales" was clicked, so you can build your flow scenario according to that. You can have up to 10 buttons of the quick reply type. - Remember! A total of 10 buttons is allowed from the two kinds. | Content | Explain | Option to select | Mandatory | Number of variables allowed | Example | Limit (characters) | | --- | --- | --- | --- | --- | --- | --- | | callToAction | Here you can choose how you want to set up the call to action | 1 - One website button only
2 - Call button only
3 - One website + Call button
4 - Two websites + Call button
5 - Two websites only | only if you selected "2" or "4" in `buttons` | - | 3 | 1 | | callToActionWebsiteText | First website text to show | Text to show for the link | only if you used `callToAction` option 1 / 3 / 4 / 5 | 0 | Click here for my website | 20 | | callToActionWebsiteType | First website link type | 1 - for a static URL (meaning, no variable)
2 - for a dynamic URL, with one variable automatically added at the end of the URL | only if you used `callToAction` option 1 / 3 / 4 / 5 | 0 | 1 | 1 | | callToActionWebsiteURL | First website link URL | The link to your website. You cannot use WhatsApp groups, WhatsApp URLs for opening a conversation, and cannot use short URL services such as bitly. | only if you used `callToAction` option 1 / 3 / 4 / 5 | In case you choose "2" in `callToActionWebsiteType`, the variable will be automatically put at the end. For example: `https://www.amazon.com/{{1}}`, so when you send the template, you can provide what the `{{1}}` will be. Write the URL without the variable: it is added for you. | `https://www.google.com/` | 2000 | | callToActionWebsiteText2 | Second website text to show, in case you want to use a second website button | Text to show for the link | only if you used `callToAction` option 4 / 5 | 0 | Click here for my second website | 20 | | callToActionWebsiteType2 | Second website link type | 1 - for a static URL (meaning, no variable)
2 - for a dynamic URL, with one variable automatically added at the end of the URL | only if you used `callToAction` option 4 / 5 | 0 | 1 | 1 | | callToActionWebsiteURL2 | Second website link URL | The link to your website. You cannot use WhatsApp groups, WhatsApp URLs for opening a conversation, and cannot use short URL services such as bitly. | only if you used `callToAction` option 4 / 5 | In case you choose "2" in `callToActionWebsiteType2`, the variable will be automatically put at the end. For example: `https://www.amazon.com/{{1}}`, so when you send the template, you can provide what the `{{1}}` will be. Write the URL without the variable: it is added for you. | `https://www.amazon.com/` | 2000 | | callToActionCallText | The button text for the call | The text to show for the dial button | only if you used `callToAction` option 2 / 3 / 4 | 0 | Click here to call me | 20 | | callToActionCallNumber | The number to dial. The number is fixed. | The number to dial, with the country code and `+` | only if you used `callToAction` option 2 / 3 / 4 | 0 | `+972501234567` | 20 | | useCoupon | A coupon button is another type of "call to action" and can be added to any of the `callToAction` options 1/3/4/5. When using a coupon button, the end user receives a "copy code" coupon message that can have an expiration time.
If a coupon code button is used, please notice the following limitations:
- the `body` parameter can only have 600 characters;
- the `header` can only be none/image/video, not a document;
- at least one website URL is required;
- a footer can't be used;
- only mobile phones using WhatsApp can see this template, not WhatsApp Web. | 0 to disable
1 to enable
(send it as a number, not as text) | no. Default is 0. | 0 | 1 | 1 | | couponTitle | The title of the coupon code, which will be presented next to the code in the template. | Text to show for the coupon title | only if `useCoupon` is set to 1 | 0 | Special offer! | 16 | | couponExpiration | In case you want to use a time limit for the coupon button. You will provide the expiration time when sending the template, and the template shows the timer. | 0 - to have a coupon without a time limit
1 - to limit the time to use the coupon
(send it as a number, not as text) | only if `useCoupon` is set to 1 | 0 | 1 | 1 | | quickReply1-10 | The quick reply buttons, up to 10 buttons | Provide the quick reply buttons as parameters (`quickReply1`, `quickReply2`, etc.) | only if you selected the `buttons` parameter as 3 or 4 | 0 | "customer service"
"sales"
"support" | 25 | | carouselCardX_body | In case the header is a carousel, this is the body of card number X, where X is from 1 to 10 | The body text of the specific carousel card, with up to 2 new lines | No, but it's all or none: if you choose to have a body for one card, all of them must have one. | 1 (only `{{1}}`) | Here is my first product, named: `{{1}}`. Click to buy | 160 | | carouselCardX_var | In case the body of card X has the variable `{{1}}`, where X can be between 1 and 10 | A sample text for that `{{1}}`, which WhatsApp reviews the template with | No, but if not provided, a sample will be generated for you automatically. Send it only if the card body has `{{1}}`. | 0 | Leather wallet | 160 | | carouselCardX_websiteText | In case `carouselButtons` is set to 1/4/5, where X can be between 1 and 10 | Text to show for the website button | only if `carouselButtons` is 1/4/5 | 0 | Click here | 25 | | carouselCardX_websiteType | In case `carouselButtons` is set to 1/4/5, where X can be between 1 and 10 | 1 - for a static website URL
2 - for a dynamic URL, with a variable at the end
The same type on all cards. | only if `carouselButtons` is 1/4/5 | 1 | 1 | 1 | | carouselCardX_websiteURL | In case `carouselButtons` is set to 1/4/5, where X can be between 1 and 10 | This is the website URL; you can use a variable that will be added at the end. | only if `carouselButtons` is 1/4/5 | In case you choose "2" in `carouselCardX_websiteType`, the variable will be automatically put at the end. For example: `https://www.amazon.com/{{1}}`, so when you send the template, you can provide what the `{{1}}` will be. | `https://www.amazon.com/` | 2000 | | carouselCardX_quickReply1 | In case `carouselButtons` is set to 2/3/4/6, where X can be between 1 and 10 | This is the first quick reply button | only if `carouselButtons` is 2/3/4/6 | 0 | Click Here | 25 | | carouselCardX_quickReply2 | In case `carouselButtons` is set to 3, where X can be between 1 and 10 | This is the second quick reply button | only if `carouselButtons` is 3 | 0 | Click here 2 | 25 | | carouselCardX_callText | In case `carouselButtons` is set to 5/6, where X can be between 1 and 10 | This is the button text for the phone call | only if `carouselButtons` is 5/6 | 0 | Call now | 25 | | carouselCardX_callNumber | In case `carouselButtons` is set to 5/6, where X can be between 1 and 10 | This is the phone number, with the country code and `+` | only if `carouselButtons` is 5/6, and `carouselCardX_callText` is provided | 0 | `+972501234567` | 20 | ### Full Request | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | | name | Any name for the template; it cannot be used twice | | language | 1-9 | | header | 2 for image | | body | Your template + variables go here.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough
`{{1}}` for variable 1
`{{2}}` for variable 2
and so on (maximum 10 variables) | | footer | Footer text | | buttons | 3 for quick reply | | callToAction | Everything that is relevant to buttons (phone calls, website(s), coupon code) | | quickReply1-10 | Any text goes here | ### Full example 1 Here is an example of a full template request. The template is in English. The template contains: - no header; - a body with 6 variables; - no footer; - 2 websites and 1 call button; - 5 buttons of "quick reply". ```json { "from": "972771234567", "name": "website_welcome", "language": 2, "header": 1, "body": "*Hello {{1}}* and thank you for joining our exclusive website store!\nOur company has many secrets to discover.\nFor future connection, we received your phone number: {{2}} and your email address: {{3}}.\nYou can find shirts, hats, shoes and gloves at discounted prices. Hold on, wait a minute, i found something interesting! just for this week we offer: {{4}} at discounted price: {{5}} only when you buy it online or in-store shop at: {{6}}.\nWhat would you like to discover?", "buttons": 4, "callToAction": 4, "callToActionWebsiteText": "Our Website", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://www.example.com", "callToActionWebsiteText2": "Our second website", "callToActionWebsiteType2": 1, "callToActionWebsiteURL2": "https://www.example-second-website.com", "callToActionCallText": "Click to call us", "callToActionCallNumber": "+972522222222", "quickReply1": "Shirts", "quickReply2": "Hats", "quickReply3": "Shoes", "quickReply4": "Gloves", "quickReply5": "Something else" } ``` The template submission will look like this: ![The template: the welcome text, two website buttons, a call button and five quick reply buttons](https://storage.99digital.online/docs/template2.png) When you send the template to your client, you need to fill `{{1}}`, `{{2}}`, `{{3}}`, `{{4}}`, `{{5}}` and `{{6}}`. ### Full example 2 Here is a sample of a full template request: an appointment update template, in English. The template contains: - an image header; - a body with 2 variables; - a footer; - buttons: call to action (one website + one call button). ```json { "from": "972771234567", "name": "friday_appointment_reminder", "language": 2, "header": 2, "body": "*Hello {{1}}* we would like to remind you of the appointment you have with us on {{2}}.\nPlease arrive with your ID card.", "footer": "Our address: 51D street.", "buttons": 2, "callToAction": 3, "callToActionWebsiteText": "Click for navigation", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://waze.com/ul", "callToActionCallText": "Call Us", "callToActionCallNumber": "+972779111111" } ``` The template submission will look like this: ![The template: an image, the reminder text, the footer, and "Click for navigation" and "Call Us" buttons](https://storage.99digital.online/docs/template3.png) ### Full example 3 Here is a sample of a full template request: a payment update template, in English. The template contains: - a document header; - a body with 2 variables; - no footer; - buttons: call to action (dynamic website). ```json { "from": "972771234567", "name": "payment_reminder_1", "language": 2, "header": 4, "body": "*Dear {{1}}*\nYour invoice for December 2021 is attached. Total amount is {{2}} USD.\nPlease pay as soon as you can.\nThe invoice is due in a week. 💳", "buttons": 2, "callToAction": 1, "callToActionWebsiteText": "Click to pay", "callToActionWebsiteType": 2, "callToActionWebsiteURL": "https://paypal.com/" } ``` The template submission will look like this: ![The template: a document, the payment text, and a "Click to pay" button](https://storage.99digital.online/docs/template4.png) ### Full example 4 Here is a sample of a full template request: a transportation update template, in English. The template contains: - no header; - a body with no variables; - a footer; - no buttons. ```json { "from": "972771234567", "name": "the_bus_is_coming", "language": 2, "header": 1, "body": "*Dear NetBus user*\nYour bus is on its way.\nStay sharp. 🚍🚍🚍🚍", "footer": "The wheels on the bus go round and round", "buttons": 1 } ``` The template submission will look like this: ![The template: a bold title, two lines of text with bus emoji, and a footer](https://storage.99digital.online/docs/template5.png) ### Full example 5 Here is a sample of a full template request in English: a weekend sale with a coupon code. The template contains: - no header; - a body with 2 variables; - 1 website button (static website); - 1 phone button; - 1 coupon code button with an expiration time. ```json { "from": "972771234567", "name": "weekend_sale", "language": 2, "header": 1, "body": "*Hello {{1}}*\nWe value our VIP clients very much and would like to offer you {{2}} off for the weekend sale only!", "buttons": 2, "callToAction": 3, "callToActionWebsiteText": "Click here for more", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://www.amazon.com/store/", "callToActionCallText": "Call Us", "callToActionCallNumber": "+972501122334", "useCoupon": 1, "couponTitle": "Weekend Sale!", "couponExpiration": 1 } ``` The template submission will look like this: ![The template: the sale text, the "Weekend Sale!" offer with a timer, and "Copy offer code", website and call buttons](https://storage.99digital.online/docs/template6.png) (The "Copy offer code" text is fixed and can't be changed; each template language shows the relevant translation. When the user clicks on it, it copies the code. When you send the template, the expiration shows the relevant timer.) ### Response ```json { "status": "OK", "name": "template name", "timestamp": 1710861707, "body": "The body text you wrote", "category": 1, "reason": 1 } ``` ### Full example 6 Here is a sample of a full carousel template, in English: - image cards; - 3 cards; - each card has 1 static website button and 1 quick reply button. This is how it will look like; the client can switch between the 3 cards provided: ![A carousel template: the message, then image cards side by side, each with a website and a quick reply button](https://storage.99digital.online/docs/carousel_template.png) ```json { "from": "972771234567", "name": "carousel_1", "language": 2, "header": 5, "carouselMedia": 1, "carouselButtons": 4, "body": "Hello! See all my cards below", "carouselCard1_body": "Card 1 body text", "carouselCard1_websiteText": "My website", "carouselCard1_websiteType": 1, "carouselCard1_websiteURL": "https://www.amazon.com", "carouselCard1_quickReply1": "Contact us", "carouselCard2_body": "Card 2 body text", "carouselCard2_websiteText": "My website 2", "carouselCard2_websiteType": 1, "carouselCard2_websiteURL": "https://www.google.com", "carouselCard2_quickReply1": "Contact us 2", "carouselCard3_body": "Card 3 body text", "carouselCard3_websiteText": "My website 3", "carouselCard3_websiteType": 1, "carouselCard3_websiteURL": "https://www.wikipedia.com", "carouselCard3_quickReply1": "Contact us 3" } ``` ### Response ```json { "status": "OK", "name": "carousel_1", "timestamp": 1788784106, "body": "Hello! See all my cards below", "category": 2, "reason": 1 } ``` ### Response-Explain | Parameter | Description | | --- | --- | | status | `OK` (template submitted to Meta) or `FAIL` (template error) | | name | The template name you submitted | | timestamp | The timestamp (Unix time, in seconds) | | body | The body message you submitted | | category | The category of the template, temporarily — see the values below | | reason | The status explanation — see the table below | | Value | Meaning | | --- | --- | | 1 | Utility template | | 2 | Marketing template | The reason it's "temporarily" is that until the template is approved, the category can be changed by Meta. The final and actual category is determined when the template is approved, and can be obtained with the [Get Templates](https://docs.99digital.co.il/whatsapp-api/templates/get-templates) API. | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `name` is either empty / too long / invalid / already exists in your account | | 5 | `language` code is incorrect | | 6 | `header` code is incorrect (with a coupon code button, the header can't be a document) | | 7 | The `body` has one of the following issues:
- it has more than 10 variables;
- the text is too long;
- the same variable appears more than once;
- there are only parameters and no regular text;
- the body can't have more than two consecutive new lines (`\n\n\n`) together. | | 8 | `footer` is too long or incorrect (a coupon code template can't have a footer) | | 9 | `buttons` is missing or not 1/2/3/4 (2 or 4 with a coupon code button) | | 10 | You used call to action / quick reply buttons, but didn't provide a correct `callToAction` code or a quick reply button | | 11 | `callToActionWebsiteText` is invalid / too long | | 12 | `callToActionWebsiteType` must be 1/2 | | 13 | `callToActionWebsiteURL` is invalid / too long (write it without the variable: it is added for you) | | 14 | `callToActionCallText` is invalid / too long | | 15 | `callToActionCallNumber` is invalid / too long | | 16 | You used quick reply buttons, but did not provide any buttons | | 17 | You used more than 10 buttons | | 18 | The number of `bodyVariableSample` fields you provided does not match the number of variables in `body`; the body variables must be numbered in order, from `{{1}}` and without gaps | | 19 | WhatsApp rejected the header's sample file. Please try again or contact support. | | 20 | A dynamic website button (`callToActionWebsiteType` or `callToActionWebsiteType2` set to 2) needs its `callToActionWebsiteURL` / `callToActionWebsiteURL2` | | 21 | The quick reply button(s) are too long | | 22 | The template contains too many variables compared to the length of the rest of the text. Decrease the number of variables or increase the body length. | | 23 | `callToActionWebsiteText2` is invalid / too long, or two buttons are the same | | 24 | `callToActionWebsiteType2` must be 1/2 | | 25 | `callToActionWebsiteURL2` is invalid / too long | | 26 | `couponTitle` is required / too long / wrong | | 27 | `couponExpiration` is invalid (it must be the number 0 or 1) | | 30 | Unknown error, please check your syntax | | 31 | Quick reply buttons must not contain any emoji | | 32 | The template content is an authentication template; please change your syntax to match | | 33 | Unable to create this kind of template, please contact support for more information | | 35 | Permission denied to create templates, please contact our support | | 36 | `carouselMedia` is missing or invalid | | 37 | Wrong number of cards for `carouselCardX` (a carousel has 2 to 10 cards, numbered from 1 without gaps) | | 38 | `carouselCardX_body` is invalid (X can be 1 to 10) | | 39 | `carouselButtons` is missing or invalid | | 40 | A card variable is invalid: a card body can have one variable, `{{1}}`, on all the cards or none, and its sample (`carouselCardX_var`) can be up to 160 characters | | 41 | `carouselCardX_websiteText` / `_websiteType` / `_websiteURL` is invalid or wrong | | 42 | `carouselCardX_quickReply1` / `_quickReply2` is invalid or wrong | | 43 | `carouselCardX_callText` / `_callNumber` is invalid or wrong | ## Create an Authentication template An authentication code template is a different kind of template you can create. It is still a template, but it is different from the regular template creation, and it doesn't contain the normal structure: header, body, footer, buttons. An authentication code template is an OTP — a one-time password code that you can send to your clients over WhatsApp. It looks like this: ![An authentication template: the code, the security text, the expiration notice and a Copy code button](https://storage.99digital.online/docs/template7.png) ### Remarks - The template text is fixed and can't be changed (per language). - The "Copy code" button is fixed and can't be changed (per language). - The template will have "copy code", which copies the code from WhatsApp for easy usage. - You can only create an authentication template if your daily limit is 1000 or more. - When you send it, the authentication template can only be seen on a mobile phone. If your client uses WhatsApp Web, the template message with the code will not be visible to them. - You send the code itself with each message, with [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template), in its `otp` field. ### Endpoint (same as regular template creation) | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/createTemplate` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ### Body Each template needs to have a name and a language. | Content | Explanation | Mandatory | Example | Limit (characters) | Explanation | | --- | --- | --- | --- | --- | --- | | from | Your WhatsApp account number. International number without `+`. | yes | 972771234567 | | | | name | Name for your template, without spaces (use an underscore instead), lower case, English only. The template name must be unique. | yes | login_code | 512 | | | language | The language of the template: the code to use, from the table below. | yes | 1 | | The fixed text of the template is in this language. | | authentication | 1 (fixed, always) | yes | 1 | 1 | This is for our system to know you are building an authentication template | | add_security_text | 0 - no security message
1 - with security message
(default is 0) | no | 1 | 1 | This is a fixed text along with your code. As in the above screenshot, the text "For your security, do not share this code." will be added (based on your template language). | | code_expiration | 0-90 minutes for code expiration
(default is 0 - no expiration) | no | 5 | 2 | If you wish your code to expire, you can provide the code expiration in minutes, between 1 and 90. When the time is up, the "Copy code" button will not be available, and the text "the code has expired" will be shown instead. | | 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", "name": "template name", "timestamp": 1710861707, "category": 3, "reason": 1 } ``` ### Response-Explain | Parameter | Description | | --- | --- | | status | `OK` (template submitted to Meta) or `FAIL` (template error) | | name | The template name you submitted | | timestamp | The timestamp (Unix time, in seconds) | | category | The category of the template — see the values below | | reason | The status explanation — see the table below | | Value | Meaning | | --- | --- | | 3 | Authentication template | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `name` is either empty / too long / invalid / already exists in your account | | 5 | `language` code is incorrect | | 30 | Unknown error, please check your syntax | | 33 | `add_security_text` is wrong or invalid, or WhatsApp is unable to create this kind of template (please contact support) | | 34 | `code_expiration` is wrong, invalid or not in range (0 to 90) | | 35 | Permission denied to create templates, please contact our support | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | (one of: Utility or marketing) Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `name` | string | Yes | (one of: Utility or marketing) Name for your template, without spaces (use an underscore instead), lower case, English only. The template name must be unique. Max length: 512. Example: `website_login_new_client`. | | `language` | integer | Yes | (one of: Utility or marketing) The language of the template — the code to use. One of: `1` — Hebrew; `2` — English; `3` — Arabic; `4` — Russian; `5` — Spanish; `6` — Chinese; `7` — Hindi; `8` — Thai; `9` — French. Example: `2`. | | `header` | integer | Yes | (one of: Utility or marketing) Header allows you to choose media to be sent as part of the template. WhatsApp reviews it with a sample file we provide; you send the real file with each template. One of: `1` — No media; `2` — Image; `3` — Video; `4` — Document; `5` — Carousel — set `carouselMedia`, `carouselButtons` and the cards. Example: `1`. | | `body` | string | Yes | (one of: Utility or marketing) Your template message goes here. Use `\n` for a new line, `*text*` for bold, `_text_` for italic, `~text~` for strikethrough, and `{{1}}` to `{{10}}` for variables. The limit of 1024 characters is for the total body, including the variables' data when sending the template (600 with a coupon code). Max length: 1024. Example: `Hello {{1}}, and welcome to our website! Thank you for buying {{2}}. Your order will be shipped on {{3}}.`. | | `bodyVariableSample1` | string | No | (one of: Utility or marketing) For any variable you used in `body`, you can provide a sample text: `bodyVariableSample1` for `{{1}}`, `bodyVariableSample2` for `{{2}}` and so on. WhatsApp reviews the template with the samples. If not provided, a sample is generated for you. Max length: 500. Example: `This is a sample text`. | | `footer` | string | No | (one of: Utility or marketing) Any footer you want to add. No emoji, no variables. Not for a carousel or a coupon code template. Max length: 60. Example: `This is footer, optional`. | | `buttons` | integer | No | (one of: Utility or marketing) The buttons of the template. If you wish to use buttons, choose between "call to action" or "quick reply", or use both (a total of 10 buttons is allowed from the two kinds). You must select 1, 2, 3 or 4 — except for a carousel (`header` 5), whose buttons are set with `carouselButtons`. One of: `1` — No buttons; `2` — Call to action only — set `callToAction`; `3` — Quick reply only — set `quickReply1` and on; `4` — Both call to action and quick reply. Example: `1`. | | `callToAction` | integer | No | (one of: Utility or marketing) Required if `buttons` is 2 or 4: how you want to set up the call to action buttons. One of: `1` — One website button only; `2` — Call button only; `3` — One website + call button; `4` — Two websites + call button; `5` — Two websites only. Example: `3`. | | `callToActionWebsiteText` | string | No | (one of: Utility or marketing) The text of the first website button — the text to show for the link. No variables. Required with `callToAction` 1, 3, 4 and 5. Max length: 20. Example: `Click here for my website`. | | `callToActionWebsiteType` | integer | No | (one of: Utility or marketing) The first website link type. Required with `callToAction` 1, 3, 4 and 5. One of: `1` — Static URL (no variable); `2` — Dynamic — one variable is automatically added at the end of the URL. Example: `1`. | | `callToActionWebsiteURL` | string | No | (one of: Utility or marketing) The link of the first website button — the link to your website. Required with `callToAction` 1, 3, 4 and 5. You can't use WhatsApp groups, WhatsApp links for opening a conversation, or short URL services such as bitly. For a dynamic link (`callToActionWebsiteType` 2), write it without the variable: it is added at the end automatically — `https://www.amazon.com/` becomes `https://www.amazon.com/{{1}}`, and you provide the `{{1}}` when you send the template. Max length: 2000. Example: `https://www.google.com/`. | | `callToActionWebsiteText2` | string | No | (one of: Utility or marketing) The text of the second website button, in case you want to use a second website button. No variables. Required with `callToAction` 4 and 5. Max length: 20. Example: `Click here for my second website`. | | `callToActionWebsiteType2` | integer | No | (one of: Utility or marketing) The second website link type. Required with `callToAction` 4 and 5. One of: `1` — Static URL (no variable); `2` — Dynamic — one variable is automatically added at the end of the URL. Example: `1`. | | `callToActionWebsiteURL2` | string | No | (one of: Utility or marketing) The link of the second website button. Required with `callToAction` 4 and 5. The same rules as `callToActionWebsiteURL`: no WhatsApp groups, WhatsApp links for opening a conversation or short URL services such as bitly. For a dynamic link (`callToActionWebsiteType2` 2), write it without the variable: it is added at the end automatically (`https://www.amazon.com/{{1}}`), and you provide the `{{1}}` when you send the template. Max length: 2000. Example: `https://www.amazon.com/`. | | `callToActionCallText` | string | No | (one of: Utility or marketing) The text of the call button — the text to show for the dial button. No variables. Required with `callToAction` 2, 3 and 4. Max length: 20. Example: `Click here to call me`. | | `callToActionCallNumber` | string | No | (one of: Utility or marketing) The number the call button dials — a fixed number, with the country code and `+`. Required with `callToAction` 2, 3 and 4. Max length: 20. Example: `+972501234567`. | | `useCoupon` | integer | No | (one of: Utility or marketing) Adds a coupon code button — another type of call to action — to the `callToAction` options 1, 3, 4 or 5. The client gets a "copy code" coupon message, and the code can have an expiration time. If a coupon code button is used: the body can only have 600 characters; the header can only be none, image or video, not a document; at least one website URL is required; a footer can't be used; and only mobile phones using WhatsApp can see this template, not WhatsApp Web. Send it as the number `1`, not the text `"1"`. One of: `0` — No coupon button; `1` — A coupon code button. Default: `0`. | | `couponTitle` | string | No | (one of: Utility or marketing) Required with `useCoupon` 1: the title of the coupon code, shown next to the code in the template. No variables. Max length: 16. Example: `Special offer!`. | | `couponExpiration` | integer | No | (one of: Utility or marketing) With `useCoupon` 1: whether the coupon has a time limit. If it does, you provide the expiration time when sending the template, and the template shows the timer. Send it as a number. One of: `0` — A coupon without a time limit; `1` — A coupon with a time limit. | | `quickReply1` | string | No | (one of: Utility or marketing) The quick reply buttons, up to 10: `quickReply1`, `quickReply2` and so on. Required if `buttons` is 3 or 4. When the client clicks one, your webhook gets the button's text and ID. A quick reply must not contain variables, new lines, emoji or any design symbols. Max length: 25. Example: `Customer service`. | | `carouselMedia` | integer | No | (one of: Utility or marketing) Required if `header` is 5: the media of the cards — images for all cards, or videos for all cards. One of: `1` — Image cards; `2` — Video cards. | | `carouselButtons` | integer | No | (one of: Utility or marketing) Required if `header` is 5 — the buttons of every card. One of: `1` — One website only; `2` — One quick reply only; `3` — Two quick replies only; `4` — Website + quick reply; `5` — Phone + website; `6` — Phone + quick reply. | | `carouselCard1_body` | string | No | (one of: Utility or marketing) In case the header is a carousel (`header` 5): the text of card 1, with up to 2 new lines and one variable, `{{1}}`. Optional, but all or none: if one card has a text, all of them must. Max length: 160. Example: `Here is my first product, named: {{1}}. Click to buy`. | | `carouselCard1_var` | string | No | (one of: Utility or marketing) A sample for the `{{1}}` of card 1's text, for WhatsApp's review. If not provided, a sample is generated for you. Max length: 160. Example: `Leather wallet`. | | `carouselCard1_websiteText` | string | No | (one of: Utility or marketing) With `carouselButtons` 1, 4 or 5 — the text of card 1's website button. No variables. Max length: 25. Example: `Click here`. | | `carouselCard1_websiteType` | integer | No | (one of: Utility or marketing) With `carouselButtons` 1, 4 or 5 — the website link type, the same for all cards. One of: `1` — Static URL; `2` — Dynamic — a variable is added at the end. | | `carouselCard1_websiteURL` | string | No | (one of: Utility or marketing) With `carouselButtons` 1, 4 or 5 — the website URL of card 1. For a dynamic link the variable is added at the end automatically (`https://www.amazon.com/{{1}}`), and you provide it when you send the template. Max length: 2000. Example: `https://www.amazon.com/`. | | `carouselCard1_quickReply1` | string | No | (one of: Utility or marketing) With `carouselButtons` 2, 3, 4 or 6 — the first quick reply button of card 1. No variables. Max length: 25. Example: `Click here`. | | `carouselCard1_quickReply2` | string | No | (one of: Utility or marketing) With `carouselButtons` 3 — the second quick reply button of card 1. No variables. Max length: 25. Example: `Click here 2`. | | `carouselCard1_callText` | string | No | (one of: Utility or marketing) With `carouselButtons` 5 or 6 — the text of card 1's call button. No variables. Max length: 25. Example: `Call now`. | | `carouselCard1_callNumber` | string | No | (one of: Utility or marketing) With `carouselButtons` 5 or 6, and `carouselCard1_callText` provided — the phone number card 1's call button dials, with the country code and `+`. Max length: 20. Example: `+972501234567`. | | `from` | string | Yes | (one of: Authentication) Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `name` | string | Yes | (one of: Authentication) Name for your template, without spaces (use an underscore instead), lower case, English only. The template name must be unique. Max length: 512. Example: `login_code`. | | `language` | integer | Yes | (one of: Authentication) The language of the template — the code to use. The fixed text of the authentication template is in this language. One of: `1` — Hebrew; `2` — English; `3` — Arabic; `4` — Russian; `5` — Spanish; `6` — Chinese; `7` — Hindi; `8` — Thai; `9` — French. Example: `2`. | | `authentication` | integer | Yes | (one of: Authentication) Always 1. This is how our system knows you are building an authentication template. Always `1`. | | `add_security_text` | integer | No | (one of: Authentication) A fixed text added to your code: "For your security, do not share this code." (in your template's language), as in the picture above. One of: `0` — No security message; `1` — With the security message. Default: `0`. | | `code_expiration` | integer | No | (one of: Authentication) If you wish your code to expire: the code expiration in minutes, between 1 and 90 (0 — no expiration). When the time is up, the "Copy code" button is no longer available, and the text "the code has expired" is shown instead. Default: `0`. Minimum: 0. Maximum: 90. Example: `5`. | ### Example: Text only A transportation update template, in English. The template contains: - no header; - a body with no variables; - a footer; - no buttons. The template submission will look like this: ![The template: a bold title, two lines of text with bus emoji, and a footer](https://storage.99digital.online/docs/template5.png) ```json { "from": "972771234567", "name": "the_bus_is_coming", "language": 2, "header": 1, "body": "*Dear NetBus user*\nYour bus is on its way.\nStay sharp. 🚍🚍🚍🚍", "footer": "The wheels on the bus go round and round", "buttons": 1 } ``` ### Example: Variables with samples An order update with 2 variables, each with a sample for WhatsApp's review. `bodyVariableSample1` is a sample for `{{1}}` and `bodyVariableSample2` for `{{2}}`. WhatsApp reviews the template with these samples; without them, samples are generated for you. You provide the real values when you send the template (`bodyVariable1`, `bodyVariable2`). ```json { "from": "972771234567", "name": "order_received", "language": 2, "header": 1, "body": "Hi {{1}}, your order {{2}} was received. We will let you know when it ships.", "bodyVariableSample1": "Dana", "bodyVariableSample2": "4711", "footer": "Thank you for shopping with us", "buttons": 1 } ``` ### Example: Quick replies (Hebrew) A Hebrew template (`language` 1) with two quick reply buttons. `buttons` 3 means quick reply buttons only. When the client clicks one, your webhook gets the button's text (and the id you give it when you send the template). ```json { "from": "972771234567", "name": "hebrew_order_received", "language": 1, "header": 1, "body": "שלום {{1}}, ההזמנה שלך מספר {{2}} התקבלה בהצלחה. נעדכן אותך כשהיא תישלח.", "bodyVariableSample1": "דנה", "bodyVariableSample2": "4711", "footer": "תודה שקניתם אצלנו", "buttons": 3, "quickReply1": "מעקב משלוח", "quickReply2": "דברו איתי" } ``` ### Example: Image header An appointment reminder, in English. The template contains: - an image header; - a body with 2 variables; - a footer; - call to action buttons: one website button and one call button (`callToAction` 3). The template submission will look like this: ![The template: an image, the reminder text, the footer, and "Click for navigation" and "Call Us" buttons](https://storage.99digital.online/docs/template3.png) ```json { "from": "972771234567", "name": "friday_appointment_reminder", "language": 2, "header": 2, "body": "*Hello {{1}}* we would like to remind you of the appointment you have with us on {{2}}.\nPlease arrive with your ID card.", "footer": "Our address: 51D street.", "buttons": 2, "callToAction": 3, "callToActionWebsiteText": "Click for navigation", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://waze.com/ul", "callToActionCallText": "Call Us", "callToActionCallNumber": "+972779111111" } ``` ### Example: Video header A product video with three quick reply buttons. `header` 3 is a video. When you send the template, you provide the video itself (`headerType` 4 and `headerLink` in Send a Template). ```json { "from": "972771234567", "name": "promo_video", "language": 2, "header": 3, "body": "Hi {{1}}, watch our new {{2}} in action. Interested? Pick an option below.", "bodyVariableSample1": "Dana", "bodyVariableSample2": "espresso machine", "buttons": 3, "quickReply1": "Tell me more", "quickReply2": "Book a demo", "quickReply3": "Not interested" } ``` ### Example: Document header A payment reminder, in English, with the invoice attached. The template contains: - a document header; - a body with 2 variables; - no footer; - a call to action button: a dynamic website (`callToAction` 1, `callToActionWebsiteType` 2). The variable is added at the end of `https://paypal.com/`; you provide it when you send the template (`websiteVariable`). The template submission will look like this: ![The template: a document, the payment text, and a "Click to pay" button](https://storage.99digital.online/docs/template4.png) ```json { "from": "972771234567", "name": "payment_reminder_1", "language": 2, "header": 4, "body": "*Dear {{1}}*\nYour invoice for December 2021 is attached. Total amount is {{2}} USD.\nPlease pay as soon as you can.\nThe invoice is due in a week. 💳", "buttons": 2, "callToAction": 1, "callToActionWebsiteText": "Click to pay", "callToActionWebsiteType": 2, "callToActionWebsiteURL": "https://paypal.com/" } ``` ### Example: Call button A single call button (`callToAction` 2). ```json { "from": "972771234567", "name": "delivery_call_us", "language": 2, "header": 1, "body": "Hi {{1}}, your delivery is on its way. Questions about it? Give us a call.", "bodyVariableSample1": "Dana", "buttons": 2, "callToAction": 2, "callToActionCallText": "Call us", "callToActionCallNumber": "+97231234567" } ``` ### Example: Two websites Two website buttons (`callToAction` 5); the second one is dynamic. ```json { "from": "972771234567", "name": "booking_links", "language": 2, "header": 1, "body": "Hi {{1}}, your table for {{2}} is booked. You can view the menu or manage your booking below.", "bodyVariableSample1": "Dana", "bodyVariableSample2": "Friday 20:00", "buttons": 2, "callToAction": 5, "callToActionWebsiteText": "View menu", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://www.example.com/menu", "callToActionWebsiteText2": "My booking", "callToActionWebsiteType2": 2, "callToActionWebsiteURL2": "https://www.example.com/booking/" } ``` ### Example: All button kinds A welcome template, in English, with every kind of button. The template contains: - no header; - a body with 6 variables; - no footer; - 2 website buttons and 1 call button (`callToAction` 4); - 5 quick reply buttons (`buttons` 4 — both kinds). The template submission will look like this: ![The template: the welcome text, two website buttons, a call button and five quick reply buttons](https://storage.99digital.online/docs/template2.png) When you send the template to your client, you need to fill `{{1}}`, `{{2}}`, `{{3}}`, `{{4}}`, `{{5}}` and `{{6}}`. ```json { "from": "972771234567", "name": "website_welcome", "language": 2, "header": 1, "body": "*Hello {{1}}* and thank you for joining our exclusive website store!\nOur company has many secrets to discover.\nFor future connection, we received your phone number: {{2}} and your email address: {{3}}.\nYou can find shirts, hats, shoes and gloves at discounted prices. Hold on, wait a minute, i found something interesting! just for this week we offer: {{4}} at discounted price: {{5}} only when you buy it online or in-store shop at: {{6}}.\nWhat would you like to discover?", "buttons": 4, "callToAction": 4, "callToActionWebsiteText": "Our Website", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://www.example.com", "callToActionWebsiteText2": "Our second website", "callToActionWebsiteType2": 1, "callToActionWebsiteURL2": "https://www.example-second-website.com", "callToActionCallText": "Click to call us", "callToActionCallNumber": "+972522222222", "quickReply1": "Shirts", "quickReply2": "Hats", "quickReply3": "Shoes", "quickReply4": "Gloves", "quickReply5": "Something else" } ``` ### Example: Coupon code A weekend sale, in English, with a coupon code that expires. The template contains: - no header; - a body with 2 variables; - 1 website button (static website); - 1 call button; - 1 coupon code button with an expiration time. The template submission will look like this: ![The template: the sale text, the "Weekend Sale!" offer with a timer, and "Copy offer code", website and call buttons](https://storage.99digital.online/docs/template6.png) The "Copy offer code" text is fixed and can't be changed; each template language shows its translation. When the client clicks it, the code is copied. When you send the template, you provide the code and its expiration time, and the template shows the timer. ```json { "from": "972771234567", "name": "weekend_sale", "language": 2, "header": 1, "body": "*Hello {{1}}*\nWe value our VIP clients very much and would like to offer you {{2}} off for the weekend sale only!", "buttons": 2, "callToAction": 3, "callToActionWebsiteText": "Click here for more", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://www.amazon.com/store/", "callToActionCallText": "Call Us", "callToActionCallNumber": "+972501122334", "useCoupon": 1, "couponTitle": "Weekend Sale!", "couponExpiration": 1 } ``` ### Example: Carousel A carousel template, in English, with 3 image cards. - image cards (`carouselMedia` 1); - 3 cards; - each card has 1 static website button and 1 quick reply button (`carouselButtons` 4). This is how it will look like — the client can switch between the 3 cards: ![A carousel template: the message, then image cards side by side, each with a website and a quick reply button](https://storage.99digital.online/docs/carousel_template.png) ```json { "from": "972771234567", "name": "carousel_1", "language": 2, "header": 5, "carouselMedia": 1, "carouselButtons": 4, "body": "Hello! See all my cards below", "carouselCard1_body": "Card 1 body text", "carouselCard1_websiteText": "My website", "carouselCard1_websiteType": 1, "carouselCard1_websiteURL": "https://www.amazon.com", "carouselCard1_quickReply1": "Contact us", "carouselCard2_body": "Card 2 body text", "carouselCard2_websiteText": "My website 2", "carouselCard2_websiteType": 1, "carouselCard2_websiteURL": "https://www.google.com", "carouselCard2_quickReply1": "Contact us 2", "carouselCard3_body": "Card 3 body text", "carouselCard3_websiteText": "My website 3", "carouselCard3_websiteType": 1, "carouselCard3_websiteURL": "https://www.wikipedia.com", "carouselCard3_quickReply1": "Contact us 3" } ``` ### Example: Carousel with variables A carousel whose cards each have a variable and a dynamic website button. Each card text has one variable, `{{1}}`, with its sample in `carouselCardX_var`. The website buttons are dynamic (`carouselCardX_websiteType` 2): when you send the template, you provide each card's variable and website variable. ```json { "from": "972771234567", "name": "products_carousel", "language": 2, "header": 5, "carouselMedia": 1, "carouselButtons": 4, "body": "Hi {{1}}, here are this week's picks for you - swipe to see them all.", "bodyVariableSample1": "Dana", "carouselCard1_body": "Our {{1}} - premium quality, in stock now.", "carouselCard1_var": "Leather wallet", "carouselCard1_websiteText": "View product", "carouselCard1_websiteType": 2, "carouselCard1_websiteURL": "https://www.example.com/p/", "carouselCard1_quickReply1": "I want this", "carouselCard2_body": "Our {{1}} - our best seller this month.", "carouselCard2_var": "Canvas backpack", "carouselCard2_websiteText": "View product", "carouselCard2_websiteType": 2, "carouselCard2_websiteURL": "https://www.example.com/p/", "carouselCard2_quickReply1": "I want this", "carouselCard3_body": "Our {{1}} - limited edition, few left.", "carouselCard3_var": "Travel mug", "carouselCard3_websiteText": "View product", "carouselCard3_websiteType": 2, "carouselCard3_websiteURL": "https://www.example.com/p/", "carouselCard3_quickReply1": "I want this" } ``` ### Example: Carousel (video) Video cards (`carouselMedia` 2) with two quick replies each and no card text. ```json { "from": "972771234567", "name": "workshop_video_carousel", "language": 2, "header": 5, "carouselMedia": 2, "carouselButtons": 3, "body": "Hi {{1}}, two short clips from our workshop - which one would you like to join?", "bodyVariableSample1": "Dana", "carouselCard1_quickReply1": "Join Sunday", "carouselCard1_quickReply2": "Send details", "carouselCard2_quickReply1": "Join Tuesday", "carouselCard2_quickReply2": "Send details" } ``` ### Example: Carousel (call + website) Each card has a call button and a website button (`carouselButtons` 5). ```json { "from": "972771234567", "name": "branches_carousel", "language": 2, "header": 5, "carouselMedia": 1, "carouselButtons": 5, "body": "Find the branch nearest to you.", "carouselCard1_body": "Tel Aviv - Herzl 1", "carouselCard1_callText": "Call the branch", "carouselCard1_callNumber": "+97231234567", "carouselCard1_websiteText": "Directions", "carouselCard1_websiteType": 1, "carouselCard1_websiteURL": "https://www.example.com/branches/tel-aviv", "carouselCard2_body": "Haifa - Hanamal 10", "carouselCard2_callText": "Call the branch", "carouselCard2_callNumber": "+97241234567", "carouselCard2_websiteText": "Directions", "carouselCard2_websiteType": 1, "carouselCard2_websiteURL": "https://www.example.com/branches/haifa" } ``` ### Example: Authentication An authentication (OTP) template, with the security text and a code that expires after 5 minutes. The text and the "Copy code" button are fixed per language; you choose only whether to add the security text (`add_security_text`) and when the code expires (`code_expiration`, in minutes). You send the code itself with each message, in Send a Template's `otp`. ![An authentication template: "123456 is your verification code", the security text, the expiration notice and a Copy code button](https://storage.99digital.online/docs/template7.png) ```json { "from": "972771234567", "name": "login_code", "language": 2, "authentication": 1, "add_security_text": 1, "code_expiration": 5 } ``` ## 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 template was submitted to WhatsApp (Meta) for approval. Always `OK`. | | `name` | string | (one of: OK) The template name you submitted. | | `timestamp` | integer | (one of: OK) The timestamp (Unix time, in seconds). Example: `1710861707`. | | `body` | string | (one of: OK) The body message you submitted (not for an authentication template). | | `category` | integer | (one of: OK) The template category, temporarily: until the template is approved, Meta can change the category. The final, actual category is set when the template is approved, and you can get it with [Get Templates](https://docs.99digital.co.il/whatsapp-api/templates/get-templates). One of: `1` — Utility template; `2` — Marketing template; `3` — Authentication template. | | `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 (template error): the template was not submitted. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'name' is either empty, too long, invalid, or already exists in your account; `5` — 'language' code is incorrect; `6` — 'header' code is incorrect (with a coupon code, the header can't be a document); `7` — The 'body' has one of the following issues: it has more than 10 variables; the text is too long; the same variable appears more than once; there are only parameters and no regular text; it has more than two consecutive new lines (\n\n\n); `8` — 'footer' is too long or incorrect (a coupon code template can't have a footer); `9` — 'buttons' is missing or not 1, 2, 3 or 4 (2 or 4 with a coupon code); `10` — You used call to action or quick reply buttons, but didn't provide a correct callToAction code or a quick reply button; `11` — callToActionWebsiteText is invalid or too long; `12` — callToActionWebsiteType must be 1 or 2; `13` — callToActionWebsiteURL is invalid or too long (write it without the variable — it is added for you); `14` — callToActionCallText is invalid or too long; `15` — callToActionCallNumber is invalid or too long; `16` — You used quick reply buttons, but did not provide any buttons; `17` — You used more than 10 buttons; `18` — The body variables must be numbered in order, from `{{1}}` and without gaps, and the number of bodyVariableSample fields must match the variables in 'body'; `19` — WhatsApp rejected the header's sample file. Please try again or contact support; `20` — A dynamic website button (callToActionWebsiteType 2) needs its callToActionWebsiteURL; `21` — The quick reply buttons are too long; `22` — The template contains too many variables compared to the length of the rest of the text. Decrease the number of variables or increase the body length; `23` — callToActionWebsiteText2 is invalid or too long, or two buttons are the same; `24` — callToActionWebsiteType2 must be 1 or 2; `25` — callToActionWebsiteURL2 is invalid or too long; `26` — couponTitle is required, too long or wrong; `27` — couponExpiration is invalid (it must be the number 0 or 1); `30` — Unknown error, please check your syntax; `31` — Quick reply buttons must not contain any emoji; `32` — The template content is an authentication template; please change your syntax to match; `33` — add_security_text is wrong or invalid (authentication template), or WhatsApp is unable to create this kind of template — please contact support; `34` — code_expiration is wrong, invalid or not between 0 and 90 (authentication template); `35` — Permission denied to create templates, please contact our support; `36` — carouselMedia is missing or invalid; `37` — Wrong number of cards: a carousel has 2 to 10 cards, numbered from 1 without gaps; `38` — carouselCardX_body is invalid (X can be 1 to 10); `39` — carouselButtons is missing or invalid; `40` — A card variable is invalid: a card text can have one variable, `{{1}}`, on all the cards or none, and its sample (carouselCardX_var) can be up to 160 characters; `41` — carouselCardX_websiteText, _websiteType or _websiteURL is invalid or wrong; `42` — carouselCardX_quickReply1 or _quickReply2 is invalid or wrong; `43` — carouselCardX_callText or _callNumber is invalid or wrong. | #### Example: OK The template was submitted to WhatsApp for approval. ```json { "status": "OK", "name": "website_welcome", "timestamp": 1710861707, "body": "*Hello {{1}}* and thank you for joining our exclusive website store!", "category": 1, "reason": 1 } ``` #### Example: OK — carousel A carousel template is a marketing template. ```json { "status": "OK", "name": "carousel_1", "timestamp": 1788784106, "body": "Hello! See all my cards below", "category": 2, "reason": 1 } ``` #### Example: OK — authentication An authentication template has no `body` in the response. ```json { "status": "OK", "name": "login_code", "timestamp": 1710861707, "category": 3, "reason": 1 } ``` #### Example: Reason 4 The name is empty, invalid or already exists. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 34 The code expiration is not between 0 and 90 minutes. ```json { "status": "FAIL", "reason": 34 } ``` --- # Send a Template Source: https://docs.99digital.co.il/whatsapp-api/templates/send-a-template Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/templates/send-a-template.md Section: WhatsApp API › Templates `POST https://api.99digital.co.il/whatsapp/v2/sendTemplate` Send a template message that you created with Create a Template, and fill in its variables, media and buttons. :::info You can use the "Send Template" API anytime you want to send a message to a client if it is more than 24 hours since the client's last message, or if you send a message to a new client. You can even send the template during the 24-hour session time if you wish. ::: ## More Remarks - You can only send template messages to private people, not groups. - If you send a template message to the client, and the client did not reply yet, and you want to send another message to them, you must use the template message again. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited template messages within the 24-hour session time of a conversation. - The 24-hour conversation session starts when you send a message to the client. - Every time the user replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. - If your template has variables, you must provide all the variables' data (inside the `bodyVariable` parameters). - The entire template body + variables should not exceed 1024 characters. - For a carousel template, `headerType` should be 1. - The template must be approved first — see [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template) and [Get Templates](https://docs.99digital.co.il/whatsapp-api/templates/get-templates). Fill in only what your template has: its variables, its header media, its dynamic website buttons, its coupon code or its authentication code. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendTemplate` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the message to. For example: `972501234567`
or
The user id you want to send the message to. For example: `IL.1605856887361213` — for a client who hides their number behind a WhatsApp [username](https://docs.99digital.co.il/whatsapp-api/information/username); it arrives as `from_id` in your webhook. | yes | | name | The template name | yes | | headerType | `1` for none
`2` for text with a variable
`3` for image
`4` for video
`5` for document | yes | | headerVariable | In case your template has a text header with a variable (`headerType` 2), this is the value of that variable, without special characters such as `**`. | only if you used `2` as headerType | | headerLink | In case you used an image/video/document header, this is the link to the image, video or document.
Limits:
image - 5 MB
document - 100 MB
video - 16 MB | only if you used `3`/`4`/`5` as headerType | | bodyVariable1-10 | In case you used variables `{{1}}` to `{{10}}` in your body when submitting the template, this is where you provide them. Each item as a variable (1 to 10), not an array.
Two important rules:
1. You can't use `\n` (a new line) inside a variable.
2. You can't use 4 or more consecutive spaces inside a variable. | only if you used variables in the 'body' | | websiteVariable | In case you used a call to action button, and you chose a dynamic "website" with the variable `{{1}}`, this is where you use it. You should put the variable information, not the full website address. | no | | websiteVariable2 | In case you used a second website for the call to action button, and you used a dynamic variable, this is where you provide the `{{1}}` for the second website. You should put the variable information, not the full website address. | no | | couponCode | In case you used a coupon code in the template, here you put the code. 15 characters maximum. | no | | couponExpiration | In case you used a coupon code in the template, and set 'true' for code expiration, here you put the Unix timestamp (seconds) of the date and time that the code will no longer be available. A Unix timestamp is the same in every time zone, so convert your local time (for example Israel time, GMT+2 or GMT+3) to it. | no | | pdfFilename | In case you used `headerType` as document, and provided a document link in `headerLink`, here you can put the file name that will show for the end user when receiving the PDF file.
Priority:
1. If `pdfFilename` is provided, it will be used.
2. If `pdfFilename` is not provided by you, we will use the PDF file name from the `headerLink` URL directly.
3. If the `headerLink` file name is not available for any reason, we will put the default text: "קובץ מצורף - לחץ כאן" | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | | otp | If your template is an authentication template, here is where you provide the code.
Maximum 15 characters (can be a combination of numbers, letters, special characters etc.)
Note: an authentication template is visible only on a mobile phone. If the end user is using WhatsApp Web, the code will not be available to them. | Only if an authentication template is used | | localStorage | Whenever you provide a `headerLink` URL or carousel card URLs, we deliver this URL to WhatsApp. They download the link in order to deliver it with your template.
If for any reason your file link is not accessible by Meta and open to the internet, you can request our servers to download the file and upload it to WhatsApp, so WhatsApp doesn't need your own link.
Default value is `0` (disable).
`1` - enable.
Please note that using this feature may delay the response from our server, due to the operation described above. | no | | quickReplyX_id | If you used quickReply (1-10) buttons during the template creation, you can provide an ID for each button, which will be returned on the webhook if a client clicks it.
Example: you created two quick reply buttons in the template, using quickReply1 = "Yes" and quickReply2 = "No". You can send `quickReply1_id` and `quickReply2_id` as strings; the id and the template name together can be up to 252 characters.
This will return as the `caption` when the incoming message arrives, if the end user clicked that button. | no | | carouselCardX_headerLink | X represents the card number (for example `carouselCard1_headerLink`).
You must provide the full URL of either the image (up to 5 MB) or the video (up to 16 MB) to send for the card.
You must provide this URL for every card you used when creating the template. | Only if you send a carousel template | | carouselCardX_bodyVariable | X represents the card number (for example `carouselCard1_bodyVariable`).
The card text, with the variable in it, must be up to 160 characters.
You must provide this for each of the cards. | Only if you send a carousel template, and you added a variable in the card | | carouselCardX_websiteVariable | X represents the card number (for example `carouselCard1_websiteVariable`).
Provide only the variable, not the full website.
You must provide this for each of the cards. | Only if you send a carousel template, and you added a dynamic website button | | carouselCardX_quickReply1_id | X represents the card number (for example `carouselCard1_quickReply1_id`).
If a client clicks a quick reply button in a carousel, you can provide the button id and get it back on the webhook. | no | | carouselCardX_quickReply2_id | X represents the card number (for example `carouselCard1_quickReply2_id`).
If a client clicks a quick reply button in a carousel, you can provide the button id and get it back on the webhook. | no | ## Body example On the Create a Template page, in the first example, we created a template named "website_welcome", in English, without a header, and with 6 variables in the body, which looks like this: ```text *Hello {{1}}* and thank you for joining our exclusive website store!\nOur company has many secrets to discover.\nFor future connection, we received your phone number: {{2}} and your email address: {{3}}.\nYou can find shirts, hats, shoes and gloves at discounted prices. Hold on, wait a minute, i found something interesting! just for this week we offer: {{4}} at discounted price: {{5}} only when you buy it online or in-store shop at: {{6}}.\nWhat would you like to discover? ``` This is how you should send the template to your customer: ```json { "from": "972771234567", "to": "972509876543", "name": "website_welcome", "headerType": 1, "bodyVariable1": "John", "bodyVariable2": "0509876543", "bodyVariable3": "john@example.com", "bodyVariable4": "Shoes and Hats", "bodyVariable5": "50% off", "bodyVariable6": "Israel", "showRequest": 0 } ``` ## Another body example For a template named "website_signup_image_logo", in Hebrew, with an image header, and 2 variables in the body, which looks like this: ```text תודה שהצטרפת אלינו. קוד הכניסה שלך הוא: {{1}} אנחנו רוצים להודות לך ולברך אותך בברכת התחלה חדשה. בברכה, צוות {{2}} ``` the request will look like this: ```json { "from": "972771234567", "to": "972509876543", "name": "website_signup_image_logo", "headerType": 3, "headerLink": "https://storage.99digital.online/samples/hello.png", "bodyVariable1": "43143", "bodyVariable2": "קידום אתרים" } ``` ## Response ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "timestamp": 1600115719, "from": "972771234567", "to": "972509876543", "body": "Hello John Thank you for joining our exclusive website", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** an OK status doesn't mean the message arrived to the end user. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | timestamp | Time stamp (Unix time, in seconds) | | from | Your WhatsApp account | | to | The number or the user id that the message was sent to | | body | The body of the template, including the variables | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message.
Even though you sent a template now, if the templateTimeLeft value is more than 0, it means that you don't have to use a template. | | conversationTimeLeft | No longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is either empty or in a wrong number format | | 6 | WhatsApp error or template rejected | | 12 | The template name does not exist | | 14 | `headerType` is missing or not `1`, `2`, `3`, `4` or `5` | | 15 | You must provide `headerVariable` for this template, without special characters such as `**` | | 17 | The number of `bodyVariable` fields must be equal to the number of variables used when creating the template, and they must not be empty | | 18 | You must provide `websiteVariable` for this template | | 19 | A body variable is too long: the template body with its variables must not exceed 1024 characters | | 20 | The coupon code is too long (more than 15 characters) or invalid | | 21 | WhatsApp has rejected the sending of the template due to high-volume sending. Please try to send again. | | 22 | Rate limit error, try again | | 23 | `otp` is required for an authentication template and must not exceed 15 characters | | 24 | When `localStorage` is used, the `headerLink` provided is incorrect or access is denied | | 28 | A `quickReplyX_id` is invalid or too long | | 29 | The cards you provided in `carouselCardX` don't match the cards of the template — for example, a card number higher than the number of cards the template was created with | | 30 | `carouselCardX_bodyVariable` is missing or invalid (relevant for any of the cards) | | 31 | `carouselCardX_headerLink` is missing, invalid or wrong | | 32 | `carouselCardX_websiteVariable` is missing, invalid or wrong | | 33 | `carouselCardX_quickReply1_id` or `carouselCardX_quickReply2_id` is invalid or wrong | | 34 | When `localStorage` is used, a `carouselCardX_headerLink` provided is incorrect or access is denied | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the message to, in international format, digits only — or the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `name` | string | Yes | The template name. Example: `website_welcome`. | | `headerType` | integer | Yes | The template's header. One of: `1` — None — also for a carousel template; `2` — Text, with a variable — provide `headerVariable`; `3` — Image — provide `headerLink`; `4` — Video — provide `headerLink`; `5` — Document — provide `headerLink`. Example: `1`. | | `headerVariable` | string | No | For a template with a text header that has a variable (`headerType` 2): the value of that variable, without special characters such as `**`. Example: `Order 4711`. | | `headerLink` | string (uri) | No | In case your template has an image, video or document header, this is the link to the image, video or document. Limits: image — 5 MB; document — 100 MB; video — 16 MB. Required only when `headerType` is 3, 4 or 5. Example: `https://storage.99digital.online/samples/hello.png`. | | `pdfFilename` | string | No | In case you used `headerType` 5 (document) and provided a document link in `headerLink`, here you can put the file name that the client sees when receiving the PDF file. Priority: 1. if `pdfFilename` is provided, it is used; 2. if you don't provide it, the PDF file name from the `headerLink` URL is used; 3. if the `headerLink` file name is not available for any reason, the default text "קובץ מצורף - לחץ כאן" is used. Example: `Invoice 4711 - August 2026`. | | `bodyVariable1` | string | No | In case you used variables `{{1}}` to `{{10}}` in your body when submitting the template, this is where you provide them — one field per variable, `bodyVariable1` to `bodyVariable10`, not an array. Two important rules: you can't use `\n` (a new line) inside a variable, and you can't use 4 or more consecutive spaces inside a variable. Example: `John`. | | `websiteVariable` | string | No | In case your template has a dynamic website button (with the variable `{{1}}`), this is where you provide it. Put the variable information, not the full website address. Example: `inv-4711`. | | `websiteVariable2` | string | No | In case your template has a second website button that is dynamic (with the variable `{{1}}`), this is where you provide the `{{1}}` of the second website. Put the variable information, not the full website address. Example: `bk-88213`. | | `couponCode` | string | No | In case your template has a coupon code button, here you put the code. Up to 15 characters. Max length: 15. Example: `SAVE20`. | | `couponExpiration` | integer | No | In case your template has a coupon code button with an expiration time: the moment the code is no longer available, as a Unix timestamp in seconds. A Unix timestamp is the same in every time zone — convert your local time (for example Israel time, GMT+2 or GMT+3) to it. Example: `1790500000`. | | `otp` | string | No | If your template is an authentication template, here is where you provide the code — up to 15 characters (any combination of numbers, letters, special characters etc.). Note: an authentication template is visible only on a mobile phone; if the client uses WhatsApp Web, the code will not be available to them. Max length: 15. Example: `482913`. | | `quickReply1_id` | string | No | If your template has quick reply buttons (`quickReply1` to `quickReply10` when you created it), you can give each button an id that is returned on the webhook, as the `caption`, when the client clicks it: `quickReply1_id` to `quickReply10_id`. For example, for the buttons "Yes" and "No", send `quickReply1_id` and `quickReply2_id`. The id and the template name together can be up to 252 characters. Example: `CONFIRM`. | | `carouselCard1_headerLink` | string (uri) | No | For a carousel template: the full link to the image (up to 5 MB) or video (up to 16 MB) of card 1. You must provide it for every card of the template: `carouselCard1_headerLink`, `carouselCard2_headerLink` and so on. Example: `https://storage.99digital.online/samples/hello.png`. | | `carouselCard1_bodyVariable` | string | No | For a carousel template whose cards have a variable: the variable of card 1. The card text with it can be up to 160 characters. You must provide it for each of the cards. Example: `Leather wallet`. | | `carouselCard1_websiteVariable` | string | No | For a carousel template with a dynamic website button: the variable of card 1 — only the variable, not the full website. You must provide it for each of the cards. Example: `wallet-01`. | | `carouselCard1_quickReply1_id` | string | No | For a carousel template with quick reply buttons: an id for the first quick reply button of card 1, returned on the webhook when the client clicks it. Example: `WANT_WALLET`. | | `carouselCard1_quickReply2_id` | string | No | For a carousel template with quick reply buttons: an id for the second quick reply button of card 1, returned on the webhook when the client clicks it. Example: `MORE_WALLET`. | | `localStorage` | integer | No | We deliver your `headerLink` (or carousel card links) to WhatsApp, and WhatsApp downloads the file in order to deliver it with your template. If your link is not accessible to WhatsApp or not open to the internet, enable this: we download the file ourselves and upload it to WhatsApp, so WhatsApp doesn't need your link. Please note that using this feature may delay the response from our server. One of: `0` — Off — WhatsApp downloads the file from your link; `1` — Enable — we upload the file to WhatsApp for you. Default: `0`. | | `showRequest` | integer | No | You can get back in the response an object with the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: Body variables A template with 6 variables in the body, and no header. The Create a Template example `website_welcome` is a template in English, without a header, and with 6 variables in the body: > \*Hello {{1}}\* and thank you for joining our exclusive website store! Our company has many secrets to discover. For future connection, we received your phone number: {{2}} and your email address: {{3}}. You can find shirts, hats, shoes and gloves at discounted prices. Hold on, wait a minute, i found something interesting! just for this week we offer: {{4}} at discounted price: {{5}} only when you buy it online or in-store shop at: {{6}}. What would you like to discover? This is how you send it to your customer: ```json { "from": "972771234567", "to": "972509876543", "name": "website_welcome", "headerType": 1, "bodyVariable1": "John", "bodyVariable2": "0509876543", "bodyVariable3": "john@example.com", "bodyVariable4": "Shoes and Hats", "bodyVariable5": "50% off", "bodyVariable6": "Israel", "showRequest": 0 } ``` ### Example: Image header (Hebrew) A Hebrew template with an image header and 2 variables. A template named `website_signup_image_logo`, in Hebrew, with an image header and 2 variables in the body: > תודה שהצטרפת אלינו. > > קוד הכניסה שלך הוא: {{1}} > > אנחנו רוצים להודות לך ולברך אותך בברכת התחלה חדשה. > > בברכה, צוות {{2}} The request looks like this: ```json { "from": "972771234567", "to": "972509876543", "name": "website_signup_image_logo", "headerType": 3, "headerLink": "https://storage.99digital.online/samples/hello.png", "bodyVariable1": "43143", "bodyVariable2": "קידום אתרים" } ``` ### Example: No variables A text template without variables. ```json { "from": "972771234567", "to": "972501234567", "name": "store_open_today", "headerType": 1 } ``` ### Example: Video + quick reply ids A video header, and an id for each quick reply button — the id of the button the client clicks comes back in the webhook. ```json { "from": "972771234567", "to": "972501234567", "name": "promo_video", "headerType": 4, "headerLink": "https://storage.99digital.online/samples/meditation.mp4", "bodyVariable1": "Dana", "bodyVariable2": "espresso machine", "quickReply1_id": "MORE_INFO", "quickReply2_id": "BOOK_DEMO", "quickReply3_id": "NOT_INTERESTED" } ``` ### Example: Document + dynamic website A PDF header with the file name the client sees, and the variable of a dynamic website button. ```json { "from": "972771234567", "to": "972501234567", "name": "invoice_pdf", "headerType": 5, "headerLink": "https://storage.99digital.online/samples/headerSample.pdf", "pdfFilename": "Invoice 4711 - August 2026", "bodyVariable1": "Dana Levi", "bodyVariable2": "August 2026", "bodyVariable3": "350 USD", "websiteVariable": "inv-4711" } ``` ### Example: Two websites A template with two website buttons, where only the second one is dynamic — so only `websiteVariable2` is sent. ```json { "from": "972771234567", "to": "972501234567", "name": "booking_links", "headerType": 1, "bodyVariable1": "Dana", "bodyVariable2": "Friday 20:00", "websiteVariable2": "bk-88213" } ``` ### Example: Coupon code A coupon code button, with the time the code expires. ```json { "from": "972771234567", "to": "972501234567", "name": "weekend_coupon", "headerType": 3, "headerLink": "https://storage.99digital.online/samples/hello.png", "bodyVariable1": "Dana", "bodyVariable2": "20%", "couponCode": "SAVE20", "couponExpiration": 1790500000 } ``` ### Example: Authentication code An authentication template — the code goes in `otp`. ```json { "from": "972771234567", "to": "972501234567", "name": "login_code", "headerType": 1, "otp": "482913" } ``` ### Example: Carousel A carousel template with 3 image cards: a link, a variable, a website variable and a quick reply id for every card. ```json { "from": "972771234567", "to": "972501234567", "name": "products_carousel", "headerType": 1, "bodyVariable1": "Dana", "carouselCard1_headerLink": "https://storage.99digital.online/samples/hello.png", "carouselCard1_bodyVariable": "Leather wallet", "carouselCard1_websiteVariable": "wallet-01", "carouselCard1_quickReply1_id": "WANT_WALLET", "carouselCard2_headerLink": "https://storage.99digital.online/samples/hello.png", "carouselCard2_bodyVariable": "Canvas backpack", "carouselCard2_websiteVariable": "backpack-02", "carouselCard2_quickReply1_id": "WANT_BACKPACK", "carouselCard3_headerLink": "https://storage.99digital.online/samples/hello.png", "carouselCard3_bodyVariable": "Travel mug", "carouselCard3_websiteVariable": "mug-03", "carouselCard3_quickReply1_id": "WANT_MUG" } ``` ### Example: Carousel (video) A carousel template with 2 video cards and two quick reply buttons on each card, with `localStorage`. ```json { "from": "972771234567", "to": "972501234567", "name": "workshop_video_carousel", "headerType": 1, "localStorage": 1, "bodyVariable1": "Dana", "carouselCard1_headerLink": "https://storage.99digital.online/samples/meditation.mp4", "carouselCard1_quickReply1_id": "JOIN_SUN", "carouselCard1_quickReply2_id": "DETAILS_SUN", "carouselCard2_headerLink": "https://storage.99digital.online/samples/meditation.mp4", "carouselCard2_quickReply1_id": "JOIN_TUE", "carouselCard2_quickReply2_id": "DETAILS_TUE" } ``` ### Example: Text header A template with a text header that has a variable (a template created in WhatsApp Manager). ```json { "from": "972771234567", "to": "972501234567", "name": "your_template_with_text_header", "headerType": 2, "headerVariable": "Order 4711", "bodyVariable1": "Dana" } ``` ### Example: To user id For a client who hides their number behind a WhatsApp username: send to the user id from your webhook. ```json { "from": "972771234567", "to": "IL.1605856887361213", "name": "order_received", "headerType": 1, "bodyVariable1": "Dana", "bodyVariable2": "4711" } ``` ### Example: localStorage We upload the header image to WhatsApp for you, for a link that WhatsApp can't reach. ```json { "from": "972771234567", "to": "972501234567", "name": "summer_offer_image", "headerType": 3, "headerLink": "https://storage.99digital.online/samples/hello.png", "localStorage": 1, "bodyVariable1": "Dana", "bodyVariable2": "20%" } ``` ### Example: showRequest Get the request back in the response, as `originalRequest`. ```json { "from": "972771234567", "to": "972501234567", "name": "order_received", "headerType": 1, "bodyVariable1": "Dana", "bodyVariable2": "4711", "showRequest": 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) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `body` | string | (one of: OK) The body of the template, including the variables. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Even though you sent a template now, if templateTimeLeft is more than 0, you don't have to use a template. Example: `0`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `6` — WhatsApp error or template rejected; `12` — The template name does not exist; `14` — 'headerType' is missing or not 1, 2, 3, 4 or 5; `15` — You must provide headerVariable for this template, without special characters such as **; `17` — The number of bodyVariable fields must be equal to the number of variables used when creating the template, and they must not be empty; `18` — You must provide websiteVariable for this template; `19` — A body variable is too long — the template body with its variables must not exceed 1024 characters; `20` — The coupon code is too long or invalid; `21` — WhatsApp has rejected the sending of the template due to high volume sending. Please try to send again; `22` — Rate limit error, try again; `23` — otp is required for an authentication template and must not exceed 15 characters; `24` — When localStorage is used: the headerLink provided is incorrect or access is denied; `28` — A quickReplyX_id is invalid or too long; `29` — The cards you provided in carouselCardX don't match the cards of the template — for example, a card number higher than the number of cards the template was created with; `30` — carouselCardX_bodyVariable is missing or invalid (for any of the cards); `31` — carouselCardX_headerLink is missing, invalid or wrong; `32` — carouselCardX_websiteVariable is missing, invalid or wrong; `33` — carouselCardX_quickReply1_id or _quickReply2_id is invalid or wrong; `34` — When localStorage is used: a carouselCardX_headerLink provided is incorrect or access is denied. | #### Example: OK The system received your request. `body` is the template text with your variables. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "timestamp": 1600115719, "from": "972771234567", "to": "972509876543", "body": "*Hello John* and thank you for joining our exclusive website store!\nOur company has many secrets to discover.\nFor future connection, we received your phone number: 0509876543 and your email address: john@example.com.\nYou can find shirts, hats, shoes and gloves at discounted prices. Hold on, wait a minute, i found something interesting! just for this week we offer: Shoes and Hats at discounted price: 50% off only when you buy it online or in-store shop at: Israel.\nWhat would you like to discover?", "templateTimeLeft": 0, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: OK + showRequest With `showRequest` set to 1, the response includes `originalRequest`. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "body": "Hi Dana, your order 4711 was received. We will let you know when it ships.", "templateTimeLeft": 0, "conversationTimeLeft": 0, "originalRequest": { "from": "972771234567", "to": "972501234567", "name": "order_received", "headerType": 1, "bodyVariable1": "Dana", "bodyVariable2": "4711" }, "reason": 1 } ``` #### Example: Reason 12 The template name does not exist. ```json { "status": "FAIL", "reason": 12 } ``` #### Example: Reason 17 The number of variables doesn't match the template. ```json { "status": "FAIL", "reason": 17 } ``` #### Example: Reason 23 The authentication template needs its code in `otp`. ```json { "status": "FAIL", "reason": 23 } ``` --- # Send Multi Template Source: https://docs.99digital.co.il/whatsapp-api/templates/send-multi-template Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/templates/send-multi-template.md Section: WhatsApp API › Templates `POST https://api.99digital.co.il/whatsapp/v2/sendMultiTemplate` Send the same template to many clients in one request, with the personal variables of each client. The Send Multi Template endpoint allows you to send the same template to multiple destinations in a single request. This endpoint is very similar to [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template); the only difference is that some body parameters are now part of an array, allowing you to send them all at once. What is the same for everyone — the template, its header and its carousel cards — is sent once; what is personal — the number, the body variables, the website variables, the coupon code and the quick reply ids — goes in each destination. This page assumes you know how to handle `bodyVariable1`-`10`, `websiteVariable`/`2` and `couponCode` and what they mean. For more reference, see the [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) endpoint first. ## More Remarks - You can only send template messages to private people, not groups. - If you send a template message to the client, and the client did not reply yet, and you want to send another message to them, you must use the template message again. - If your template has variables, you must provide all the variables' data (inside the `bodyVariable` parameters inside the destinations). - The entire template body + variables should not exceed 1024 characters. - The sendMultiTemplate endpoint doesn't allow you to send an authentication code template. - For a carousel template, `headerType` should be 1. - A destination with a mistake (a wrong number, a too long coupon code) is rejected on its own, with its `reason`; the other destinations are sent. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendMultiTemplate` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | name | The template name | yes | | destinations | An array of objects that contain: `to`, `bodyVariable1`-`10`, `websiteVariable`, `websiteVariable2`, `couponCode` and `quickReplyX_id`.
It should be sent as in the example below, depending on the variables you used when you created the template. `to` is required (the number in international format, digits only, or the user id of a client who hides their number behind a WhatsApp username). | yes | | headerType | `1` for none
`2` for text with a variable
`3` for image
`4` for video
`5` for document | yes | | headerVariable | In case your template has a text header with a variable (`headerType` 2), this is the value of that variable — the same for every destination — without special characters such as `**`. | only if you used `2` as headerType | | headerLink | In case you used an image/video/document header, this is the link to the image, video or document.
Limits:
image - 5 MB
document - 100 MB
video - 16 MB | only if you used `3`/`4`/`5` as headerType | | couponExpiration | In case you used a coupon code in the template, and set 'true' for code expiration, here you put the Unix timestamp (seconds) of the date and time that the code will no longer be available. A Unix timestamp is the same in every time zone, so convert your local time (for example Israel time, GMT+2 or GMT+3) to it. | no | | pdfFilename | In case you used `headerType` as document, and provided a document link in `headerLink`, here you can put the file name that will show for the end user when receiving the PDF file.
Priority:
1. If `pdfFilename` is provided, it will be used.
2. If `pdfFilename` is not provided by you, we will use the PDF file name from the `headerLink` URL directly.
3. If the `headerLink` file name is not available for any reason, we will put the default text: "קובץ מצורף - לחץ כאן" | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | | localStorage | Whenever you provide a `headerLink` URL (or carousel card URLs), we deliver this URL to WhatsApp. They download the link in order to deliver it with your template.
If for any reason your file link is not accessible by Meta and open to the internet, you can request us to download the file and upload it to WhatsApp, so WhatsApp doesn't need your own link. The file is uploaded once and used for every destination; if the upload fails, your link is used.
Default value is `0` (disable).
`1` - enable.
Please note that using this feature may delay the response from our server, due to the operation described above. | no | | showBody | Whether or not to show the body in every item of the `destinations` array of the response.
`1` = show
`0` = don't show
Default is `0`.
For a long list, the entire `body` in the response can be long, and the full response might reach a very high size in MB. So consider carefully whether to enable the body in your response or not. | no | | carouselCardX_headerLink | X represents the card number (for example `carouselCard1_headerLink`).
You must provide the full URL of either the image (up to 5 MB) or the video (up to 16 MB) to send for the card.
You must provide this URL for every card you used when creating the template. | Only if you send a carousel template | | carouselCardX_bodyVariable | X represents the card number (for example `carouselCard1_bodyVariable`).
The card text, with the variable in it, must be up to 160 characters. You must provide this for each of the cards. | Only if you send a carousel template, and you added a variable in the card | | carouselCardX_websiteVariable | X represents the card number (for example `carouselCard1_websiteVariable`).
Provide only the variable, not the full website.
You must provide this for each of the cards. | Only if you send a carousel template, and you added a dynamic website button | | carouselCardX_quickReply1_id | X represents the card number (for example `carouselCard1_quickReply1_id`).
If a client clicks a quick reply button in a carousel, you can provide the button id and get it back on the webhook. | no | | carouselCardX_quickReply2_id | X represents the card number (for example `carouselCard1_quickReply2_id`).
If a client clicks a quick reply button in a carousel, you can provide the button id and get it back on the webhook. | no | The `destinations` array should be sent like this, depending on the variables you used when you created the template (`to` is required): ```json [ { "to": "972501234567", "bodyVariable1": "Hello John", "bodyVariable2": "Special offer", "websiteVariable": "value1", "websiteVariable2": "value2", "couponCode": "SAVE20", "quickReply1_id": "button-id" }, { "to": "972501234568", "bodyVariable1": "Hello Jane", "bodyVariable2": "Different offer", "websiteVariable": "param1=value2", "websiteVariable2": "param1=value2", "couponCode": "SAVE30", "quickReply1_id": "button-id" } ] ``` ## Body example A sample request to send a multi template, with 3 body variables, to 2 numbers: ```json { "from": "972771234567", "name": "welcome_to_the_jungle", "headerType": 1, "destinations": [ { "to": "972501234567", "bodyVariable1": "one", "bodyVariable2": "two", "bodyVariable3": "three", "quickReply1_id": "button-1-id" }, { "to": "972509875654", "bodyVariable1": "four", "bodyVariable2": "five", "bodyVariable3": "six" } ], "showRequest": 0, "showBody": 1 } ``` ## Response ```json { "status": "OK", "timestamp": 1757610296, "from": "972771234567", "accepted": 2, "rejected": 0, "failed": 0, "destinations": [ { "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972501234567", "body": "שלום one! *מבצע חדש* על המוצרים שבחרת.\nבדקו two מחיר, דברו איתנו, או בחרו three אפשרות מהירה." }, { "unique": "5ec46920d615aa3-x3c15a2dff350a1-3SIZZq8h9JVdA53", "to": "972509875654", "body": "שלום four! *מבצע חדש* על המוצרים שבחרת.\nבדקו five מחיר, דברו איתנו, או בחרו six אפשרות מהירה." } ], "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** an OK status doesn't mean the messages arrived to the end users. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your messages. | | from | Your WhatsApp account | | accepted | How many destinations the request was processed for successfully. Integer. | | rejected | How many destinations the request was rejected for (wrong number, wrong `to`, wrong variables). Fix them and try again. Integer. | | failed | How many destinations the request failed for (system error, WhatsApp error). Try again. Integer. | | timestamp | Timestamp of the sending (Unix time, in seconds) | | destinations | An array, one item per destination in the order you sent them, that contains 3 keys:
`unique` - the unique ID of the message sent
`to` - the number that the message was sent to
`body` - the body of the template, including the variables (only with `showBody` set to `1`)
A destination that was rejected or failed has `to` and a `reason` instead (no `unique`). | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 6 | WhatsApp error or template rejected | | 12 | The template name does not exist | | 14 | `headerType` is missing or not `1`, `2`, `3`, `4` or `5` | | 15 | You must provide `headerVariable` for this template, without special characters such as `**` | | 21 | WhatsApp has rejected the sending of the template due to high-volume sending. Please try to send again. | | 22 | The message to this destination could not be sent — try again. This error is per destination, in `destinations`. | | 23 | The `destinations` array is required and must be a non-empty array | | 24 | At least one destination is required | | 25 | One of the destinations is not an object. This error is per destination. | | 26 | One of the destinations is missing the `to` field, or `to` is empty or in a wrong format. This error is per destination, not for the entire list — unless all the destinations have it: then the whole request fails with reason 26, and the response also carries `timestamp`, `from` and `destinations` (every destination with its `to` and `reason`). | | 27 | You provided a `couponCode` in the destination, but it's too long (15 characters maximum). This error is per destination. | | 28 | A `quickReplyX_id` of the destination is invalid or too long. This error is per destination. | | 29 | The carousel cards don't match the template created | | 30 | `carouselCardX_bodyVariable` is missing or invalid (relevant for any of the cards) | | 31 | `carouselCardX_headerLink` is missing, invalid or wrong | | 32 | `carouselCardX_websiteVariable` is missing, invalid or wrong | | 33 | `carouselCardX_quickReply1_id` or `carouselCardX_quickReply2_id` is invalid or wrong | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `name` | string | Yes | The template name. Example: `welcome_to_the_jungle`. | | `destinations` | array of object | Yes | An array of objects, one per client, that contain `to`, `bodyVariable1`-`10`, `websiteVariable`, `websiteVariable2`, `couponCode` and the `quickReplyX_id` fields — depending on the variables you used when you created the template. `to` is required. Min items: 1. | | `destinations[].to` | string | Yes | The number you want to send the template to, in international format, digits only — or the user id, for a client who hides their number behind a WhatsApp username. Example: `972501234567`. | | `destinations[].bodyVariable1` | string | No | The body variables of this destination, `bodyVariable1` to `bodyVariable10` — as in Send a Template. Example: `Hello John`. | | `destinations[].websiteVariable` | string | No | In case your template has a dynamic website button (with the variable `{{1}}`): the variable for this destination. Put the variable information, not the full website address. Example: `value1`. | | `destinations[].websiteVariable2` | string | No | In case your template has a second website button that is dynamic: the `{{1}}` of the second website for this destination. Put the variable information, not the full website address. Example: `value2`. | | `destinations[].couponCode` | string | No | The coupon code for this destination — up to 15 characters. Max length: 15. Example: `SAVE20`. | | `destinations[].quickReply1_id` | string | No | The quick reply button ids for this destination, `quickReply1_id` to `quickReply10_id` — as in Send a Template. Example: `button-id`. | | `headerType` | integer | Yes | The template's header, the same for every destination. One of: `1` — None — also for a carousel template; `2` — Text, with a variable — provide `headerVariable`; `3` — Image — provide `headerLink`; `4` — Video — provide `headerLink`; `5` — Document — provide `headerLink`. Example: `1`. | | `headerVariable` | string | No | For a template with a text header that has a variable (`headerType` 2): the value of that variable, the same for every destination, without special characters such as `**`. Example: `Order 4711`. | | `headerLink` | string (uri) | No | In case your template has an image, video or document header, this is the link to the image, video or document, the same for every destination. Limits: image — 5 MB; document — 100 MB; video — 16 MB. Required only when `headerType` is 3, 4 or 5. Example: `https://storage.99digital.online/samples/hello.png`. | | `pdfFilename` | string | No | In case you used `headerType` 5 (document) and provided a document link in `headerLink`, here you can put the file name that the client sees when receiving the PDF file. Priority: 1. if `pdfFilename` is provided, it is used; 2. if you don't provide it, the PDF file name from the `headerLink` URL is used; 3. if the `headerLink` file name is not available for any reason, the default text "קובץ מצורף - לחץ כאן" is used. Example: `Invoice August 2026`. | | `couponExpiration` | integer | No | In case your template has a coupon code button with an expiration time: the moment the codes are no longer available, as a Unix timestamp in seconds — the same for every destination. A Unix timestamp is the same in every time zone — convert your local time (for example Israel time, GMT+2 or GMT+3) to it. Example: `1790500000`. | | `carouselCard1_headerLink` | string (uri) | No | For a carousel template: the full link to the image (up to 5 MB) or video (up to 16 MB) of card 1, the same for every destination. You must provide it for every card of the template: `carouselCard1_headerLink`, `carouselCard2_headerLink` and so on. Example: `https://storage.99digital.online/samples/hello.png`. | | `carouselCard1_bodyVariable` | string | No | For a carousel template whose cards have a variable: the variable of card 1, the same for every destination. The card text with it can be up to 160 characters. You must provide it for each of the cards. Example: `Leather wallet`. | | `carouselCard1_websiteVariable` | string | No | For a carousel template with a dynamic website button: the variable of card 1 — only the variable, not the full website. You must provide it for each of the cards. Example: `wallet-01`. | | `carouselCard1_quickReply1_id` | string | No | For a carousel template with quick reply buttons: an id for the first quick reply button of card 1, returned on the webhook when the client clicks it. Example: `WANT_WALLET`. | | `carouselCard1_quickReply2_id` | string | No | For a carousel template with quick reply buttons: an id for the second quick reply button of card 1, returned on the webhook when the client clicks it. Example: `MORE_WALLET`. | | `localStorage` | integer | No | We deliver your `headerLink` to WhatsApp, and WhatsApp downloads the file in order to deliver it with your template. If your link is not accessible to WhatsApp or not open to the internet, enable this: we download the file ourselves and upload it to WhatsApp, so WhatsApp doesn't need your link. Please note that using this feature may delay the response from our server. If the upload fails, your link is used. One of: `0` — Off — WhatsApp downloads the file from your link; `1` — Enable — we upload the file to WhatsApp for you. Default: `0`. | | `showBody` | integer | No | Whether or not to show the body in every item of the `destinations` array of the response. For a long list, the entire `body` of every destination can make the full response very large (it might reach many MB), so consider carefully whether to enable it. One of: `0` — Don't show; `1` — Show. Default: `0`. | | `showRequest` | integer | No | You can get back in the response an object with the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: Body variables A template with 3 body variables, sent to 2 numbers. ```json { "from": "972771234567", "name": "welcome_to_the_jungle", "headerType": 1, "destinations": [ { "to": "972501234567", "bodyVariable1": "one", "bodyVariable2": "two", "bodyVariable3": "three", "quickReply1_id": "button-1-id" }, { "to": "972509875654", "bodyVariable1": "four", "bodyVariable2": "five", "bodyVariable3": "six" } ], "showRequest": 0, "showBody": 1 } ``` ### Example: Video + quick reply ids The same video header for everyone, with `localStorage`, and quick reply ids per destination. ```json { "from": "972771234567", "name": "promo_video", "headerType": 4, "headerLink": "https://storage.99digital.online/samples/meditation.mp4", "localStorage": 1, "destinations": [ { "to": "972501234567", "bodyVariable1": "Dana", "bodyVariable2": "espresso machine", "quickReply1_id": "MORE_INFO", "quickReply2_id": "BOOK_DEMO", "quickReply3_id": "NOT_INTERESTED" }, { "to": "IL.1605856887361213", "bodyVariable1": "Yossi", "bodyVariable2": "espresso machine", "quickReply1_id": "MORE_INFO", "quickReply2_id": "BOOK_DEMO", "quickReply3_id": "NOT_INTERESTED" } ] } ``` ### Example: Document + personal website The same PDF for everyone, with a personal dynamic website variable per destination. ```json { "from": "972771234567", "name": "invoice_pdf", "headerType": 5, "headerLink": "https://storage.99digital.online/samples/headerSample.pdf", "pdfFilename": "Invoice August 2026", "destinations": [ { "to": "972501234567", "bodyVariable1": "Dana Levi", "bodyVariable2": "August 2026", "bodyVariable3": "350 USD", "websiteVariable": "inv-4711" }, { "to": "IL.1605856887361213", "bodyVariable1": "Yossi Cohen", "bodyVariable2": "August 2026", "bodyVariable3": "120 USD", "websiteVariable": "inv-4712" } ] } ``` ### Example: Coupon codes A personal coupon code per destination, with the same expiration for all. ```json { "from": "972771234567", "name": "weekend_coupon", "headerType": 3, "headerLink": "https://storage.99digital.online/samples/hello.png", "couponExpiration": 1790500000, "destinations": [ { "to": "972501234567", "bodyVariable1": "Dana", "bodyVariable2": "20%", "couponCode": "DANA20" }, { "to": "IL.1605856887361213", "bodyVariable1": "Yossi", "bodyVariable2": "15%", "couponCode": "YOSSI15" } ] } ``` ### Example: Carousel The same carousel cards for everyone, with a personal body variable per destination. ```json { "from": "972771234567", "name": "products_carousel", "headerType": 1, "carouselCard1_headerLink": "https://storage.99digital.online/samples/hello.png", "carouselCard1_bodyVariable": "Leather wallet", "carouselCard1_websiteVariable": "wallet-01", "carouselCard1_quickReply1_id": "WANT_WALLET", "carouselCard2_headerLink": "https://storage.99digital.online/samples/hello.png", "carouselCard2_bodyVariable": "Canvas backpack", "carouselCard2_websiteVariable": "backpack-02", "carouselCard2_quickReply1_id": "WANT_BACKPACK", "carouselCard3_headerLink": "https://storage.99digital.online/samples/hello.png", "carouselCard3_bodyVariable": "Travel mug", "carouselCard3_websiteVariable": "mug-03", "carouselCard3_quickReply1_id": "WANT_MUG", "destinations": [ { "to": "972501234567", "bodyVariable1": "Dana" }, { "to": "IL.1605856887361213", "bodyVariable1": "Yossi" } ] } ``` ## 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 status doesn't mean the messages arrived to the end users, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your messages. Always `OK`. | | `timestamp` | integer | (one of: OK) Timestamp of the sending (Unix time, in seconds). Example: `1757610296`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `accepted` | integer | (one of: OK) How many destinations were processed successfully. | | `rejected` | integer | (one of: OK) How many destinations were rejected (wrong number, wrong `to`, wrong variables). Fix them and try again. | | `failed` | integer | (one of: OK) How many destinations failed (system error, WhatsApp error). Try again. | | `destinations` | array of object | (one of: OK) One item per destination, in the order you sent them: `unique` and `to` for each one that was sent (and its `body`, if you enabled `showBody`), or `to` and a `reason` for each one that was rejected or failed. | | `destinations[].unique` | string | (one of: OK) The unique ID of the message to this destination. | | `destinations[].to` | string | (one of: OK) The number or user id the message was sent to. | | `destinations[].body` | string | (one of: OK) The body of the template, including the variables (with `showBody` set to 1). | | `destinations[].reason` | integer | (one of: OK) For a destination that was rejected or failed: why (25, 26, 27, 28 or 22 — see the reasons below). | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. | | `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. Reasons 22 and 25–28 are given per destination, in `destinations`; when every destination is rejected, the whole request fails with reason 26. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `6` — WhatsApp error or template rejected; `12` — The template name does not exist; `14` — 'headerType' is missing or not 1, 2, 3, 4 or 5; `15` — You must provide headerVariable for this template, without special characters such as **; `21` — WhatsApp has rejected the sending of the template due to high volume sending. Please try to send again; `22` — The message to this destination could not be sent — try again (per destination); `23` — The destinations array is required and must be a non-empty array; `24` — At least one destination is required; `25` — One of the destinations is not an object (per destination); `26` — One of the destinations is missing the 'to' field, or 'to' is empty or in a wrong format. This error is per destination, not for the entire list — unless all the destinations have it; `27` — You provided a couponCode in the destination, but it's too long (15 characters maximum); `28` — A quickReplyX_id of the destination is invalid or too long (per destination); `29` — The carousel cards don't match the template created; `30` — carouselCardX_bodyVariable is missing or invalid (for any of the cards); `31` — carouselCardX_headerLink is missing, invalid or wrong; `32` — carouselCardX_websiteVariable is missing, invalid or wrong; `33` — carouselCardX_quickReply1_id or _quickReply2_id is invalid or wrong. | | `timestamp` | integer | (one of: FAIL) With reason 26 — the time of the request. | | `from` | string | (one of: FAIL) With reason 26 — your WhatsApp account. | | `destinations` | array of object | (one of: FAIL) With reason 26 — every destination, with its `to` and `reason`. | | `destinations[].to` | string | (one of: FAIL) The `to` of this destination, as you sent it. | | `destinations[].reason` | integer | (one of: FAIL) Why this destination was rejected (25, 26, 27 or 28 — see the reasons above). | #### Example: OK Both destinations were sent; `showBody` is 1, so each has its body. ```json { "status": "OK", "timestamp": 1757610296, "from": "972771234567", "accepted": 2, "rejected": 0, "failed": 0, "destinations": [ { "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972501234567", "body": "Welcome to the jungle! Your picks today are one, two and three." }, { "unique": "5ec46920d615aa3-x3c15a2dff350a1-3SIZZq8h9JVdA53", "to": "972509875654", "body": "Welcome to the jungle! Your picks today are four, five and six." } ], "reason": 1 } ``` #### Example: OK — one rejected Two destinations were sent; the third has a local number and was rejected with reason 26. ```json { "status": "OK", "timestamp": 1757610296, "from": "972771234567", "accepted": 2, "rejected": 1, "failed": 0, "destinations": [ { "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972501234567" }, { "unique": "5ec46920d615aa3-x3c15a2dff350a1-3SIZZq8h9JVdA53", "to": "IL.1605856887361213" }, { "to": "0501234", "reason": 26 } ], "reason": 1 } ``` #### Example: Reason 23 `destinations` is missing or empty. ```json { "status": "FAIL", "reason": 23 } ``` #### Example: Reason 26 Every destination was rejected, so nothing was sent. ```json { "status": "FAIL", "reason": 26, "timestamp": 1757610296, "from": "972771234567", "destinations": [ { "to": "0501234", "reason": 26 }, { "to": "05099", "reason": 26 } ] } ``` --- # Delete a Template Source: https://docs.99digital.co.il/whatsapp-api/templates/delete-a-template Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/templates/delete-a-template.md Section: WhatsApp API › Templates `POST https://api.99digital.co.il/whatsapp/v2/deleteTemplate` Delete a template from your WhatsApp account, by its name. Delete a Template allows you to delete a template from your account. Editing a template is not possible, so in order to change a template, you need to create a new one (and delete the old one if you wish). ## More Remarks - You can't use the name of a deleted template again for 30 days (when creating a template). - The template is deleted in every language you created it in. - A template whose name starts with `reserved_` can't be deleted (reason 7). See [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template). ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/deleteTemplate` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | name | The template name you want to delete | yes | ## Response ```json { "status": "OK", "name": "template_name", "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | name | The name of the template you deleted | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | The template name is missing or does not exist | | 6 | WhatsApp error | | 7 | This template can't be deleted — its name starts with `reserved_` | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `name` | string | Yes | The template name you want to delete. Example: `website_welcome`. | ### Example (generated from the schema) ```json { "from": "972771234567", "name": "website_welcome" } ``` ## 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 template is deleted from your account. Always `OK`. | | `name` | string | (one of: OK) The name of the template you deleted. Example: `website_welcome`. | | `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` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — The template name is missing or does not exist; `6` — WhatsApp error; `7` — This template can't be deleted — its name starts with `reserved_`. | #### Example: OK The template is deleted. ```json { "status": "OK", "name": "website_welcome", "reason": 1 } ``` #### Example: Reason 4 The template name does not exist. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 7 A `reserved_` template can't be deleted. ```json { "status": "FAIL", "reason": 7 } ``` --- # Get Profile Source: https://docs.99digital.co.il/whatsapp-api/profile/get-profile Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/profile/get-profile.md Section: WhatsApp API › Profile `POST https://api.99digital.co.il/whatsapp/v2/getProfile` Get Profile allows you to see all the settings within your WhatsApp account. You can change these settings with [Set Profile](https://docs.99digital.co.il/whatsapp-api/profile/set-profile). A new display name sent with Set Profile shows in `displayName` only after it has been approved. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getProfile` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | ## Response ```json { "status": "OK", "from": "972771234567", "displayName": "WhatsApp Display Name", "address": "business address", "description": "business description and the things we do", "email": "info@example.com", "type": 13, "website": "https://www.example.com", "about": "Hey there! I am using WhatsApp.", "conversations": 180, "dailyLimit": 1000, "profilePic": "https://storage.99digital.online/files/1789900000aB3dE9fGh1.jpg", "isVerifiedBusiness": 1, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp number | | displayName | WhatsApp display name that users see | | address | Business address. Empty when not set. | | description | Business description. Empty when not set. | | email | Company email address. Empty when not set. | | type | Business type number:
`1` - Automotive
`2` - Beauty, Spa and Salon
`3` - Clothing and Apparel
`4` - Education
`5` - Entertainment
`6` - Event Planning and Service
`7` - Finance and Banking
`8` - Food and Grocery
`9` - Public Service / Government
`10` - Hotel and Lodging
`11` - Medical and Health
`12` - Non-profit Organization
`13` - Professional Services
`14` - Shopping and Retail
`15` - Travel and Transportation
`16` - Restaurant
`17` - Other (also when no business type is set) | | website | Website address (URL). Empty when not set. | | about | The 'about' info from the WhatsApp profile | | conversations | Total count of all conversations for the current month. The number of conversations resets on the first day of every month at 4am Israel time. | | dailyLimit | The daily limit for new conversations in a rolling 24 hours: `250`, `1000`, `2000`, `10000` or `100000`; `1000000` means unlimited. | | profilePic | WhatsApp profile picture: a link to a copy of the current profile picture. Empty when there is no profile picture. | | isVerifiedBusiness | Shows if the business manager (from Meta) that manages this WhatsApp account is verified or not. Values:
`0` - Business status is unknown
`1` - The business is verified
`2` - The business is not verified
`3` - More information is needed to verify the business
`4` - Business is under review
`5` - Business verification has not been submitted yet
`6` - Business verification was rejected | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, JSON syntax error, or the profile could not be read (try again) | | 3 | Wrong apiKey, or the "from" number is not registered with us | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | ### Example (generated from the schema) ```json { "from": "972771234567" } ``` ## 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 response holds the settings of your WhatsApp account. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp number. Example: `972771234567`. | | `displayName` | string | (one of: OK) WhatsApp display name that users see. Example: `My Business Ltd`. | | `address` | string | (one of: OK) Business address. Empty when not set. Example: `Herzl 1, Tel Aviv`. | | `description` | string | (one of: OK) Business description. Empty when not set. Example: `Online store for gadgets`. | | `email` | string | (one of: OK) Company email address. Empty when not set. Example: `info@example.com`. | | `type` | integer | (one of: OK) Business type number. One of: `1` — Automotive; `2` — Beauty, Spa and Salon; `3` — Clothing and Apparel; `4` — Education; `5` — Entertainment; `6` — Event Planning and Service; `7` — Finance and Banking; `8` — Food and Grocery; `9` — Public Service / Government; `10` — Hotel and Lodging; `11` — Medical and Health; `12` — Non-profit Organization; `13` — Professional Services; `14` — Shopping and Retail; `15` — Travel and Transportation; `16` — Restaurant; `17` — Other (also when no business type is set). Example: `14`. | | `website` | string | (one of: OK) Website address (URL). Empty when not set. Example: `https://www.example.com`. | | `about` | string | (one of: OK) The 'about' info from the WhatsApp profile. Example: `Hey there! I am using WhatsApp.`. | | `conversations` | integer | (one of: OK) Total count of all conversations for the current month. The number of conversations resets on the first day of every month at 4am Israel time. Example: `180`. | | `dailyLimit` | integer | (one of: OK) The daily limit for new conversations in a rolling 24 hours: 250, 1000, 2000, 10000 or 100000; 1000000 means unlimited. Example: `1000`. | | `profilePic` | string | (one of: OK) WhatsApp profile picture: a link to a copy of the current profile picture. Empty when there is no profile picture. Example: `https://storage.99digital.online/files/1789900000aB3dE9fGh1.jpg`. | | `isVerifiedBusiness` | integer | (one of: OK) Shows if the business manager (from Meta) that manages this WhatsApp account is verified or not. One of: `0` — Business status is unknown; `1` — The business is verified; `2` — The business is not verified; `3` — More information is needed to verify the business; `4` — Business is under review; `5` — Business verification has not been submitted yet; `6` — Business verification was rejected. 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` — 'from' is missing, JSON syntax error, or the profile could not be read (try again); `3` — Wrong apiKey, or the "from" number is not registered with us. | #### Example: OK All the settings of your WhatsApp account. ```json { "status": "OK", "from": "972771234567", "displayName": "My Business Ltd", "address": "Herzl 1, Tel Aviv", "description": "Online store for gadgets", "email": "info@example.com", "type": 14, "website": "https://www.example.com", "about": "Hey there! I am using WhatsApp.", "conversations": 180, "dailyLimit": 1000, "profilePic": "https://storage.99digital.online/files/1789900000aB3dE9fGh1.jpg", "isVerifiedBusiness": 1, "reason": 1 } ``` #### Example: Reason 2 The profile could not be read — try again. ```json { "status": "FAIL", "reason": 2 } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` --- # Set Profile Source: https://docs.99digital.co.il/whatsapp-api/profile/set-profile Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/profile/set-profile.md Section: WhatsApp API › Profile `POST https://api.99digital.co.il/whatsapp/v2/setProfile` Set Profile allows you to change one or multiple settings within your WhatsApp account. ## More Remarks - None of the parameters (except `from`) is mandatory: you can set only the ones you need. Everything you leave out stays as it is. - You can't change or set the profile settings for [Coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) WhatsApp accounts: the profile can only be changed directly by the client in the mobile app. - You can see the current settings with [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile). ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/setProfile` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Maximum length | Remarks | | --- | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | | | | address | The address of your business.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough | 256 | If you need to clear this data, you can send `" "` (a space). | | description | Description of your business.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough | 256 | If you need to clear this data, you can send `" "` (a space). | | email | `info@example.com` | 128 | Must be a valid email format. If you need to clear this data, you can send `" "` (a space). | | type | You must choose a business category type:
`1` - Automotive
`2` - Beauty, Spa and Salon
`3` - Clothing and Apparel
`4` - Education
`5` - Entertainment
`6` - Event Planning and Service
`7` - Finance and Banking
`8` - Food and Grocery
`9` - Public Service / Government
`10` - Hotel and Lodging
`11` - Medical and Health
`12` - Non-profit Organization
`13` - Professional Services
`14` - Shopping and Retail
`15` - Travel and Transportation
`16` - Restaurant
`17` - Other | 2 | This parameter can be changed, but cannot be empty. | | website | `https://www.example.com` | 256 | Must be a valid website format. If you need to clear this data, you can send `" "` (a space). Must include `http` or `https`. The value can be a business website, Facebook page, Instagram, YouTube link etc. | | profilePic | `https://storage.99digital.online/samples/hello.png` | - | Must be a jpeg / jpg / png image link; the URL must be https.
The image needs to be square, with a max edge of 640px and a maximum file size of 5MB.
It is recommended to use 640x640; images smaller than 192px will not be approved. | | about | `Hi There, I'm using WhatsApp` | 139 | About section in the business profile. Can't be empty. | | displayName | `My New WhatsApp Name` | 75 | This is the WhatsApp number display name change. A few points for you to know:
• Minimum 3 characters, maximum 75 characters.
• The name will be sent to Meta for approval: an OK response means the name was submitted, not changed yet. You can check with [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile) whether the name has been approved (or you can see it in WhatsApp directly). It can take around 2-4 days.
• The name must be as similar as possible to your business name, or Meta will reject it.
• You can request a name change 10 times during 30 days.
• If your WhatsApp number has the green/blue official checkmark, this will not work, and you must contact support to change the name.
• This will not work for coexistence WhatsApp accounts, as they can change the `displayName` directly on the mobile phone.
• Don't include this parameter if you don't wish to change it. Sending your current name again does nothing (no new request to Meta, and no `displayName` in `returnedData`).
• If a request is sent, you can't request again until the new name is either approved or rejected. Wait a few days between requests.
• You can send `displayName` together with the other parameters. They are saved first, so if the name gets reason 14, the other settings were already saved. | ## Response ```json { "status": "OK", "reason": 1, "returnedData": { "address": "The address you provided" } } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | returnedData | An object that will show all the parameters you sent (`address`, `description`, `email`, `type`, `website`, `about`, `profilePic`, and `displayName` when a new name was submitted). A field you cleared shows as an empty string. Left out when you sent no parameter to change. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or invalid JSON | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `address` is too long | | 5 | `description` is too long | | 6 | `email` is too long, or invalid email address | | 7 | `type` must be an integer from 1 to 17 | | 8 | `website` is too long, or invalid website address | | 10 | `profilePic` URL is invalid, or the image could not be downloaded from it | | 11 | `about` is invalid or too long | | 12 | Unknown error - please contact support | | 13 | `displayName` value is invalid or wrong | | 14 | `displayName` received an error on Meta's side; the other profile settings (if sent) were saved successfully | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `address` | string | No | The address of your business. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. If you need to clear this data, you can send `" "` (a space). Max length: 256. Example: `Herzl 1, Tel Aviv`. | | `description` | string | No | Description of your business. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. If you need to clear this data, you can send `" "` (a space). Max length: 256. Example: `Online store for gadgets. Free delivery over 200 NIS.`. | | `email` | string (email) | No | Company email address. Must be a valid email format. If you need to clear this data, you can send `" "` (a space). Max length: 128. Example: `info@example.com`. | | `type` | integer | No | The business category type. This parameter can be changed, but it can't be cleared. One of: `1` — Automotive; `2` — Beauty, Spa and Salon; `3` — Clothing and Apparel; `4` — Education; `5` — Entertainment; `6` — Event Planning and Service; `7` — Finance and Banking; `8` — Food and Grocery; `9` — Public Service / Government; `10` — Hotel and Lodging; `11` — Medical and Health; `12` — Non-profit Organization; `13` — Professional Services; `14` — Shopping and Retail; `15` — Travel and Transportation; `16` — Restaurant; `17` — Other. Example: `14`. | | `website` | string (uri) | No | Must be a valid website address, including `http://` or `https://`. The value can be a business website, Facebook page, Instagram, YouTube link etc. If you need to clear this data, you can send `" "` (a space). Max length: 256. Example: `https://www.example.com`. | | `profilePic` | string (uri) | No | A link to a jpeg / jpg / png image; the URL must be https. The image needs to be square, with a max edge of 640px and a maximum file size of 5MB. It is recommended to use 640x640; images smaller than 192px will not be approved. Example: `https://storage.99digital.online/samples/hello.png`. | | `about` | string | No | About section in the business profile. Can't be empty. Max length: 139. Example: `Available Sun-Thu 09:00-17:00`. | | `displayName` | string | No | This is the WhatsApp number display name change. A few points for you to know: - Minimum 3 characters, maximum 75 characters. - The name will be sent to Meta for approval: an OK response means the name was submitted, not changed yet. You can check with [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile) whether the name has been approved (or you can see it in WhatsApp directly). It can take around 2-4 days. - The name must be as similar as possible to your business name, or Meta will reject it. - You can request a name change 10 times during 30 days. - If your WhatsApp number has the green/blue official checkmark, this will not work, and you must contact support to change the name. - This will not work for coexistence WhatsApp accounts, as they can change the display name directly on the mobile phone. - Don't include this parameter if you don't wish to change it. Sending your current name again does nothing. - If a request is sent, you can't request again until the new name is either approved or rejected. Wait a few days between requests. Min length: 3. Max length: 75. Example: `My Business Store`. | ### Example: Profile texts Update the texts of the profile — send only the ones you want to change. ```json { "from": "972771234567", "address": "Herzl 1, Tel Aviv", "description": "Online store for gadgets. Free delivery over 200 NIS.", "email": "info@example.com", "website": "https://www.example.com", "about": "Available Sun-Thu 09:00-17:00" } ``` ### Example: Business type Only the business category, a number from 1 to 17. ```json { "from": "972771234567", "type": 14 } ``` ### Example: Display name Submit a new display name to Meta for approval. ```json { "from": "972771234567", "displayName": "My Business Store" } ``` ### Example: Profile picture A new profile picture: a link to a square jpg / png image, up to 640x640 and 5MB. ```json { "from": "972771234567", "profilePic": "https://storage.99digital.online/samples/hello.png" } ``` ### Example: Clear fields A single space clears `address`, `description`, `email` or `website`. ```json { "from": "972771234567", "address": " ", "website": " " } ``` ## 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 settings you sent were saved (a new `displayName` was submitted to Meta for approval). Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `returnedData` | object | (one of: OK) An object that shows all the parameters you sent (`address`, `description`, `email`, `type`, `website`, `about`, `profilePic`, and `displayName` when a new name was submitted). A field you cleared shows as an empty string. Left out when you sent no parameter to change. | | `returnedData.address` | string | (one of: OK) The business address you sent. An empty string when you cleared it. | | `returnedData.description` | string | (one of: OK) The business description you sent. An empty string when you cleared it. | | `returnedData.email` | string | (one of: OK) The company email address you sent. An empty string when you cleared it. | | `returnedData.type` | integer | (one of: OK) The business category type you sent (1 to 17). | | `returnedData.website` | string | (one of: OK) The website address you sent. An empty string when you cleared it. | | `returnedData.profilePic` | string | (one of: OK) The link to the profile picture image you sent. | | `returnedData.about` | string | (one of: OK) The 'about' text you sent. | | `returnedData.displayName` | string | (one of: OK) The name submitted to Meta for approval — not changed yet. | | `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` — 'from' is missing, or invalid JSON; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'address' is too long; `5` — 'description' is too long; `6` — 'email' is too long, or invalid email address; `7` — 'type' must be an integer from 1 to 17; `8` — 'website' is too long, or invalid website address; `10` — 'profilePic' URL is invalid, or the image could not be downloaded from it; `11` — 'about' is invalid or too long; `12` — Unknown error — please contact support; `13` — 'displayName' value is invalid or wrong; `14` — 'displayName' received an error on Meta's side; the other profile settings (if sent) were saved successfully. | #### Example: OK The profile texts were updated. ```json { "status": "OK", "reason": 1, "returnedData": { "address": "Herzl 1, Tel Aviv", "description": "Online store for gadgets. Free delivery over 200 NIS.", "email": "info@example.com", "website": "https://www.example.com", "about": "Available Sun-Thu 09:00-17:00" } } ``` #### Example: Display name The new display name was submitted to Meta for approval. ```json { "status": "OK", "reason": 1, "returnedData": { "displayName": "My Business Store" } } ``` #### Example: Clear fields The cleared fields show as empty strings. ```json { "status": "OK", "reason": 1, "returnedData": { "address": "", "website": "" } } ``` #### Example: Reason 6 'email' is too long, or invalid email address. ```json { "status": "FAIL", "reason": 6 } ``` #### Example: Reason 10 'profilePic' URL is invalid, or the image could not be downloaded. ```json { "status": "FAIL", "reason": 10 } ``` #### Example: Reason 14 Meta refused the display name request; the other settings you sent were saved. ```json { "status": "FAIL", "reason": 14 } ``` --- # Explanation - Start here Source: https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/explanation-start-here Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/whatsapp-calls/explanation-start-here.md Section: WhatsApp API › WhatsApp Calls **WhatsApp Calling** lets your WhatsApp API line receive incoming voice calls from end users, directly through WhatsApp. :::info This feature is not available for [Coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) accounts — for those, incoming calls go to the linked personal WhatsApp app instead, so this feature doesn't apply. ::: Once enabled, a call icon appears at the top of the chat for end users on that WhatsApp line. When they tap it, the call is routed to the SIP trunk address you provide — connecting directly to your own call center system or PBX, where you can implement IVR, call forwarding, or any routing logic you choose. To enable this feature for your WhatsApp account, please contact support first. Once enabled, you can configure and manage your line through the `/setCall` endpoint. | Endpoint | What it does | | --- | --- | | [Set Call Configuration](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/set-call-configuration) | Set your SIP server, turn calling on or off, and set the hours when customers can call you. | | [Get Call Settings](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/get-call-settings) | See your current calling settings. | ## How a call reaches you - The call is sent to your SIP server as `sip:@:;transport=` — your WhatsApp number without `+`, for example `sip:972771234567@sip.your-company.com:5060;transport=udp`. - Calls are forwarded only once `sip_host`, `sip_port` and `sip_transport` are all set with [Set Call Configuration](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/set-call-configuration). - All incoming calls (SIP signaling and RTP media) come from IP **34.165.246.158**, so don't forget to whitelist it. - Calling is only available for numbers whose daily limit is at least 2000 conversations (see [Rate Limit](https://docs.99digital.co.il/whatsapp-api/information/rate-limit)). - By default, you can have 1 concurrent call; calls above your limit are rejected. If you need to upgrade your plan, please contact support. --- # Set Call Configuration Source: https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/set-call-configuration Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/whatsapp-calls/set-call-configuration.md Section: WhatsApp API › WhatsApp Calls `POST https://api.99digital.co.il/whatsapp/v2/setCall` Set your SIP server, turn WhatsApp calling on or off, and set the hours when customers can call you. Set Call allows you to set the SIP trunk information where you wish to get the incoming calls. This can only work once our support team has enabled the WhatsApp calling feature for your account (see [Explanation - Start here](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/explanation-start-here)). ## Important information - In this endpoint you need to provide the SIP server information and enable the calling feature. - The WhatsApp calling feature is only available for numbers whose daily limit is at least 2000 conversations (`dailyLimit` in [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile)). - Your SIP server must be reachable from the internet at the public hostname or public IPv4. - All incoming calls (SIP signaling and RTP media) will be coming from IP **34.165.246.158**, so don't forget to whitelist it. - Calls are forwarded to your SIP server only once `sip_host`, `sip_port` and `sip_transport` are all set. - Default codecs are PCMU and PCMA (G.711). You can change them with the `codec_pref` parameter. - By default, you can have 1 concurrent call. If you need to upgrade your plan, please contact support. Calls above your limit are rejected. - Only the `from` in the body is mandatory. Send only what you want to change: everything you leave out stays as it is. - You can see your current settings with [Get Call Settings](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/get-call-settings). ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/setCall` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Maximum length | Remarks | | --- | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | | Mandatory | | status | Boolean.
`true` to enable calling (show the calling icon)
`false` to disable calling | | Your settings are kept. This is purely the call icon at the top of the chat. | | sip_host | Public hostname or IPv4 of your SIP server. Can't be empty. Private / internal addresses (and IPv6) are refused. | 253 | Hostname or IP. For example: `sip.your-company.com` or `153.65.210.52` | | sip_port | The port number of your SIP host. | 5 | Must be between 1-65535. Usually the default is 5060 (UDP/TCP) or 5061 (TLS). Can't be empty. | | sip_transport | The SIP transport value. Available values: `udp` / `tcp` / `tls` | 3 | Can't be empty. | | client_auth | `{"username": "some-username", "password": "some-password"}`
This is the username and password for digest authentication. Letters, digits and `. _ - @ ! # % * + = ~ : / ?` | 128 each | This value is in case your server requires authentication. It is not mandatory, but if `username` is provided, `password` must be provided too (and the other way around). Send `{}` to remove them. | | codec_pref | Comma-separated codecs in order of preference. Default is `PCMU,PCMA`. Letters, digits and `@ . _ -` | 50 per codec, 200 in total | Can't be empty. For example: `PCMU,PCMA,OPUS` | | call_hours | See "Call hours" below | See below | See below | ## Call hours - The `call_hours` parameter controls when customers can call you. - Without call hours, customers will see the call icon 24/7 and will be able to call you. - Call hours allow you to hide this icon at specific times when you can't take those calls in your call center. WhatsApp will show that you are not available and show your call availability in the app. - The default is call hours off, so the call button is available 24/7. - A day you leave out is closed all day. In the example below, Saturday is closed. - Every `call_hours` you send in a new request replaces the entire object you previously provided, including the holidays. Always send the complete object if you wish to update this parameter. - To remove the hours so customers can call you 24/7, you can simply send `"call_hours": {}`. To keep the hours saved but not enforce them, send the complete `call_hours` object with `"status": "DISABLED"`. - Common mistakes: write the times as `HHMM`, e.g. `"0900"` (`"09:00"` is accepted too, and saved as `"0900"`). Don't write `"2400"`, write `"2359"`. Don't write `"SUN"`, write `"SUNDAY"` (capitals). Don't write holiday dates in the past, otherwise you will get an error with reason 13. The `call_hours` is an object that contains the status, time zone, working hours and holidays. When you enable it, the call button shows only during the provided hours. Example of the `call_hours` object: ```json "call_hours": { "status": "ENABLED", "timezone_id": "Asia/Jerusalem", "weekly_operating_hours": [ { "day_of_week": "SUNDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "MONDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "TUESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "WEDNESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "THURSDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "FRIDAY", "open_time": "0900", "close_time": "1300" } ], "holiday_schedule": [ { "date": "2027-04-22", "start_time": "0000", "end_time": "2359" } ] } ``` ### call_hours explained | Parameter | Description / Example | What to provide | Example | | --- | --- | --- | --- | | status | `ENABLED` (default)
or
`DISABLED` (this keeps the saved data but accepts calls 24/7) | Optional — when left out, the status is `ENABLED`. | `ENABLED` | | timezone_id | IANA format time zone. | The time zone you wish the hours to take effect in. Required when `status` is `ENABLED`. | `Asia/Jerusalem` | | weekly_operating_hours | Array of hours and days | 1–14 entries. `day_of_week` = `MONDAY` … `SUNDAY`. `open_time` / `close_time` = 24-hour `HHMM` with no colon (`0900`, `1730`; the end of the day is `2359`). Open must be before close. Up to 2 non-overlapping entries per day for split shifts, e.g. `0800`–`1200` and `1600`–`2000`. Required when `status` is `ENABLED`. | `{ "day_of_week": "SUNDAY", "open_time": "0900", "close_time": "1700" }`,
`{ "day_of_week": "MONDAY", "open_time": "0900", "close_time": "1700" }`,
`{ "day_of_week": "TUESDAY", "open_time": "0900", "close_time": "1700" }`,
`{ "day_of_week": "WEDNESDAY", "open_time": "0900", "close_time": "1700" }`,
`{ "day_of_week": "THURSDAY", "open_time": "0900", "close_time": "1700" }`,
`{ "day_of_week": "FRIDAY", "open_time": "0900", "close_time": "1300" }` | | holiday_schedule | Array of selected dates that will be closed | Optional, up to 20 dates that override the weekly hours. `date` = `YYYY-MM-DD`, today or later; `start_time` / `end_time` in `HHMM` (start before end). `0000`–`2359` closes the whole day. | `{ "date": "2027-04-22", "start_time": "0000", "end_time": "2359" }` | ## Full setCall example request ```json { "from": "972771234567", "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "codec_pref": "PCMU,PCMA", "client_auth": { "username": "whatsapp", "password": "Str0ng-Pass!" } } ``` ## Response ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "client_auth": null, "codec_pref": "PCMU,PCMA", "call_hours": null, "concurrency_limit": 1 }, "reason": 1 } ``` The response always carries the complete current settings, also when nothing needed to change. When the status is FAIL, nothing was saved. ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp account | | calling | Your returned settings: always the complete current settings, not only what you sent. Anything never set is `null`. The fields are the same as in [Get Call Settings](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/get-call-settings), including the read-only `concurrency_limit`. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, invalid JSON, or a temporary error — try again | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `status` must be true / false | | 5 | `sip_host` is empty, invalid, or a private / internal address | | 6 | `sip_port` is empty, invalid, or not between 1 and 65535 | | 7 | `sip_transport` must be udp / tcp / tls | | 8 | `client_auth` is missing the username / password, or has characters that are not allowed | | 9 | `codec_pref` is empty or invalid | | 10 | `call_hours` is not an object, or its status is not ENABLED / DISABLED | | 11 | `timezone_id` is missing for `call_hours`, or is not a valid IANA time zone | | 12 | `weekly_operating_hours` is missing or empty, or one of its entries is invalid (day, time, open not before close, more than 2 or overlapping entries in a day, more than 14 entries) | | 13 | `holiday_schedule` is invalid (or a date is in the past) | | 14 | Calling can't be enabled: the daily limit of the number must be at least 2000 conversations | | 15 | Calling is temporarily disabled for this number (call quality or spam) | | 16 | The support team did not enable calling for your number, please contact support | | 17 | Settings rejected, please contact support | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `status` | boolean | No | `true` to enable calling (show the calling icon), `false` to disable calling. Your settings are kept: this is purely the call icon at the top of the chat. Example: `true`. | | `sip_host` | string | No | Public hostname or IPv4 of your SIP server, for example `sip.your-company.com` or `153.65.210.52`. Can't be empty. Private / internal addresses and IPv6 are refused. Max length: 253. Example: `sip.your-company.com`. | | `sip_port` | integer | No | The port number of your SIP host, between 1 and 65535. Usually 5060 (UDP / TCP) or 5061 (TLS). Can't be empty. Minimum: 1. Maximum: 65535. Example: `5060`. | | `sip_transport` | string | No | The SIP transport value — `udp`, `tcp` or `tls`. Can't be empty. One of: `udp` — SIP over UDP (the usual port is 5060); `tcp` — SIP over TCP (the usual port is 5060); `tls` — SIP over TLS (the usual port is 5061). Example: `udp`. | | `client_auth` | object | No | `{"username": "some-username", "password": "some-password"}` — the username and password for digest authentication. This value is in case your SIP server requires authentication. It is not mandatory, but if `username` is provided, `password` must be provided too (and the other way around). Send `{}` to remove them. | | `client_auth.username` | string | No | The username for digest authentication. Letters, digits and `. _ - @ ! # % * + = ~ : / ?`, up to 128 characters. Max length: 128. Pattern: `^[A-Za-z0-9._@!#%*+=~:/?-]{1,128}$`. Example: `whatsapp`. | | `client_auth.password` | string | No | The password for digest authentication. Letters, digits and `. _ - @ ! # % * + = ~ : / ?`, up to 128 characters. Max length: 128. Pattern: `^[A-Za-z0-9._@!#%*+=~:/?-]{1,128}$`. Example: `Str0ng-Pass!`. | | `codec_pref` | string | No | Comma-separated codecs in order of preference, for example `PCMU,PCMA,OPUS`. Default is `PCMU,PCMA`. Letters, digits and `@ . _ -`, up to 50 characters per codec. Can't be empty. Default: `PCMU,PCMA`. Max length: 200. Example: `PCMU,PCMA`. | | `call_hours` | object | No | When customers can call you: an object that contains the status, time zone, working hours and holidays — see "Call hours" above. Every `call_hours` you send replaces the entire object you previously provided, including the holidays. Send `{}` to remove the hours, so customers can call you 24/7. | | `call_hours.status` | string | No | `ENABLED` (default) shows the call button only during the hours. `DISABLED` keeps the saved data but accepts calls 24/7. Optional — when left out, the status is `ENABLED`. One of: `ENABLED` — The call button shows only during the provided hours (default); `DISABLED` — The hours stay saved, but customers can call you 24/7. Send the complete object with this status to keep the hours. Default: `ENABLED`. Example: `ENABLED`. | | `call_hours.timezone_id` | string | No | IANA format time zone: the time zone you wish the hours to take effect in. Required when `status` is `ENABLED`. Example: `Asia/Jerusalem`. | | `call_hours.weekly_operating_hours` | array of object | No | Array of days and hours, 1–14 entries. Required when `status` is `ENABLED`. Up to 2 non-overlapping entries per day for split shifts, e.g. `0800`–`1200` and `1600`–`2000`. A day you leave out is closed all day. Min items: 1. Max items: 14. | | `call_hours.weekly_operating_hours[].day_of_week` | string | Yes | The day of the week, in capitals (`SUNDAY`, not `SUN`). A day you leave out is closed all day. One of: `MONDAY` — Monday; `TUESDAY` — Tuesday; `WEDNESDAY` — Wednesday; `THURSDAY` — Thursday; `FRIDAY` — Friday; `SATURDAY` — Saturday; `SUNDAY` — Sunday. Example: `SUNDAY`. | | `call_hours.weekly_operating_hours[].open_time` | string | Yes | 24-hour `HHMM` with no colon (`0900`, `1730`). Open must be before close. Example: `0900`. | | `call_hours.weekly_operating_hours[].close_time` | string | Yes | 24-hour `HHMM` with no colon; the end of the day is `2359`. Example: `1700`. | | `call_hours.holiday_schedule` | array of object | No | Array of selected dates that will be closed. Optional, up to 20 dates that override the weekly hours. `0000`–`2359` closes the whole day. Max items: 20. | | `call_hours.holiday_schedule[].date` | string (date) | Yes | `YYYY-MM-DD`, today or later. Example: `2027-04-22`. | | `call_hours.holiday_schedule[].start_time` | string | Yes | The time the closing starts, `HHMM`. Start must be before end. Example: `0000`. | | `call_hours.holiday_schedule[].end_time` | string | Yes | The time the closing ends, `HHMM` (`2359` for the end of the day). Example: `2359`. | ### Example: Enable calling Turn calling on and forward the calls to your SIP server. ```json { "from": "972771234567", "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "codec_pref": "PCMU,PCMA" } ``` ### Example: Digest auth Your SIP server, with the username and password your server asks for (digest authentication). ```json { "from": "972771234567", "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "codec_pref": "PCMU,PCMA", "client_auth": { "username": "whatsapp", "password": "Str0ng-Pass!" } } ``` ### Example: Call hours Sunday to Thursday 09:00–17:00 and Friday 09:00–13:00; Saturday (left out) and the holiday are closed. ```json { "from": "972771234567", "call_hours": { "status": "ENABLED", "timezone_id": "Asia/Jerusalem", "weekly_operating_hours": [ { "day_of_week": "SUNDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "MONDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "TUESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "WEDNESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "THURSDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "FRIDAY", "open_time": "0900", "close_time": "1300" } ], "holiday_schedule": [ { "date": "2027-04-22", "start_time": "0000", "end_time": "2359" } ] } } ``` ### Example: Split shifts Two entries a day: 08:00–12:00 and 16:00–20:00, Sunday to Thursday. No holidays are sent, so the holidays saved before are removed. ```json { "from": "972771234567", "call_hours": { "status": "ENABLED", "timezone_id": "Asia/Jerusalem", "weekly_operating_hours": [ { "day_of_week": "SUNDAY", "open_time": "0800", "close_time": "1200" }, { "day_of_week": "SUNDAY", "open_time": "1600", "close_time": "2000" }, { "day_of_week": "MONDAY", "open_time": "0800", "close_time": "1200" }, { "day_of_week": "MONDAY", "open_time": "1600", "close_time": "2000" }, { "day_of_week": "TUESDAY", "open_time": "0800", "close_time": "1200" }, { "day_of_week": "TUESDAY", "open_time": "1600", "close_time": "2000" }, { "day_of_week": "WEDNESDAY", "open_time": "0800", "close_time": "1200" }, { "day_of_week": "WEDNESDAY", "open_time": "1600", "close_time": "2000" }, { "day_of_week": "THURSDAY", "open_time": "0800", "close_time": "1200" }, { "day_of_week": "THURSDAY", "open_time": "1600", "close_time": "2000" } ] } } ``` ### Example: Keep hours, accept 24/7 The complete `call_hours` object with status `DISABLED`: the hours stay saved, but customers can call you 24/7. ```json { "from": "972771234567", "call_hours": { "status": "DISABLED", "timezone_id": "Asia/Jerusalem", "weekly_operating_hours": [ { "day_of_week": "SUNDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "MONDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "TUESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "WEDNESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "THURSDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "FRIDAY", "open_time": "0900", "close_time": "1300" } ] } } ``` ### Example: Remove call hours An empty `call_hours` removes the hours — customers can call you 24/7. ```json { "from": "972771234567", "call_hours": {} } ``` ### Example: Disable calling Remove the call icon. Your SIP settings and call hours stay saved; `status: true` turns calling back on with them. ```json { "from": "972771234567", "status": false } ``` ## 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 — your settings were saved; `calling` shows them. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `calling` | object | (one of: OK) Your returned settings: always the complete current settings, not only what you sent. Anything never set is `null`. | | `calling.status` | boolean | (one of: OK) `true` when calling is enabled (the call icon is shown); `false` when it is disabled or was never enabled. Example: `true`. | | `calling.sip_host` | string \| null | (one of: OK) The SIP host you provided (SIP trunk). Example: `sip.your-company.com`. | | `calling.sip_port` | integer \| null | (one of: OK) The SIP port you provided. Example: `5060`. | | `calling.sip_transport` | string \| null | (one of: OK) The transport you provided. Example: `udp`. | | `calling.client_auth` | object \| null | (one of: OK) The `username` / `password` you provided, if any; `null` when there is no authentication. | | `calling.client_auth.username` | string | (one of: OK) The username for digest authentication, as you set it. | | `calling.client_auth.password` | string | (one of: OK) The password for digest authentication, as you set it. | | `calling.codec_pref` | string | (one of: OK) The codecs in use — `PCMU,PCMA` until you set your own. Example: `PCMU,PCMA`. | | `calling.call_hours` | object \| null | (one of: OK) The call hours you provided, as saved (times as `HHMM`, days in capitals); `null` when there are no call hours. | | `calling.concurrency_limit` | integer | (one of: OK) The number of concurrent calls allowed for your account (1 by default). Read-only: contact support if you need more. 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 and nothing was saved. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, invalid JSON, or a temporary error — try again; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'status' must be true / false; `5` — 'sip_host' is empty, invalid, or a private / internal address; `6` — 'sip_port' is empty, invalid, or not between 1 and 65535; `7` — 'sip_transport' must be udp / tcp / tls; `8` — 'client_auth' is missing the username / password, or has characters that are not allowed; `9` — 'codec_pref' is empty or invalid; `10` — 'call_hours' is not an object, or its status is not ENABLED / DISABLED; `11` — 'timezone_id' is missing for call_hours, or is not a valid IANA time zone; `12` — 'weekly_operating_hours' is missing or empty, or one of its entries is invalid (day, time, open not before close, more than 2 or overlapping entries in a day, more than 14 entries); `13` — 'holiday_schedule' is invalid (or a date is in the past); `14` — Calling can't be enabled: the daily limit of the number must be at least 2000 conversations; `15` — Calling is temporarily disabled for this number (call quality or spam); `16` — The support team did not enable calling for your number, please contact support; `17` — Settings rejected, please contact support. | #### Example: OK Calling is on, and the calls are forwarded to your SIP server. ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "client_auth": null, "codec_pref": "PCMU,PCMA", "call_hours": null, "concurrency_limit": 1 }, "reason": 1 } ``` #### Example: OK + digest auth The response to the "Digest auth" request, on a number where calling was enabled before. ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "client_auth": { "username": "whatsapp", "password": "Str0ng-Pass!" }, "codec_pref": "PCMU,PCMA", "call_hours": null, "concurrency_limit": 1 }, "reason": 1 } ``` #### Example: OK + call hours The response to the "Call hours" request, on a number whose SIP server was set before. ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "client_auth": null, "codec_pref": "PCMU,PCMA", "call_hours": { "status": "ENABLED", "timezone_id": "Asia/Jerusalem", "weekly_operating_hours": [ { "day_of_week": "SUNDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "MONDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "TUESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "WEDNESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "THURSDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "FRIDAY", "open_time": "0900", "close_time": "1300" } ], "holiday_schedule": [ { "date": "2027-04-22", "start_time": "0000", "end_time": "2359" } ] }, "concurrency_limit": 1 }, "reason": 1 } ``` #### Example: Reason 5 'sip_host' is empty, invalid, or a private / internal address. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 13 'holiday_schedule' is invalid — for example, a date in the past. ```json { "status": "FAIL", "reason": 13 } ``` #### Example: Reason 14 The daily limit of the number is below 2000 conversations. ```json { "status": "FAIL", "reason": 14 } ``` #### Example: Reason 16 Calling was not enabled for your number yet — contact support. ```json { "status": "FAIL", "reason": 16 } ``` --- # Get Call Settings Source: https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/get-call-settings Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/whatsapp-calls/get-call-settings.md Section: WhatsApp API › WhatsApp Calls `POST https://api.99digital.co.il/whatsapp/v2/getCall` See your current WhatsApp calling settings: your SIP server, call hours and concurrent call limit. The Get Call endpoint allows you to see the settings you provided on [`/setCall`](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/set-call-configuration), plus the number of concurrent calls allowed for your account. Anything you never set is `null`, `status` is `false` until you enable calling, and `codec_pref` shows the default `PCMU,PCMA` until you set your own. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getCall` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | ## Response ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "client_auth": null, "codec_pref": "PCMU,PCMA", "call_hours": null, "concurrency_limit": 1 }, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp account | | calling->status | `true` or `false`: `true` when calling is enabled (the call icon is shown) | | calling->sip_host | The SIP host you provided (SIP trunk) | | calling->sip_port | The SIP port you provided | | calling->sip_transport | The transport you provided | | calling->client_auth | The `username` / `password`, if provided; `null` when there is no authentication | | calling->codec_pref | The codecs in use — `PCMU,PCMA` until you set your own | | calling->call_hours | The call hours you provided, as saved; `null` when there are no call hours | | calling->concurrency_limit | The number of concurrent calls allowed for your account (1 by default). Contact support if you need more. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or invalid JSON | | 3 | Wrong apiKey, or the "from" number is not registered with us | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | ### Example (generated from the schema) ```json { "from": "972771234567" } ``` ## 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 response carries your calling settings. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `calling` | object | (one of: OK) Your calling settings. | | `calling.status` | boolean | (one of: OK) `true` or `false`: `true` when calling is enabled (the call icon is shown). Example: `true`. | | `calling.sip_host` | string \| null | (one of: OK) The SIP host you provided (SIP trunk). Example: `sip.your-company.com`. | | `calling.sip_port` | integer \| null | (one of: OK) The SIP port you provided. Example: `5060`. | | `calling.sip_transport` | string \| null | (one of: OK) The transport you provided. Example: `udp`. | | `calling.client_auth` | object \| null | (one of: OK) The `username` / `password`, if provided; `null` when there is no authentication. | | `calling.client_auth.username` | string | (one of: OK) The username your SIP server accepts for digest authentication, as you set it with Set Call. | | `calling.client_auth.password` | string | (one of: OK) The password your SIP server accepts for digest authentication, as you set it with Set Call. | | `calling.codec_pref` | string | (one of: OK) The codecs in use — `PCMU,PCMA` until you set your own. Example: `PCMU,PCMA`. | | `calling.call_hours` | object \| null | (one of: OK) The call hours you provided, as saved; `null` when there are no call hours. | | `calling.concurrency_limit` | integer | (one of: OK) The number of concurrent calls allowed for your account (1 by default). Contact support if you need more. 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` — 'from' is missing, or invalid JSON; `3` — Wrong apiKey, or the "from" number is not registered with us. | #### Example: OK Calling is on, and the calls are forwarded to your SIP server. ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "client_auth": null, "codec_pref": "PCMU,PCMA", "call_hours": null, "concurrency_limit": 1 }, "reason": 1 } ``` #### Example: All settings With digest authentication and call hours. ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5061, "sip_transport": "tls", "client_auth": { "username": "whatsapp", "password": "Str0ng-Pass!" }, "codec_pref": "PCMU,PCMA", "call_hours": { "status": "ENABLED", "timezone_id": "Asia/Jerusalem", "weekly_operating_hours": [ { "day_of_week": "SUNDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "MONDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "TUESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "WEDNESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "THURSDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "FRIDAY", "open_time": "0900", "close_time": "1300" } ], "holiday_schedule": [ { "date": "2027-04-22", "start_time": "0000", "end_time": "2359" } ] }, "concurrency_limit": 1 }, "reason": 1 } ``` #### Example: Not set yet Nothing was set yet — calling is off. ```json { "status": "OK", "from": "972771234567", "calling": { "status": false, "sip_host": null, "sip_port": null, "sip_transport": null, "client_auth": null, "codec_pref": "PCMU,PCMA", "call_hours": null, "concurrency_limit": 1 }, "reason": 1 } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` --- # Template, Conversation and Message Source: https://docs.99digital.co.il/whatsapp-api/information/template-conversation-and-message Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/information/template-conversation-and-message.md Section: WhatsApp API › Information This page is here to explain the difference between template session time, conversation session time and regular messages, just in case you are still confused. **Template and messages explanation** ## Outgoing | Message type | When you can use it | Opens a 24-hour session? | Counted? | Billed? | | --- | --- | --- | --- | --- | | Regular message ([sendMessage](https://docs.99digital.co.il/whatsapp-api/send-message), [sendFile](https://docs.99digital.co.il/whatsapp-api/send-file), [sendButtons](https://docs.99digital.co.il/whatsapp-api/send-buttons), etc.) | Only if the client sent a message in the last 24 hours | No | No | No | | Marketing template | Anytime you want.
Better not to use it if a 24-hour incoming session is already open. | No | Yes, every template message | Yes | | Utility template | Anytime you want | No | If a 24-hour session is open between you and the client (meaning that the client sent you a message), we don't count.
If the 24-hour session is closed, we count every template message. | A utility template is billed only if there is no 24-hour session open between you and the client | | Authentication template | Anytime you want | No | Yes, every template message | Yes | ## Incoming | Message type | Opens a 24-hour session? | Counted? | Billed? | | --- | --- | --- | --- | | Incoming message for the first time in 24 hours (no session is open) | Yes | Yes | Depends on your contract terms with 99 Digital | | Incoming message within 24 hours of the message that opened the session | No, the session is still open | No | No | ## Counted vs. billed "Counted" means that our system counts the session or the template and shows it to you on the webhook (`isNewConversation` on an incoming message, `isBilledTemplate` on a status update). The counting makes it easier for you to know when there is a new interaction between the business and the client. This is mostly for statistics and usage transparency. "Billed" means that our system is billing your business for this event. This is what we charge you on the monthly usage invoice. The counting for an **incoming message** happens when the client sends a message (and this is unrelated to any template messages you sent to the client prior to that). This opens an incoming message conversation session. The session lasts 24 hours from that message; the client's first message after that opens, and is counted as, a new session. The counting for the **templates** only happens when the business sends a billed template to the user and the status of the template is either "read" or "delivered". There is no billing or counting if the status remains "sent" or changes to "failed". ## Easy examples for incoming messages and business messages | Scenario | Counted as | Billed? | | --- | --- | --- | | Client sends a new message to the business, and the business replies with a utility template right away | Incoming message session | Depends on your contract | | Client sends a new message to the business, and the business replies with a marketing template (not recommended) | 1 incoming message session + 1 marketing template | Yes | | Client sends a new message to the business, and the business replies with a regular message | Incoming message session | Depends on your contract | | Client sends a new message to the business, and the business replies back after more than 24 hours with a utility template | 1 incoming message session + 1 utility template | Yes | | Client sends 1 new message to the business, and then sends another 100 different messages to the business within 24 hours | 1 incoming session | Depends on your contract | | Client sends a message to the business (a 24-hour session is open), and the business replies with either a utility template or a regular message | No count | No | | Business sends a utility template, the client replies back, and the business sends another utility template message | 1 utility template + 1 incoming session | Yes | | Business sends a utility template, the client did not reply back, and the business sends another utility template message | 2 utility templates | Yes | | Business sends a utility template, the client replies back, and the business sends a marketing template | 1 utility template + 1 incoming session + 1 marketing template | Yes | | Business sends an authentication template | 1 authentication template | Yes | \*\* "Client sends a new message" means a new message after 24 hours: a message sent when no session is open, more than 24 hours after the message that opened the previous session. ![A client message starts a 24-hour session. Inside the session, regular messages (text, file, buttons) and utility templates are free to send. After 24 hours the session is closed: regular messages are not allowed, and marketing and utility templates are billed.](https://storage.99digital.online/docs/information1.png) If you have more questions regarding this, please contact support. --- # Rate Limit Source: https://docs.99digital.co.il/whatsapp-api/information/rate-limit Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/information/rate-limit.md Section: WhatsApp API › Information The WhatsApp API (v2) has rate limits (from Meta/Facebook's side). Please read the following information carefully so you can better prepare your code while building the solution for your customers. ## Daily rate limit rules 1. Every new phone number starts with a daily limit of 250 _business-initiated_ conversations. This means that you can start up to 250 new conversations with WhatsApp numbers in 24 hours. If a customer starts the conversation, and not your business, you can reply to unlimited conversations. The 250 per 24 hours only applies when you start the conversation with your customers (in other words, it's 250 conversations per 24 hours that started with a template message). 2. You can move from 250 per day to 2,000 per day if one of the following happens: - You verify your business on Facebook. If your business is already verified, you will move to 2,000 automatically. You can send the link for business verification if you wish to help your client verify their business, but this process must be done by the business itself. [Go to the business verification page](https://business.facebook.com/settings/security). - You start 1,000 business-initiated conversations with unique customers over 7 consecutive days, without getting spam reports. Once you meet _one_ of them, you will be switched to 2,000 conversations per 24 hours. 3. You can move from 2,000 / 24 hours to 10,000 / 24 hours if you open at least 1,000 new business-initiated conversations in 7 consecutive days. After reaching this limit, wait 6 hours and 10,000 will be opened for you (assuming, of course, that you keep high-quality templates without spam reports). 4. You can move from 10,000 / 24 hours to 100,000 / 24 hours if you open at least 5,000 new business-initiated conversations in 7 consecutive days. After reaching this limit, wait 6 hours and 100,000 will be opened for you (assuming, of course, that you keep high-quality templates without spam reports). 5. You can move from 100,000 / 24 hours to UNLIMITED / 24 hours if you open at least 50,000 new business-initiated conversations in 7 consecutive days. After reaching this limit, wait 6 hours and unlimited will be opened for you (assuming, of course, that you keep high-quality templates without spam reports). Moving forward in the daily rate limit is done automatically 24 hours after reaching the threshold. :::tip Your number's current daily limit is the `dailyLimit` field of [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile). ::: :::info[Important note] Starting November 2025, Meta counts the limit _per business_ and not _per phone number_. What does it mean for you? All your phone numbers under the same business manager are counted together to reach the daily limit that moves you to the next tier (250 → 2,000 → 10,000 → 100,000 → unlimited), so once you reach it, all of the phone numbers in that business manager are upgraded. As a result, the daily limit is also shared between all the phone numbers in the business. If your business has two phone numbers, the business capability is 250 per day, and one phone number reached 250 in a given day, the other phone number won't be able to send new business templates until 24 hours have passed. To conclude: all phone numbers under the same business share the same limit, for the good and for the bad. ::: ## Messaging rate limit rules 1. Every WhatsApp API number has a default sending rate limit of 80 messages (of any kind: templates, messages, files) _per second_. This means that every WhatsApp number can send up to 80 messages per second in total (incoming messages don't count toward this limit). 2. You can move from 80 messages per second to 1,000 messages per second if all of the following happen: - You reach the UNLIMITED daily rate limit (as explained in item 5 of the [daily rate limit rules](#daily-rate-limit-rules) above). - You did not receive any spam reports in the last 7 days. You will get the 1,000 per second automatically when both of the above happen. 3. You can send up to 10 messages (of any kind: templates, messages, files) _per minute_ to the _same phone number_. This is to avoid sending too many messages to the same WhatsApp client. There is a small exception: you can "borrow" capacity from the next minutes, for _up to 45 messages_. For example, in normal scenarios you can send 10 messages in 1 minute to the same phone number. Let's assume you want to send 45 messages now: you will be able to do that, but after those 45 messages you will have to wait 4.5 minutes to send the next message. For easy calculations, you can consider the rate limit to be 0.17 messages per second to the same phone number. The rate limit error will be received as a webhook later on (`messageUpdate` 16). 4. You can send up to 2 marketing templates to the same phone number in 24 hours. Meta also counts all the marketing templates that an end user's WhatsApp number received recently (not only from you, but from anyone), and might even lower the 2 marketing templates for that end user, to keep WhatsApp users from receiving too much marketing on the WhatsApp platform. A webhook with an error will be received when this happens (`messageUpdate` 14). This doesn't apply to utility templates or to normal messages within the 24-hour session. :::note Error webhooks reach you only when system messages are turned on (`system: 1` in [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook)). ::: ## Phone number limit rules 1. A verified business is allowed up to 20 phone numbers (20 WhatsApp API accounts). Most businesses don't need more than 3, so you have more than enough here. If you need more than 20, contact our support. 2. A non-verified business can only have 2 phone numbers under its business manager. If the business reaches 2,000 messages per day, it has the same limit as a verified business: up to 20 numbers. If you have more questions regarding this, please contact support. --- # Coexistence Source: https://docs.99digital.co.il/whatsapp-api/information/coexistence Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/information/coexistence.md Section: WhatsApp API › Information This feature allows your client to connect to the WhatsApp API with their own number and keep using their WhatsApp Business app together with it. Partners can create an onboarding link with this feature, which enables coexistence while the client completes the onboarding process. ## Important remarks Make sure you read and understand them all: 1. The client can only onboard numbers that are present in the WhatsApp Business app, not the regular WhatsApp app. If the client uses the regular WhatsApp app and wants to use the API, it is possible to migrate the number from one app to the other: just let the client download the official WhatsApp Business app and register the same number. WhatsApp will migrate everything, and then they can onboard. 2. The WhatsApp Business app version must be 2.24.17 or higher. 3. While onboarding, the client will be asked if they want to share their chat history with the API. If they accept, the system will extract 6 months of history, allowing you to get it (using [Get History](https://docs.99digital.co.il/whatsapp-api/get-history)) so you can show it in your system for a complete, user-friendly experience. It's completely up to you whether you want the history or not (after the client approves it). Media is not supported, only written messages. 4. Every incoming message (from end users) will arrive in the client's app (as it did before) and also to the API, so both of you get the same message. 5. Every outgoing message from the API will be visible inside the client's WhatsApp mobile app. 6. Every outgoing message that the client sends themselves from the WhatsApp app will trigger a webhook to tell you that the client sent an outgoing message from the app. 7. Groups are not supported. Incoming and outgoing group messages will only work in the mobile app and will not be visible in the API. 8. In order to create a better user experience, you are limited to 20 messages per second (outgoing) and not 80 messages per second as in an API-only account (see [Rate Limit](https://docs.99digital.co.il/whatsapp-api/information/rate-limit)). 9. Regarding pricing: everything that happens in the mobile app is free, as it was before the connection. Incoming and outgoing messages are all the same as they were (outgoing messages from the mobile app don't need a template). Everything that is done from the API keeps the same pricing as before: marketing and utility templates as they were. Example use case, so you better understand item 9: a client completed the coexistence onboarding, and their mobile app and the API are now synced. If you want to send a message to an end user from the API, you must send a template if there was no open session in the last 24 hours. The client, however, can send a message freely to new numbers: they don't "feel" the 24-hour session limitation in the WhatsApp app. If an end user sends a message to your client, you will get it through the API (as explained in item 4 above), and because of that it opens a 24-hour session, as it does today, so you can send free messages without templates from the API. 10. Disappearing messages (messages that disappear after some time) will be disabled in the mobile app (only groups can still use this feature). 11. "View once" messages (messages that can be opened only once) will be disabled in the mobile app (only groups can still use this feature). 12. All other special WhatsApp features will remain in the app only (such as channels, status, greeting messages, away messages, voice and video calls, broadcasts, live location messages, etc.). 13. Once the coexistence onboarding is completed, all linked devices (WhatsApp Web, the WhatsApp desktop app for Mac or Windows) will be disconnected, and they can be re-linked if needed. WhatsApp for Windows and Wear OS are currently not supported as linked devices for triggering the outgoing message webhook, so for Windows users it is better to re-link with WhatsApp Web instead. The client can use the Windows app as a linked device, but the API will not see any outgoing message that was sent from the Windows app or Wear OS. 14. During onboarding, the client will be required to scan a QR code or enter a code sent to their WhatsApp, to confirm the connection. 15. The client can stop using coexistence (on their side) directly from their app at any time. 16. The client must open the WhatsApp Business app (on their phone) at least once every 20 days to keep the connection active. These are similar rules to using WhatsApp Web. 17. The display name, profile picture and profile settings (website, email, description) can only be changed or set by the client from the WhatsApp Business app, not from the API. ## How to use and how to onboard a coexistence client 1. From the partners platform, create a new onboarding, setting the `whatsapp` parameter to `1`. This tells the system not to use an existing verified number. The system will generate a temporary WhatsApp number starting with 97257 until a real number is connected. 2. The client opens the onboarding link and selects "Connect a WhatsApp Business App" when asked to create a WhatsApp account. 3. The client will be asked for their WhatsApp phone number, and then they will get a WhatsApp message (on their WhatsApp number) from the system to accept the connection. Tell them to check their WhatsApp messages. Clicking the WhatsApp message opens the camera on their phone, and a QR code will be shown for them to scan. They can either scan the QR code on the onboarding page, or enter a code instead (if the camera is not working for any reason). 4. Once they do it, they can choose whether to share 6 months of chat history (no files) or not. 5. After the client finishes the onboarding, the partner will get the same webhooks as for setting up any account, with the WhatsApp number (the real number) and the `apiKey`. 6. Once the onboarding finishes, tell the client to open the WhatsApp app on their phone (in case it's not open in the foreground) to allow a quick history sync (if they accepted it). 7. 10 minutes after the onboarding is completed, you can use [Get History](https://docs.99digital.co.il/whatsapp-api/get-history) to see the 6 months of history that was extracted. If no history is there, it means that the client did not give permission to extract it: a clean slate. 8. Before you start onboarding coexistence clients, make sure you listen to 2 new webhooks: outgoing messages (`hook: outgoing`) and contact messages (`hook: contact`). They are described on the [Outgoing Messages](https://docs.99digital.co.il/whatsapp-api/webhook/outgoing-messages) and [Contacts Update](https://docs.99digital.co.il/whatsapp-api/webhook/contacts-update) pages. When the client sends a message directly from their mobile phone, you will get an `outgoing` webhook so you know this event happened. When the recipient receives the message, you will also get read status webhooks for that outgoing message (when `readStatus` is on in [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook)). So you not only get notified about outgoing messages, you also get webhooks about their read status. 9. During onboarding (or right after it) you might start getting `contact` webhooks updating you about all the contacts the client added to their phone book. Alternatively, you can always use the [Get Contacts](https://docs.99digital.co.il/whatsapp-api/get-contacts) endpoint to see all contacts. 10. Remember: the client is in control. The client decides the display name, the profile settings, if and when to disconnect, and so on. If you have more questions regarding this, please contact support. --- # Username Source: https://docs.99digital.co.il/whatsapp-api/information/username Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/information/username.md Section: WhatsApp API › Information ## Overview WhatsApp is introducing usernames: an optional feature that allows users to hide their phone number and communicate using a username instead (similar to Telegram). This is being rolled out gradually, starting late 2026. :::warning This is a critical update. If your system relies on phone numbers as the primary identifier for incoming messages, you must adapt your integration to support the new user id field. ::: ## What is this feature? Meta is allowing WhatsApp users who opt in to hide their phone number by choosing a username (e.g. `@john.smith`). Once a user enables this, their communication with new contacts and businesses will use this hidden identity. **Key point:** this is an opt-in feature. Users who don't adopt a username will continue to work exactly as they do today — no changes to your integration are required for those users. ## What changes in your webhooks? Currently, when you receive an incoming message via webhook, the sender's phone number is included in the payload (in the `from` field). Once a user enables usernames, their phone number may be hidden, and you will get a user id instead, which is a two-letter country code + dot + 16 digits. The user id arrives in the `from_id` field. When the phone number is hidden, `from` holds the user id as well, and `phone` is `null`. The phone number will still appear in your webhooks if you sent or received a message with this user's phone number within the last 30 days (evaluated per business phone number). ## Understanding the user id The user id is the new primary identifier for WhatsApp users. Think of it as the replacement for the phone number as your "primary key". ### Format The id consists of an ISO country code, a period, and a long numeric string. For example: `IL.1605856887361213`. The country code prefix lets you identify the user's country of origin (e.g. IL = Israel, US = United States). You can also use the `country` field that arrives in the webhook. ### Key characteristics - Automatically generated by Meta — you don't create or manage them. - Always present in webhooks, for every user, regardless of username adoption. - Permanent and stable — it will not change. - **Scoped to your business portfolio:** the same end user will have a different user id for each business portfolio they interact with. You cannot use the user id from one portfolio to message the user from a line in another portfolio. :::warning[Important] The user id is tied to your business portfolio, not to a single WhatsApp API line. All your lines in the same portfolio see the same user id for a user. If you have lines in different portfolios and the same user contacts both, they will have a different user id on each. ::: ## Sending messages You use the `to` field the same way as before: you can now send either the international phone number or the user id. **If you already know the user's phone number,** you can still send messages using the phone number — even if the user has enabled usernames. The username feature does not block outbound messages to known phone numbers. To ask a user who hides their phone number to share it with you, use [Request Phone](https://docs.99digital.co.il/whatsapp-api/request-phone). ## Frequently asked questions ### Can I send a message to a username (e.g. `@john.smith`)? No. Via the API, you can only send messages using a phone number or a user id. Usernames are for display and for person-to-person communication within the WhatsApp app. Users can search for each other by username in the app, but the API does not support addressing messages to a username. ### If I already know a user's phone number and they enable usernames, can I still message them? Yes. The username feature does not block messages sent to a known phone number. If you have the user's phone number from any source (a call, a form, a previous conversation), you can continue messaging them exactly as you do today. ### Will I still see the phone number for users who previously chatted with me? If the user interacted with your line after April 1, 2026, their phone number will be present permanently. You will continue to see their phone number in all webhooks, even if they later enable usernames. The phone number is also included if you had any interaction within the last 30 days. ### Can I use the same user id across different WhatsApp API lines? Only between lines in the same business portfolio: the user id is scoped to the portfolio level. If you have lines in different portfolios, the same user will have a different user id on each. Note: the user id is permanent and will never change (unlike the username, which the user can modify). The user cannot see or control their user id. ### Can a user hide their phone number without setting a username? No. Based on the current implementation, a user must adopt a username to hide their phone number. There is no standalone "hide phone number" toggle without a username. However, having a username does not automatically hide the phone number from your webhooks — the 30-day and previous interaction rules still apply. ### What happens to the user's display name (profile name)? The profile name is always present in webhooks (`senderName`), regardless of username adoption. It is not affected by this feature. ## Updates This document will be updated when more information is available. :::note Sending messages using a user id in the `to` field may not be supported on all WhatsApp accounts yet, as this feature is currently undergoing updates by Meta. ::: --- # 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 } ``` --- # SMS API Source: https://docs.99digital.co.il/sms-api Markdown: https://docs.99digital.co.il/markdown/sms-api.md Section: SMS API Send SMS to Israeli numbers, check their delivery status, send verification codes, and receive incoming messages by webhook. ## Base URL ```text https://api.99digital.co.il/sms ``` ## Authentication Send your API key in the `apiKey` header of every request, and the fields as JSON with `POST`: ```http apiKey: Content-Type: application/json ``` ## Where to start - Send a message: [Send SMS](https://docs.99digital.co.il/sms-api/send-sms). - Delivery statuses and incoming messages: [Webhook](https://docs.99digital.co.il/sms-api/webhook). - Verification codes and two-factor authentication: [Verify SMS](https://docs.99digital.co.il/sms-api/verify-sms). --- # Send SMS Source: https://docs.99digital.co.il/sms-api/send-sms Markdown: https://docs.99digital.co.il/markdown/sms-api/send-sms.md Section: SMS API `POST https://api.99digital.co.il/sms/sendMessage` You can send a message to any Israeli number. "Send SMS" is for sending the same message to one or more numbers. - For a Hebrew message, an SMS is counted every 70 characters: a Hebrew SMS with 71 characters will be counted as two SMS. - For an English message, an SMS is counted every 160 characters. **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/sms/sendMessage` | | Method | JSON via POST (`Content-Type: application/json`) | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | | --- | --- | | from | The sender. It can be either alphanumeric or a number (maximum of 11 characters), without '+972'. The sender (alphanumeric or a number) must be approved by 99 Digital for your account. If you leave "from" empty, or send a sender that isn't approved for your account, the message is sent from your first approved sender: check "from" in the response to see which one was used | | to | Numbers list, separated by commas, without 00 or +972 or 972. Example: 0501234567 or 0501234567,0508999999 | | text | Your SMS goes here, up to 670 characters. Use `\n` for a new line (in JSON, write it as `\\n`, as in the **Hebrew with a new line** example) | **Response**: ```json { "status": "OK", "unique": 63433453, "text": "your message", "timestamp": 1600115719, "from": "0501234567", "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | unique | Unique ID for any message. Several numbers in "to" are sent as one shipment, so they all share the same unique, and every delivery status on your [Webhook](https://docs.99digital.co.il/sms-api/webhook) carries it | | text | The text you sent | | timestamp | Time stamp (Unix time, seconds) | | from | Sender number or text (the sender the message was sent from) | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your account has no approved sender yet. Contact 99 Digital | | 3 | The number you are trying to use is not verified by 99 Digital | | 4 | The text is too long (more than 670 characters) | | 5 | Unknown error, contact support | | 6 | Wrong apiKey (the apiKey is missing or wrong) | | 7 | "to" can't be empty | | 8 | "text" can't be empty | | 9 | "from" can't be empty | **Remarks**: - Send every value as a string. - You get a delivery status for each of the numbers in `to` on your [Webhook](https://docs.99digital.co.il/sms-api/webhook). - Integrations written before the `apiKey` header keep working: the API also accepts `apiKey` as a field of the body, and the fields as form data instead of JSON. When both are sent, the header wins. ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | No | The sender. It can be either alphanumeric or a number (maximum of 11 characters), without `+972`. The sender (alphanumeric or a number) must be approved by 99 Digital for your account. If you leave `from` empty, or send a sender that isn't approved for your account, the message is sent from your first approved sender — check `from` in the response to see which one was used. Example: `MyStore`. | | `to` | string | Yes | Numbers list, separated by commas, without `00`, `+972` or `972`. Example: `0501234567` or `0501234567,0508999999`. Example: `0501234567,0508999999`. | | `text` | string | Yes | Your SMS goes here, up to 670 characters. Use `\n` for a new line (`\\n` in JSON). For a Hebrew message, an SMS is counted every 70 characters; for an English message, every 160 characters. Max length: 670. Example: `Your order 4711 is on its way and will arrive tomorrow.`. | ### Example: One number Send a message to one number. ```json { "from": "MyStore", "to": "0501234567", "text": "Your order 4711 is on its way and will arrive tomorrow." } ``` ### Example: Several numbers The same message to several numbers, separated by commas. ```json { "from": "MyStore", "to": "0501234567,0508999999,0527654321", "text": "Our store is closed today. See you tomorrow!" } ``` ### Example: Hebrew with a new line A Hebrew message with a new line (`\n`, written `\\n` in JSON). ```json { "from": "MyStore", "to": "0501234567", "text": "שלום דנה,\\nההזמנה שלך מוכנה לאיסוף." } ``` ## 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 or FAIL. `OK` — the message was accepted for sending; the delivery status of each number arrives on your [Webhook](https://docs.99digital.co.il/sms-api/webhook). Always `OK`. | | `unique` | integer | (one of: OK) Unique ID for any message. Several numbers in `to` are sent as one shipment, so they all share the same `unique`, and every delivery status on your webhook carries it. Example: `3683442114`. | | `text` | string | (one of: OK) The text you sent. Example: `Your order 4711 is on its way and will arrive tomorrow.`. | | `timestamp` | integer | (one of: OK) Time stamp — when the message was sent (Unix time, seconds). Example: `1789900000`. | | `from` | string | (one of: OK) Sender number or text — the sender the message was sent from. It can differ from the `from` you sent (see `from` in the request). Example: `MyStore`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the message was not sent. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Your account has no approved sender yet. Contact 99 Digital; `3` — The number you are trying to use is not verified by 99 Digital; `4` — The text is too long (more than 670 characters); `5` — Unknown error, contact support; `6` — Wrong apiKey (the apiKey is missing or wrong); `7` — 'to' can't be empty; `8` — 'text' can't be empty; `9` — 'from' can't be empty. | | `error` | string | (one of: FAIL) Sometimes added to reason 5, with the error details. | #### Example: OK The message was sent. ```json { "status": "OK", "unique": 3683442114, "text": "Your order 4711 is on its way and will arrive tomorrow.", "timestamp": 1789900000, "from": "MyStore", "reason": 1 } ``` #### Example: Reason 6 The apiKey is missing or wrong. ```json { "status": "FAIL", "reason": 6 } ``` #### Example: Reason 4 The text is longer than 670 characters. ```json { "status": "FAIL", "reason": 4 } ``` ### 500 — An unexpected error (reason 0). `error` has the details. Try again, and contact support if it repeats. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | Always FAIL. Always `FAIL`. | | `reason` | integer | Always 0 — an unexpected error on our side. Always `0`. | | `error` | string | The details of the error. | #### Example ```json { "status": "FAIL", "reason": 0, "error": "Internal error" } ``` --- # Webhook Source: https://docs.99digital.co.il/sms-api/webhook Markdown: https://docs.99digital.co.il/markdown/sms-api/webhook.md Section: SMS API › Webhook Webhook allows you to get a callback push to your server whenever there is an incoming message to your verified number, and with the delivery status of every message you send. - You need to set the webhook URL within the 99 Digital dashboard. - Every webhook is sent to your URL as JSON via POST (`Content-Type: application/json`), and `event` tells you what arrived. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL | | Method | JSON via POST | ## Webhook types Every kind of webhook has its own page, with its explanation, an example, and every parameter explained: | Webhook | `event` | What arrives | When it is sent | | --- | --- | --- | --- | | [Incoming Message](https://docs.99digital.co.il/sms-api/webhook/incoming-message) | `incoming` | A new message to your SMS number. | Every time a new message arrives to your SMS number. | | [Status Message](https://docs.99digital.co.il/sms-api/webhook/status-message) | `status` | The delivery status of a message you sent: delivered, failed, kosher, blocked or error. | For every number you send a message to, when its status arrives from the operator. | ## Delivery - Answer within a few seconds: we wait up to 5 seconds to connect to your server and up to 15 seconds for your answer. The status and body of your answer are ignored. - If your server answers with an error or doesn't answer in time, the webhook is not sent again. --- # Incoming Message Source: https://docs.99digital.co.il/sms-api/webhook/incoming-message Markdown: https://docs.99digital.co.il/markdown/sms-api/webhook/incoming-message.md Section: SMS API › Webhook **Webhook.** Sent to the webhook URL you configure. This will be triggered every time a new message arrives to your SMS number (`event` "incoming"). You need to set the webhook URL within the 99 Digital dashboard. How the webhooks are delivered is explained on [Webhook](https://docs.99digital.co.il/sms-api/webhook). **Settings:** | Setting | Value | | --- | --- | | URL | Your URL | | Method | JSON via POST | **With every incoming message, you will receive the following:** ```json { "event": "incoming", "message": "Reply back", "date": "09/03/26 10:25:32", "from": "0501234567", "to": "0534444323" } ``` **Response explained:** | Parameter | Description / Example | | --- | --- | | `event` | "incoming" always. | | `message` | The message that was sent from the user. | | `date` | The time it was sent: when the message arrived, Israel time, in the format `dd/mm/yy HH:MM:SS`. | | `from` | Sender number. | | `to` | The number it was sent to (your verified number). | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `event` | string | Yes | "incoming" always, for an incoming message. Always `incoming`. | | `message` | string | Yes | The message that was sent from the user. Example: `Reply back`. | | `date` | string | Yes | The time it was sent: when the message arrived, Israel time, in the format `dd/mm/yy HH:MM:SS`. Example: `09/03/26 10:25:32`. | | `from` | string | Yes | Sender number. Example: `0501234567`. | | `to` | string | Yes | The number it was sent to (your verified number). Example: `0534444323`. | ### Example (generated from the schema) ```json { "event": "incoming", "message": "Reply back", "date": "09/03/26 10:25:32", "from": "0501234567", "to": "0534444323" } ``` ## Responses ### 200 — Answer with HTTP 200. The status and body of your answer are ignored. --- # Status Message Source: https://docs.99digital.co.il/sms-api/webhook/status-message Markdown: https://docs.99digital.co.il/markdown/sms-api/webhook/status-message.md Section: SMS API › Webhook **Webhook.** Sent to the webhook URL you configure. This will be triggered every time you deliver a message, with the message status information (`event` "status"). You need to set the webhook URL within the 99 Digital dashboard. How the webhooks are delivered is explained on [Webhook](https://docs.99digital.co.il/sms-api/webhook). **Settings:** | Setting | Value | | --- | --- | | URL | Your URL | | Method | JSON via POST | **With every outgoing message you send, you will receive the following back:** ```json { "event": "status", "status": 1, "date": "26/08/26 09:45:47", "he_message": "נמסר", "en_message": "delivered", "from": "972535355499", "to": "0507139996", "operator": "Pelephone", "unique": 3683442114 } ``` **Response explained:** | Parameter | Description / Example | | --- | --- | | `event` | "status" always. | | `status` | The status code (int) — see the table below. | | `date` | The time when this message arrived or failed to arrive. | | `he_message` | Hebrew text of the status: נמסר, נכשל, מספר כשר, מספר חסום, תקלה. | | `en_message` | English text of the status: delivered, failed, kosher, blocked, error. | | `from` | Your SMS API number: the sender you sent the message from. | | `to` | The number you sent the message to. | | `operator` | The mobile operator of the end user. | | `unique` | The unique message ID that you received when sending the message from the [Send SMS](https://docs.99digital.co.il/sms-api/send-sms) API endpoint. | | Status code (int) | `en_message` | `he_message` | Explanation | | --- | --- | --- | --- | | 1 | delivered | נמסר | Message delivered successfully. | | 2 | failed | נכשל | Failed (for example, the phone is off or out of network). | | 3 | kosher | מספר כשר | Kosher number, can't get SMS. | | 4 | blocked | מספר חסום | Blocked: the end user asked not to receive messages from you. | | 5 | error | תקלה | Error (either a network error, delivery error, or server error). Try again. | ### Remarks - A message sent to several numbers has one `unique` (from [Send SMS](https://docs.99digital.co.il/sms-api/send-sms)), and you get a status for each number. - Codes sent by [Verify SMS](https://docs.99digital.co.il/sms-api/verify-sms) get a status too. Its `unique` is the ID of the SMS, not the `unique` that Verify SMS returned. ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `event` | string | Yes | "status" always, for a delivery status. Always `status`. | | `status` | integer | Yes | The status code of the delivery. One of: `1` — Message delivered successfully; `2` — Failed (for example, the phone is off or out of network); `3` — Kosher number, can't get SMS; `4` — Blocked: the end user asked not to receive messages from you; `5` — Error (either a network error, delivery error, or server error). Try again. | | `date` | string | Yes | The time when this message arrived or failed to arrive. Example: `26/08/26 09:45:47`. | | `he_message` | string | Yes | Hebrew text of the status (status 1 to 5, in order). One of: `נמסר`, `נכשל`, `מספר כשר`, `מספר חסום`, `תקלה`. | | `en_message` | string | Yes | English text of the status (status 1 to 5, in order). One of: `delivered`, `failed`, `kosher`, `blocked`, `error`. | | `from` | string | Yes | Your SMS API number — the sender you sent the message from. Example: `972535355499`. | | `to` | string | Yes | The number you sent the message to. Example: `0507139996`. | | `operator` | string | Yes | The mobile operator of the end user. Example: `Pelephone`. | | `unique` | integer | Yes | The unique message ID that you received when sending the message with Send SMS. Example: `3683442114`. | ### Example (generated from the schema) ```json { "event": "status", "status": 1, "date": "26/08/26 09:45:47", "he_message": "נמסר", "en_message": "delivered", "from": "972535355499", "to": "0507139996", "operator": "Pelephone", "unique": 3683442114 } ``` ## Responses ### 200 — Answer with HTTP 200. The status and body of your answer are ignored. --- # Verify SMS Source: https://docs.99digital.co.il/sms-api/verify-sms Markdown: https://docs.99digital.co.il/markdown/sms-api/verify-sms.md Section: SMS API `POST https://api.99digital.co.il/sms/verifySMS` User verification for accessing a system. You can use this Verify SMS method to check if a user is the owner of the phone number they provided, or as two-factor authentication. We have two steps: **Send** and **Check**, both with this endpoint. - **Send:** you provide us a phone number, and we send an SMS to the client. The client has 10 minutes to enter the code back to your system. - **Check:** once the client puts in their code, you deliver to us their phone number and the code, and we verify if the code is correct. A code can be used only once. **Super simple!** Choose **Send** or **Check** under Request → Body (and in the request builder on the right) to see each request and its code samples. Sending `code` is what makes the request a check. ## Send **Settings:** | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/sms/verifySMS` | | Method | JSON via POST | | Header | Value | | --- | --- | | `apiKey` | Your API key for the service | **Body:** | Parameter | Description / Example | | --- | --- | | `from` | `from` can be either alphanumeric or a number (maximum of 11 characters), without `+972`. It must be one of the senders 99 Digital approved for your account; otherwise (or when empty) your first approved sender is used. | | `to` | The phone number to send the code to, without `00`, `+972` or `972`. Example: `0501234567`. | | `message` | As default, we use the following message to provide the code to the client: "Your verification code is ##code##". Alternatively, you can specify your own message, using this parameter. Please use this variable: `##code##` for the code that we will generate from our side. | ```json { "from": "MyStore", "to": "0501234567" } ``` **Response:** ```json { "status": "OK", "unique": "1789900000aB3dE9fGh1", "phone": "0501234567", "reason": 1 } ``` **Response explained:** | Parameter | Description | | --- | --- | | `status` | OK or FAIL | | `unique` | Unique ID for this verification request | | `phone` | The phone number the code was sent to | | `reason` | The status explanation — see below | | Reason | Explanation | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | Your account has no approved sender yet — contact 99 Digital. | | 3 | The number you are trying to use is not verified by 99 Digital. | | 5 | The SMS couldn't be sent (unknown error). Try again, and contact support if it repeats. | | 6 | The apiKey is missing or wrong. | | 7 | `to` can't be empty (returned today as reason 11). | | 9 | `from` can't be empty. | | 10 | You provided the `message` parameter, but without `##code##`. | | 11 | `to` can't be empty. | | 12 | The code couldn't be saved. Try again. | ## Check **Settings:** | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/sms/verifySMS` | | Method | JSON via POST | | Header | Value | | --- | --- | | `apiKey` | Your API key for the service | **Body:** | Parameter | Description / Example | | --- | --- | | `to` | The phone number of the client that received the SMS, in the same format you used to send the code. | | `code` | The code that the client entered. | ```json { "to": "0501234567", "code": "482913" } ``` **Response:** ```json { "status": 1, "phone": "0501234567" } ``` **Response explained:** | Parameter | Description | | --- | --- | | `status` | The result of the check — see below | | `phone` | The phone number of the client | | Status | Explanation | | --- | --- | | 1 | Verification passed. The code was entered correctly. | | 2 | The code is wrong, was already used, or does not exist. | | 3 | The code is invalid: more than 10 minutes passed. | ## Remarks - Send every value as a string — `"code": "482913"`, not `482913`. - Send `to` in exactly the same format in both steps (for example `0501234567` both times): the code is kept for the number as you wrote it. - Sending a new code to a number replaces the previous code of that number. - A wrong code can be tried again until the code expires. Limit the number of attempts on your side (for example, 5 attempts per code). - A correct code and an expired code are both deleted: checking them again returns status 2. - A request that fails before the check (wrong apiKey, missing `to`) answers like the send step: `status` FAIL and a `reason`. - Integrations written before the `apiKey` header keep working: the API also accepts `apiKey` as a field of the body, and the fields as form data instead of JSON. When both are sent, the header wins. ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | No | (one of: Send) The sender: an alphanumeric name or a number (up to 11 characters), without `+972`. It must be one of the senders 99 Digital approved for your account; otherwise (or when empty) your first approved sender is used. Example: `MyStore`. | | `to` | string | Yes | (one of: Send) The phone number to send the code to, without `00`, `+972` or `972`. For example `0501234567`. Example: `0501234567`. | | `message` | string | No | (one of: Send) Your own message instead of the default one ("Your verification code is 123456"). Put `##code##` where the code should appear — we replace it with the code we generate. Example: `Your MyStore login code is ##code##`. | | `to` | string | Yes | (one of: Check) The phone number of the client that received the SMS, in the same format you used to send the code. Example: `0501234567`. | | `code` | string | Yes | (one of: Check) The code the client entered. Example: `482913`. | ### Example: Send Step 1: send the client an SMS with a code. ```json { "from": "MyStore", "to": "0501234567" } ``` ### Example: Send with your own message Step 1, with your own text: ##code## is replaced with the code. ```json { "from": "MyStore", "to": "0501234567", "message": "Your MyStore login code is ##code##" } ``` ### Example: Check Step 2: check the code the client entered. ```json { "to": "0501234567", "code": "482913" } ``` ## Responses ### 200 — The request was processed. The send step answers with `status` OK or FAIL (and `reason`); the check step answers with `status` 1, 2 or 3. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: Send — OK) OK — the code was sent to the client. Always `OK`. | | `unique` | string | (one of: Send — OK) A unique ID for this verification request. Example: `1789900000aB3dE9fGh1`. | | `phone` | string | (one of: Send — OK) The phone number the code was sent to. Example: `0501234567`. | | `reason` | integer | (one of: Send — OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request failed; `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Your account has no approved sender yet — contact 99 Digital; `3` — The number you are trying to use is not verified by 99 Digital; `5` — The SMS couldn't be sent. Try again, and contact support if it repeats; `6` — The apiKey is missing or wrong; `7` — 'to' can't be empty (returned today as reason 11); `9` — 'from' can't be empty; `10` — You provided the 'message' parameter, but without; `11` — 'to' can't be empty; `12` — The code couldn't be saved. Try again. | | `status` | integer | (one of: Check) The result of the check. One of: `1` — Verification passed — the code was entered correctly; `2` — The code is wrong, was already used, or does not exist; `3` — The code expired (more than 10 minutes passed). | | `phone` | string | (one of: Check) The phone number of the client. Example: `0501234567`. | #### Example: Send — OK The code was sent to the client. ```json { "status": "OK", "unique": "1789900000aB3dE9fGh1", "phone": "0501234567", "reason": 1 } ``` #### Example: Send — reason 10 'message' was sent without ##code##. ```json { "status": "FAIL", "reason": 10 } ``` #### Example: Check — passed The code is correct (status 1). ```json { "status": 1, "phone": "0501234567" } ``` #### Example: Check — wrong code The code is wrong, was already used, or does not exist (status 2). ```json { "status": 2, "phone": "0501234567" } ``` #### Example: Check — expired More than 10 minutes passed (status 3). ```json { "status": 3, "phone": "0501234567" } ``` #### Example: Reason 6 The apiKey is missing or wrong (both steps). ```json { "status": "FAIL", "reason": 6 } ``` ### 500 — An unexpected error in the send step (reason 0). `error` has the details. Try again, and contact support if it repeats. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | FAIL — an unexpected error. Always `FAIL`. | | `reason` | integer | 0 — an unexpected error in the send step. Always `0`. | | `error` | string | The details of the error. | #### Example ```json { "status": "FAIL", "reason": 0, "error": "Internal error" } ``` --- # Online API Source: https://docs.99digital.co.il/online-api Markdown: https://docs.99digital.co.il/markdown/online-api.md Section: Online API Automate the Online omni-channel inbox: agents, contacts, conversations, tickets, messages, teams, labels, forms and webhooks. ## Base URL ```text https://online.99digital.co.il/api/v1/accounts/{account_id} ``` `{account_id}` is the number after `/app/accounts/` in your dashboard URL. If your account runs on its own Online domain, use that domain instead. ## Authentication Send an access token in the `api_access_token` header of every request. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. ```http api_access_token: ``` ## Where to start - Tokens, permissions, errors and rate limits: [Getting Started](https://docs.99digital.co.il/online-api/getting-started). - Start a conversation and send a message — including a WhatsApp template: [Add Conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation) and [Create a Message](https://docs.99digital.co.il/online-api/messages/create-a-message). - Hand a conversation from the bot to a human: [Toggle Conversation Status](https://docs.99digital.co.il/online-api/conversations/toggle-conversation-status). - Statuses, display IDs and tickets: [Conversation Basics](https://docs.99digital.co.il/online-api/conversations/conversation-basics). - Events sent to your server: [Webhook Events](https://docs.99digital.co.il/online-api/webhooks/webhook-events). - Try every endpoint in Postman: [Postman Collection](https://docs.99digital.co.il/online-api/postman-collection). --- # Getting Started Source: https://docs.99digital.co.il/online-api/getting-started Markdown: https://docs.99digital.co.il/markdown/online-api/getting-started.md Section: Online API The API uses standard verbs and returns HTTP response codes and JSON-encoded responses. It covers agents, contacts, conversations, tickets, messages, teams, labels, forms and webhooks. To get started with the 99 Digital Online REST API, first get your user API key (access token) by visiting the profile page: in the dashboard, **Profile settings → Access Token**. The user API key provides access to endpoints based on the user's permission level. ## Base URL The base URL for all API endpoints is `https://online.99digital.co.il/api/v1`, or your own API endpoint domain: ```text https://online.99digital.co.il/api/v1/accounts/{account_id}/… ``` - If your account runs on its own Online domain, use that domain instead of `online.99digital.co.il`. - `{account_id}` is the numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. For example, in `https://online.99digital.co.il/app/accounts/12/dashboard` it is `12`. ## Authentication This API requires authentication. All requests must include an `api_access_token` header with a valid API key (access token): ```bash curl 'https://online.99digital.co.il/api/v1/accounts/12/conversations/meta' \ -H 'api_access_token: ' ``` There are two kinds of tokens: | Token | Where to get it | Acts as | | --- | --- | --- | | **User token** | Dashboard → **Profile settings** → **Access Token**. | That agent, with exactly that agent's role and permissions. Everything the API does is recorded as done by this agent. | | **Agent-bot token** | Issued for an agent bot, such as a Studio flow or an external bot. | The bot. A bot can call only the endpoints whose page says "Agent-bot token: allowed". | An agent-bot token can call these endpoints: [Add Conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation), [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation), [Toggle Conversation Status](https://docs.99digital.co.il/online-api/conversations/toggle-conversation-status), [Toggle Conversation Priority](https://docs.99digital.co.il/online-api/conversations/toggle-conversation-priority), [Assign Conversation](https://docs.99digital.co.il/online-api/conversations/assign-conversation), [Set Conversation Labels](https://docs.99digital.co.il/online-api/conversations/set-conversation-labels), [Set Conversation Custom Attributes](https://docs.99digital.co.il/online-api/conversations/set-conversation-custom-attributes), [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy), [Send CSAT Survey](https://docs.99digital.co.il/online-api/conversations/send-csat-survey), [Create a Message](https://docs.99digital.co.il/online-api/messages/create-a-message), [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact), [List Online Agents](https://docs.99digital.co.il/online-api/agents/list-online-agents) and every [Forms](https://docs.99digital.co.il/online-api/forms/list-forms) endpoint. A missing or wrong token, or a valid token of a user who does not belong to the account, is answered with `401`: ```json { "error": "Invalid Access Token" } ``` ```json { "error": "You are not authorized to access this account" } ``` :::warning Keep tokens secret, and use them only from your server. A user token can do everything its agent can do in the dashboard. ::: ## Path Parameters For most REST API calls, you must include one or more path parameters in the request URI. | Parameter | Type | Description | | --- | --- | --- | | `account_id` | integer | The numeric ID of the account: the number after `/app/accounts/` in the dashboard URL. | | `inbox_id` | integer | The numeric ID of the inbox. No endpoint in this reference takes it in the path: it is sent as a query or body parameter, for example in [Add Conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation). | | `agent_id` | integer | The numeric ID of the agent (the agent's user ID). | | `team_id` | integer | The numeric ID of the team. | | `conversation_id` | integer | The numeric ID of the conversation: always its **display ID**, the `id` in conversation responses and the number in the dashboard URL. See [Conversation Basics](https://docs.99digital.co.il/online-api/conversations/conversation-basics). | | `message_id` | integer | The numeric ID of the message. | | `contact_id` | integer | The numeric ID of the contact. | | `ticket_id` | integer | The numeric ID of a ticket of the conversation. See [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets). | | `label_id` | integer | The numeric ID of the label. | | `webhook_id` | integer | The numeric ID of the webhook. | | `note_id` | integer | The ID of a contact note, as returned by [List Contact Notes](https://docs.99digital.co.il/online-api/contacts/notes/list-contact-notes). | | `file_id` | integer | The ID of a contact file, as returned by [List Contact Files](https://docs.99digital.co.il/online-api/contacts/files/list-contact-files). | | `event_id` | integer | The ID of a conversation event, as returned by [List Conversation Events](https://docs.99digital.co.il/online-api/conversations/list-conversation-events). | | `form_id` | string | The form's `publicId`, as returned by [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). | | `submission_id` | string | The ID (a UUID) of a form submission, as returned by [List Form Submissions](https://docs.99digital.co.il/online-api/forms/list-form-submissions). | ## Query Parameters In some of the REST API calls you can include one or more query parameters in the request URI to filter, limit the size of, and sort the data in an API response. For filter parameters, see the individual GET calls. Use these, or similar, query parameters: :::note Not all pagination parameters are available for all endpoints. ::: | Parameter | Type | Description | | --- | --- | --- | | `sort` | string | The attribute by which the list should be sorted. | | `page` | integer | The page parameter: the number of the page to return. | List endpoints take `page` (and sometimes `per_page`), or message-ID cursors (`before` / `after`) for messages. Each endpoint page says its page size and which of these parameters it accepts. ## Authorization What a user token may do depends on the account's permission model. **Legacy roles** (accounts without the new rules system): every agent is either `administrator` or `agent`. Administrators can manage everything. Agents work with conversations and contacts, but cannot manage agents, teams, labels or webhooks. **New rules system** (custom roles): every agent has a custom role, such as *General Manager* or *Shift Manager*, made of named permissions. On these accounts **only the permissions decide**: the legacy `administrator` role is not used, and an agent cannot be set to `administrator`. There are two kinds of permissions. ### Account permissions Each has `read`, `create`, `update` and `delete` flags. | Permission | Used by | | --- | --- | | **Agents** | Managing agents. `read` also decides whether agents' personal details (email, phone, role) are returned. | | **Disconnect Agents** | [Disconnect Agent](https://docs.99digital.co.il/online-api/agents/disconnect-agent) (`update`). | | **Teams** | Managing teams and team members. | | **Labels** | Managing label definitions. | | **Contacts** | Reading, creating, updating, deleting and blocking contacts. | | **Webhooks** | Managing webhooks. | | **Forms** / **Forms Responses** | Reading forms / reading form submissions. | | **Import Wizard** / **Export Wizard** | Importing / exporting conversations (`create`). | ### Inbox permissions Granted per inbox: the role lists the inboxes each one applies to. They decide what the agent may do with the conversations of that inbox. | Permission | Allows | | --- | --- | | **Inbox read all conversations** | Seeing every conversation in the inbox. | | **Inbox read (Team)** | Seeing the conversations of the agent's teams in the inbox. | | **Inbox read unassigned conversations** | Seeing conversations with no agent and no team in the inbox. | | **Inbox see conversations history** | Seeing messages from before the conversation was last resolved. | | **Inbox new message** | Starting a new conversation in the inbox. | | **Inbox reply** / **Inbox private notes** | Sending replies / private notes. | | **Inbox attach files** / **Inbox delay message** | Sending attachments / scheduled messages. | | **Inbox delete message** | Deleting messages. | | **Inbox resolve** / **Inbox reopen** | Resolving / reopening conversations. | | **Inbox move to pending** | Snoozing conversations (shown as "Snooze conversation" in the role editor). | | **Inbox manual/bot switch** | Switching between Bot (`open`) and Manual (`pending`). | | **Inbox priority of conversations** | Changing the priority. | | **Inbox can assign** / **Inbox assign to group** | Assigning agents / teams. | | **Inbox can be assigned** | Being assigned conversations in the inbox. | | **Inbox assign labels** | Changing conversation labels. | | **Inbox send Transcript** | Emailing transcripts. | | **Inbox ai assistance** | AI features, such as translation. | Every endpoint page lists what it needs under **Permissions**. A request without the needed permission is answered with `403`: ```json { "error": "You are not authorized to do this action" } ``` ## Requests and responses - **Format.** Send JSON with `Content-Type: application/json`. File uploads use `multipart/form-data`. - **Wrapped bodies.** Some endpoints take their fields inside an object named after the resource: `{"agent": {…}}`, `{"team": {…}}`, `{"label": {…}}`, `{"webhook": {…}}`. In a JSON request the wrapper is optional — top-level fields are wrapped for you. The examples always show the wrapped form. - **Conversation IDs.** Paths take the conversation's display ID. See [Conversation Basics](https://docs.99digital.co.il/online-api/conversations/conversation-basics). - **Timestamps.** Most are Unix timestamps in seconds. Some are ISO 8601 strings, as noted per field. `snoozed_until` in conversations is in milliseconds. - **Pagination.** See [Query Parameters](#query-parameters). - **Empty responses.** Many update and delete endpoints answer `200 OK` with an empty body. - **Webhooks.** Endpoints that send a [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events) say so. ## Errors | Status | Meaning | Typical body | | --- | --- | --- | | `401` | The token is missing or wrong, or its user is not in the account. | `{"error": "Invalid Access Token"}` | | `403` | The role lacks the permission, or an agent-bot token called an endpoint that is not open to bots. | `{"error": "You are not authorized to do this action"}` or `{"error": "Access to this endpoint is not authorized for bots"}` | | `404` | The resource does not exist in this account. | `{"error": "Resource could not be found"}` | | `422` | Validation failed, or a required parameter is missing. | `{"message": "Name has already been taken", "attributes": ["name"]}` or `{"error": "param is missing or the value is empty: agent"}` | | `402` | The account reached its licensed number of agents. | `{"error": "Account limit exceeded. Please purchase more licenses"}` | | `429` | Too many requests — see [Rate limits](#rate-limits). | | Validation messages may be translated to the account's language (for example Hebrew), so do not parse them: use the HTTP status and `attributes`. ## Rate limits | Limit | Applies to | | --- | --- | | 1,000 requests per minute | Per IP address, across all endpoints. | | 10 requests per minute | Per IP address, for the **same** `GET` URL under `/conversations` — for example polling `/conversations?status=open` in a loop. `/conversations/meta` is not limited this way. | | 30 requests per hour | [Conversation transcripts](https://docs.99digital.co.il/online-api/conversations/send-conversation-transcript), per account. | Above a limit, the request is answered with `429`. Instead of polling, listen to [webhook events](https://docs.99digital.co.il/online-api/webhooks/webhook-events). ## Postman Every endpoint, with ready-to-send samples, is in the [Online API Postman Collection](https://docs.99digital.co.il/online-api/postman-collection). --- # List of all Agents Source: https://docs.99digital.co.il/online-api/agents/list-of-all-agents Markdown: https://docs.99digital.co.il/markdown/online-api/agents/list-of-all-agents.md Section: Online API › Agents `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/agents` List all agents in an account. The agents are returned ordered by name. Pass `inbox_id` to get only the agents who can work in that inbox: the inbox's members, plus the agents whose role grants **Inbox read all conversations** in it. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/agents` | | Method | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token: any agent of the account. On accounts with the new rules system, the agents' personal details are returned only when the caller's role grants **Agents → read** — see the `Agent` object below. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | **Query Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `inbox_id` | Return only the agents who can work in this inbox. | No | **Response:** ```json [ { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": true, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [31, 32], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": "+972507654321", "email1": null, "create_time": 1794470400 } ] ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `id` | Agent numeric ID | | `account_id` | Account numeric ID | | `availability_status` | The availability status of the agent. Enum: `online`, `busy`, `offline`. This is the live presence, computed from the agent's connection. | | `auto_offline` | Whether the availability status of the agent is configured to go offline automatically when away | | `confirmed` | Whether or not the agent's account has been validated by clicking on the invitation email they received | | `email` | Email of the agent | | `available_name` | Display name of the agent | | `name` | Full name of the agent | | `role` | Whether it's an administrator or an agent. Enum: `agent`, `administrator`. On accounts with the new rules system: the name of the agent's custom role. | | `see_all_conversations` | Whether an agent can see all conversations | | `thumbnail` | Agent thumbnail | The other fields of the response are described in the response schema below. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `inbox_id` | query | integer | No | Return only the agents who can work in this inbox: its members, plus the agents whose role grants **Inbox read all conversations** in it. Example: `31`. | ## Responses ### 200 — The agents of the account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The agent's numeric ID (user ID). | | `[].account_id` | integer | The numeric ID of the account. | | `[].availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `[].auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `[].confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `[].email` | string | The agent's login email address. | | `[].available_name` | string | The agent's display name. | | `[].custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `[].name` | string | The agent's full name. | | `[].role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `[].operation_bot` | boolean | `true` for internal operation-bot users. | | `[].see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `[].assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `[].new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `[].thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `[].capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `[].two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `[].phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `[].email1` | string \| null | The email address that receives two-factor codes by email. | | `[].create_time` | integer | When the agent was created (Unix timestamp, in seconds). | #### Example ```json [ { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": true, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [ 31, 32 ], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": "+972507654321", "email1": null, "create_time": 1794470400 }, { "id": 51, "account_id": 12, "availability_status": "online", "auto_offline": true, "confirmed": true, "email": "jane.agent@example.com", "available_name": "Jane Agent", "custom_attributes": {}, "name": "Jane Agent", "role": "General Manager", "operation_bot": false, "see_all_conversations": true, "assignable_to_inbox": [ 31, 32, 33 ], "new_role": "General Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": "sms", "phone1": "+972541234567", "email1": null, "create_time": 1790000000 } ] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` --- # Add Agent Source: https://docs.99digital.co.il/online-api/agents/add-agent Markdown: https://docs.99digital.co.il/markdown/online-api/agents/add-agent.md Section: Online API › Agents `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/agents` Add a new agent to an account. Creates a user and adds them to the account. If a user with the same email already exists in the system, that user is added to the account instead of creating a new one. New users receive an invitation email to set their password. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/agents` | | Method | JSON via POST | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token — legacy roles: `administrator`. New rules system: **Agents → create**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | **Request body:** All fields go inside an `agent` object. In a JSON request the wrapper is optional: top-level fields are wrapped for you. | Parameter | Type | Description | Required | | --- | --- | --- | --- | | `name` | string | Full name of the agent | Yes | | `email` | string | Email of the agent. It is the login email and must be unique system-wide: if it already exists, the existing user is attached to the account. | Yes | | `role` | string | Whether it's an administrator or an agent. Enum: `agent`, `administrator`. On accounts with the new rules system: the name of a custom role (for example `Shift Manager`), or `agent`; `administrator` is rejected there. | Yes | | `availability` | string | The availability setting of the agent. Enum: `online`, `busy`, `offline`. Default `online`. | No | | `auto_offline` | boolean | Whether the availability status of the agent is configured to go offline automatically when away. Default `true`. | No | | `see_all_conversations` | boolean | Legacy flag that lets the agent see all conversations. On new-rules accounts the effective value comes from the role (**Inbox read all conversations** on every inbox). | No | | `two_factor_type` | string | `sms` or `email` enables two-factor authentication; any other value disables it. `sms` requires `phone1`, `email` requires `email1`. | No | | `phone1` | string | Phone number for two-factor codes by SMS. | No | | `email1` | string | Email address for two-factor codes by email. | No | | `custom_attributes` | object | Free-form key/value attributes. | No | | `capacity_cap` | integer | Queue-management cap of open tickets for this agent. Empty or `null` means the account default (unlimited). Used only with queue management. | No | **Response:** ```json { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": false, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [31, 32], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": "+972507654321", "email1": null, "create_time": 1794470400 } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `id` | Agent numeric ID | | `account_id` | Account numeric ID | | `availability_status` | The availability status of the agent. Enum: `online`, `busy`, `offline`. This is the live presence, computed from the agent's connection, so it can differ from the `availability` you sent. | | `auto_offline` | Whether the availability status of the agent is configured to go offline automatically when away | | `confirmed` | Whether or not the agent's account has been validated by clicking on the invitation email they received | | `email` | Email of the agent | | `available_name` | Display name of the agent | | `name` | Full name of the agent | | `role` | Whether it's an administrator or an agent. Enum: `agent`, `administrator`. On accounts with the new rules system: the name of the agent's custom role. | | `see_all_conversations` | Whether an agent can see all conversations | | `thumbnail` | Agent thumbnail | The other fields of the response are described in the response schema below. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent` | object | Yes | The new agent's details. In a JSON request the wrapper is optional: top-level fields are wrapped for you. | | `agent.name` | string | Yes | The full name of the agent. Example: `Dana Levi`. | | `agent.email` | string | Yes | The email of the agent, used to log in. It must be unique system-wide: if a user with this email already exists, that existing user is added to the account instead of a new one being created. Example: `dana.levi@example.com`. | | `agent.role` | string | Yes | Whether it's an administrator or an agent: `agent` or `administrator` (legacy roles). On accounts with the new rules system: the name of a custom role (for example `Shift Manager`), or `agent`; `administrator` is rejected there with `422`. Example: `Shift Manager`. | | `agent.availability` | string | No | The availability setting of the agent: `online`, `busy` or `offline`. Default `online`. The live presence returned in `availability_status` also depends on whether the agent is connected. One of: `online` — Available to take conversations; `busy` — Marked as busy; `offline` — Not available. Default: `online`. | | `agent.auto_offline` | boolean | No | Whether the availability status of the agent is configured to go offline automatically when away (when the agent disconnects). Default `true`. Default: `true`. | | `agent.see_all_conversations` | boolean | No | Legacy flag that lets the agent see all conversations. On accounts with the new rules system the effective value comes from the role (**Inbox read all conversations** on every inbox). | | `agent.two_factor_type` | string | No | `sms` or `email` enables two-factor authentication; any other value disables it. `sms` requires `phone1`, `email` requires `email1`. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`. | | `agent.phone1` | string | No | The phone number for two-factor codes by SMS. Example: `+972507654321`. | | `agent.email1` | string | No | The email address for two-factor codes by email. | | `agent.custom_attributes` | object | No | Free-form key/value attributes, stored on the agent's membership in this account. | | `agent.capacity_cap` | integer \| null | No | Queue-management cap of open tickets for this agent, used for queue routing (only with queue management). Empty or `null` means the account default (unlimited). | ### Example: Agent An agent with a custom role. ```json { "agent": { "name": "Dana Levi", "email": "dana.levi@example.com", "role": "Shift Manager" } } ``` ### Example: With two-factor and attributes Two-factor codes by SMS, and a custom attribute. ```json { "agent": { "name": "Dana Levi", "email": "dana.levi@example.com", "role": "Shift Manager", "availability": "online", "auto_offline": true, "two_factor_type": "sms", "phone1": "+972507654321", "custom_attributes": { "department": "sales" } } } ``` ## Responses ### 200 — The new agent. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The agent's numeric ID (user ID). | | `account_id` | integer | The numeric ID of the account. | | `availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `email` | string | The agent's login email address. | | `available_name` | string | The agent's display name. | | `custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `name` | string | The agent's full name. | | `role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `operation_bot` | boolean | `true` for internal operation-bot users. | | `see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `email1` | string \| null | The email address that receives two-factor codes by email. | | `create_time` | integer | When the agent was created (Unix timestamp, in seconds). | #### Example ```json { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": false, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [ 31, 32 ], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": "sms", "phone1": "+972507654321", "email1": null, "create_time": 1794470400 } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 402 — The account reached its licensed number of agents. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Account limit exceeded. Please purchase more licenses" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 422 — The `agent` fields are missing, or the role is not allowed. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `message` | string | What failed, in the account's language. | | `attributes` | array of string | The fields that failed. | | `error` | string | Returned instead of `message` when `agent` is missing. | #### Example: Administrator role `administrator` on an account with the new rules system. ```json { "message": "Role ‘Administrator’ is not allowed when the ‘new_rules_system’ feature is enabled. Please use the ‘Agent’ role and set the new role through the General Manager account.", "attributes": [ "role" ] } ``` #### Example: Missing fields The body has no `agent` fields. ```json { "error": "param is missing or the value is empty: agent" } ``` --- # Update Agent Source: https://docs.99digital.co.il/online-api/agents/update-agent Markdown: https://docs.99digital.co.il/markdown/online-api/agents/update-agent.md Section: Online API › Agents `PATCH https://online.99digital.co.il/api/v1/accounts/{account_id}/agents/{agent_id}` Update agent details in an account. Updates the agent's profile and their membership in this account. Only the fields you send are changed. The login email cannot be changed through this endpoint. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/agents/{agent_id}` | | Method | JSON via PATCH (`PUT` works the same way) | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token — legacy roles: `administrator`. New rules system: **Agents → update**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `agent_id` | The numeric ID of the agent | Yes | **Request body:** All fields go inside an `agent` object. In a JSON request the wrapper is optional: top-level fields are wrapped for you. | Parameter | Type | Description | Required | | --- | --- | --- | --- | | `role` | string | Whether it's an administrator or an agent. Enum: `agent`, `administrator`. On accounts with the new rules system: the name of a custom role (for example `Shift Manager`), which sets the agent's custom role, or `agent`; `administrator` is rejected there. | No | | `availability` | string | The availability setting of the agent. Enum: `online`, `busy`, `offline`. | No | | `auto_offline` | boolean | Whether the availability status of the agent is configured to go offline automatically when away | No | | `name` | string | Full name of the agent. | No | | `see_all_conversations` | boolean | Legacy flag that lets the agent see all conversations. On accounts with the new rules system the role decides, and this field has no effect. | No | | `two_factor_type` | string | `sms` or `email` enables two-factor authentication; any other value disables it. `sms` requires `phone1`, `email` requires `email1`. | No | | `phone1` | string | Phone number for two-factor codes by SMS. | No | | `email1` | string | Email address for two-factor codes by email. | No | | `custom_attributes` | object | Replaces the agent's custom attributes in this account. | No | | `capacity_cap` | integer | Queue-management cap of open tickets. Send `null` or `""` to clear it (account default, unlimited). | No | **Response:** ```json { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": true, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [31, 32], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": "+972507654321", "email1": null, "create_time": 1794470400 } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `id` | Agent numeric ID | | `account_id` | Account numeric ID | | `availability_status` | The availability status of the agent. Enum: `online`, `busy`, `offline`. This is the live presence, computed from the agent's connection, so it can differ from the `availability` you sent — for example `offline` while the agent is not connected. | | `auto_offline` | Whether the availability status of the agent is configured to go offline automatically when away | | `confirmed` | Whether or not the agent's account has been validated by clicking on the invitation email they received | | `email` | Email of the agent | | `available_name` | Display name of the agent | | `name` | Full name of the agent | | `role` | Whether it's an administrator or an agent. Enum: `agent`, `administrator`. On accounts with the new rules system: the name of the agent's custom role. | | `see_all_conversations` | Whether an agent can see all conversations | | `thumbnail` | Agent thumbnail | The other fields of the response are described in the response schema below. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `agent_id` | path | integer | Yes | The numeric ID of the agent (the agent's user ID). Example: `52`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent` | object | Yes | The fields to change. Every field is optional. In a JSON request the wrapper is optional: top-level fields are wrapped for you. | | `agent.name` | string | No | The full name of the agent. Example: `Dana Levi`. | | `agent.role` | string | No | Whether it's an administrator or an agent: `agent` or `administrator` (legacy roles) — the same values as in [Add Agent](https://docs.99digital.co.il/online-api/agents/add-agent). On accounts with the new rules system, the name of a custom role (for example `Shift Manager`) sets the agent's custom role; `agent` is also accepted, and `administrator` is rejected with `422`. Example: `Shift Manager`. | | `agent.availability` | string | No | The availability setting of the agent: `online`, `busy` or `offline`. The live presence returned in `availability_status` also depends on whether the agent is connected. One of: `online` — Available to take conversations; `busy` — Marked as busy; `offline` — Not available. | | `agent.auto_offline` | boolean | No | Whether the availability status of the agent is configured to go offline automatically when away (when the agent disconnects). | | `agent.see_all_conversations` | boolean | No | Legacy flag that lets the agent see all conversations. On accounts with the new rules system the role decides, and this field has no effect. | | `agent.two_factor_type` | string | No | `sms` or `email` enables two-factor authentication; any other value disables it. `sms` requires `phone1`, `email` requires `email1`. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`. | | `agent.phone1` | string | No | The phone number for two-factor codes by SMS. Example: `+972507654321`. | | `agent.email1` | string | No | The email address for two-factor codes by email. | | `agent.custom_attributes` | object | No | Free-form key/value attributes. Replaces the agent's current custom attributes in this account. | | `agent.capacity_cap` | integer \| null | No | Queue-management cap of open tickets for this agent, used for queue routing (only with queue management). Send `null` or `""` to clear it: the account default (unlimited). | ### Example: Change the role Give the agent another custom role. ```json { "agent": { "role": "Shift Manager" } } ``` ### Example: Role and profile A new name, role, availability and custom attributes. ```json { "agent": { "name": "Dana Levi", "role": "Shift Manager", "availability": "busy", "custom_attributes": { "department": "sales" } } } ``` ### Example: Clear the capacity cap Go back to the account default (unlimited). ```json { "agent": { "capacity_cap": null } } ``` ## Responses ### 200 — The updated agent. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The agent's numeric ID (user ID). | | `account_id` | integer | The numeric ID of the account. | | `availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `email` | string | The agent's login email address. | | `available_name` | string | The agent's display name. | | `custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `name` | string | The agent's full name. | | `role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `operation_bot` | boolean | `true` for internal operation-bot users. | | `see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `email1` | string \| null | The email address that receives two-factor codes by email. | | `create_time` | integer | When the agent was created (Unix timestamp, in seconds). | #### Example ```json { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": true, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [ 31, 32 ], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": "+972507654321", "email1": null, "create_time": 1794470400 } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The agent is not in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — `role` is `administrator` on an account with the new rules system. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `message` | string | What failed, in the account's language. | | `attributes` | array of string | The fields that failed. | #### Example ```json { "message": "Role ‘Administrator’ is not allowed when the ‘new_rules_system’ feature is enabled. Please use the ‘Agent’ role and set the new role through the General Manager account.", "attributes": [ "role" ] } ``` --- # Remove Agent Source: https://docs.99digital.co.il/online-api/agents/remove-agent Markdown: https://docs.99digital.co.il/markdown/online-api/agents/remove-agent.md Section: Online API › Agents `DELETE https://online.99digital.co.il/api/v1/accounts/{account_id}/agents/{agent_id}` Remove an agent from an account. If the user does not belong to any other account, the user record is deleted as well, in the background. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/agents/{agent_id}` | | Method | JSON via DELETE | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token — legacy roles: `administrator`. New rules system: **Agents → delete**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `agent_id` | The numeric ID of the agent | Yes | **Response:** `200 OK` with an empty body. **Error responses:** `404 {"error": "Resource could not be found"}` when the agent is not (or no longer) in the account. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `agent_id` | path | integer | Yes | The numeric ID of the agent (the agent's user ID). Example: `52`. | ## Responses ### 200 — The agent was removed, with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The agent is not (or no longer) in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List Online Agents Source: https://docs.99digital.co.il/online-api/agents/list-online-agents Markdown: https://docs.99digital.co.il/markdown/online-api/agents/list-online-agents.md Section: Online API › Agents `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/agents/online` Returns the IDs of agents who are currently online in the account. Optionally filters to the members of one team. Useful for bots that decide whether to hand a conversation over to a human. | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/agents/online` | | **Authorization** | User token (any agent) **or agent-bot token**. | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | **Query parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `team_id` | integer | No | Return only online agents who are members of this team. `404` if the team does not exist. | **Example: all online agents** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/agents/online' \ -H 'api_access_token: ' ``` Response (`200 OK`). The IDs are strings. ```json ["51", "52", "53"] ``` **Example: online agents of a team** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/agents/online?team_id=7' \ -H 'api_access_token: ' ``` Response (`200 OK`): ```json ["51"] ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `team_id` | query | integer | No | Return only the online agents who are members of this team. A team that does not exist returns `404`. Example: `7`. | ## Responses ### 200 — The user IDs of the online agents, as strings. Content type: `application/json` Type: `array of string`. #### Example: Online agents One agent is online. ```json [ "51" ] ``` #### Example: Nobody online No agent (or no member of the team) is online. ```json [] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 404 — The team in `team_id` does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Disconnect Agent Source: https://docs.99digital.co.il/online-api/agents/disconnect-agent Markdown: https://docs.99digital.co.il/markdown/online-api/agents/disconnect-agent.md Section: Online API › Agents `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/agents/{agent_id}/disconnect` Forces an agent's session to end. The agent's next request to the account fails with a session-timeout error, and the dashboard logs them out. The request has no body. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/agents/{agent_id}/disconnect` | | **Authorization** | User token. Legacy: `administrator`. New rules: **Disconnect Agents → update**. Not available to agent-bot tokens. | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `agent_id` | integer | Yes | Agent (user) ID. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/agents/52/disconnect' \ -H 'api_access_token: ' ``` **Example response**: `200 OK` with an empty body. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `agent_id` | path | integer | Yes | The numeric ID of the agent (the agent's user ID). Example: `52`. | ## Responses ### 200 — The agent's session was ended, with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List Assignable Agents Source: https://docs.99digital.co.il/online-api/agents/list-assignable-agents Markdown: https://docs.99digital.co.il/markdown/online-api/agents/list-assignable-agents.md Section: Online API › Agents `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/assignable_agents` Returns the agents who can be assigned conversations in all of the given inboxes. An agent is returned only when assignable in **all** of them: - New-rules accounts: agents whose role grants **Inbox can be assigned** on every requested inbox. - Legacy accounts: agents who are members of every requested inbox, plus all administrators. | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/assignable_agents` | | **Authorization** | User token. The caller must be allowed to view each requested inbox. Not available to agent-bot tokens. | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | **Query parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `inbox_ids[]` | integer[] | Yes | One or more inbox IDs. Repeat the parameter for each inbox. | **Example request** Repeat `inbox_ids[]` for each inbox (`-g` stops cURL from reading the brackets as a pattern): ```bash curl -g -X GET 'https://online.99digital.co.il/api/v1/accounts/12/assignable_agents?inbox_ids[]=31&inbox_ids[]=32' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`). The result is wrapped in `payload`; one agent is shown. ```json { "payload": [ { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": true, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [31, 32], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": "+972507654321", "email1": null, "create_time": 1794470400 } ] } ``` **Error responses**: `404 {"error": "Resource could not be found"}` when any of the inbox IDs does not exist in the account. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `inbox_ids[]` | query | array of integer | Yes | One or more inbox IDs. Repeat the parameter for each inbox. Example: `[31,32]`. | ## Responses ### 200 — The agents who can be assigned in every requested inbox, in `payload`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of object | The assignable agents. | | `payload[].id` | integer | The agent's numeric ID (user ID). | | `payload[].account_id` | integer | The numeric ID of the account. | | `payload[].availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `payload[].auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `payload[].confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `payload[].email` | string | The agent's login email address. | | `payload[].available_name` | string | The agent's display name. | | `payload[].custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `payload[].name` | string | The agent's full name. | | `payload[].role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `payload[].operation_bot` | boolean | `true` for internal operation-bot users. | | `payload[].see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `payload[].assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `payload[].new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `payload[].thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `payload[].capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `payload[].two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `payload[].phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `payload[].email1` | string \| null | The email address that receives two-factor codes by email. | | `payload[].create_time` | integer | When the agent was created (Unix timestamp, in seconds). | #### Example ```json { "payload": [ { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": true, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [ 31, 32 ], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": "+972507654321", "email1": null, "create_time": 1794470400 }, { "id": 51, "account_id": 12, "availability_status": "online", "auto_offline": true, "confirmed": true, "email": "jane.agent@example.com", "available_name": "Jane Agent", "custom_attributes": {}, "name": "Jane Agent", "role": "General Manager", "operation_bot": false, "see_all_conversations": true, "assignable_to_inbox": [ 31, 32, 33 ], "new_role": "General Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": "sms", "phone1": "+972541234567", "email1": null, "create_time": 1790000000 } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — One of the inbox IDs does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List Contacts Source: https://docs.99digital.co.il/online-api/contacts/list-contacts Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/list-contacts.md Section: Online API › Contacts `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts` List all contacts with values for identifier, email, phone number or WhatsApp ID in your account, with pagination (page size = 10 by default). Send `labels[]` to get only the contacts that have any of those labels, and `sort` to change the order. To find contacts by text, use [Search Contacts](https://docs.99digital.co.il/online-api/contacts/search-contact); for conditions on specific fields, use [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts). **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts` | | Method | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token — legacy roles: any agent. New rules system: **Contacts → read**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | **Query Parameters:** | Parameter | Type | Description | Required | | --- | --- | --- | --- | | `sort` | string | The attribute by which the list should be sorted. Prefix it with `-` for descending order (for example `-created_at`). Enum: `name`, `email`, `phone_number`, `last_activity_at`, `created_at`, `company`, `city`, `country`, `-name`, `-email`, `-phone_number`, `-last_activity_at`, `-created_at`, `-company`, `-city`, `-country` | No | | `page` | integer | The page parameter. Default: `1` | No | | `per_page` | integer | The page size. Default: `10`, maximum `100` | No | | `labels[]` | string[] | Return only the contacts that have **any** of these labels | No | | `include_contact_inboxes` | boolean | Include `contact_inboxes` in each contact. Default: `true`; send `false` for much smaller responses | No | **Response:** ```json { "meta": { "count": 1, "contacts_all": null, "current_page": 1 }, "payload": [ { "additional_attributes": {}, "availability_status": "offline", "email": "string", "id": 0, "name": "string", "phone_number": "string", "identifier": "string", "thumbnail": "string", "custom_attributes": { "attribute_key": "attribute_value" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 0, "contact_inboxes": [ { "source_id": "string", "inbox": {} } ] } ] } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | meta | Metadata about the contacts | | meta -> count | Number of matching contacts, across all pages | | meta -> contacts_all | Always `null` | | meta -> current_page | Current results page. It may come back as a string (for example `"1"`), so parse it before comparing | | payload | Array of objects (contacts) | | payload -> id | Contact numeric ID | | payload -> name | Full name of the contact | | payload -> email | Email address of the contact (stored in lower case) | | payload -> phone_number | Phone number of the contact, in E.164 format | | payload -> availability_status | Availability status of the contact: whether the contact is connected right now (website widget). Enum: `online`, `offline` | | payload -> identifier | A unique identifier for the contact in an external system | | payload -> thumbnail | Avatar URL of the contact | | payload -> last_activity_at | Timestamp of the last activity. Present only when set | | payload -> blocked | Indicates whether the contact is blocked | | payload -> is_whatsapp_contact | `true` if the contact belongs to a WhatsApp API inbox | | payload -> created_at | The time at which the contact was created (Unix timestamp) | | payload -> custom_attributes | Object containing custom attributes related to the contact | | payload -> additional_attributes | Object containing additional attributes related to the contact | | payload -> contact_inboxes | Array of objects (contact_inboxes). Left out when you send `include_contact_inboxes=false` | | payload -> contact_inboxes -> source_id | Contact inbox source ID | | payload -> contact_inboxes -> inbox | Object containing the inbox details | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `page` | query | integer | No | The page parameter — the number of the page to return. Default: `1`. Example: `1`. | | `per_page` | query | integer | No | The page size — the number of contacts per page, at most 100. Default: `10`. Maximum: 100. | | `sort` | query | string | No | The attribute by which the list should be sorted. Prefix it with `-` for descending order (for example `-created_at`). One of: `name` — By name, ascending (A to Z); `email` — By email address, ascending; `phone_number` — By phone number, ascending; `last_activity_at` — By last activity, oldest first; `created_at` — By creation time, oldest first; `company` — By company name (`company_name` in `additional_attributes`), ascending; `city` — By city (`city` in `additional_attributes`), ascending; `country` — By country (`country` in `additional_attributes`), ascending; `-name` — By name, descending (Z to A); `-email` — By email address, descending; `-phone_number` — By phone number, descending; `-last_activity_at` — By last activity, newest first; `-created_at` — By creation time, newest first; `-company` — By company name, descending; `-city` — By city, descending; `-country` — By country, descending. Example: `-created_at`. | | `labels[]` | query | array of string | No | Return only the contacts that have **any** of these label titles. | | `include_contact_inboxes` | query | boolean | No | Include `contact_inboxes` in each contact. Send `false` for much smaller responses. Default: `true`. | ## Responses ### 200 — A page of contacts. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `meta` | object | Metadata about the contacts — paging information for the result. | | `meta.count` | integer | The number of matching contacts, across all pages. | | `meta.contacts_all` | null | Returned as `null`. | | `meta.current_page` | integer \| string | The current page number. It may come back as a string (for example `"1"`). | | `payload` | array of object | Array of contact objects — the contacts on this page. | | `payload[].id` | integer | The contact's numeric ID. | | `payload[].name` | string | The full name of the contact. | | `payload[].email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload[].phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload[].identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload[].thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload[].availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload[].additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload[].custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload[].blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload[].is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload[].created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload[].last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload[].email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload[].contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload[].contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload[].contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload[].contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload[].contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload[].contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload[].contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload[].contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload[].contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload[].contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload[].conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | #### Example: Newest first `?page=1&sort=-created_at&include_contact_inboxes=false`. Shortened to the first two of the four contacts. ```json { "meta": { "count": 4, "contacts_all": null, "current_page": "1" }, "payload": [ { "additional_attributes": {}, "availability_status": "offline", "email": null, "id": 804, "name": "Yossi Ben David", "phone_number": "+972547654321", "identifier": null, "thumbnail": "", "custom_attributes": {}, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794471100 }, { "additional_attributes": {}, "availability_status": "offline", "email": null, "id": 803, "name": "Noa Mizrahi", "phone_number": "+972531234567", "identifier": null, "thumbnail": "", "custom_attributes": {}, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794471000 } ] } ``` #### Example: With a label `?labels[]=vip&include_contact_inboxes=false` — the contacts labelled `vip`. ```json { "meta": { "count": 1, "contacts_all": null, "current_page": "1" }, "payload": [ { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500 } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` --- # Create Contact Source: https://docs.99digital.co.il/online-api/contacts/create-contact Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/create-contact.md Section: Online API › Contacts `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts` Create a new contact in an account. Send `inbox_id` to also link the contact to that inbox. The response then includes the contact inbox's `source_id`, which you need to [add a conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation) in that inbox. To link an existing contact to an inbox later, use [Create Contact Inbox](https://docs.99digital.co.il/online-api/contacts/create-contact-inbox). Fires the `contact_created` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events). **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts` | | Method | JSON via POST | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token — legacy roles: any agent. New rules system: **Contacts → create**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | **Request body:** | Parameter | Type | Description | Required | | --- | --- | --- | --- | | `inbox_id` | integer | The numeric ID of the inbox. The contact is also linked to this inbox (a contact inbox is created) | No | | `name` | string | Name of the contact | No | | `email` | string | Email of the contact. Must be a valid email | No | | `phone_number` | string | Phone number of the contact in E.164 format, for example: `+972501234567`. Israeli local formats are normalised (see the note below). Unique in the account | No | | `avatar_url` | string | The URL to a JPEG or PNG file for the contact avatar. The image is downloaded in the background | No | | `identifier` | string | A unique identifier for the contact in an external system. Unique in the account | No | | `custom_attributes` | object | An object where you can store custom attributes for the contact, for example `{"type": "customer", "age": 30}` | No | | `additional_attributes` | object | Standard extra fields, for example `company_name`, `city`, `country`, `description`. The blocking keys (`blocked`, `blocked_at`, `block_source`, `block_reason`) are ignored; use [Block Contact](https://docs.99digital.co.il/online-api/contacts/block-contact) instead | No | | `avatar` | file | Avatar image, instead of `avatar_url` (send the request as `multipart/form-data`, see Remarks) | No | | `source_id` | string | With `inbox_id`: the contact's ID on that channel. If omitted it is generated (a UUID for API inboxes, the phone number or email for phone and email channels) | No | :::note A contact without an email, phone number or identifier can be created, but it does **not** appear in [List Contacts](https://docs.99digital.co.il/online-api/contacts/list-contacts) or [Search Contacts](https://docs.99digital.co.il/online-api/contacts/search-contact). ::: **Request body example:** ```json { "inbox_id": 0, "name": "string", "email": "string", "phone_number": "string", "avatar_url": "string", "identifier": "string", "custom_attributes": {} } ``` **Response:** ```json { "payload": { "contact": { "id": 0, "name": "string", "email": "string", "phone_number": "string", "availability_status": "offline", "identifier": "string", "thumbnail": "string", "blocked": false, "is_whatsapp_contact": false, "created_at": 0, "custom_attributes": { "attribute_key": "attribute_value" }, "additional_attributes": {}, "email_or_phone_optional": false, "contact_inboxes": [ { "source_id": "string", "inbox": {} } ] }, "contact_inbox": { "inbox": {}, "source_id": "string" } } } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | payload | Object containing the new contact and its contact inbox | | payload -> contact | Object containing the contact details | | payload -> contact -> id | Contact numeric ID | | payload -> contact -> name | Full name of the contact | | payload -> contact -> email | Email address of the contact (stored in lower case) | | payload -> contact -> phone_number | Phone number of the contact, in E.164 format | | payload -> contact -> availability_status | Availability status of the contact: whether the contact is connected right now (website widget). Enum: `online`, `offline` | | payload -> contact -> identifier | A unique identifier for the contact in an external system | | payload -> contact -> thumbnail | Avatar URL of the contact | | payload -> contact -> blocked | Whether the contact is blocked | | payload -> contact -> is_whatsapp_contact | `true` if the contact belongs to a WhatsApp API inbox | | payload -> contact -> created_at | Timestamp of contact creation time (Unix time, seconds) | | payload -> contact -> custom_attributes | The object to save custom attributes for the contact; accepts custom attribute keys and values | | payload -> contact -> additional_attributes | The object containing additional attributes related to the contact | | payload -> contact -> email_or_phone_optional | `true` when the contact has a WhatsApp ID, so email and phone may both be empty | | payload -> contact -> contact_inboxes | Array of objects (contact_inboxes) | | payload -> contact_inbox | The contact inbox created for `inbox_id`. Both its fields are `null` when no `inbox_id` was sent | | payload -> contact_inbox -> source_id | Contact inbox source ID: the contact's ID on the inbox's channel. Use it to [add a conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation) | | payload -> contact_inbox -> inbox | Object containing the inbox details | ## Remarks - Phone numbers must be in E.164 format (`+`, the country code, then the number). Israeli mobile numbers are normalised for you: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. - The `message` of a `422` response is translated to the account's language (for example Hebrew). Check `attributes`, not the text. - To upload an avatar image instead of sending `avatar_url`, send the request as `multipart/form-data`, with the fields above as form fields and the image in an `avatar` field: ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts' \ -H 'api_access_token: ' \ -F 'name=Dana Cohen' \ -F 'phone_number=+972501234567' \ -F 'avatar=@avatar.png;type=image/png' ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `name` | string | No | Name of the contact. Example: `Dana Cohen`. | | `email` | string | No | Email of the contact. Must be a valid email. Example: `dana.cohen@example.com`. | | `phone_number` | string | No | Phone number of the contact in E.164 format, for example `+972501234567`. Israeli local formats are normalised: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. Unique in the account. Example: `+972501234567`. | | `identifier` | string | No | A unique identifier for the contact in an external system (your own external ID). Unique in the account. Example: `crm-801`. | | `additional_attributes` | object | No | Standard extra fields, for example `company_name`, `city`, `country` and `description`. The blocking keys (`blocked`, `blocked_at`, `block_source`, `block_reason`) are ignored — use [Block Contact](https://docs.99digital.co.il/online-api/contacts/block-contact) instead. | | `custom_attributes` | object | No | An object where you can store custom attributes for the contact, as key-value pairs — for example `{"type": "customer", "age": 30}`. Use the keys of the account's contact custom attributes (Settings → Custom attributes); other keys are stored too. | | `avatar_url` | string | No | The URL to a JPEG or PNG file for the contact avatar. It must be public; the image is downloaded in the background. To upload the image itself, send an `avatar` file field instead (see Remarks). | | `inbox_id` | integer | No | The numeric ID of the inbox. The contact is also linked to this inbox (a contact inbox is created), and the response returns its `source_id`. Example: `31`. | | `source_id` | string | No | With `inbox_id`: the contact's ID on that channel. When omitted it is generated — a UUID for API inboxes, the phone number or email address for phone and email channels. | ### Example: Linked to an inbox A full contact, linked to an API inbox. ```json { "inbox_id": 31, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "custom_attributes": { "customer_tier": "gold" } } ``` ### Example: Local phone number An Israeli local phone number and no inbox. The number is saved as `+972521234567`. ```json { "name": "Avi Levi", "phone_number": "0521234567" } ``` ## Responses ### 200 — The new contact, and the contact inbox created for `inbox_id` (both fields of `contact_inbox` are `null` when no `inbox_id` was sent). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | object | Object containing the new contact and its contact inbox. | | `payload.contact` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.contact.id` | integer | The contact's numeric ID. | | `payload.contact.name` | string | The full name of the contact. | | `payload.contact.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload.contact.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload.contact.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload.contact.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload.contact.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload.contact.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload.contact.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload.contact.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload.contact.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload.contact.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload.contact.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload.contact.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload.contact.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload.contact.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.contact.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload.contact.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload.contact.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload.contact.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload.contact.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload.contact.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload.contact.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload.contact.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload.contact.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload.contact.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload.contact.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | | `payload.contact_inbox` | object | The contact inbox created for `inbox_id`. Both its fields are `null` when no `inbox_id` was sent. | | `payload.contact_inbox.inbox` | object \| null | The inbox's stored record, or `null` when no `inbox_id` was sent. Its main fields are listed. | | `payload.contact_inbox.inbox.id` | integer | The inbox ID. | | `payload.contact_inbox.inbox.channel_id` | integer | The ID of the inbox's channel. | | `payload.contact_inbox.inbox.account_id` | integer | The account ID. | | `payload.contact_inbox.inbox.name` | string | The inbox name. | | `payload.contact_inbox.inbox.channel_type` | string | The channel type, for example `Channel::Api`. | | `payload.contact_inbox.inbox.created_at` | string | When the inbox was created (ISO 8601). | | `payload.contact_inbox.inbox.updated_at` | string | The inbox's last update (ISO 8601). | | `payload.contact_inbox.source_id` | string \| null | Contact inbox source ID: the contact's ID on the inbox's channel. Use it to add a conversation. `null` when no `inbox_id` was sent. | #### Example: Linked to an inbox The contact and its new contact inbox. The `inbox` objects are shortened to their main fields. ```json { "payload": { "contact": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500, "email_or_phone_optional": false, "contact_inboxes": [ { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b", "inbox": { "id": 31, "channel_id": 9, "name": "Website API", "channel_type": "Channel::Api", "enable_auto_assignment": true, "timezone": "UTC", "webhook_url": "" } } ] }, "contact_inbox": { "inbox": { "id": 31, "channel_id": 9, "account_id": 12, "name": "Website API", "channel_type": "Channel::Api", "created_at": "2026-11-12T08:00:00.000Z", "updated_at": "2026-11-12T08:00:00.000Z" }, "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b" } } } ``` #### Example: Local phone number No inbox, so `contact_inbox` is empty. The phone number was normalised to E.164. ```json { "payload": { "contact": { "additional_attributes": {}, "availability_status": "offline", "email": null, "id": 802, "name": "Avi Levi", "phone_number": "+972521234567", "identifier": null, "thumbnail": "", "custom_attributes": {}, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470600, "email_or_phone_optional": false, "contact_inboxes": [] }, "contact_inbox": { "inbox": null, "source_id": null } } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The `inbox_id` does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — Validation failed. `message` is translated to the account's language, so check `attributes` (the fields that failed) rather than the text. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `message` | string | What failed, in the account's language. | | `attributes` | array of string | The fields that failed. | #### Example: Phone number taken Another contact in the account has this phone number. ```json { "message": "Phone number has already been taken", "attributes": [ "phone_number" ] } ``` #### Example: Invalid email and phone An invalid email and phone number, on an account whose language is Hebrew. ```json { "message": "Email אימייל לא תקין, Phone number צריך להיות בפורמט e164", "attributes": [ "email", "phone_number" ] } ``` --- # Retrieve Contact Source: https://docs.99digital.co.il/online-api/contacts/retrieve-contact Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/retrieve-contact.md Section: Online API › Contacts `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}` Retrieve contact details by ID. The contact comes with its `contact_inboxes`: the inboxes it is linked to, each with the `source_id` that identifies the contact on that channel. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}` | | Method | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token — legacy roles: any agent. New rules system: **Contacts → read**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `contact_id` | The numeric ID of the contact | Yes | **Response:** ```json { "payload": { "additional_attributes": {}, "availability_status": "offline", "email": "string", "id": 0, "name": "string", "phone_number": "string", "identifier": "string", "thumbnail": "string", "custom_attributes": {}, "blocked": false, "is_whatsapp_contact": false, "created_at": 0, "email_or_phone_optional": false, "contact_inboxes": [ { "source_id": "string", "inbox": { "id": 0, "name": "string", "website_url": "string", "channel_type": "string", "avatar_url": "string", "widget_color": "string", "website_token": "string", "enable_auto_assignment": true, "web_widget_script": "string", "welcome_title": "string", "welcome_tagline": "string", "greeting_enabled": false, "greeting_message": "string" } } ] } } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | payload | Object containing contact details | | payload -> additional_attributes | Object containing additional attributes related to the contact | | payload -> availability_status | Availability status of the contact: whether the contact is connected right now (website widget). Enum: `online`, `offline` | | payload -> email | Email address of the contact (stored in lower case) | | payload -> id | Contact numeric ID | | payload -> name | Full name of the contact | | payload -> phone_number | Phone number of the contact, in E.164 format | | payload -> identifier | A unique identifier for the contact in an external system | | payload -> thumbnail | Avatar URL of the contact | | payload -> custom_attributes | Object containing custom attributes related to the contact | | payload -> blocked | Indicates whether the contact is blocked | | payload -> is_whatsapp_contact | `true` if the contact belongs to a WhatsApp API inbox | | payload -> created_at | The time at which the contact was created (Unix timestamp) | | payload -> email_or_phone_optional | `true` when the contact has a WhatsApp ID, so email and phone may both be empty | | payload -> contact_inboxes | Array of objects (contact inboxes) | | payload -> contact_inboxes -> source_id | Contact inbox source ID: the contact's ID on the inbox's channel | | payload -> contact_inboxes -> inbox | Object containing inbox details | | payload -> contact_inboxes -> inbox -> id | The numeric ID of the inbox | | payload -> contact_inboxes -> inbox -> name | The name of the inbox | | payload -> contact_inboxes -> inbox -> website_url | Website URL | | payload -> contact_inboxes -> inbox -> channel_type | The type of the inbox, for example `Channel::Api` | | payload -> contact_inboxes -> inbox -> avatar_url | The avatar image of the inbox | | payload -> contact_inboxes -> inbox -> widget_color | Widget color used for customization of the widget | | payload -> contact_inboxes -> inbox -> website_token | Website token | | payload -> contact_inboxes -> inbox -> enable_auto_assignment | Indicates whether auto assignment is enabled or not | | payload -> contact_inboxes -> inbox -> web_widget_script | Script used to load the website widget | | payload -> contact_inboxes -> inbox -> welcome_title | Welcome title to be displayed on the widget | | payload -> contact_inboxes -> inbox -> welcome_tagline | Welcome tagline to be displayed on the widget | | payload -> contact_inboxes -> inbox -> greeting_enabled | Indicates whether greeting is enabled | | payload -> contact_inboxes -> inbox -> greeting_message | A greeting message when the user starts the conversation | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Responses ### 200 — The contact. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.id` | integer | The contact's numeric ID. | | `payload.name` | string | The full name of the contact. | | `payload.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | #### Example ```json { "payload": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500, "email_or_phone_optional": false, "contact_inboxes": [ { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b", "inbox": { "id": 31, "channel_id": 9, "name": "Website API", "channel_type": "Channel::Api", "enable_auto_assignment": true, "timezone": "UTC", "webhook_url": "" } } ] } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Update Contact Source: https://docs.99digital.co.il/online-api/contacts/update-contact Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/update-contact.md Section: Online API › Contacts `PATCH https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}` Update a contact belonging to an account by ID. Only the fields you send are changed, and all of them are optional: - `custom_attributes` are **merged** into the existing values. To remove keys, use [Delete Contact Custom Attributes](https://docs.99digital.co.il/online-api/contacts/delete-contact-custom-attributes). - `additional_attributes` **replace** the existing object, so send the whole object. The blocking keys are always kept. Fires the `contact_updated` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events). **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}` | | Method | JSON via PATCH (`PUT` works the same way) | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token — legacy roles: any agent. New rules system: **Contacts → update**. - Agent-bot token: allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `contact_id` | The numeric ID of the contact | Yes | **Request body:** | Parameter | Type | Description | Required | | --- | --- | --- | --- | | `name` | string | Name of the contact | No | | `email` | string | Email of the contact. Must be a valid email | No | | `phone_number` | string | Phone number of the contact in E.164 format, for example: `+972501234567`. Israeli local formats are normalised. Unique in the account | No | | `avatar_url` | string | The URL to a JPEG or PNG file for the contact avatar. The image is downloaded in the background | No | | `identifier` | string | A unique identifier for the contact in an external system. Unique in the account | No | | `custom_attributes` | object | An object where you can store custom attributes for the contact. Merged into the existing values | No | | `additional_attributes` | object | Standard extra fields, for example `company_name`, `city`, `country`, `description`. Replaces the existing object; the blocking keys are kept and cannot be changed here | No | | `avatar` | file | Avatar image, instead of `avatar_url` (send the request as `multipart/form-data`, see Remarks) | No | When you edit an existing contact, the phone number needs at least 7 digits after the country code, and the contact must keep an email or a phone number (unless it is a WhatsApp contact). **Request body example:** ```json { "phone_number": "string" } ``` **Response:** ```json { "payload": { "id": 0, "name": "string", "email": "string", "phone_number": "string", "availability_status": "offline", "identifier": "string", "thumbnail": "string", "blocked": false, "is_whatsapp_contact": false, "created_at": 0, "custom_attributes": { "attribute_key": "attribute_value" }, "additional_attributes": {}, "email_or_phone_optional": false, "contact_inboxes": [ { "source_id": "string", "inbox": {} } ] } } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | payload | Object containing the response: the updated contact | | payload -> id | Contact numeric ID | | payload -> name | Full name of the contact | | payload -> email | Email address of the contact (stored in lower case) | | payload -> phone_number | Phone number of the contact, in E.164 format | | payload -> availability_status | Availability status of the contact: whether the contact is connected right now (website widget). Enum: `online`, `offline` | | payload -> identifier | A unique identifier for the contact in an external system | | payload -> thumbnail | Avatar URL of the contact | | payload -> blocked | Whether the contact is blocked | | payload -> is_whatsapp_contact | `true` if the contact belongs to a WhatsApp API inbox | | payload -> created_at | Timestamp of contact creation time (Unix time, seconds) | | payload -> custom_attributes | The object to save custom attributes for the contact; accepts custom attribute keys and values | | payload -> additional_attributes | The object containing additional attributes related to the contact | | payload -> email_or_phone_optional | `true` when the contact has a WhatsApp ID, so email and phone may both be empty | | payload -> contact_inboxes | Array of objects (contact_inboxes) | ## Remarks - Phone numbers must be in E.164 format (`+`, the country code, then the number). Israeli mobile numbers are normalised for you: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. - The `message` of a `422` response is translated to the account's language (for example Hebrew). Check `attributes`, not the text. - To upload an avatar image instead of sending `avatar_url`, send the request as `multipart/form-data`, with the fields as form fields and the image in an `avatar` field: ```bash curl -X PATCH 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801' \ -H 'api_access_token: ' \ -F 'avatar=@avatar.png;type=image/png' ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `name` | string | No | Name of the contact. | | `email` | string | No | Email of the contact. Must be a valid email. | | `phone_number` | string | No | Phone number of the contact in E.164 format, for example `+972501234567`. Israeli local formats are normalised: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. Unique in the account. | | `identifier` | string | No | A unique identifier for the contact in an external system (your own external ID). Unique in the account. | | `additional_attributes` | object | No | Standard extra fields, for example `company_name`, `city`, `country` and `description`. Replaces the existing object; the blocking keys (`blocked`, `blocked_at`, `block_source`, `block_reason`) are kept and cannot be changed here — use [Block Contact](https://docs.99digital.co.il/online-api/contacts/block-contact). | | `custom_attributes` | object | No | An object where you can store custom attributes for the contact, as key-value pairs. **Merged** into the existing values; to remove keys, use Delete Contact Custom Attributes. | | `avatar_url` | string | No | The URL to a JPEG or PNG file for the contact avatar. It must be public; the image is downloaded in the background. To upload the image itself, send an `avatar` file field instead (see Remarks). | ### Example (generated from the schema) ```json { "name": "Dana Cohen", "additional_attributes": { "company_name": "Example Ltd", "city": "Haifa" }, "custom_attributes": { "plan": "premium" } } ``` ## Responses ### 200 — The updated contact. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.id` | integer | The contact's numeric ID. | | `payload.name` | string | The full name of the contact. | | `payload.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | #### Example: Updated contact `custom_attributes` kept `customer_tier` and added `plan`, while `additional_attributes` is now the object that was sent. The `inbox` object is shortened. ```json { "payload": { "additional_attributes": { "company_name": "Example Ltd", "city": "Haifa" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold", "plan": "premium" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500, "email_or_phone_optional": false, "contact_inboxes": [ { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b", "inbox": { "id": 31, "name": "Website API", "channel_type": "Channel::Api" } } ] } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — Validation failed. `message` is translated to the account's language, so check `attributes` (the fields that failed) rather than the text. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `message` | string | What failed, in the account's language. | | `attributes` | array of string | The fields that failed. | #### Example: Phone number taken Another contact in the account has this phone number. ```json { "message": "Phone number has already been taken", "attributes": [ "phone_number" ] } ``` #### Example: Invalid email and phone An invalid email and phone number, on an account whose language is Hebrew. ```json { "message": "Email אימייל לא תקין, Phone number צריך להיות בפורמט e164", "attributes": [ "email", "phone_number" ] } ``` --- # Delete Contact Source: https://docs.99digital.co.il/online-api/contacts/delete-contact Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/delete-contact.md Section: Online API › Contacts `DELETE https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}` Delete contact allows you to delete a contact from your account. The contact is deleted together with its conversations, messages, contact inboxes and notes. The related records are removed in the background. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}` | | Method | JSON via DELETE | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token — legacy roles: `administrator`. New rules system: **Contacts → delete**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `contact_id` | The numeric ID of the contact | Yes | **Response:** ```json { "status": "ok" } ``` :::warning Deleting a contact also deletes all of its conversations and messages. To combine two records of the same customer instead, use [Merge Contacts](https://docs.99digital.co.il/online-api/contacts/merge-contacts). ::: ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Responses ### 200 — The contact was deleted. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | Always `ok` when the contact was deleted. | #### Example ```json { "status": "ok" } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Search Contacts Source: https://docs.99digital.co.il/online-api/contacts/search-contact Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/search-contact.md Section: Online API › Contacts `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/search` Search contacts by name, identifier, email, phone number or company name (page size = 10 by default). The search text matches any part of those fields, ignoring case — except the identifier, where case matters. Results accept the same paging, sorting and label options as [List Contacts](https://docs.99digital.co.il/online-api/contacts/list-contacts). **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/search` | | Method | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token — legacy roles: any agent. New rules system: **Contacts → read**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | **Query Parameters:** | Parameter | Type | Description | Required | | --- | --- | --- | --- | | `q` | string | Search using contact name, identifier, email, phone number or company name. Phone numbers are stored in E.164 format (`+972…`), so search for `972501234567` or `501234567`, not the local `0501234567` | No | | `search_with` | string | `phone_number`: only contacts that have a phone number. `email`: only contacts that have an email | No | | `sort` | string | The attribute by which the list should be sorted. Prefix it with `-` for descending order. Enum: `name`, `email`, `phone_number`, `last_activity_at`, `created_at`, `company`, `city`, `country`, `-name`, `-email`, `-phone_number`, `-last_activity_at`, `-created_at`, `-company`, `-city`, `-country` | No | | `page` | integer | The page parameter. Default: `1` | No | | `per_page` | integer | The page size. Default: `10`, maximum `100` | No | | `labels[]` | string[] | Return only the contacts that have **any** of these labels | No | | `include_contact_inboxes` | boolean | Include `contact_inboxes` in each contact. Default: `true`; send `false` for much smaller responses | No | **Response-Explain:** | Parameter | Description | | --- | --- | | meta | Metadata regarding the search results | | meta -> count | Number of matching contacts, across all pages | | meta -> current_page | Current results page. It may come back as a string (for example `"1"`), so parse it before comparing | | payload | Array of objects (contacts) | | payload -> id | Contact numeric ID | | payload -> name | Full name of the contact | | payload -> email | Email address of the contact (stored in lower case) | | payload -> phone_number | Phone number of the contact, in E.164 format | | payload -> availability_status | Availability status of the contact: whether the contact is connected right now (website widget). Enum: `online`, `offline` | | payload -> identifier | A unique identifier for the contact in an external system | | payload -> thumbnail | Avatar URL of the contact | | payload -> last_activity_at | Timestamp of the last activity. Present only when set | | payload -> blocked | Whether the contact is blocked | | payload -> is_whatsapp_contact | `true` if the contact belongs to a WhatsApp API inbox | | payload -> created_at | Timestamp of contact creation time. Measured in seconds since the Unix epoch | | payload -> custom_attributes | The object to save custom attributes for the contact; accepts custom attribute keys and values | | payload -> additional_attributes | The object containing additional attributes related to the contact | | payload -> contact_inboxes | Array of objects (contact_inboxes). Left out when you send `include_contact_inboxes=false` | | payload -> contact_inboxes -> source_id | Contact inbox source ID | | payload -> contact_inboxes -> inbox | Object containing the inbox details | ## Remarks - A contact without an email, phone number or identifier is never returned, although it exists. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `q` | query | string | No | Search using contact name, identifier, email, phone number or company name. The text matches any part of those fields, ignoring case (for the identifier, case matters). Phone numbers are stored in E.164 format, so search for `972501234567` or `501234567`, not the local `0501234567`. Example: `dana`. | | `search_with` | query | string | No | Return only the contacts that have a phone number, or an email. One of: `phone_number` — Only contacts that have a phone number; `email` — Only contacts that have an email. | | `page` | query | integer | No | The page parameter — the number of the page to return. Default: `1`. | | `per_page` | query | integer | No | The page size — the number of contacts per page, at most 100. Default: `10`. Maximum: 100. | | `sort` | query | string | No | The attribute by which the list should be sorted. Prefix it with `-` for descending order (for example `-created_at`). One of: `name` — By name, ascending (A to Z); `email` — By email address, ascending; `phone_number` — By phone number, ascending; `last_activity_at` — By last activity, oldest first; `created_at` — By creation time, oldest first; `company` — By company name (`company_name` in `additional_attributes`), ascending; `city` — By city (`city` in `additional_attributes`), ascending; `country` — By country (`country` in `additional_attributes`), ascending; `-name` — By name, descending (Z to A); `-email` — By email address, descending; `-phone_number` — By phone number, descending; `-last_activity_at` — By last activity, newest first; `-created_at` — By creation time, newest first; `-company` — By company name, descending; `-city` — By city, descending; `-country` — By country, descending. | | `labels[]` | query | array of string | No | Return only the contacts that have **any** of these label titles. | | `include_contact_inboxes` | query | boolean | No | Include `contact_inboxes` in each contact. Send `false` for much smaller responses. Default: `true`. | ## Responses ### 200 — A page of matching contacts. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `meta` | object | Metadata regarding the search results — paging information. | | `meta.count` | integer | The total number of matching contacts, across all pages. | | `meta.current_page` | integer \| string | The current page number. It may come back as a string (for example `"1"`). | | `payload` | array of object | Array of contact objects — the matching contacts on this page. | | `payload[].id` | integer | The contact's numeric ID. | | `payload[].name` | string | The full name of the contact. | | `payload[].email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload[].phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload[].identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload[].thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload[].availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload[].additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload[].custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload[].blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload[].is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload[].created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload[].last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload[].email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload[].contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload[].contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload[].contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload[].contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload[].contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload[].contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload[].contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload[].contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload[].contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload[].contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload[].conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | #### Example: Matching contacts `?q=dana&include_contact_inboxes=false`. ```json { "meta": { "count": 1, "current_page": 1 }, "payload": [ { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500 } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` --- # Filter Contacts Source: https://docs.99digital.co.il/online-api/contacts/filter-contacts Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/filter-contacts.md Section: Online API › Contacts `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/filter` Advanced filtering of contacts with a list of conditions. Each condition is combined with the **next** one using its `query_operator` (`and` / `or`). The last condition has `query_operator: null`. Results come 10 per page by default, with the same paging and sorting options as [List Contacts](https://docs.99digital.co.il/online-api/contacts/list-contacts). | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/contacts/filter` | | **Authorization** | User token. Legacy: any agent. New rules: **Contacts → read**. Agent-bot tokens: not allowed. | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | **Query parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `page`, `per_page`, `sort`, `include_contact_inboxes` | | No | Same as [List Contacts](https://docs.99digital.co.il/online-api/contacts/list-contacts). | | `include_conversations` | boolean | No | Also return each contact's `conversations`. Default `false`. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `payload` | array | Yes | List of conditions. | | `payload[].attribute_key` | string | Yes | Attribute to filter on (table below), or the key of a contact custom attribute. | | `payload[].filter_operator` | string | Yes | Operator (table below). | | `payload[].values` | array | Yes | Values to compare. Most operators use `values[0]`. Send `[]` for `is_present` / `is_not_present`. | | `payload[].query_operator` | string | Yes | `and` / `or` to join with the next condition; `null` on the last one. Any other value returns `422`. | **Filterable attributes** | `attribute_key` | Operators | | --- | --- | | `name` | `equal_to`, `not_equal_to`, `contains`, `does_not_contain` | | `phone_number` | `equal_to`, `not_equal_to`, `contains`, `does_not_contain`, `is_present`, `is_not_present` (the value may be sent with or without `+`) | | `email` | `equal_to`, `not_equal_to`, `contains`, `does_not_contain`, `is_present`, `is_not_present` | | `identifier` | `equal_to`, `not_equal_to` | | `country_code` | `equal_to`, `not_equal_to` | | `city` | `equal_to`, `not_equal_to`, `contains`, `does_not_contain` | | `browser_language` | `equal_to`, `not_equal_to`, `contains`, `does_not_contain` | | `company`, `company_name` | `equal_to`, `not_equal_to`, `contains`, `does_not_contain`, `is_present`, `is_not_present` | | `labels` | `equal_to` (has any of the labels), `not_equal_to` (has none of them), `is_present`, `is_not_present` | | `created_at`, `last_activity_at` | `is_greater_than`, `is_less_than` (value `YYYY-MM-DD`), `days_before` (value = number of days) | | `blocked` | `equal_to`, `not_equal_to` (value `true` / `false`) | | *custom attribute key* | Key of a **contact** custom attribute defined in Settings → Custom attributes. Operators depend on the attribute type: text `equal_to` / `not_equal_to` / `contains` / `does_not_contain`; number and date `equal_to` / `not_equal_to` / `is_greater_than` / `is_less_than`; plus `is_present` / `is_not_present`. | Text comparisons are case-insensitive. :::warning A condition with an unsupported operator (for example `contains` on `labels`) or an unknown attribute key is **silently ignored**, so the filter returns more results than expected. Stick to the operators in the table. ::: #### Example: email contains X **or** phone equals Y ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts/filter?page=1&include_contact_inboxes=false' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "payload": [ { "attribute_key": "email", "filter_operator": "contains", "values": ["dana.cohen"], "query_operator": "or" }, { "attribute_key": "phone_number", "filter_operator": "equal_to", "values": ["972521234567"], "query_operator": null } ] }' ``` Response (`200 OK`). The two contacts are shown by ID and name only; each item is a full contact object. ```json { "meta": { "count": 2, "current_page": "1" }, "payload": [ { "id": 801, "name": "Dana Cohen" }, { "id": 802, "name": "Avi Levi" } ] } ``` #### Example: city equals Tel Aviv **and** created after a date ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts/filter?include_contact_inboxes=false' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "payload": [ { "attribute_key": "city", "filter_operator": "equal_to", "values": ["Tel Aviv"], "query_operator": "and" }, { "attribute_key": "created_at", "filter_operator": "is_greater_than", "values": ["2026-11-11"], "query_operator": null } ] }' ``` Response (`200 OK`): ```json { "meta": { "count": 1, "current_page": 1 }, "payload": [ { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500 } ] } ``` **Error responses** | Status | When | Body | | --- | --- | --- | | `422` | `query_operator` is not `and` / `or` / `null`. | `{"error": "Query operator must be either \"AND\" or \"OR\"."}` | ## Remarks - `meta.current_page` may come back as a string (for example `"1"`), so parse it before comparing. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `page` | query | integer | No | The page parameter — the number of the page to return. Default: `1`. | | `per_page` | query | integer | No | The page size — the number of contacts per page, at most 100. Default: `10`. Maximum: 100. | | `sort` | query | string | No | The attribute by which the list should be sorted. Prefix it with `-` for descending order (for example `-created_at`). One of: `name` — By name, ascending (A to Z); `email` — By email address, ascending; `phone_number` — By phone number, ascending; `last_activity_at` — By last activity, oldest first; `created_at` — By creation time, oldest first; `company` — By company name (`company_name` in `additional_attributes`), ascending; `city` — By city (`city` in `additional_attributes`), ascending; `country` — By country (`country` in `additional_attributes`), ascending; `-name` — By name, descending (Z to A); `-email` — By email address, descending; `-phone_number` — By phone number, descending; `-last_activity_at` — By last activity, newest first; `-created_at` — By creation time, newest first; `-company` — By company name, descending; `-city` — By city, descending; `-country` — By country, descending. | | `include_contact_inboxes` | query | boolean | No | Include `contact_inboxes` in each contact. Send `false` for much smaller responses. Default: `true`. | | `include_conversations` | query | boolean | No | Also return each contact's `conversations`, each a full conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Default: `false`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `payload` | array of object | Yes | The conditions, in order. Each one is joined to the next with its `query_operator`. | | `payload[].attribute_key` | string | Yes | The attribute to filter on (see the table above), or the key of a contact custom attribute. Example: `city`. | | `payload[].filter_operator` | string | Yes | The comparison. Which operators an attribute supports is in the table above. Text comparisons ignore case. One of: `equal_to` — The attribute equals the value. For `labels`: the contact has any of the given labels; `not_equal_to` — The attribute does not equal the value. For `labels`: the contact has none of the given labels; `contains` — The attribute contains the value as part of it; `does_not_contain` — The attribute does not contain the value; `is_present` — The attribute has a value. Send `values` as `[]`; `is_not_present` — The attribute is empty. Send `values` as `[]`; `is_greater_than` — After the date (`YYYY-MM-DD`), or more than the number (number attributes); `is_less_than` — Before the date (`YYYY-MM-DD`), or less than the number (number attributes); `days_before` — For `created_at` and `last_activity_at`: the date is more than the given number of days ago. The value is a number of days. | | `payload[].values` | array of string \| number \| boolean | Yes | The values to compare with. Most operators use the first value only. Send `[]` for `is_present` and `is_not_present`. | | `payload[].query_operator` | string \| null | Yes | How this condition is joined to the next one. `null` on the last condition. Any other value returns `422`. One of: `and` — Both this condition and the next one must match; `or` — This condition or the next one must match; `null`. | ### Example: Email or phone The email contains a text, or the phone number equals a number. ```json { "payload": [ { "attribute_key": "email", "filter_operator": "contains", "values": [ "dana.cohen" ], "query_operator": "or" }, { "attribute_key": "phone_number", "filter_operator": "equal_to", "values": [ "972521234567" ], "query_operator": null } ] } ``` ### Example: City and creation date The city equals a value, and the contact was created after a date. ```json { "payload": [ { "attribute_key": "city", "filter_operator": "equal_to", "values": [ "Tel Aviv" ], "query_operator": "and" }, { "attribute_key": "created_at", "filter_operator": "is_greater_than", "values": [ "2026-11-11" ], "query_operator": null } ] } ``` ## Responses ### 200 — A page of the contacts that match the conditions. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `meta` | object | Paging information for the result. | | `meta.count` | integer | The total number of matching contacts, across all pages. | | `meta.current_page` | integer \| string | The current page number. It may come back as a string (for example `"1"`). | | `payload` | array of object | The matching contacts on this page. With `include_conversations=true`, each contact also has a `conversations` array. | | `payload[].id` | integer | The contact's numeric ID. | | `payload[].name` | string | The full name of the contact. | | `payload[].email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload[].phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload[].identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload[].thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload[].availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload[].additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload[].custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload[].blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload[].is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload[].created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload[].last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload[].email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload[].contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload[].contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload[].contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload[].contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload[].contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload[].contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload[].contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload[].contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload[].contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload[].contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload[].conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | #### Example: Email or phone The "Email or phone" request, with `?page=1&include_contact_inboxes=false`. The contacts are shown by ID and name only; each is a full contact object. ```json { "meta": { "count": 2, "current_page": "1" }, "payload": [ { "id": 801, "name": "Dana Cohen" }, { "id": 802, "name": "Avi Levi" } ] } ``` #### Example: City and creation date The "City and creation date" request, with `?include_contact_inboxes=false`. ```json { "meta": { "count": 1, "current_page": 1 }, "payload": [ { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500 } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 422 — A `query_operator` is not `and`, `or` or `null`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Query operator must be either \"AND\" or \"OR\"." } ``` --- # List Online Contacts Source: https://docs.99digital.co.il/online-api/contacts/list-online-contacts Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/list-online-contacts.md Section: Online API › Contacts `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/active` Returns contacts that are online right now (connected through the website widget). | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/contacts/active` | | **Authorization** | User token. Any agent. Agent-bot tokens: not allowed. | **Query parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | No | Page number. Default `1`. | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/contacts/active' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`). Truncated to one item. ```json { "meta": { "count": 6, "current_page": 1 }, "payload": [ { "additional_attributes": {}, "availability_status": "online", "email": null, "id": 803, "name": "Noa Mizrahi", "phone_number": "+972531234567", "identifier": null, "thumbnail": "", "custom_attributes": {}, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794471000 } ] } ``` `meta.count` is the total number of online contacts across all pages. `meta.current_page` may come back as a string (for example `"1"`), so parse it before comparing. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `page` | query | integer | No | The page parameter — the number of the page to return. Default: `1`. | ## Responses ### 200 — A page of online contacts. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `meta` | object | Paging information for the result. | | `meta.count` | integer | The total number of online contacts, across all pages. | | `meta.current_page` | integer \| string | The current page number. It may come back as a string (for example `"1"`). | | `payload` | array of object | The online contacts on this page. | | `payload[].id` | integer | The contact's numeric ID. | | `payload[].name` | string | The full name of the contact. | | `payload[].email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload[].phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload[].identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload[].thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload[].availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload[].additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload[].custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload[].blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload[].is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload[].created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload[].last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload[].email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload[].contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload[].contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload[].contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload[].contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload[].contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload[].contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload[].contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload[].contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload[].contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload[].contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload[].conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | #### Example ```json { "meta": { "count": 1, "current_page": 1 }, "payload": [ { "additional_attributes": {}, "availability_status": "online", "email": null, "id": 803, "name": "Noa Mizrahi", "phone_number": "+972531234567", "identifier": null, "thumbnail": "", "custom_attributes": {}, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794471000 } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` --- # Get Contact Conversations Source: https://docs.99digital.co.il/online-api/contacts/get-contact-conversations Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/get-contact-conversations.md Section: Online API › Contacts `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/conversations` Get conversations associated to that contact. Returns up to the 20 most recent conversations of the contact that the caller is allowed to see, newest first. Each item is a full conversation object, as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/conversations` | | Method | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token — only the conversations the caller may see are returned: - New rules system: conversations in the inboxes where the caller's role has **Inbox read all conversations**, plus the conversations assigned to the caller. - Legacy roles: conversations in the caller's inboxes. Agents without "see all conversations" get only the conversations assigned to them. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `contact_id` | The numeric ID of the contact | Yes | **Response:** ```json { "payload": [ { "meta": {}, "id": 0, "messages": [], "account_id": 0, "additional_attributes": {}, "agent_last_seen_at": 0, "assignee_last_seen_at": 0, "can_reply": false, "contact_last_seen_at": 0, "custom_attributes": {}, "inbox_id": 0, "labels": ["string"], "muted": false, "snoozed_until": null, "status": "resolved", "created_at": 0, "timestamp": 0, "first_reply_created_at": 0, "unread_count": 0, "last_non_activity_message": {} } ] } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | payload | Array of objects (conversation), up to 20, newest first | | payload -> meta | Metadata about the conversation: the contact (`sender`), the `assignee`, the `team` and the `channel` | | payload -> id | Conversation display ID: the number in the dashboard URL, used in every conversation path | | payload -> account_id | Account numeric ID | | payload -> inbox_id | Inbox numeric ID | | payload -> status | The status of the conversation. Enum: `open`, `resolved`, `pending`, `snoozed`. The dashboard calls `open` **Bot** and `pending` **Manual** | | payload -> created_at | Time at which the conversation was created. Measured in seconds since the Unix epoch | | payload -> unread_count | The number of unread incoming messages | | payload -> messages | Array of objects (message). Holds the conversation's **last** message only; use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history | | payload -> agent_last_seen_at | The last time at which an agent read the conversation. Measured in seconds since the Unix epoch; `0` if never | | payload -> assignee_last_seen_at | The last time at which the assignee (user) read the conversation. Measured in seconds since the Unix epoch; `0` if never | | payload -> labels | Array of strings (label titles) | | payload -> additional_attributes | The object containing additional attributes related to the conversation | | payload -> custom_attributes | The object containing custom attributes for the conversation (custom attribute keys and values) | | payload -> first_reply_created_at | The time at which the first reply was sent. Measured in seconds since the Unix epoch; `0` if there is none yet | | payload -> last_non_activity_message | Object containing the last non-activity message (incoming, outgoing, template) | | payload -> can_reply | Whether the conversation is currently within the messaging window (for example WhatsApp's 24-hour window) | | payload -> contact_last_seen_at | The last time the contact read the conversation. Measured in seconds since the Unix epoch; `0` if never | | payload -> snoozed_until | The time at which a previously snoozed conversation is reactivated. Measured in **milliseconds** since the Unix epoch; `null` when the conversation is not snoozed | | payload -> muted | Whether the conversation is muted. A muted conversation does not notify agents | | payload -> timestamp | The same as `last_activity_at`: the conversation's last activity (Unix time, seconds) | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Responses ### 200 — The contact's conversations, newest first. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of object | Array of conversation objects — up to the 20 most recent conversations the caller may see, newest first. | | `payload[].id` | integer | The conversation's numeric ID: its display ID, used in every path and shown in the dashboard URL. | | `payload[].uuid` | string | A globally unique ID of the conversation. | | `payload[].account_id` | integer | The numeric ID of the account. | | `payload[].inbox_id` | integer | The numeric ID of the inbox. | | `payload[].status` | string | The status of the conversation. The status names in the API differ from the labels in the dashboard: the dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Hidden until `snoozed_until`, then reopened; `resolved` — Closed. | | `payload[].priority` | string \| null | The priority of the conversation, or `null` when none is set. One of: `low` — Low priority; `medium` — Medium priority; `high` — High priority; `urgent` — Urgent — the highest priority; `null` — No priority is set. | | `payload[].labels` | array of string | Array of strings — the titles of the conversation's labels. | | `payload[].custom_attributes` | object | Object containing the custom attributes related to the conversation (custom attribute keys and their values). | | `payload[].additional_attributes` | object | Object containing the additional attributes related to the conversation: channel or system data, such as `mail_subject`, `source` or `transcript_lmi`. | | `payload[].meta` | object | Object containing the conversation's metadata — its people and channel. | | `payload[].meta.sender` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].meta.sender.id` | integer | The contact's numeric ID. | | `payload[].meta.sender.name` | string | The full name of the contact. | | `payload[].meta.sender.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload[].meta.sender.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload[].meta.sender.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload[].meta.sender.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload[].meta.sender.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload[].meta.sender.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload[].meta.sender.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload[].meta.sender.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload[].meta.sender.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload[].meta.sender.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload[].meta.sender.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload[].meta.sender.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload[].meta.sender.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload[].meta.sender.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].meta.sender.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload[].meta.sender.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload[].meta.sender.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload[].meta.sender.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload[].meta.sender.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload[].meta.sender.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].meta.sender.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload[].meta.sender.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload[].meta.sender.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload[].meta.sender.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload[].meta.sender.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | | `payload[].meta.assignee` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `payload[].meta.assignee.id` | integer | The agent's numeric ID (user ID). | | `payload[].meta.assignee.account_id` | integer | The numeric ID of the account. | | `payload[].meta.assignee.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `payload[].meta.assignee.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `payload[].meta.assignee.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `payload[].meta.assignee.email` | string | The agent's login email address. | | `payload[].meta.assignee.available_name` | string | The agent's display name. | | `payload[].meta.assignee.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `payload[].meta.assignee.name` | string | The agent's full name. | | `payload[].meta.assignee.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `payload[].meta.assignee.operation_bot` | boolean | `true` for internal operation-bot users. | | `payload[].meta.assignee.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `payload[].meta.assignee.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `payload[].meta.assignee.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `payload[].meta.assignee.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `payload[].meta.assignee.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `payload[].meta.assignee.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `payload[].meta.assignee.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `payload[].meta.assignee.email1` | string \| null | The email address that receives two-factor codes by email. | | `payload[].meta.assignee.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `payload[].meta.team` | object | Object containing the assigned team's data, if a team is assigned. | | `payload[].meta.team.id` | integer | The numeric ID of the team. | | `payload[].meta.team.name` | string | The name of the team. Stored in lower case, and unique in the account. | | `payload[].meta.team.description` | string | The description of the team. | | `payload[].meta.team.allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `payload[].meta.team.account_id` | integer | The numeric ID of the account. | | `payload[].meta.team.members_count` | integer | The number of agents in the team. | | `payload[].meta.team.is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | | `payload[].meta.channel` | string | The channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].meta.hmac_verified` | boolean | Whether the contact's identity was HMAC-verified (website widget). | | `payload[].contact_inbox` | object | The contact's link (contact inbox) to the conversation's inbox. | | `payload[].contact_inbox.wa_id` | string \| null | The contact's WhatsApp ID in this inbox, for WhatsApp users who hide their phone number; otherwise `null`. | | `payload[].messages` | array of object | Array of message objects — the **last** message only. Use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. | | `payload[].messages[].id` | integer | The numeric ID of the message. | | `payload[].messages[].content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `payload[].messages[].inbox_id` | integer | The numeric ID of the inbox. | | `payload[].messages[].conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `payload[].messages[].message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `payload[].messages[].content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `payload[].messages[].content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `payload[].messages[].private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `payload[].messages[].status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `payload[].messages[].status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `payload[].messages[].source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `payload[].messages[].echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `payload[].messages[].sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `payload[].messages[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `payload[].messages[].sender.name` | string | The sender's name. | | `payload[].messages[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `payload[].messages[].sender.available_name` | string | An agent's display name. | | `payload[].messages[].sender.email` | string \| null | The sender's email address. | | `payload[].messages[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `payload[].messages[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `payload[].messages[].sender.avatar_url` | string | An agent's avatar image URL. | | `payload[].messages[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `payload[].messages[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `payload[].messages[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `payload[].messages[].sender.blocked` | boolean | Whether a contact is blocked. | | `payload[].messages[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `payload[].messages[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `payload[].messages[].sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `payload[].messages[].sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `payload[].messages[].attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `payload[].messages[].attachments[].id` | integer | The numeric ID of the file (attachment). | | `payload[].messages[].attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `payload[].messages[].attachments[].account_id` | integer | The numeric ID of the account. | | `payload[].messages[].attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `payload[].messages[].attachments[].filename` | string | The name of the file. | | `payload[].messages[].attachments[].extension` | string \| null | The file extension, when known. | | `payload[].messages[].attachments[].data_url` | string | The URL of the file. | | `payload[].messages[].attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `payload[].messages[].attachments[].file_size` | integer | The file size, in bytes. | | `payload[].messages[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `payload[].messages[].delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `payload[].messages[].created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `payload[].messages[].created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `payload[].last_non_activity_message` | object | A message in a conversation. Outgoing messages are delivered to the contact through the inbox's channel (WhatsApp, SMS, email, Facebook, API webhook, and so on). | | `payload[].last_non_activity_message.id` | integer | The numeric ID of the message. | | `payload[].last_non_activity_message.content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `payload[].last_non_activity_message.inbox_id` | integer | The numeric ID of the inbox. | | `payload[].last_non_activity_message.conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `payload[].last_non_activity_message.message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `payload[].last_non_activity_message.content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `payload[].last_non_activity_message.content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `payload[].last_non_activity_message.private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `payload[].last_non_activity_message.status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `payload[].last_non_activity_message.status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `payload[].last_non_activity_message.source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `payload[].last_non_activity_message.echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `payload[].last_non_activity_message.sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `payload[].last_non_activity_message.sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `payload[].last_non_activity_message.sender.name` | string | The sender's name. | | `payload[].last_non_activity_message.sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `payload[].last_non_activity_message.sender.available_name` | string | An agent's display name. | | `payload[].last_non_activity_message.sender.email` | string \| null | The sender's email address. | | `payload[].last_non_activity_message.sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `payload[].last_non_activity_message.sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `payload[].last_non_activity_message.sender.avatar_url` | string | An agent's avatar image URL. | | `payload[].last_non_activity_message.sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `payload[].last_non_activity_message.sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `payload[].last_non_activity_message.sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `payload[].last_non_activity_message.sender.blocked` | boolean | Whether a contact is blocked. | | `payload[].last_non_activity_message.sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `payload[].last_non_activity_message.sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `payload[].last_non_activity_message.sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `payload[].last_non_activity_message.sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `payload[].last_non_activity_message.attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `payload[].last_non_activity_message.attachments[].id` | integer | The numeric ID of the file (attachment). | | `payload[].last_non_activity_message.attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `payload[].last_non_activity_message.attachments[].account_id` | integer | The numeric ID of the account. | | `payload[].last_non_activity_message.attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `payload[].last_non_activity_message.attachments[].filename` | string | The name of the file. | | `payload[].last_non_activity_message.attachments[].extension` | string \| null | The file extension, when known. | | `payload[].last_non_activity_message.attachments[].data_url` | string | The URL of the file. | | `payload[].last_non_activity_message.attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `payload[].last_non_activity_message.attachments[].file_size` | integer | The file size, in bytes. | | `payload[].last_non_activity_message.ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `payload[].last_non_activity_message.delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `payload[].last_non_activity_message.created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `payload[].last_non_activity_message.created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `payload[].can_reply` | boolean | Whether the conversation is currently within the messaging window: `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window). | | `payload[].muted` | boolean | Whether the conversation is currently muted. A muted conversation does not notify agents. | | `payload[].snoozed_until` | integer \| null | The time at which a snoozed conversation is reactivated (reopened), in **milliseconds** since the Unix epoch, or `null`. | | `payload[].unread_count` | integer | The number of unread messages — incoming messages the agents have not read. | | `payload[].has_incoming_messages` | boolean | Whether the contact has written at least one public message. | | `payload[].created_at` | integer | The time at which the conversation was created, measured in seconds since the Unix epoch. | | `payload[].timestamp` | integer | The same as `last_activity_at`. | | `payload[].last_activity_at` | integer | The time of the conversation's last activity (Unix timestamp, in seconds). | | `payload[].first_reply_created_at` | integer | The time at which the first reply was sent to the contact (Unix timestamp, in seconds), or `0` when there is none yet. | | `payload[].waiting_since` | integer | Since when the contact has been waiting for a reply (Unix timestamp, in seconds), or `0`. | | `payload[].agent_last_seen_at` | integer | The last time an agent saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `payload[].assignee_last_seen_at` | integer | The last time the assignee saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `payload[].contact_last_seen_at` | integer | The last time the contact interacted with your service — when they last saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `payload[].last_incoming_message_time` | string \| null | The time of the last incoming message (ISO 8601), or `null`. | | `payload[].sla_policy_id` | integer \| null | The ID of the applied SLA policy, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `payload[].applied_sla` | object \| null | The applied SLA policy's details and thresholds, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `payload[].sla_events` | array of object | The SLA events of the conversation (missed thresholds). | | `payload[].sla_events_with_distinct_event_type` | array of object | The SLA events, one per event type. | | `payload[].feature_enabled_sla` | boolean | Whether the account uses SLA policies (the SLA feature is enabled). | | `payload[].campaign_id` | integer \| null | The ID of the campaign that started the conversation, or `null`. | | `payload[].pinned` | boolean | Whether the caller pinned this conversation. | | `payload[].file` | object | `{url, file_type}` when a file is attached to the conversation itself (rare). | #### Example: Conversations One conversation. The message objects are shortened. ```json { "payload": [ { "meta": { "sender": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500 }, "channel": "Channel::Api", "hmac_verified": false }, "contact_inbox": { "wa_id": null }, "id": 1501, "messages": [ { "id": 40113, "content": "Hi, where is my order?", "message_type": 0, "private": false, "status": "sent", "content_type": "text", "created_at": 1794471600 } ], "account_id": 12, "uuid": "8d4e2f1a-6b7c-4d8e-9f0a-1b2c3d4e5f60", "additional_attributes": {}, "agent_last_seen_at": 0, "assignee_last_seen_at": 0, "can_reply": true, "last_incoming_message_time": "2026-11-12T08:20:00.000Z", "contact_last_seen_at": 0, "custom_attributes": {}, "inbox_id": 31, "labels": [], "muted": false, "snoozed_until": null, "status": "open", "created_at": 1794471500, "timestamp": 1794471600, "first_reply_created_at": 0, "unread_count": 1, "has_incoming_messages": true, "last_non_activity_message": { "id": 40113, "content": "Hi, where is my order?", "message_type": 0 }, "last_activity_at": 1794471600, "priority": null, "waiting_since": 1794471600, "sla_policy_id": null, "feature_enabled_sla": true, "applied_sla": null, "sla_events": [], "sla_events_with_distinct_event_type": [], "campaign_id": null, "pinned": false } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List Contactable Inboxes Source: https://docs.99digital.co.il/online-api/contacts/list-contactable-inboxes Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/list-contactable-inboxes.md Section: Online API › Contacts `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/contactable_inboxes` Returns the inboxes the caller can use to start a new conversation with this contact, each with the source ID to use. For phone and email channels the `source_id` is the contact's phone or email. For API inboxes a new ID is suggested (it is not saved until you [create the conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation) or [contact inbox](https://docs.99digital.co.il/online-api/contacts/create-contact-inbox)). | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/contacts/{contact_id}/contactable_inboxes` | | **Authorization** | User token. Only inboxes where the caller may send messages are returned. Agent-bot tokens: not allowed. | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `contact_id` | integer | Yes | Contact ID. | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/contactable_inboxes' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`). Truncated: 2 of the inboxes are shown, and the `inbox` objects are trimmed. ```json { "payload": [ { "inbox": { "id": 33, "name": "Support Email", "channel_type": "Channel::Email" }, "source_id": "dana.cohen@example.com" }, { "inbox": { "id": 31, "name": "Website API", "channel_type": "Channel::Api" }, "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b" } ] } ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Responses ### 200 — The inboxes, each with the contact's `source_id` in it. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of object | The inboxes where the caller can start a conversation with the contact, each with the `source_id` to use for the contact. | | `payload[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].inbox` | object | Object containing the details of the inbox. | | `payload[].inbox.id` | integer | The numeric ID of the inbox. | | `payload[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload[].inbox.account_id` | integer | The numeric ID of the account. | | `payload[].inbox.name` | string | The name of the inbox. | | `payload[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload[].inbox.timezone` | string | The inbox's time zone. | | `payload[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | #### Example: Contactable inboxes Shortened to two inboxes, with their `inbox` objects trimmed. ```json { "payload": [ { "inbox": { "id": 33, "name": "Support Email", "channel_type": "Channel::Email" }, "source_id": "dana.cohen@example.com" }, { "inbox": { "id": 31, "name": "Website API", "channel_type": "Channel::Api" }, "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b" } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Create Contact Inbox Source: https://docs.99digital.co.il/online-api/contacts/create-contact-inbox Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/create-contact-inbox.md Section: Online API › Contacts `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/contact_inboxes` Links an existing contact to an inbox. This creates the contact inbox (and its `source_id`) needed to [open a conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation) in that inbox. If the link already exists, it is returned unchanged. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/contacts/{contact_id}/contact_inboxes` | | **Authorization** | User token. The caller must be allowed to view the inbox. Agent-bot tokens: not allowed. | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `contact_id` | integer | Yes | Contact ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `inbox_id` | integer | Yes | Inbox ID. | | `source_id` | string | No | The contact's ID on that channel. Generated if omitted. For phone channels it defaults to the contact's phone; for email inboxes to the contact's email. | | `hmac_verified` | boolean | No | Mark the contact inbox as HMAC-verified (website widget identity validation). | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/contact_inboxes' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "inbox_id": 31, "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b" }' ``` **Example response** (`200 OK`). The `inbox` object is truncated. ```json { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b", "inbox": { "id": 31, "channel_id": 9, "name": "Website API", "channel_type": "Channel::Api", "enable_auto_assignment": true, "webhook_url": "" } } ``` **Error responses**: `404 {"error": "Resource could not be found"}` when the contact or inbox does not exist. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `inbox_id` | integer | Yes | The inbox to link the contact to. Example: `31`. | | `source_id` | string | No | The contact's ID on that channel. Generated when omitted: for phone channels it is the contact's phone number, for email inboxes the contact's email address. Example: `5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b`. | | `hmac_verified` | boolean | No | Mark the contact inbox as HMAC-verified (identity validation of the website widget). | ### Example: Generated source ID Link the contact to an inbox, with a generated `source_id`. ```json { "inbox_id": 31 } ``` ### Example: Your own source ID Link the contact to an inbox with a `source_id` you choose. ```json { "inbox_id": 31, "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b" } ``` ## Responses ### 200 — The contact inbox. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `inbox` | object | Object containing the details of the inbox. | | `inbox.id` | integer | The numeric ID of the inbox. | | `inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `inbox.account_id` | integer | The numeric ID of the account. | | `inbox.name` | string | The name of the inbox. | | `inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `inbox.timezone` | string | The inbox's time zone. | | `inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | #### Example: Contact inbox The `inbox` object is shortened. ```json { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b", "inbox": { "id": 31, "channel_id": 9, "name": "Website API", "channel_type": "Channel::Api", "enable_auto_assignment": true, "webhook_url": "" } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The contact or the inbox does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List Contact Labels Source: https://docs.99digital.co.il/online-api/contacts/list-contact-labels Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/list-contact-labels.md Section: Online API › Contacts `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/labels` List the labels of a contact. The labels are returned as their titles. To change them, use [Set Contact Labels](https://docs.99digital.co.il/online-api/contacts/set-contact-labels). | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/contacts/{contact_id}/labels` | | **Authorization** | User token. Any agent. Agent-bot tokens: not allowed. | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/labels' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`) ```json { "payload": ["vip", "billing"] } ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Responses ### 200 — The contact's label titles. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of string | The titles of the contact's labels. | #### Example ```json { "payload": [ "vip", "billing" ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Set Contact Labels Source: https://docs.99digital.co.il/online-api/contacts/set-contact-labels Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/set-contact-labels.md Section: Online API › Contacts `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/labels` Replaces the contact's labels with the given list. Send `[]` to remove all labels. Label titles are not checked against the account's [labels](https://docs.99digital.co.il/online-api/labels/list-labels), so any string is accepted. Use existing label titles so the labels show up with their colours in the dashboard. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/contacts/{contact_id}/labels` | | **Authorization** | User token. Any agent. Agent-bot tokens: not allowed. | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `contact_id` | integer | Yes | Contact ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `labels` | string[] | Yes | The full list of label titles. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/labels' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "labels": ["vip", "billing"] }' ``` **Example response** (`200 OK`) ```json { "payload": ["vip", "billing"] } ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `labels` | array of string | Yes | The full list of label titles. `[]` removes all labels. | ### Example: Set labels The contact gets exactly these two labels. ```json { "labels": [ "vip", "billing" ] } ``` ### Example: Remove all labels An empty list removes every label from the contact. ```json { "labels": [] } ``` ## Responses ### 200 — The contact's labels after the change. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of string | The titles of the contact's labels. | #### Example ```json { "payload": [ "vip", "billing" ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Block Contact Source: https://docs.99digital.co.il/online-api/contacts/block-contact Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/block-contact.md Section: Online API › Contacts `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/block` Blocks the contact for a number of days. While a contact is blocked, their incoming messages are not delivered to agents, and the contact is removed from all contact lists. If you pass `conversation_id`, an activity message about the block is added to that conversation. The block is recorded with `block_source: "api"` when it is made with an access token. To lift the block early, use [Unblock Contact](https://docs.99digital.co.il/online-api/contacts/unblock-contact). | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/contacts/{contact_id}/block` | | **Authorization** | User token. Legacy: `administrator`. New rules: **Contacts → update** only (the legacy administrator role does not pass). When `conversation_id` is sent, the caller must also be able to see that conversation. Agent-bot tokens: not allowed. | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `contact_id` | integer | Yes | Contact ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `period` | integer | No | Block duration in days. Default `1`, maximum `36500`. | | `conversation_id` | integer | No | Display ID of one of the contact's conversations, where the "blocked" activity message is posted. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/block' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "period": 7, "conversation_id": 1501 }' ``` **Example response** (`200 OK`). The `contact_inboxes` list is truncated. ```json { "payload": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv", "blocked": "2026-11-19 08:00:00 UTC", "blocked_at": "2026-11-12T08:00:00Z", "block_source": "api" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": true, "is_whatsapp_contact": false, "created_at": 1794470500, "email_or_phone_optional": false, "contact_inboxes": [] } } ``` `additional_attributes.blocked` is the time the block ends, `blocked_at` the time it started, and `block_source` is `api` when the block is made with an access token. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Request body Content type: `application/json` | Field | Type | Required | Description | | --- | --- | --- | --- | | `period` | integer | No | How long the block lasts, in days. Default: `1`. Maximum: 36500. Example: `7`. | | `conversation_id` | integer | No | The display ID of one of the contact's conversations, where the "blocked" activity message is posted. Example: `1501`. | ### Example (generated from the schema) ```json { "period": 7, "conversation_id": 1501 } ``` ## Responses ### 200 — The blocked contact. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.id` | integer | The contact's numeric ID. | | `payload.name` | string | The full name of the contact. | | `payload.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | #### Example: Blocked contact Blocked for 7 days. The `inbox` object is shortened. ```json { "payload": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv", "blocked": "2026-11-19 08:00:00 UTC", "blocked_at": "2026-11-12T08:00:00Z", "block_source": "api" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": true, "is_whatsapp_contact": false, "created_at": 1794470500, "email_or_phone_optional": false, "contact_inboxes": [ { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b", "inbox": { "id": 31, "name": "Website API", "channel_type": "Channel::Api" } } ] } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Unblock Contact Source: https://docs.99digital.co.il/online-api/contacts/unblock-contact Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/unblock-contact.md Section: Online API › Contacts `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/unblock` Lift the block of a contact before it ends. See [Block Contact](https://docs.99digital.co.il/online-api/contacts/block-contact). | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/contacts/{contact_id}/unblock` | | **Authorization** | Same as [Block Contact](https://docs.99digital.co.il/online-api/contacts/block-contact): user token. Legacy: `administrator`. New rules: **Contacts → update** only (the legacy administrator role does not pass). When `conversation_id` is sent, the caller must also be able to see that conversation. Agent-bot tokens: not allowed. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `conversation_id` | integer | No | Display ID of one of the contact's conversations, where the "unblocked" activity message is posted. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/unblock' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "conversation_id": 1501 }' ``` **Example response** (`200 OK`): the contact (same shape as [Block Contact](https://docs.99digital.co.il/online-api/contacts/block-contact)) with `"blocked": false` and the block keys removed from `additional_attributes`. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Request body Content type: `application/json` | Field | Type | Required | Description | | --- | --- | --- | --- | | `conversation_id` | integer | No | The display ID of one of the contact's conversations, where the "unblocked" activity message is posted. Example: `1501`. | ### Example (generated from the schema) ```json { "conversation_id": 1501 } ``` ## Responses ### 200 — The unblocked contact. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.id` | integer | The contact's numeric ID. | | `payload.name` | string | The full name of the contact. | | `payload.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | #### Example: Unblocked contact The block keys are gone from `additional_attributes`. The `inbox` object is shortened. ```json { "payload": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500, "email_or_phone_optional": false, "contact_inboxes": [ { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b", "inbox": { "id": 31, "name": "Website API", "channel_type": "Channel::Api" } } ] } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Delete Contact Custom Attributes Source: https://docs.99digital.co.il/online-api/contacts/delete-contact-custom-attributes Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/delete-contact-custom-attributes.md Section: Online API › Contacts `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/destroy_custom_attributes` Removes the given keys from the contact's custom attributes. The other custom attributes are kept. To add or change values, use [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact), which merges `custom_attributes`. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/contacts/{contact_id}/destroy_custom_attributes` | | **Authorization** | User token. Same as [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact): legacy roles: any agent; new rules: **Contacts → update**. Agent-bot tokens: not allowed. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `custom_attributes` | string[] | Yes | Keys to remove. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/destroy_custom_attributes' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "custom_attributes": ["plan"] }' ``` **Example response** (`200 OK`). The `contact_inboxes` list is truncated. ```json { "payload": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500, "email_or_phone_optional": false, "contact_inboxes": [] } } ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `custom_attributes` | array of string | Yes | The keys to remove. | ### Example (generated from the schema) ```json { "custom_attributes": [ "plan" ] } ``` ## Responses ### 200 — The contact, without the removed keys. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.id` | integer | The contact's numeric ID. | | `payload.name` | string | The full name of the contact. | | `payload.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | #### Example: Updated contact `plan` was removed and `customer_tier` kept. The `inbox` object is shortened. ```json { "payload": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500, "email_or_phone_optional": false, "contact_inboxes": [ { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b", "inbox": { "id": 31, "name": "Website API", "channel_type": "Channel::Api" } } ] } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Delete Contact Avatar Source: https://docs.99digital.co.il/online-api/contacts/delete-contact-avatar Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/delete-contact-avatar.md Section: Online API › Contacts `DELETE https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/avatar` Remove a contact's avatar image. To set a new avatar, use [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact). | Setting | Value | | --- | --- | | **Method** | `DELETE` | | **Path** | `/api/v1/accounts/{account_id}/contacts/{contact_id}/avatar` | | **Authorization** | User token. Same as [Retrieve Contact](https://docs.99digital.co.il/online-api/contacts/retrieve-contact): legacy roles: any agent; new rules: **Contacts → read**. Agent-bot tokens: not allowed. | **Example request** ```bash curl -X DELETE 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/avatar' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`): `{"payload": { ...contact object without contact_inboxes... }}` with `"thumbnail": ""`. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Responses ### 200 — The contact, without its avatar. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.id` | integer | The contact's numeric ID. | | `payload.name` | string | The full name of the contact. | | `payload.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | #### Example ```json { "payload": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500 } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Merge Contacts Source: https://docs.99digital.co.il/online-api/contacts/merge-contacts Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/merge-contacts.md Section: Online API › Contacts `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/actions/contact_merge` Merges the mergee contact into the base contact, then deletes the mergee. The base contact takes over all conversations, messages, contact inboxes, list memberships, form submissions, notes, tickets, CSAT responses, files and labels. For attributes, the base contact's non-empty values win, and empty ones are filled from the mergee. An active block on the mergee is carried over if it is longer than the base contact's. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/actions/contact_merge` | | **Authorization** | User token. Requires **delete** permission on the mergee and **update** permission on the base contact (legacy: `administrator`; new rules: **Contacts → delete** and **Contacts → update**). Agent-bot tokens: not allowed. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `base_contact_id` | integer | Yes | Contact that is kept. | | `mergee_contact_id` | integer | Yes | Contact that is merged and then deleted. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/actions/contact_merge' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "base_contact_id": 801, "mergee_contact_id": 802 }' ``` **Example response** (`200 OK`): the base contact. It is **not** wrapped in `payload`, and has no `contact_inboxes`. ```json { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500 } ``` After the merge, `GET /contacts/802` returns `404`. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `base_contact_id` | integer | Yes | The contact that is kept. Example: `801`. | | `mergee_contact_id` | integer | Yes | The contact that is merged into the base contact, then deleted. Example: `802`. | ### Example (generated from the schema) ```json { "base_contact_id": 801, "mergee_contact_id": 802 } ``` ## Responses ### 200 — The base contact after the merge. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The contact's numeric ID. | | `name` | string | The full name of the contact. | | `email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `thumbnail` | string | The avatar URL of the contact, or an empty string. | | `availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `contact_inboxes[].inbox.name` | string | The name of the inbox. | | `contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | #### Example ```json { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500 } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` --- # List Contact Notes Source: https://docs.99digital.co.il/online-api/contacts/notes/list-contact-notes Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/notes/list-contact-notes.md Section: Online API › Contacts › Notes `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/notes` List the internal notes that agents wrote about a contact, newest first. Internal notes that agents write about a contact. They are not visible to the contact. To add one, use [Create Contact Note](https://docs.99digital.co.il/online-api/contacts/notes/create-contact-note). | Action | Method | Path | | --- | --- | --- | | List notes (newest first) | `GET` | `/api/v1/accounts/{account_id}/contacts/{contact_id}/notes` | **Authorization**: user token. Listing requires the [Retrieve Contact](https://docs.99digital.co.il/online-api/contacts/retrieve-contact) permission (new rules: **Contacts → read**). Creating, updating and deleting require the [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact) permission (new rules: **Contacts → update**). Legacy roles: any agent. Agent-bot tokens: not allowed. #### Example: list notes ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/notes' \ -H 'api_access_token: ' ``` Response (`200 OK`): an array of note objects. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Responses ### 200 — The contact's notes, newest first. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The note ID. | | `[].content` | string | The note text. | | `[].account_id` | integer \| null | Returned as `null`. | | `[].contact_id` | integer \| null | Returned as `null`. | | `[].user` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `[].user.id` | integer | The agent's numeric ID (user ID). | | `[].user.account_id` | integer | The numeric ID of the account. | | `[].user.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `[].user.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `[].user.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `[].user.email` | string | The agent's login email address. | | `[].user.available_name` | string | The agent's display name. | | `[].user.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `[].user.name` | string | The agent's full name. | | `[].user.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `[].user.operation_bot` | boolean | `true` for internal operation-bot users. | | `[].user.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `[].user.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `[].user.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `[].user.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `[].user.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `[].user.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `[].user.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `[].user.email1` | string \| null | The email address that receives two-factor codes by email. | | `[].user.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `[].created_at` | integer | When the note was created (Unix time, seconds). | | `[].updated_at` | integer | The note's last update (Unix time, seconds). | #### Example: Notes One note. `user`, the author, is shortened. ```json [ { "id": 71, "content": "Callback moved to Monday.", "account_id": null, "contact_id": null, "user": { "id": 51, "account_id": 12, "availability_status": "online", "name": "Jane Agent", "available_name": "Jane Agent", "email": "jane.agent@example.com", "role": "General Manager", "thumbnail": "" }, "created_at": 1794470700, "updated_at": 1794474300 } ] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Create Contact Note Source: https://docs.99digital.co.il/online-api/contacts/notes/create-contact-note Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/notes/create-contact-note.md Section: Online API › Contacts › Notes `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/notes` Add an internal note about a contact. Internal notes that agents write about a contact. They are not visible to the contact. The caller becomes the note's author (`user`). | Action | Method | Path | | --- | --- | --- | | Create a note | `POST` | `/api/v1/accounts/{account_id}/contacts/{contact_id}/notes` | **Authorization**: user token. Listing requires the [Retrieve Contact](https://docs.99digital.co.il/online-api/contacts/retrieve-contact) permission (new rules: **Contacts → read**). Creating, updating and deleting require the [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact) permission (new rules: **Contacts → update**). Legacy roles: any agent. Agent-bot tokens: not allowed. **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `note.content` | string | Yes | Note text. | #### Example: create a note ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/notes' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "note": { "content": "Customer asked for a callback about order A-1001." } }' ``` Response (`200 OK`). `user` is the author, as an [agent object](https://docs.99digital.co.il/online-api/agents/list-of-all-agents), shown here truncated. `account_id` and `contact_id` are always `null` in this response. ```json { "id": 71, "content": "Customer asked for a callback about order A-1001.", "account_id": null, "contact_id": null, "user": { "id": 51, "account_id": 12, "availability_status": "online", "name": "Jane Agent", "available_name": "Jane Agent", "email": "jane.agent@example.com", "role": "General Manager", "thumbnail": "" }, "created_at": 1794470700, "updated_at": 1794470700 } ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `note` | object | Yes | The note to add. Its text goes in `content`. | | `note.content` | string | Yes | The note text. Example: `Customer asked for a callback about order A-1001.`. | ### Example (generated from the schema) ```json { "note": { "content": "Customer asked for a callback about order A-1001." } } ``` ## Responses ### 200 — The new note. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The note ID. | | `content` | string | The note text. | | `account_id` | integer \| null | Returned as `null`. | | `contact_id` | integer \| null | Returned as `null`. | | `user` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `user.id` | integer | The agent's numeric ID (user ID). | | `user.account_id` | integer | The numeric ID of the account. | | `user.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `user.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `user.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `user.email` | string | The agent's login email address. | | `user.available_name` | string | The agent's display name. | | `user.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `user.name` | string | The agent's full name. | | `user.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `user.operation_bot` | boolean | `true` for internal operation-bot users. | | `user.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `user.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `user.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `user.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `user.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `user.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `user.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `user.email1` | string \| null | The email address that receives two-factor codes by email. | | `user.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `created_at` | integer | When the note was created (Unix time, seconds). | | `updated_at` | integer | The note's last update (Unix time, seconds). | #### Example: Note The new note. `user`, the author, is shortened. ```json { "id": 71, "content": "Customer asked for a callback about order A-1001.", "account_id": null, "contact_id": null, "user": { "id": 51, "account_id": 12, "availability_status": "online", "name": "Jane Agent", "available_name": "Jane Agent", "email": "jane.agent@example.com", "role": "General Manager", "thumbnail": "" }, "created_at": 1794470700, "updated_at": 1794470700 } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Update Contact Note Source: https://docs.99digital.co.il/online-api/contacts/notes/update-contact-note Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/notes/update-contact-note.md Section: Online API › Contacts › Notes `PATCH https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/notes/{note_id}` Change the text of an internal note about a contact. Internal notes that agents write about a contact. They are not visible to the contact. | Action | Method | Path | | --- | --- | --- | | Update a note | `PATCH` | `/api/v1/accounts/{account_id}/contacts/{contact_id}/notes/{note_id}` | **Authorization**: user token. Listing requires the [Retrieve Contact](https://docs.99digital.co.il/online-api/contacts/retrieve-contact) permission (new rules: **Contacts → read**). Creating, updating and deleting require the [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact) permission (new rules: **Contacts → update**). Legacy roles: any agent. Agent-bot tokens: not allowed. **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `note.content` | string | Yes | Note text. | #### Example: update a note ```bash curl -X PATCH 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/notes/71' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "note": { "content": "Callback moved to Monday." } }' ``` Response (`200 OK`): the same note object with `"content": "Callback moved to Monday."` and a new `updated_at`. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | | `note_id` | path | integer | Yes | The note's ID, as returned by [List Contact Notes](https://docs.99digital.co.il/online-api/contacts/notes/list-contact-notes). Example: `71`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `note` | object | Yes | The note's new text, in `content`. | | `note.content` | string | Yes | The new note text. Example: `Callback moved to Monday.`. | ### Example (generated from the schema) ```json { "note": { "content": "Callback moved to Monday." } } ``` ## Responses ### 200 — The updated note. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The note ID. | | `content` | string | The note text. | | `account_id` | integer \| null | Returned as `null`. | | `contact_id` | integer \| null | Returned as `null`. | | `user` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `user.id` | integer | The agent's numeric ID (user ID). | | `user.account_id` | integer | The numeric ID of the account. | | `user.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `user.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `user.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `user.email` | string | The agent's login email address. | | `user.available_name` | string | The agent's display name. | | `user.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `user.name` | string | The agent's full name. | | `user.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `user.operation_bot` | boolean | `true` for internal operation-bot users. | | `user.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `user.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `user.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `user.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `user.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `user.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `user.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `user.email1` | string \| null | The email address that receives two-factor codes by email. | | `user.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `created_at` | integer | When the note was created (Unix time, seconds). | | `updated_at` | integer | The note's last update (Unix time, seconds). | #### Example: Note The updated note. `user`, the author, is shortened. ```json { "id": 71, "content": "Callback moved to Monday.", "account_id": null, "contact_id": null, "user": { "id": 51, "account_id": 12, "availability_status": "online", "name": "Jane Agent", "available_name": "Jane Agent", "email": "jane.agent@example.com", "role": "General Manager", "thumbnail": "" }, "created_at": 1794470700, "updated_at": 1794474300 } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Delete Contact Note Source: https://docs.99digital.co.il/online-api/contacts/notes/delete-contact-note Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/notes/delete-contact-note.md Section: Online API › Contacts › Notes `DELETE https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/notes/{note_id}` Delete an internal note about a contact. Internal notes that agents write about a contact. They are not visible to the contact. | Action | Method | Path | | --- | --- | --- | | Delete a note | `DELETE` | `/api/v1/accounts/{account_id}/contacts/{contact_id}/notes/{note_id}` | **Authorization**: user token. Listing requires the [Retrieve Contact](https://docs.99digital.co.il/online-api/contacts/retrieve-contact) permission (new rules: **Contacts → read**). Creating, updating and deleting require the [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact) permission (new rules: **Contacts → update**). Legacy roles: any agent. Agent-bot tokens: not allowed. #### Example: delete a note ```bash curl -X DELETE 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/notes/71' \ -H 'api_access_token: ' ``` Response: `200 OK` with an empty body. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | | `note_id` | path | integer | Yes | The note's ID, as returned by [List Contact Notes](https://docs.99digital.co.il/online-api/contacts/notes/list-contact-notes). Example: `71`. | ## Responses ### 200 — The note was deleted, with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List Contact Files Source: https://docs.99digital.co.il/online-api/contacts/files/list-contact-files Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/files/list-contact-files.md Section: Online API › Contacts › Files `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/files` List the documents attached to a contact's profile. Documents attached to a contact profile (for example contracts or ID scans), with an optional comment. To add one, use [Upload Contact File](https://docs.99digital.co.il/online-api/contacts/files/upload-contact-file). | Action | Method | Path | | --- | --- | --- | | List files | `GET` | `/api/v1/accounts/{account_id}/contacts/{contact_id}/files` | **Authorization**: user token. Listing requires the [Retrieve Contact](https://docs.99digital.co.il/online-api/contacts/retrieve-contact) permission (new rules: **Contacts → read**). Uploading, updating and deleting require the [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact) permission (new rules: **Contacts → update**). Legacy roles: any agent. Agent-bot tokens: not allowed. `file_type` is `image`, `audio`, `video` or the file's MIME type. `thumb_url` is returned only for images. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Responses ### 200 — The contact's files. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The file ID. | | `[].data_url` | string | The URL of the file. | | `[].file_type` | string | `image`, `audio`, `video`, or the file's MIME type (for example `application/pdf`). | | `[].thumb_url` | string | The URL of a thumbnail. Returned for images only. | | `[].comment` | string | The comment kept with the file. | | `[].created_at_exact` | string | When the file was uploaded, as `DD/MM/YY HH:mm` (for example `12/11/26 08:00`). | #### Example ```json [ { "id": 3101, "data_url": "https://online.99digital.co.il/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "file_type": "image", "thumb_url": "https://online.99digital.co.il/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "comment": "Invoice for order A-1001", "created_at_exact": "12/11/26 08:00" } ] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Upload Contact File Source: https://docs.99digital.co.il/online-api/contacts/files/upload-contact-file Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/files/upload-contact-file.md Section: Online API › Contacts › Files `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/add_file` Attach a document to a contact's profile. Documents attached to a contact profile (for example contracts or ID scans), with an optional comment. | Action | Method | Path | | --- | --- | --- | | Upload a file | `POST` | `/api/v1/accounts/{account_id}/contacts/{contact_id}/add_file` | **Authorization**: user token. Listing requires the [Retrieve Contact](https://docs.99digital.co.il/online-api/contacts/retrieve-contact) permission (new rules: **Contacts → read**). Uploading, updating and deleting require the [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact) permission (new rules: **Contacts → update**). Legacy roles: any agent. Agent-bot tokens: not allowed. **Upload (form-data) parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `file` | file | Yes | Up to 10 MB. Allowed types: PDF, CSV, RTF, DOC/DOCX, XLS/XLSX, PNG, JPEG. The account's upload policy may restrict this further (for example, `text/plain` can be rejected). | | `comment` | string | No | Comment stored with the file (max 500 characters on update). | #### Example: upload a file ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/add_file' \ -H 'api_access_token: ' \ -F 'file=@invoice.png;type=image/png' \ -F 'comment=Invoice for order A-1001' ``` Response (`200 OK`): **all** files of the contact. ```json [ { "id": 3101, "data_url": "https://online.99digital.co.il/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "file_type": "image", "thumb_url": "https://online.99digital.co.il/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "comment": "Invoice for order A-1001", "created_at_exact": "12/11/26 08:00" } ] ``` `file_type` is `image`, `audio`, `video` or the file's MIME type. `thumb_url` is returned only for images. **Error responses (upload)** | Status | When | Body | | --- | --- | --- | | `422` | No `file` sent. | `"File field is required"` | | `415` | File type not allowed. | `File type is not supported: text/plain` | | `413` | File larger than 10 MB. | Error message | ## Remarks - The code samples add the file once you choose one under **Request → Body**. - To change the comment later, use [Update Contact File](https://docs.99digital.co.il/online-api/contacts/files/update-contact-file). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | ## Request body Content type: `multipart/form-data` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `file` | string (binary) | Yes | The file, up to 10 MB: PDF, CSV, RTF, DOC/DOCX, XLS/XLSX, PNG or JPEG. The account's upload policy may allow fewer types. | | `comment` | string | No | An optional comment kept with the file. You can change it later with [Update Contact File](https://docs.99digital.co.il/online-api/contacts/files/update-contact-file), which accepts up to 500 characters. Example: `Invoice for order A-1001`. | ## Responses ### 200 — All the contact's files, including the new one. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The file ID. | | `[].data_url` | string | The URL of the file. | | `[].file_type` | string | `image`, `audio`, `video`, or the file's MIME type (for example `application/pdf`). | | `[].thumb_url` | string | The URL of a thumbnail. Returned for images only. | | `[].comment` | string | The comment kept with the file. | | `[].created_at_exact` | string | When the file was uploaded, as `DD/MM/YY HH:mm` (for example `12/11/26 08:00`). | #### Example ```json [ { "id": 3101, "data_url": "https://online.99digital.co.il/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "file_type": "image", "thumb_url": "https://online.99digital.co.il/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "comment": "Invoice for order A-1001", "created_at_exact": "12/11/26 08:00" } ] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 413 — The file is larger than 10 MB. ### 415 — The file type is not allowed. Content type: `text/plain` Type: `string`. #### Example ```text File type is not supported: text/plain ``` ### 422 — No `file` was sent. Content type: `application/json` Type: `string`. #### Example ```json "File field is required" ``` --- # Update Contact File Source: https://docs.99digital.co.il/online-api/contacts/files/update-contact-file Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/files/update-contact-file.md Section: Online API › Contacts › Files `PATCH https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/update_file/{file_id}` Change the comment of a file attached to a contact's profile. Documents attached to a contact profile (for example contracts or ID scans), with an optional comment. | Action | Method | Path | | --- | --- | --- | | Update a file comment | `PATCH` | `/api/v1/accounts/{account_id}/contacts/{contact_id}/update_file/{file_id}` | **Authorization**: user token. Listing requires the [Retrieve Contact](https://docs.99digital.co.il/online-api/contacts/retrieve-contact) permission (new rules: **Contacts → read**). Uploading, updating and deleting require the [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact) permission (new rules: **Contacts → update**). Legacy roles: any agent. Agent-bot tokens: not allowed. **Update (JSON) parameters**: `comment` (string, max 500 characters). Send an empty string to clear it. #### Example: update the comment ```bash curl -X PATCH 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/update_file/3101' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "comment": "Paid invoice for order A-1001" }' ``` Response (`200 OK`): **all** files of the contact, with the updated `comment`. `file_type` is `image`, `audio`, `video` or the file's MIME type. `thumb_url` is returned only for images. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | | `file_id` | path | integer | Yes | The file's ID, as returned by [List Contact Files](https://docs.99digital.co.il/online-api/contacts/files/list-contact-files). Example: `3101`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `comment` | string | No | The new comment. An empty string clears it. Max length: 500. | ### Example: Change the comment Replace the file's comment. ```json { "comment": "Paid invoice for order A-1001" } ``` ### Example: Clear the comment An empty string removes the comment. ```json { "comment": "" } ``` ## Responses ### 200 — All the contact's files, with the updated comment. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The file ID. | | `[].data_url` | string | The URL of the file. | | `[].file_type` | string | `image`, `audio`, `video`, or the file's MIME type (for example `application/pdf`). | | `[].thumb_url` | string | The URL of a thumbnail. Returned for images only. | | `[].comment` | string | The comment kept with the file. | | `[].created_at_exact` | string | When the file was uploaded, as `DD/MM/YY HH:mm` (for example `12/11/26 08:00`). | #### Example ```json [ { "id": 3101, "data_url": "https://online.99digital.co.il/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "file_type": "image", "thumb_url": "https://online.99digital.co.il/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "comment": "Paid invoice for order A-1001", "created_at_exact": "12/11/26 08:00" } ] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Delete Contact File Source: https://docs.99digital.co.il/online-api/contacts/files/delete-contact-file Markdown: https://docs.99digital.co.il/markdown/online-api/contacts/files/delete-contact-file.md Section: Online API › Contacts › Files `DELETE https://online.99digital.co.il/api/v1/accounts/{account_id}/contacts/{contact_id}/remove_file/{file_id}` Delete a file from a contact's profile. Documents attached to a contact profile (for example contracts or ID scans), with an optional comment. | Action | Method | Path | | --- | --- | --- | | Delete a file | `DELETE` | `/api/v1/accounts/{account_id}/contacts/{contact_id}/remove_file/{file_id}` | **Authorization**: user token. Listing requires the [Retrieve Contact](https://docs.99digital.co.il/online-api/contacts/retrieve-contact) permission (new rules: **Contacts → read**). Uploading, updating and deleting require the [Update Contact](https://docs.99digital.co.il/online-api/contacts/update-contact) permission (new rules: **Contacts → update**). Legacy roles: any agent. Agent-bot tokens: not allowed. #### Example: delete a file ```bash curl -X DELETE 'https://online.99digital.co.il/api/v1/accounts/12/contacts/801/remove_file/3101' \ -H 'api_access_token: ' ``` Response (`200 OK`): the remaining files (`[]` here). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `contact_id` | path | integer | Yes | The numeric ID of the contact. Example: `801`. | | `file_id` | path | integer | Yes | The file's ID, as returned by [List Contact Files](https://docs.99digital.co.il/online-api/contacts/files/list-contact-files). Example: `3101`. | ## Responses ### 200 — The contact's remaining files. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The file ID. | | `[].data_url` | string | The URL of the file. | | `[].file_type` | string | `image`, `audio`, `video`, or the file's MIME type (for example `application/pdf`). | | `[].thumb_url` | string | The URL of a thumbnail. Returned for images only. | | `[].comment` | string | The comment kept with the file. | | `[].created_at_exact` | string | When the file was uploaded, as `DD/MM/YY HH:mm` (for example `12/11/26 08:00`). | #### Example: No files left The deleted file was the contact's only file. ```json [] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Conversation Basics Source: https://docs.99digital.co.il/online-api/conversations/conversation-basics Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/conversation-basics.md Section: Online API › Conversations A conversation is a thread between a contact and your team in one inbox. This page explains what every conversation endpoint has in common. ## Display IDs In every path, `{conversation_id}` is the conversation's **display ID**: the `id` field in conversation responses and the number shown in the dashboard URL (`…/conversations/1501`). A few ticket and event responses also show the conversation's internal ID — their pages say so. ## Statuses **Conversation statuses.** The status names in the API differ from the labels in the dashboard: | API value | Dashboard label | Meaning | | --- | --- | --- | | `open` | **Bot** | The conversation is handled by the bot / automation. | | `pending` | **Manual** | The conversation is handled by a human agent. | | `snoozed` | Snoozed | Hidden until `snoozed_until`, then reopened. | | `resolved` | Resolved | Closed. | Change the status with [Toggle Conversation Status](https://docs.99digital.co.il/online-api/conversations/toggle-conversation-status) — for example `pending` to hand a conversation from the bot over to a human. ## Tickets Every conversation is split into [tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets); a new ticket starts when a resolved conversation is reopened. The first ticket opens with the conversation and closes when the conversation is resolved, so one long-lived conversation — a WhatsApp thread, for example — can hold many tickets. Messages and [events](https://docs.99digital.co.il/online-api/conversations/list-conversation-events) carry a `ticket_id`. ## No generic update or delete There is no `PATCH /conversations/{id}` and no `DELETE /conversations/{id}`. Change a conversation through the dedicated endpoints below (status, priority, assignment, labels, custom attributes, SLA, and so on). A conversation is deleted only when its contact is [deleted](https://docs.99digital.co.il/online-api/contacts/delete-contact). To create a conversation, use [Add Conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation). If the contact already has a conversation in that inbox, it returns that conversation and adds your message to it instead. ## Endpoints in this section - `GET /api/v1/accounts/{account_id}/conversations`: [List conversations](https://docs.99digital.co.il/online-api/conversations/list-conversations) - `GET /api/v1/accounts/{account_id}/conversations/meta`: [Conversation counts](https://docs.99digital.co.il/online-api/conversations/conversation-counts) - `GET /api/v1/accounts/{account_id}/conversations/search`: [Search conversations by message text](https://docs.99digital.co.il/online-api/conversations/search-conversations) - `POST /api/v1/accounts/{account_id}/conversations/filter`: [Filter conversations](https://docs.99digital.co.il/online-api/conversations/filter-conversations) - `POST /api/v1/accounts/{account_id}/conversations`: [Create a conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation) - `POST /api/v1/accounts/{account_id}/conversations/by_phone_number`: [Find or create a conversation by phone number](https://docs.99digital.co.il/online-api/conversations/find-conversation-by-phone) - `GET /api/v1/accounts/{account_id}/conversations/{conversation_id}`: [Get a conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation) - `POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_status`: [Change the status](https://docs.99digital.co.il/online-api/conversations/toggle-conversation-status) - `POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_priority`: [Change the priority](https://docs.99digital.co.il/online-api/conversations/toggle-conversation-priority) - `POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/assignments`: [Assign an agent or team](https://docs.99digital.co.il/online-api/conversations/assign-conversation) - `GET /api/v1/accounts/{account_id}/conversations/{conversation_id}/labels`: [List conversation labels](https://docs.99digital.co.il/online-api/conversations/list-conversation-labels) - `POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/labels`: [Set conversation labels](https://docs.99digital.co.il/online-api/conversations/set-conversation-labels) - `POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/custom_attributes`: [Set custom attributes](https://docs.99digital.co.il/online-api/conversations/set-conversation-custom-attributes) - `POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/mute` and `/unmute`: [Mute](https://docs.99digital.co.il/online-api/conversations/mute-conversation) / [unmute](https://docs.99digital.co.il/online-api/conversations/unmute-conversation) - `GET/POST/PATCH/DELETE /api/v1/accounts/{account_id}/conversations/{conversation_id}/participants`: Participants — [list](https://docs.99digital.co.il/online-api/conversations/participants/list-participants), [add](https://docs.99digital.co.il/online-api/conversations/participants/add-participants), [replace](https://docs.99digital.co.il/online-api/conversations/participants/replace-participants), [remove](https://docs.99digital.co.il/online-api/conversations/participants/remove-participants) - `GET /api/v1/accounts/{account_id}/conversations/{conversation_id}/attachments`: [List attachments](https://docs.99digital.co.il/online-api/conversations/list-conversation-attachments) - `POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/transcript`: [Email a transcript](https://docs.99digital.co.il/online-api/conversations/send-conversation-transcript) - `POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/send_survey`: [Send a CSAT survey](https://docs.99digital.co.il/online-api/conversations/send-csat-survey) - `POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/apply_sla`: [Apply or remove an SLA policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy) - `POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/update_last_seen`, `/unread`, `/set_unread`: Read / unread — [mark as read](https://docs.99digital.co.il/online-api/conversations/mark-conversation-as-read), [mark as unread](https://docs.99digital.co.il/online-api/conversations/mark-conversation-as-unread), [set unread](https://docs.99digital.co.il/online-api/conversations/set-conversation-unread) - `GET /api/v1/accounts/{account_id}/conversations/{conversation_id}/conversation_events`: [Conversation events (audit trail)](https://docs.99digital.co.il/online-api/conversations/list-conversation-events), and [one event](https://docs.99digital.co.il/online-api/conversations/get-conversation-event) - `POST /api/v1/accounts/{account_id}/bulk_actions`: [Bulk-update conversations](https://docs.99digital.co.il/online-api/conversations/bulk-update-conversations) - `POST /api/v1/accounts/{account_id}/bulk_actions/mark_as_read_all` and `/mark_as_unread`: Bulk read / unread — [read](https://docs.99digital.co.il/online-api/conversations/bulk-mark-as-read), [unread](https://docs.99digital.co.il/online-api/conversations/bulk-mark-as-unread) The fields of the conversation object are explained on [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). ## Who can see a conversation All conversation endpoints only return conversations the caller is allowed to see. Member endpoints (`/conversations/{conversation_id}/...`) return `403` when the caller is not allowed to see that conversation. - **New rules system**: the caller is the assignee, **or** their role has **Inbox read all conversations** for the conversation's inbox, **or** **Inbox read (Team)** for the inbox and the conversation belongs to one of the caller's teams, **or** **Inbox read unassigned conversations** for the inbox and the conversation has no assignee and no team. - **Legacy**: agents with "see all conversations" see everything; other agents see conversations assigned to them, conversations of their teams, and inboxes where they have **Inbox read all conversations**. - **Agent-bot tokens** can see every conversation, but may only call: [create conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation), [get conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation), [change status](https://docs.99digital.co.il/online-api/conversations/toggle-conversation-status), [change priority](https://docs.99digital.co.il/online-api/conversations/toggle-conversation-priority), [assign](https://docs.99digital.co.il/online-api/conversations/assign-conversation), [set labels](https://docs.99digital.co.il/online-api/conversations/set-conversation-labels), [set custom attributes](https://docs.99digital.co.il/online-api/conversations/set-conversation-custom-attributes), [apply SLA](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy), [send survey](https://docs.99digital.co.il/online-api/conversations/send-csat-survey), and [create message](https://docs.99digital.co.il/online-api/messages/create-a-message). The full list of endpoints open to bots, outside conversations too, is under [Authentication](https://docs.99digital.co.il/online-api/getting-started#authentication). Actions on a conversation also need the matching **inbox permission** of the caller's role (new rules system), scoped to the conversation's inbox — for example **Inbox resolve** to resolve it. These are listed per endpoint; the full list is under [Inbox permissions](https://docs.99digital.co.il/online-api/getting-started#inbox-permissions). --- # List Conversations Source: https://docs.99digital.co.il/online-api/conversations/list-conversations Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/list-conversations.md Section: Online API › Conversations `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations` Returns conversations visible to the caller, 25 per page, sorted by last activity (pinned conversations first). The response holds the conversations in `data.payload` and the counts for the dashboard tabs in `data.meta`. Narrow the list with the query parameters below; they can be combined. To get only the counts, use [Conversation Counts](https://docs.99digital.co.il/online-api/conversations/conversation-counts). To find conversations by message text, use `q` here or [Search Conversations](https://docs.99digital.co.il/online-api/conversations/search-conversations); for conditions on any attribute, use [Filter Conversations](https://docs.99digital.co.il/online-api/conversations/filter-conversations). | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/conversations` | | **Authorization** | User token (see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation)). | **Permissions:** - User token: any agent of the account. Only the conversations the caller may see are returned. - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | **Query parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | No | `open` (Bot), `pending` (Manual), `snoozed`, `resolved`, `!resolved` (open + pending) or `all`. If omitted, all statuses are returned. | | `assignee_type` | string | No | `me` (assigned to the caller), `unassigned`, `assigned`, `new` (conversations with unread incoming messages), or `all` / omitted. | | `inbox_id` | integer | No | Only this inbox. | | `team_id` | integer | No | Only conversations of this team. | | `labels[]` | string[] | No | Conversations with **any** of these labels. | | `source_id` | string | No | Only conversations of the contact inbox with this source ID (e.g. a phone number in a WhatsApp inbox). | | `conversation_type` | string | No | `mention` (the caller was @mentioned; also marks those mentions as read), `participating` (the caller is a participant), `unattended`. | | `q` | string | No | Text that must appear in an incoming/outgoing message (same as [Search Conversations](https://docs.99digital.co.il/online-api/conversations/search-conversations)). | | `sort_by` | string | No | `last_activity_at_desc` (default), `last_activity_at_asc`, `created_at_desc`, `created_at_asc`, `priority_desc`, `priority_asc`, `waiting_since_desc`, `waiting_since_asc`, `snoozed_until_desc`, `snoozed_until_asc`, `latest`. | | `page` | integer | No | Page number (25 per page). Default `1`. | :::note[Rate limit] The exact same `GET` URL under `/conversations` can be called at most **10 times per minute** per IP. Above that you get `429`. Polling `/conversations?status=open` in a loop hits this limit quickly — use [webhook events](https://docs.99digital.co.il/online-api/webhooks/webhook-events) instead. [Conversation Counts](https://docs.99digital.co.il/online-api/conversations/conversation-counts) is not limited this way. See [Rate limits](https://docs.99digital.co.il/online-api/getting-started#rate-limits). ::: **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations?inbox_id=31&status=all&assignee_type=all&page=1' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`). The conversations in `payload` are shortened; each item is a full conversation object, as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). ```json { "data": { "meta": { "mine_count": 1, "new_count": 1, "assigned_count": 1, "unassigned_count": 2, "all_count": 3, "active_status_count": 3, "resolved_status_count": 0, "pending_status_count": 1, "snoozed_status_count": 0, "all_status_count": 3, "last_page": true, "total": 3 }, "payload": [ { "id": 1504, "inbox_id": 31, "status": "pending", "priority": "high", "labels": ["billing"], "unread_count": 0, "last_activity_at": 1794472200 }, { "id": 1501, "inbox_id": 31, "status": "open", "priority": null, "labels": ["vip"], "unread_count": 1, "last_activity_at": 1794471300 }, { "id": 1502, "inbox_id": 31, "status": "open", "priority": null, "labels": [], "unread_count": 0, "last_activity_at": 1794471060 } ] } } ``` **Meta fields** | Field | Description | | --- | --- | | `mine_count`, `assigned_count`, `unassigned_count`, `all_count` | Counts for the assignee tabs, using all filters except `assignee_type`. | | `new_count` | Conversations with unread incoming messages. | | `active_status_count`, `resolved_status_count`, `pending_status_count`, `snoozed_status_count`, `all_status_count` | Counts by status. `active` = `open` + `pending`. | | `last_page` | `true` on the last page. | | `total` | Number of items on **this page** — not the total number of matches. Page until `last_page` is `true`. | ## Remarks - Each item in `payload` is a full conversation object. `messages` holds only the last message; use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. - The status names differ from the dashboard: `open` is **Bot** and `pending` is **Manual**. See [Statuses](https://docs.99digital.co.il/online-api/conversations/conversation-basics#statuses). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `status` | query | string | No | Only conversations with this status. If omitted, every status is returned. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Snoozed; `resolved` — Resolved; `!resolved` — Bot and Manual (`open` and `pending`); `all` — Every status. Example: `open`. | | `assignee_type` | query | string | No | Only conversations with this kind of assignment. One of: `me` — Assigned to the caller; `unassigned` — Not assigned to an agent; `assigned` — Assigned to an agent; `new` — With unread incoming messages; `all` — Every conversation — the same as leaving it out. | | `inbox_id` | query | integer | No | Only conversations of this inbox. Example: `31`. | | `team_id` | query | integer | No | Only conversations of this team. Example: `7`. | | `labels[]` | query | array of string | No | Only conversations that have **any** of these labels (label titles). Repeat the parameter for each label: `labels[]=vip&labels[]=billing`. Example: `["vip","billing"]`. | | `source_id` | query | string | No | Only conversations of the contact inbox with this source ID — for example the contact's phone number in a WhatsApp inbox. | | `conversation_type` | query | string | No | Only conversations of this kind. One of: `mention` — The caller was mentioned in the conversation. This also marks those mentions as read; `participating` — The caller is a participant of the conversation; `unattended` — Unattended conversations. | | `q` | query | string | No | Only conversations with an incoming or outgoing message that contains this text — the same search as [Search Conversations](https://docs.99digital.co.il/online-api/conversations/search-conversations). | | `sort_by` | query | string | No | The sort order. Pinned conversations are always listed first. One of: `last_activity_at_desc` — Most recent activity first (the default); `last_activity_at_asc` — Oldest activity first; `created_at_desc` — Newest conversations first; `created_at_asc` — Oldest conversations first; `priority_desc` — Highest priority first (`urgent`, `high`, `medium`, `low`); `priority_asc` — Lowest priority first; `waiting_since_desc` — By `waiting_since` (since when the contact has been waiting for a reply), most recent first; `waiting_since_asc` — By `waiting_since`, earliest first: the contacts who have waited longest come first; `snoozed_until_desc` — By the time a snoozed conversation reopens, latest first; `snoozed_until_asc` — By the time a snoozed conversation reopens, soonest first; `latest` — Most recent activity first. Default: `last_activity_at_desc`. | | `page` | query | integer | No | The page number, 25 conversations per page. Default: `1`. Example: `1`. | ## Responses ### 200 — The conversations on this page, and the counts. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `data` | object | The answer — the counts in `meta`, and the conversations in `payload`. | | `data.meta` | object | An object containing the counts of the conversations that match the filters. `mine_count`, `assigned_count`, `unassigned_count` and `all_count` are the counts for the assignee tabs, using every filter except `assignee_type`. | | `data.meta.mine_count` | integer | The number of conversations that have been assigned to the user (the caller). Uses every filter except `assignee_type`. | | `data.meta.new_count` | integer | The number of new conversations — conversations with unread incoming messages. | | `data.meta.assigned_count` | integer | The number of conversations that have been assigned to an agent. Uses every filter except `assignee_type`. | | `data.meta.unassigned_count` | integer | The number of unassigned conversations (no agent). Uses every filter except `assignee_type`. | | `data.meta.all_count` | integer | The number of all the conversations. Uses every filter except `assignee_type`. | | `data.meta.active_status_count` | integer | The number of active conversations — `open` (Bot) plus `pending` (Manual). | | `data.meta.resolved_status_count` | integer | The number of resolved conversations. | | `data.meta.pending_status_count` | integer | The number of pending (Manual) conversations. | | `data.meta.snoozed_status_count` | integer | The number of snoozed conversations. | | `data.meta.all_status_count` | integer | The number of conversations in every status. | | `data.meta.last_page` | boolean | `true` on the last page. | | `data.meta.total` | integer | The number of items (conversations) on **this page**. | | `data.payload` | array of object | The conversations on this page. | | `data.payload[].id` | integer | The conversation's numeric ID: its display ID, used in every path and shown in the dashboard URL. | | `data.payload[].uuid` | string | A globally unique ID of the conversation. | | `data.payload[].account_id` | integer | The numeric ID of the account. | | `data.payload[].inbox_id` | integer | The numeric ID of the inbox. | | `data.payload[].status` | string | The status of the conversation. The status names in the API differ from the labels in the dashboard: the dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Hidden until `snoozed_until`, then reopened; `resolved` — Closed. | | `data.payload[].priority` | string \| null | The priority of the conversation, or `null` when none is set. One of: `low` — Low priority; `medium` — Medium priority; `high` — High priority; `urgent` — Urgent — the highest priority; `null` — No priority is set. | | `data.payload[].labels` | array of string | Array of strings — the titles of the conversation's labels. | | `data.payload[].custom_attributes` | object | Object containing the custom attributes related to the conversation (custom attribute keys and their values). | | `data.payload[].additional_attributes` | object | Object containing the additional attributes related to the conversation: channel or system data, such as `mail_subject`, `source` or `transcript_lmi`. | | `data.payload[].meta` | object | Object containing the conversation's metadata — its people and channel. | | `data.payload[].meta.sender` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `data.payload[].meta.sender.id` | integer | The contact's numeric ID. | | `data.payload[].meta.sender.name` | string | The full name of the contact. | | `data.payload[].meta.sender.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `data.payload[].meta.sender.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `data.payload[].meta.sender.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `data.payload[].meta.sender.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `data.payload[].meta.sender.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `data.payload[].meta.sender.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `data.payload[].meta.sender.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `data.payload[].meta.sender.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `data.payload[].meta.sender.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `data.payload[].meta.sender.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `data.payload[].meta.sender.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `data.payload[].meta.sender.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `data.payload[].meta.sender.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `data.payload[].meta.sender.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `data.payload[].meta.sender.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `data.payload[].meta.sender.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `data.payload[].meta.sender.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `data.payload[].meta.sender.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `data.payload[].meta.sender.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `data.payload[].meta.sender.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `data.payload[].meta.sender.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `data.payload[].meta.sender.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `data.payload[].meta.sender.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `data.payload[].meta.sender.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `data.payload[].meta.sender.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | | `data.payload[].meta.assignee` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `data.payload[].meta.assignee.id` | integer | The agent's numeric ID (user ID). | | `data.payload[].meta.assignee.account_id` | integer | The numeric ID of the account. | | `data.payload[].meta.assignee.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `data.payload[].meta.assignee.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `data.payload[].meta.assignee.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `data.payload[].meta.assignee.email` | string | The agent's login email address. | | `data.payload[].meta.assignee.available_name` | string | The agent's display name. | | `data.payload[].meta.assignee.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `data.payload[].meta.assignee.name` | string | The agent's full name. | | `data.payload[].meta.assignee.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `data.payload[].meta.assignee.operation_bot` | boolean | `true` for internal operation-bot users. | | `data.payload[].meta.assignee.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `data.payload[].meta.assignee.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `data.payload[].meta.assignee.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `data.payload[].meta.assignee.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `data.payload[].meta.assignee.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `data.payload[].meta.assignee.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `data.payload[].meta.assignee.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `data.payload[].meta.assignee.email1` | string \| null | The email address that receives two-factor codes by email. | | `data.payload[].meta.assignee.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `data.payload[].meta.team` | object | Object containing the assigned team's data, if a team is assigned. | | `data.payload[].meta.team.id` | integer | The numeric ID of the team. | | `data.payload[].meta.team.name` | string | The name of the team. Stored in lower case, and unique in the account. | | `data.payload[].meta.team.description` | string | The description of the team. | | `data.payload[].meta.team.allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `data.payload[].meta.team.account_id` | integer | The numeric ID of the account. | | `data.payload[].meta.team.members_count` | integer | The number of agents in the team. | | `data.payload[].meta.team.is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | | `data.payload[].meta.channel` | string | The channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `data.payload[].meta.hmac_verified` | boolean | Whether the contact's identity was HMAC-verified (website widget). | | `data.payload[].contact_inbox` | object | The contact's link (contact inbox) to the conversation's inbox. | | `data.payload[].contact_inbox.wa_id` | string \| null | The contact's WhatsApp ID in this inbox, for WhatsApp users who hide their phone number; otherwise `null`. | | `data.payload[].messages` | array of object | Array of message objects — the **last** message only. Use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. | | `data.payload[].messages[].id` | integer | The numeric ID of the message. | | `data.payload[].messages[].content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `data.payload[].messages[].inbox_id` | integer | The numeric ID of the inbox. | | `data.payload[].messages[].conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `data.payload[].messages[].message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `data.payload[].messages[].content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `data.payload[].messages[].content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `data.payload[].messages[].private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `data.payload[].messages[].status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `data.payload[].messages[].status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `data.payload[].messages[].source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `data.payload[].messages[].echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `data.payload[].messages[].sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `data.payload[].messages[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `data.payload[].messages[].sender.name` | string | The sender's name. | | `data.payload[].messages[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `data.payload[].messages[].sender.available_name` | string | An agent's display name. | | `data.payload[].messages[].sender.email` | string \| null | The sender's email address. | | `data.payload[].messages[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `data.payload[].messages[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `data.payload[].messages[].sender.avatar_url` | string | An agent's avatar image URL. | | `data.payload[].messages[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `data.payload[].messages[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `data.payload[].messages[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `data.payload[].messages[].sender.blocked` | boolean | Whether a contact is blocked. | | `data.payload[].messages[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `data.payload[].messages[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `data.payload[].messages[].sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `data.payload[].messages[].sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `data.payload[].messages[].attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `data.payload[].messages[].attachments[].id` | integer | The numeric ID of the file (attachment). | | `data.payload[].messages[].attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `data.payload[].messages[].attachments[].account_id` | integer | The numeric ID of the account. | | `data.payload[].messages[].attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `data.payload[].messages[].attachments[].filename` | string | The name of the file. | | `data.payload[].messages[].attachments[].extension` | string \| null | The file extension, when known. | | `data.payload[].messages[].attachments[].data_url` | string | The URL of the file. | | `data.payload[].messages[].attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `data.payload[].messages[].attachments[].file_size` | integer | The file size, in bytes. | | `data.payload[].messages[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `data.payload[].messages[].delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `data.payload[].messages[].created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `data.payload[].messages[].created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `data.payload[].last_non_activity_message` | object | A message in a conversation. Outgoing messages are delivered to the contact through the inbox's channel (WhatsApp, SMS, email, Facebook, API webhook, and so on). | | `data.payload[].last_non_activity_message.id` | integer | The numeric ID of the message. | | `data.payload[].last_non_activity_message.content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `data.payload[].last_non_activity_message.inbox_id` | integer | The numeric ID of the inbox. | | `data.payload[].last_non_activity_message.conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `data.payload[].last_non_activity_message.message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `data.payload[].last_non_activity_message.content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `data.payload[].last_non_activity_message.content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `data.payload[].last_non_activity_message.private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `data.payload[].last_non_activity_message.status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `data.payload[].last_non_activity_message.status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `data.payload[].last_non_activity_message.source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `data.payload[].last_non_activity_message.echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `data.payload[].last_non_activity_message.sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `data.payload[].last_non_activity_message.sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `data.payload[].last_non_activity_message.sender.name` | string | The sender's name. | | `data.payload[].last_non_activity_message.sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `data.payload[].last_non_activity_message.sender.available_name` | string | An agent's display name. | | `data.payload[].last_non_activity_message.sender.email` | string \| null | The sender's email address. | | `data.payload[].last_non_activity_message.sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `data.payload[].last_non_activity_message.sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `data.payload[].last_non_activity_message.sender.avatar_url` | string | An agent's avatar image URL. | | `data.payload[].last_non_activity_message.sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `data.payload[].last_non_activity_message.sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `data.payload[].last_non_activity_message.sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `data.payload[].last_non_activity_message.sender.blocked` | boolean | Whether a contact is blocked. | | `data.payload[].last_non_activity_message.sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `data.payload[].last_non_activity_message.sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `data.payload[].last_non_activity_message.sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `data.payload[].last_non_activity_message.sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `data.payload[].last_non_activity_message.attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `data.payload[].last_non_activity_message.attachments[].id` | integer | The numeric ID of the file (attachment). | | `data.payload[].last_non_activity_message.attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `data.payload[].last_non_activity_message.attachments[].account_id` | integer | The numeric ID of the account. | | `data.payload[].last_non_activity_message.attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `data.payload[].last_non_activity_message.attachments[].filename` | string | The name of the file. | | `data.payload[].last_non_activity_message.attachments[].extension` | string \| null | The file extension, when known. | | `data.payload[].last_non_activity_message.attachments[].data_url` | string | The URL of the file. | | `data.payload[].last_non_activity_message.attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `data.payload[].last_non_activity_message.attachments[].file_size` | integer | The file size, in bytes. | | `data.payload[].last_non_activity_message.ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `data.payload[].last_non_activity_message.delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `data.payload[].last_non_activity_message.created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `data.payload[].last_non_activity_message.created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `data.payload[].can_reply` | boolean | Whether the conversation is currently within the messaging window: `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window). | | `data.payload[].muted` | boolean | Whether the conversation is currently muted. A muted conversation does not notify agents. | | `data.payload[].snoozed_until` | integer \| null | The time at which a snoozed conversation is reactivated (reopened), in **milliseconds** since the Unix epoch, or `null`. | | `data.payload[].unread_count` | integer | The number of unread messages — incoming messages the agents have not read. | | `data.payload[].has_incoming_messages` | boolean | Whether the contact has written at least one public message. | | `data.payload[].created_at` | integer | The time at which the conversation was created, measured in seconds since the Unix epoch. | | `data.payload[].timestamp` | integer | The same as `last_activity_at`. | | `data.payload[].last_activity_at` | integer | The time of the conversation's last activity (Unix timestamp, in seconds). | | `data.payload[].first_reply_created_at` | integer | The time at which the first reply was sent to the contact (Unix timestamp, in seconds), or `0` when there is none yet. | | `data.payload[].waiting_since` | integer | Since when the contact has been waiting for a reply (Unix timestamp, in seconds), or `0`. | | `data.payload[].agent_last_seen_at` | integer | The last time an agent saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `data.payload[].assignee_last_seen_at` | integer | The last time the assignee saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `data.payload[].contact_last_seen_at` | integer | The last time the contact interacted with your service — when they last saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `data.payload[].last_incoming_message_time` | string \| null | The time of the last incoming message (ISO 8601), or `null`. | | `data.payload[].sla_policy_id` | integer \| null | The ID of the applied SLA policy, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `data.payload[].applied_sla` | object \| null | The applied SLA policy's details and thresholds, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `data.payload[].sla_events` | array of object | The SLA events of the conversation (missed thresholds). | | `data.payload[].sla_events_with_distinct_event_type` | array of object | The SLA events, one per event type. | | `data.payload[].feature_enabled_sla` | boolean | Whether the account uses SLA policies (the SLA feature is enabled). | | `data.payload[].campaign_id` | integer \| null | The ID of the campaign that started the conversation, or `null`. | | `data.payload[].pinned` | boolean | Whether the caller pinned this conversation. | | `data.payload[].file` | object | `{url, file_type}` when a file is attached to the conversation itself (rare). | #### Example: Conversations of one inbox Every conversation of inbox 31 (`status=all`). The conversations are shortened here; each item is a full conversation object. ```json { "data": { "meta": { "mine_count": 1, "new_count": 1, "assigned_count": 1, "unassigned_count": 2, "all_count": 3, "active_status_count": 3, "resolved_status_count": 0, "pending_status_count": 1, "snoozed_status_count": 0, "all_status_count": 3, "last_page": true, "total": 3 }, "payload": [ { "id": 1504, "inbox_id": 31, "status": "pending", "priority": "high", "labels": [ "billing" ], "unread_count": 0, "last_activity_at": 1794472200 }, { "id": 1501, "inbox_id": 31, "status": "open", "priority": null, "labels": [ "vip" ], "unread_count": 1, "last_activity_at": 1794471300 }, { "id": 1502, "inbox_id": 31, "status": "open", "priority": null, "labels": [], "unread_count": 0, "last_activity_at": 1794471060 } ] } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 429 — The same URL was requested more than 10 times in a minute from this IP address. See [Rate limits](https://docs.99digital.co.il/online-api/getting-started#rate-limits). --- # Conversation Counts Source: https://docs.99digital.co.il/online-api/conversations/conversation-counts Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/conversation-counts.md Section: Online API › Conversations `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/meta` Get new, unassigned and all conversation counts. The answer is the `meta` part of [List Conversations](https://docs.99digital.co.il/online-api/conversations/list-conversations), without the conversations: the numbers of mine, new, assigned, unassigned and all conversations, and the counts by status. It accepts the same query parameters, so you can count, for example, the Bot conversations of one inbox. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/meta` | | Method | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token: any agent of the account. Only the conversations the caller may see are counted — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | **Query Parameters:** | Parameter | type | Description | Required | | --- | --- | --- | --- | | `status` | string | Filters conversations by status. Enum: `open` (Bot), `pending` (Manual), `snoozed`, `resolved`, `!resolved` (`open` + `pending`), `all`. If omitted, every status is counted | No | | `q` | string | Filters conversations with messages containing the search term | No | | `inbox_id` | integer | Filters conversations belonging to an inbox by `inbox_id` | No | | `team_id` | integer | Filters conversations assigned to a team by `team_id` | No | | `labels[]` | array of strings | Filters conversations by labels: conversations with **any** of these label titles. Repeat the parameter for each label | No | | `assignee_type` | string | Filters conversations by assignment. Enum: `me` (assigned to the caller), `unassigned`, `assigned`, `new` (with unread incoming messages), `all` | No | | `source_id` | string | Filters conversations of the contact inbox with this source ID (for example a phone number in a WhatsApp inbox) | No | | `conversation_type` | string | Enum: `mention` (the caller was mentioned; also marks those mentions as read), `participating` (the caller is a participant), `unattended` | No | | `page` | integer | The page of the list that `total` and `last_page` describe (25 per page). Default `1` | No | **Response:** ```json { "meta": { "mine_count": 1, "new_count": 1, "assigned_count": 1, "unassigned_count": 3, "all_count": 4, "active_status_count": 4, "resolved_status_count": 0, "pending_status_count": 1, "snoozed_status_count": 0, "all_status_count": 4, "last_page": true, "total": 4 } } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `meta` | An object containing the counts | | `meta -> mine_count` | Number of conversations that have been assigned to the user (the caller) | | `meta -> new_count` | Number of new conversations: conversations with unread incoming messages | | `meta -> assigned_count` | Number of conversations that have been assigned | | `meta -> unassigned_count` | Number of unassigned conversations | | `meta -> all_count` | Number of all conversations | | `meta -> active_status_count` | Number of active conversations: `open` (Bot) plus `pending` (Manual) | | `meta -> resolved_status_count` | Number of resolved conversations | | `meta -> pending_status_count` | Number of `pending` (Manual) conversations | | `meta -> snoozed_status_count` | Number of snoozed conversations | | `meta -> all_status_count` | Number of conversations in every status | | `meta -> last_page` | `true` when the requested page is the last page of the list | | `meta -> total` | Number of conversations on **this page** of the list (25 per page) | `mine_count`, `assigned_count`, `unassigned_count` and `all_count` are the counts of the assignee tabs: they apply every filter except `assignee_type`. ## Remarks - This endpoint is not subject to the limit of 10 requests per minute for the same URL that applies to the other `GET` endpoints under `/conversations`. See [Rate limits](https://docs.99digital.co.il/online-api/getting-started#rate-limits). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `status` | query | string | No | Count only conversations with this status. If omitted, every status is counted. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Snoozed; `resolved` — Resolved; `!resolved` — Bot and Manual (`open` and `pending`); `all` — Every status. Example: `open`. | | `assignee_type` | query | string | No | Count only conversations with this kind of assignment. One of: `me` — Assigned to the caller; `unassigned` — Not assigned to an agent; `assigned` — Assigned to an agent; `new` — With unread incoming messages; `all` — Every conversation — the same as leaving it out. | | `inbox_id` | query | integer | No | Count only conversations of this inbox. Example: `32`. | | `team_id` | query | integer | No | Count only conversations of this team. | | `labels[]` | query | array of string | No | Count only conversations that have **any** of these labels (label titles). Repeat the parameter for each label: `labels[]=vip&labels[]=billing`. | | `source_id` | query | string | No | Count only conversations of the contact inbox with this source ID — for example the contact's phone number in a WhatsApp inbox. | | `conversation_type` | query | string | No | Count only conversations of this kind. One of: `mention` — The caller was mentioned in the conversation. This also marks those mentions as read; `participating` — The caller is a participant of the conversation; `unattended` — Unattended conversations. | | `q` | query | string | No | Count only conversations with an incoming or outgoing message that contains this text. | | `page` | query | integer | No | The page of the list that `total` and `last_page` describe, 25 conversations per page. Default: `1`. | ## Responses ### 200 — The counts. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `meta` | object | An object containing the counts of the conversations that match the filters. `mine_count`, `assigned_count`, `unassigned_count` and `all_count` are the counts for the assignee tabs, using every filter except `assignee_type`. | | `meta.mine_count` | integer | The number of conversations that have been assigned to the user (the caller). Uses every filter except `assignee_type`. | | `meta.new_count` | integer | The number of new conversations — conversations with unread incoming messages. | | `meta.assigned_count` | integer | The number of conversations that have been assigned to an agent. Uses every filter except `assignee_type`. | | `meta.unassigned_count` | integer | The number of unassigned conversations (no agent). Uses every filter except `assignee_type`. | | `meta.all_count` | integer | The number of all the conversations. Uses every filter except `assignee_type`. | | `meta.active_status_count` | integer | The number of active conversations — `open` (Bot) plus `pending` (Manual). | | `meta.resolved_status_count` | integer | The number of resolved conversations. | | `meta.pending_status_count` | integer | The number of pending (Manual) conversations. | | `meta.snoozed_status_count` | integer | The number of snoozed conversations. | | `meta.all_status_count` | integer | The number of conversations in every status. | | `meta.last_page` | boolean | `true` on the last page. | | `meta.total` | integer | The number of items (conversations) on **this page**. | #### Example: Whole account No filters — every conversation the caller can see. ```json { "meta": { "mine_count": 1, "new_count": 1, "assigned_count": 1, "unassigned_count": 3, "all_count": 4, "active_status_count": 4, "resolved_status_count": 0, "pending_status_count": 1, "snoozed_status_count": 0, "all_status_count": 4, "last_page": true, "total": 4 } } ``` #### Example: Bot conversations of one inbox `status=open&inbox_id=32`. ```json { "meta": { "mine_count": 0, "new_count": 0, "assigned_count": 0, "unassigned_count": 1, "all_count": 1, "active_status_count": 1, "resolved_status_count": 0, "pending_status_count": 0, "snoozed_status_count": 0, "all_status_count": 1, "last_page": true, "total": 1 } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` --- # Search Conversations Source: https://docs.99digital.co.il/online-api/conversations/search-conversations Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/search-conversations.md Section: Online API › Conversations `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/search` Returns conversations that have an incoming or outgoing message whose text contains the search text (case-insensitive). The search text is the `q` parameter. You can narrow the search with the filters of [List Conversations](https://docs.99digital.co.il/online-api/conversations/list-conversations) (`status`, `inbox_id`, …). | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/conversations/search` | | **Authorization** | User token. | **Permissions:** - User token: any agent of the account. Only the conversations the caller may see are returned — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | **Query parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `q` | string | Yes | Text to search for in message content. | | `page` | integer | No | Page number (25 per page). | | Other | | No | Any filter of [List Conversations](https://docs.99digital.co.il/online-api/conversations/list-conversations) (`status`, `inbox_id`, ...). | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/search?q=where%20is%20my%20order&page=1' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`): `{"meta": {...same counts as in List Conversations...}, "payload": [ ...conversation objects... ]}`. Here it returned one conversation, `1501`. Unlike [List Conversations](https://docs.99digital.co.il/online-api/conversations/list-conversations), the response is **not** wrapped in `data`: `meta` and `payload` are at the top level. The conversation is shortened; each item is a full conversation object. ```json { "meta": { "mine_count": 0, "new_count": 1, "assigned_count": 0, "unassigned_count": 1, "all_count": 1, "active_status_count": 1, "resolved_status_count": 0, "pending_status_count": 0, "snoozed_status_count": 0, "all_status_count": 1, "last_page": true, "total": 1 }, "payload": [ { "id": 1501, "inbox_id": 31, "status": "open", "priority": null, "labels": ["vip"], "unread_count": 1, "last_activity_at": 1794471300 } ] } ``` ## Remarks - The same `GET` URL under `/conversations` can be called at most 10 times per minute from one IP address; above that the answer is `429`. See [Rate limits](https://docs.99digital.co.il/online-api/getting-started#rate-limits). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `q` | query | string | Yes | The text to look for in the messages. Example: `where is my order`. | | `page` | query | integer | No | The page number, 25 conversations per page. Default: `1`. | | `status` | query | string | No | Only conversations with this status — the values of [List Conversations](https://docs.99digital.co.il/online-api/conversations/list-conversations). Every filter of that endpoint works here too. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Snoozed; `resolved` — Resolved; `!resolved` — Bot and Manual (`open` and `pending`); `all` — Every status. | | `assignee_type` | query | string | No | Only conversations with this kind of assignment. One of: `me` — Assigned to the caller; `unassigned` — Not assigned to an agent; `assigned` — Assigned to an agent; `new` — With unread incoming messages; `all` — Every conversation — the same as leaving it out. | | `inbox_id` | query | integer | No | Only conversations of this inbox. | | `team_id` | query | integer | No | Only conversations of this team. | | `labels[]` | query | array of string | No | Only conversations that have **any** of these labels (label titles). Repeat the parameter for each label. | ## Responses ### 200 — The matching conversations on this page, and the counts. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `meta` | object | An object containing the counts of the conversations that match the filters. `mine_count`, `assigned_count`, `unassigned_count` and `all_count` are the counts for the assignee tabs, using every filter except `assignee_type`. | | `meta.mine_count` | integer | The number of conversations that have been assigned to the user (the caller). Uses every filter except `assignee_type`. | | `meta.new_count` | integer | The number of new conversations — conversations with unread incoming messages. | | `meta.assigned_count` | integer | The number of conversations that have been assigned to an agent. Uses every filter except `assignee_type`. | | `meta.unassigned_count` | integer | The number of unassigned conversations (no agent). Uses every filter except `assignee_type`. | | `meta.all_count` | integer | The number of all the conversations. Uses every filter except `assignee_type`. | | `meta.active_status_count` | integer | The number of active conversations — `open` (Bot) plus `pending` (Manual). | | `meta.resolved_status_count` | integer | The number of resolved conversations. | | `meta.pending_status_count` | integer | The number of pending (Manual) conversations. | | `meta.snoozed_status_count` | integer | The number of snoozed conversations. | | `meta.all_status_count` | integer | The number of conversations in every status. | | `meta.last_page` | boolean | `true` on the last page. | | `meta.total` | integer | The number of items (conversations) on **this page**. | | `payload` | array of object | The matching conversations on this page. | | `payload[].id` | integer | The conversation's numeric ID: its display ID, used in every path and shown in the dashboard URL. | | `payload[].uuid` | string | A globally unique ID of the conversation. | | `payload[].account_id` | integer | The numeric ID of the account. | | `payload[].inbox_id` | integer | The numeric ID of the inbox. | | `payload[].status` | string | The status of the conversation. The status names in the API differ from the labels in the dashboard: the dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Hidden until `snoozed_until`, then reopened; `resolved` — Closed. | | `payload[].priority` | string \| null | The priority of the conversation, or `null` when none is set. One of: `low` — Low priority; `medium` — Medium priority; `high` — High priority; `urgent` — Urgent — the highest priority; `null` — No priority is set. | | `payload[].labels` | array of string | Array of strings — the titles of the conversation's labels. | | `payload[].custom_attributes` | object | Object containing the custom attributes related to the conversation (custom attribute keys and their values). | | `payload[].additional_attributes` | object | Object containing the additional attributes related to the conversation: channel or system data, such as `mail_subject`, `source` or `transcript_lmi`. | | `payload[].meta` | object | Object containing the conversation's metadata — its people and channel. | | `payload[].meta.sender` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].meta.sender.id` | integer | The contact's numeric ID. | | `payload[].meta.sender.name` | string | The full name of the contact. | | `payload[].meta.sender.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload[].meta.sender.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload[].meta.sender.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload[].meta.sender.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload[].meta.sender.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload[].meta.sender.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload[].meta.sender.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload[].meta.sender.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload[].meta.sender.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload[].meta.sender.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload[].meta.sender.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload[].meta.sender.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload[].meta.sender.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload[].meta.sender.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].meta.sender.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload[].meta.sender.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload[].meta.sender.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload[].meta.sender.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload[].meta.sender.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload[].meta.sender.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].meta.sender.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload[].meta.sender.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload[].meta.sender.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload[].meta.sender.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload[].meta.sender.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | | `payload[].meta.assignee` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `payload[].meta.assignee.id` | integer | The agent's numeric ID (user ID). | | `payload[].meta.assignee.account_id` | integer | The numeric ID of the account. | | `payload[].meta.assignee.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `payload[].meta.assignee.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `payload[].meta.assignee.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `payload[].meta.assignee.email` | string | The agent's login email address. | | `payload[].meta.assignee.available_name` | string | The agent's display name. | | `payload[].meta.assignee.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `payload[].meta.assignee.name` | string | The agent's full name. | | `payload[].meta.assignee.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `payload[].meta.assignee.operation_bot` | boolean | `true` for internal operation-bot users. | | `payload[].meta.assignee.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `payload[].meta.assignee.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `payload[].meta.assignee.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `payload[].meta.assignee.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `payload[].meta.assignee.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `payload[].meta.assignee.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `payload[].meta.assignee.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `payload[].meta.assignee.email1` | string \| null | The email address that receives two-factor codes by email. | | `payload[].meta.assignee.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `payload[].meta.team` | object | Object containing the assigned team's data, if a team is assigned. | | `payload[].meta.team.id` | integer | The numeric ID of the team. | | `payload[].meta.team.name` | string | The name of the team. Stored in lower case, and unique in the account. | | `payload[].meta.team.description` | string | The description of the team. | | `payload[].meta.team.allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `payload[].meta.team.account_id` | integer | The numeric ID of the account. | | `payload[].meta.team.members_count` | integer | The number of agents in the team. | | `payload[].meta.team.is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | | `payload[].meta.channel` | string | The channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].meta.hmac_verified` | boolean | Whether the contact's identity was HMAC-verified (website widget). | | `payload[].contact_inbox` | object | The contact's link (contact inbox) to the conversation's inbox. | | `payload[].contact_inbox.wa_id` | string \| null | The contact's WhatsApp ID in this inbox, for WhatsApp users who hide their phone number; otherwise `null`. | | `payload[].messages` | array of object | Array of message objects — the **last** message only. Use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. | | `payload[].messages[].id` | integer | The numeric ID of the message. | | `payload[].messages[].content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `payload[].messages[].inbox_id` | integer | The numeric ID of the inbox. | | `payload[].messages[].conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `payload[].messages[].message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `payload[].messages[].content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `payload[].messages[].content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `payload[].messages[].private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `payload[].messages[].status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `payload[].messages[].status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `payload[].messages[].source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `payload[].messages[].echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `payload[].messages[].sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `payload[].messages[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `payload[].messages[].sender.name` | string | The sender's name. | | `payload[].messages[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `payload[].messages[].sender.available_name` | string | An agent's display name. | | `payload[].messages[].sender.email` | string \| null | The sender's email address. | | `payload[].messages[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `payload[].messages[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `payload[].messages[].sender.avatar_url` | string | An agent's avatar image URL. | | `payload[].messages[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `payload[].messages[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `payload[].messages[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `payload[].messages[].sender.blocked` | boolean | Whether a contact is blocked. | | `payload[].messages[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `payload[].messages[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `payload[].messages[].sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `payload[].messages[].sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `payload[].messages[].attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `payload[].messages[].attachments[].id` | integer | The numeric ID of the file (attachment). | | `payload[].messages[].attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `payload[].messages[].attachments[].account_id` | integer | The numeric ID of the account. | | `payload[].messages[].attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `payload[].messages[].attachments[].filename` | string | The name of the file. | | `payload[].messages[].attachments[].extension` | string \| null | The file extension, when known. | | `payload[].messages[].attachments[].data_url` | string | The URL of the file. | | `payload[].messages[].attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `payload[].messages[].attachments[].file_size` | integer | The file size, in bytes. | | `payload[].messages[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `payload[].messages[].delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `payload[].messages[].created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `payload[].messages[].created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `payload[].last_non_activity_message` | object | A message in a conversation. Outgoing messages are delivered to the contact through the inbox's channel (WhatsApp, SMS, email, Facebook, API webhook, and so on). | | `payload[].last_non_activity_message.id` | integer | The numeric ID of the message. | | `payload[].last_non_activity_message.content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `payload[].last_non_activity_message.inbox_id` | integer | The numeric ID of the inbox. | | `payload[].last_non_activity_message.conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `payload[].last_non_activity_message.message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `payload[].last_non_activity_message.content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `payload[].last_non_activity_message.content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `payload[].last_non_activity_message.private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `payload[].last_non_activity_message.status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `payload[].last_non_activity_message.status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `payload[].last_non_activity_message.source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `payload[].last_non_activity_message.echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `payload[].last_non_activity_message.sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `payload[].last_non_activity_message.sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `payload[].last_non_activity_message.sender.name` | string | The sender's name. | | `payload[].last_non_activity_message.sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `payload[].last_non_activity_message.sender.available_name` | string | An agent's display name. | | `payload[].last_non_activity_message.sender.email` | string \| null | The sender's email address. | | `payload[].last_non_activity_message.sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `payload[].last_non_activity_message.sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `payload[].last_non_activity_message.sender.avatar_url` | string | An agent's avatar image URL. | | `payload[].last_non_activity_message.sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `payload[].last_non_activity_message.sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `payload[].last_non_activity_message.sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `payload[].last_non_activity_message.sender.blocked` | boolean | Whether a contact is blocked. | | `payload[].last_non_activity_message.sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `payload[].last_non_activity_message.sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `payload[].last_non_activity_message.sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `payload[].last_non_activity_message.sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `payload[].last_non_activity_message.attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `payload[].last_non_activity_message.attachments[].id` | integer | The numeric ID of the file (attachment). | | `payload[].last_non_activity_message.attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `payload[].last_non_activity_message.attachments[].account_id` | integer | The numeric ID of the account. | | `payload[].last_non_activity_message.attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `payload[].last_non_activity_message.attachments[].filename` | string | The name of the file. | | `payload[].last_non_activity_message.attachments[].extension` | string \| null | The file extension, when known. | | `payload[].last_non_activity_message.attachments[].data_url` | string | The URL of the file. | | `payload[].last_non_activity_message.attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `payload[].last_non_activity_message.attachments[].file_size` | integer | The file size, in bytes. | | `payload[].last_non_activity_message.ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `payload[].last_non_activity_message.delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `payload[].last_non_activity_message.created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `payload[].last_non_activity_message.created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `payload[].can_reply` | boolean | Whether the conversation is currently within the messaging window: `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window). | | `payload[].muted` | boolean | Whether the conversation is currently muted. A muted conversation does not notify agents. | | `payload[].snoozed_until` | integer \| null | The time at which a snoozed conversation is reactivated (reopened), in **milliseconds** since the Unix epoch, or `null`. | | `payload[].unread_count` | integer | The number of unread messages — incoming messages the agents have not read. | | `payload[].has_incoming_messages` | boolean | Whether the contact has written at least one public message. | | `payload[].created_at` | integer | The time at which the conversation was created, measured in seconds since the Unix epoch. | | `payload[].timestamp` | integer | The same as `last_activity_at`. | | `payload[].last_activity_at` | integer | The time of the conversation's last activity (Unix timestamp, in seconds). | | `payload[].first_reply_created_at` | integer | The time at which the first reply was sent to the contact (Unix timestamp, in seconds), or `0` when there is none yet. | | `payload[].waiting_since` | integer | Since when the contact has been waiting for a reply (Unix timestamp, in seconds), or `0`. | | `payload[].agent_last_seen_at` | integer | The last time an agent saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `payload[].assignee_last_seen_at` | integer | The last time the assignee saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `payload[].contact_last_seen_at` | integer | The last time the contact interacted with your service — when they last saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `payload[].last_incoming_message_time` | string \| null | The time of the last incoming message (ISO 8601), or `null`. | | `payload[].sla_policy_id` | integer \| null | The ID of the applied SLA policy, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `payload[].applied_sla` | object \| null | The applied SLA policy's details and thresholds, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `payload[].sla_events` | array of object | The SLA events of the conversation (missed thresholds). | | `payload[].sla_events_with_distinct_event_type` | array of object | The SLA events, one per event type. | | `payload[].feature_enabled_sla` | boolean | Whether the account uses SLA policies (the SLA feature is enabled). | | `payload[].campaign_id` | integer \| null | The ID of the campaign that started the conversation, or `null`. | | `payload[].pinned` | boolean | Whether the caller pinned this conversation. | | `payload[].file` | object | `{url, file_type}` when a file is attached to the conversation itself (rare). | #### Example: One match `q=where is my order` found one conversation. It is shortened here; each item is a full conversation object. ```json { "meta": { "mine_count": 0, "new_count": 1, "assigned_count": 0, "unassigned_count": 1, "all_count": 1, "active_status_count": 1, "resolved_status_count": 0, "pending_status_count": 0, "snoozed_status_count": 0, "all_status_count": 1, "last_page": true, "total": 1 }, "payload": [ { "id": 1501, "inbox_id": 31, "status": "open", "priority": null, "labels": [ "vip" ], "unread_count": 1, "last_activity_at": 1794471300 } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 429 — The same URL was requested more than 10 times in a minute from this IP address. See [Rate limits](https://docs.99digital.co.il/online-api/getting-started#rate-limits). --- # Filter Conversations Source: https://docs.99digital.co.il/online-api/conversations/filter-conversations Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/filter-conversations.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/filter` Advanced filtering with conditions, in the same format as Filter Contacts; results are sorted by last activity, 25 per page. Send the conditions in `payload`. Each condition compares one attribute with `values`, and is joined to the **next** condition by its `query_operator` (`and` or `or`); the last condition has `query_operator: null`. The format is the same as in [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts). | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/conversations/filter` | | **Authorization** | User token. Only visible conversations are returned. | **Permissions:** - User token: any agent of the account — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | **Query parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | No | Page number (25 per page). | | `assignee_type` | string | No | `me` (assigned to the caller), `unassigned`, `assigned`, `new` (with unread incoming messages). | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `payload[].attribute_key` | string | Yes | Attribute (table below) or the key of a **conversation** custom attribute. | | `payload[].filter_operator` | string | Yes | Operator (table below). | | `payload[].values` | array | Yes | Values. `equal_to` on `status`, `inbox_id` and `labels` accepts several values (match any). Send `[]` for `is_present` / `is_not_present`. | | `payload[].query_operator` | string | Yes | `and` / `or` to the next condition; `null` on the last one. Any other value returns `422`. | **Filterable attributes** | `attribute_key` | Operators | Values | | --- | --- | --- | | `status` | `equal_to`, `not_equal_to` | `open`, `pending`, `snoozed`, `resolved`, `!resolved` (= `open`, `pending`, `snoozed`), `all` | | `assignee_id`, `contact_id`, `inbox_id`, `team_id`, `display_id`, `campaign_id` | `equal_to`, `not_equal_to`, `is_present`, `is_not_present` | IDs | | `labels` | `equal_to` (has any), `not_equal_to` (has none), `is_present`, `is_not_present` | Label titles | | `browser_language`, `conversation_language`, `country_code`, `referer`, `mail_subject` | `equal_to`, `not_equal_to`, `contains`, `does_not_contain` | Text (stored in `additional_attributes`) | | `created_at`, `last_activity_at` | `is_greater_than`, `is_less_than`, `days_before` | `YYYY-MM-DD`, or a number of days for `days_before` | `attribute_key` can also be the key of a **conversation** custom attribute defined in Settings → Custom attributes. :::warning An unsupported operator or an unknown custom attribute key makes that condition be **silently ignored** (for example `contains` on `labels`, or a custom attribute that is not defined in Settings → Custom attributes), so the filter returns more conversations than you expect. Check your conditions against the table. ::: **Example request**: Bot or Manual conversations in inbox 31 that have the label `vip`. ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/filter?page=1' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "payload": [ { "attribute_key": "status", "filter_operator": "equal_to", "values": ["open", "pending"], "query_operator": "and" }, { "attribute_key": "inbox_id", "filter_operator": "equal_to", "values": [31], "query_operator": "and" }, { "attribute_key": "labels", "filter_operator": "equal_to", "values": ["vip"], "query_operator": null } ] }' ``` **Example response** (`200 OK`). The conversation is shortened to its `id`; each item is a full conversation object. ```json { "meta": { "mine_count": 0, "new_count": 1, "assigned_count": 0, "unassigned_count": 1, "all_count": 1, "last_page": true }, "payload": [ { "id": 1501 } ] } ``` **Error responses** | Status | When | Body | | --- | --- | --- | | `422` | A `query_operator` is not `and`, `or` or `null`. | `{"error": "Query operator must be either \"AND\" or \"OR\"."}` | ## Remarks - Here `!resolved` means `open`, `pending` and `snoozed`. In the `status` parameter of [List Conversations](https://docs.99digital.co.il/online-api/conversations/list-conversations) it means only `open` and `pending`. - The status names differ from the dashboard: `open` is **Bot** and `pending` is **Manual**. See [Statuses](https://docs.99digital.co.il/online-api/conversations/conversation-basics#statuses). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `page` | query | integer | No | The page number, 25 conversations per page. Default: `1`. Example: `1`. | | `assignee_type` | query | string | No | Only conversations with this kind of assignment. One of: `me` — Assigned to the caller; `unassigned` — Not assigned to an agent; `assigned` — Assigned to an agent; `new` — With unread incoming messages. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `payload` | array of object | Yes | The conditions, in order. | | `payload[].attribute_key` | string | Yes | The attribute to compare — one from the table above, or the key of a conversation custom attribute. Example: `status`. | | `payload[].filter_operator` | string | Yes | The comparison. The table above lists the operators each attribute supports. One of: `equal_to` — The attribute equals the value. On `status`, `inbox_id` and `labels`, it matches any of several values (for `labels`: the conversation has any of the labels); `not_equal_to` — The attribute does not equal the value (for `labels`: the conversation has none of the labels); `contains` — The text attribute contains the value; `does_not_contain` — The text attribute does not contain the value; `is_present` — The attribute has a value. Send `values` as `[]`; `is_not_present` — The attribute is empty. Send `values` as `[]`; `is_greater_than` — The date is after the value (`YYYY-MM-DD`); `is_less_than` — The date is before the value (`YYYY-MM-DD`); `days_before` — The date is more than the given number of days ago. Example: `equal_to`. | | `payload[].values` | array of string \| integer | Yes | The values to compare with: IDs, label titles, text, a date (`YYYY-MM-DD`) or a number of days. `equal_to` on `status`, `inbox_id` and `labels` matches any of several values. Send `[]` for `is_present` and `is_not_present`. | | `payload[].query_operator` | string \| null | Yes | How this condition joins the next one: `and` or `or`. `null` on the last condition. Any other value returns `422`. One of: `and` — Both this condition and the next one must match; `or` — This condition or the next one must match; `null` — This is the last condition. | ### Example: One condition The Bot conversations. ```json { "payload": [ { "attribute_key": "status", "filter_operator": "equal_to", "values": [ "open" ], "query_operator": null } ] } ``` ### Example: Several conditions Bot or Manual conversations in inbox 31 that have the label vip. ```json { "payload": [ { "attribute_key": "status", "filter_operator": "equal_to", "values": [ "open", "pending" ], "query_operator": "and" }, { "attribute_key": "inbox_id", "filter_operator": "equal_to", "values": [ 31 ], "query_operator": "and" }, { "attribute_key": "labels", "filter_operator": "equal_to", "values": [ "vip" ], "query_operator": null } ] } ``` ### Example: Recent activity Conversations with activity after a date. ```json { "payload": [ { "attribute_key": "last_activity_at", "filter_operator": "is_greater_than", "values": [ "2026-11-11" ], "query_operator": null } ] } ``` ## Responses ### 200 — The matching conversations on this page, and the counts. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `meta` | object | Counts of the matching conversations. | | `meta.mine_count` | integer | Assigned to the caller. | | `meta.new_count` | integer | With unread incoming messages. | | `meta.assigned_count` | integer | Assigned to an agent. | | `meta.unassigned_count` | integer | Not assigned to an agent. | | `meta.all_count` | integer | All the matching conversations. | | `meta.last_page` | boolean | `true` on the last page. | | `payload` | array of object | The matching conversations on this page. | | `payload[].id` | integer | The conversation's numeric ID: its display ID, used in every path and shown in the dashboard URL. | | `payload[].uuid` | string | A globally unique ID of the conversation. | | `payload[].account_id` | integer | The numeric ID of the account. | | `payload[].inbox_id` | integer | The numeric ID of the inbox. | | `payload[].status` | string | The status of the conversation. The status names in the API differ from the labels in the dashboard: the dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Hidden until `snoozed_until`, then reopened; `resolved` — Closed. | | `payload[].priority` | string \| null | The priority of the conversation, or `null` when none is set. One of: `low` — Low priority; `medium` — Medium priority; `high` — High priority; `urgent` — Urgent — the highest priority; `null` — No priority is set. | | `payload[].labels` | array of string | Array of strings — the titles of the conversation's labels. | | `payload[].custom_attributes` | object | Object containing the custom attributes related to the conversation (custom attribute keys and their values). | | `payload[].additional_attributes` | object | Object containing the additional attributes related to the conversation: channel or system data, such as `mail_subject`, `source` or `transcript_lmi`. | | `payload[].meta` | object | Object containing the conversation's metadata — its people and channel. | | `payload[].meta.sender` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].meta.sender.id` | integer | The contact's numeric ID. | | `payload[].meta.sender.name` | string | The full name of the contact. | | `payload[].meta.sender.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload[].meta.sender.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload[].meta.sender.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload[].meta.sender.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload[].meta.sender.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload[].meta.sender.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload[].meta.sender.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload[].meta.sender.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload[].meta.sender.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload[].meta.sender.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload[].meta.sender.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload[].meta.sender.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload[].meta.sender.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload[].meta.sender.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].meta.sender.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload[].meta.sender.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload[].meta.sender.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload[].meta.sender.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload[].meta.sender.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload[].meta.sender.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].meta.sender.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload[].meta.sender.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload[].meta.sender.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload[].meta.sender.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload[].meta.sender.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | | `payload[].meta.assignee` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `payload[].meta.assignee.id` | integer | The agent's numeric ID (user ID). | | `payload[].meta.assignee.account_id` | integer | The numeric ID of the account. | | `payload[].meta.assignee.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `payload[].meta.assignee.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `payload[].meta.assignee.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `payload[].meta.assignee.email` | string | The agent's login email address. | | `payload[].meta.assignee.available_name` | string | The agent's display name. | | `payload[].meta.assignee.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `payload[].meta.assignee.name` | string | The agent's full name. | | `payload[].meta.assignee.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `payload[].meta.assignee.operation_bot` | boolean | `true` for internal operation-bot users. | | `payload[].meta.assignee.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `payload[].meta.assignee.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `payload[].meta.assignee.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `payload[].meta.assignee.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `payload[].meta.assignee.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `payload[].meta.assignee.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `payload[].meta.assignee.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `payload[].meta.assignee.email1` | string \| null | The email address that receives two-factor codes by email. | | `payload[].meta.assignee.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `payload[].meta.team` | object | Object containing the assigned team's data, if a team is assigned. | | `payload[].meta.team.id` | integer | The numeric ID of the team. | | `payload[].meta.team.name` | string | The name of the team. Stored in lower case, and unique in the account. | | `payload[].meta.team.description` | string | The description of the team. | | `payload[].meta.team.allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `payload[].meta.team.account_id` | integer | The numeric ID of the account. | | `payload[].meta.team.members_count` | integer | The number of agents in the team. | | `payload[].meta.team.is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | | `payload[].meta.channel` | string | The channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].meta.hmac_verified` | boolean | Whether the contact's identity was HMAC-verified (website widget). | | `payload[].contact_inbox` | object | The contact's link (contact inbox) to the conversation's inbox. | | `payload[].contact_inbox.wa_id` | string \| null | The contact's WhatsApp ID in this inbox, for WhatsApp users who hide their phone number; otherwise `null`. | | `payload[].messages` | array of object | Array of message objects — the **last** message only. Use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. | | `payload[].messages[].id` | integer | The numeric ID of the message. | | `payload[].messages[].content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `payload[].messages[].inbox_id` | integer | The numeric ID of the inbox. | | `payload[].messages[].conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `payload[].messages[].message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `payload[].messages[].content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `payload[].messages[].content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `payload[].messages[].private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `payload[].messages[].status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `payload[].messages[].status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `payload[].messages[].source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `payload[].messages[].echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `payload[].messages[].sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `payload[].messages[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `payload[].messages[].sender.name` | string | The sender's name. | | `payload[].messages[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `payload[].messages[].sender.available_name` | string | An agent's display name. | | `payload[].messages[].sender.email` | string \| null | The sender's email address. | | `payload[].messages[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `payload[].messages[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `payload[].messages[].sender.avatar_url` | string | An agent's avatar image URL. | | `payload[].messages[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `payload[].messages[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `payload[].messages[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `payload[].messages[].sender.blocked` | boolean | Whether a contact is blocked. | | `payload[].messages[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `payload[].messages[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `payload[].messages[].sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `payload[].messages[].sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `payload[].messages[].attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `payload[].messages[].attachments[].id` | integer | The numeric ID of the file (attachment). | | `payload[].messages[].attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `payload[].messages[].attachments[].account_id` | integer | The numeric ID of the account. | | `payload[].messages[].attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `payload[].messages[].attachments[].filename` | string | The name of the file. | | `payload[].messages[].attachments[].extension` | string \| null | The file extension, when known. | | `payload[].messages[].attachments[].data_url` | string | The URL of the file. | | `payload[].messages[].attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `payload[].messages[].attachments[].file_size` | integer | The file size, in bytes. | | `payload[].messages[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `payload[].messages[].delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `payload[].messages[].created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `payload[].messages[].created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `payload[].last_non_activity_message` | object | A message in a conversation. Outgoing messages are delivered to the contact through the inbox's channel (WhatsApp, SMS, email, Facebook, API webhook, and so on). | | `payload[].last_non_activity_message.id` | integer | The numeric ID of the message. | | `payload[].last_non_activity_message.content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `payload[].last_non_activity_message.inbox_id` | integer | The numeric ID of the inbox. | | `payload[].last_non_activity_message.conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `payload[].last_non_activity_message.message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `payload[].last_non_activity_message.content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `payload[].last_non_activity_message.content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `payload[].last_non_activity_message.private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `payload[].last_non_activity_message.status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `payload[].last_non_activity_message.status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `payload[].last_non_activity_message.source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `payload[].last_non_activity_message.echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `payload[].last_non_activity_message.sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `payload[].last_non_activity_message.sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `payload[].last_non_activity_message.sender.name` | string | The sender's name. | | `payload[].last_non_activity_message.sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `payload[].last_non_activity_message.sender.available_name` | string | An agent's display name. | | `payload[].last_non_activity_message.sender.email` | string \| null | The sender's email address. | | `payload[].last_non_activity_message.sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `payload[].last_non_activity_message.sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `payload[].last_non_activity_message.sender.avatar_url` | string | An agent's avatar image URL. | | `payload[].last_non_activity_message.sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `payload[].last_non_activity_message.sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `payload[].last_non_activity_message.sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `payload[].last_non_activity_message.sender.blocked` | boolean | Whether a contact is blocked. | | `payload[].last_non_activity_message.sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `payload[].last_non_activity_message.sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `payload[].last_non_activity_message.sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `payload[].last_non_activity_message.sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `payload[].last_non_activity_message.attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `payload[].last_non_activity_message.attachments[].id` | integer | The numeric ID of the file (attachment). | | `payload[].last_non_activity_message.attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `payload[].last_non_activity_message.attachments[].account_id` | integer | The numeric ID of the account. | | `payload[].last_non_activity_message.attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `payload[].last_non_activity_message.attachments[].filename` | string | The name of the file. | | `payload[].last_non_activity_message.attachments[].extension` | string \| null | The file extension, when known. | | `payload[].last_non_activity_message.attachments[].data_url` | string | The URL of the file. | | `payload[].last_non_activity_message.attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `payload[].last_non_activity_message.attachments[].file_size` | integer | The file size, in bytes. | | `payload[].last_non_activity_message.ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `payload[].last_non_activity_message.delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `payload[].last_non_activity_message.created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `payload[].last_non_activity_message.created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `payload[].can_reply` | boolean | Whether the conversation is currently within the messaging window: `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window). | | `payload[].muted` | boolean | Whether the conversation is currently muted. A muted conversation does not notify agents. | | `payload[].snoozed_until` | integer \| null | The time at which a snoozed conversation is reactivated (reopened), in **milliseconds** since the Unix epoch, or `null`. | | `payload[].unread_count` | integer | The number of unread messages — incoming messages the agents have not read. | | `payload[].has_incoming_messages` | boolean | Whether the contact has written at least one public message. | | `payload[].created_at` | integer | The time at which the conversation was created, measured in seconds since the Unix epoch. | | `payload[].timestamp` | integer | The same as `last_activity_at`. | | `payload[].last_activity_at` | integer | The time of the conversation's last activity (Unix timestamp, in seconds). | | `payload[].first_reply_created_at` | integer | The time at which the first reply was sent to the contact (Unix timestamp, in seconds), or `0` when there is none yet. | | `payload[].waiting_since` | integer | Since when the contact has been waiting for a reply (Unix timestamp, in seconds), or `0`. | | `payload[].agent_last_seen_at` | integer | The last time an agent saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `payload[].assignee_last_seen_at` | integer | The last time the assignee saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `payload[].contact_last_seen_at` | integer | The last time the contact interacted with your service — when they last saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `payload[].last_incoming_message_time` | string \| null | The time of the last incoming message (ISO 8601), or `null`. | | `payload[].sla_policy_id` | integer \| null | The ID of the applied SLA policy, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `payload[].applied_sla` | object \| null | The applied SLA policy's details and thresholds, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `payload[].sla_events` | array of object | The SLA events of the conversation (missed thresholds). | | `payload[].sla_events_with_distinct_event_type` | array of object | The SLA events, one per event type. | | `payload[].feature_enabled_sla` | boolean | Whether the account uses SLA policies (the SLA feature is enabled). | | `payload[].campaign_id` | integer \| null | The ID of the campaign that started the conversation, or `null`. | | `payload[].pinned` | boolean | Whether the caller pinned this conversation. | | `payload[].file` | object | `{url, file_type}` when a file is attached to the conversation itself (rare). | #### Example: Several conditions The answer to the "Several conditions" request. The conversation is shortened to its `id`; each item is a full conversation object. ```json { "meta": { "mine_count": 0, "new_count": 1, "assigned_count": 0, "unassigned_count": 1, "all_count": 1, "last_page": true }, "payload": [ { "id": 1501 } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 422 — A `query_operator` is not `and`, `or` or `null`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Query operator must be either \"AND\" or \"OR\"." } ``` --- # Add Conversation Source: https://docs.99digital.co.il/online-api/conversations/add-conversation Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/add-conversation.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations` Create a new conversation in an account. Creating a conversation requires a source ID (or a contact — see below) in order to tie the session and the messages together. The source ID could be the phone number in case of a WhatsApp session, an identifier hash in case of a web widget, and the email address in case of an email channel. There are three ways to call this endpoint — one tab each under Request → Body: - **With `source_id`** — the contact is already linked to the inbox. The source ID comes from [Create Contact](https://docs.99digital.co.il/online-api/contacts/create-contact) (with `inbox_id`) or [Create Contact Inbox](https://docs.99digital.co.il/online-api/contacts/create-contact-inbox). - **With `contact_id`** — the contact's link to the inbox is created if it is missing. You can also set the initial status, the assignee, the team and attributes. - **One-shot, with `contact`** — the contact is found by phone number, email or `contact.id`, and created if it is missing; the conversation is reused or created; then `message` is sent. This is the mode used for outbound WhatsApp messages. On WhatsApp inboxes, send an approved template in `message.content_attributes.template_info` — see [Create a Message](https://docs.99digital.co.il/online-api/messages/create-a-message). `message` is sent as an outgoing message from the caller, and accepts every field of [Create a Message](https://docs.99digital.co.il/online-api/messages/create-a-message): attachments, `private`, `content_attributes.template_info`, and so on. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations` | | Method | JSON via POST | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token: the caller must be allowed to view the inbox. New rules system: **Inbox new message** for the inbox. Sending `message` also needs the permissions of [Create a Message](https://docs.99digital.co.il/online-api/messages/create-a-message) — **Inbox reply** for a reply. - Agent-bot token: allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | **Request body Parameters:** | Parameter | type | Description | Required | | --- | --- | --- | --- | | `inbox_id` | integer | ID of the inbox in which the conversation is created | Yes | | `source_id` | string | Conversation source ID: the source ID of the contact's existing link to the inbox (contact inbox) | Conditional — required unless you send `contact_id` or `contact` | | `status` | string | Conversation status. Enum: `open` (Bot, the default), `pending` (Manual), `snoozed`, `resolved` | No | | `contact_id` | integer | Contact ID for which the conversation is created. The contact's link to the inbox is created automatically if it is missing | Conditional | | `contact` | object | **One-shot mode**: find or create the contact and the conversation by `contact.phone_number` (or `contact.phone`, E.164), `contact.email` or `contact.id`, and send the message. `contact.name` names a new contact (default: the phone number or email) | Conditional | | `is_new_conversation` | boolean | One-shot mode only: always open a new conversation instead of reusing the contact's last conversation in the inbox | No | | `message` | object | The first message (`message.content` is its text), sent as an outgoing message from the caller. Accepts every field of Create a Message | No | | `assignee_id` | integer | Agent ID for assigning the conversation to an agent | No | | `team_id` | integer | Team ID for assigning the conversation to a team | No | | `snoozed_until` | string | With `status: snoozed`: when the conversation reopens | No | | `custom_attributes` | object | The object to save custom attributes for the conversation; accepts custom attribute keys and values | No | | `additional_attributes` | object | Lets you specify attributes like browser information | No | | `campaign_id` | integer | The campaign that started the conversation | No | :::info[Existing conversations are reused] If the contact's link to the inbox already has a conversation, the call does **not** create a new one. It returns the latest conversation of that contact inbox — in any status, even resolved — and adds `message` to it. `status`, `assignee_id` and the other conversation fields are then ignored. In WhatsApp API inboxes, where `contact_id` is required, the contact's existing conversation in the inbox is always reused. See [Conversation Basics](https://docs.99digital.co.il/online-api/conversations/conversation-basics). ::: **Request body example:** ```json { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b", "inbox_id": 31, "contact_id": 802, "additional_attributes": {}, "custom_attributes": { "attribute_key": "attribute_value" }, "status": "open", "assignee_id": 51, "team_id": 7 } ``` **Response:** The response is shortened here; the full conversation object, with the last message in `messages`, is under Responses below. ```json { "meta": { "sender": { "additional_attributes": {}, "availability_status": "offline", "email": "avi.levi@example.com", "id": 802, "name": "Avi Levi", "phone_number": "+972521234567", "identifier": "crm-802", "thumbnail": "", "custom_attributes": { "attribute_key": "attribute_value" }, "last_activity_at": 1794472200, "blocked": false, "created_at": 1794470600 }, "assignee": { "id": 51, "account_id": 12, "availability_status": "online", "auto_offline": true, "confirmed": true, "email": "jane.agent@example.com", "available_name": "Jane Agent", "name": "Jane Agent", "role": "agent", "see_all_conversations": true, "thumbnail": "" }, "channel": "Channel::Api", "hmac_verified": false }, "id": 1504, "account_id": 12, "additional_attributes": {}, "can_reply": true, "custom_attributes": { "attribute_key": "attribute_value" }, "inbox_id": 31, "muted": false, "status": "open", "created_at": 1794472200 } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `meta` | Object containing conversation-related data | | `meta -> sender` | Object containing the contact data | | `meta -> sender -> id` | Numeric ID of the contact | | `meta -> sender -> name` | Contact name | | `meta -> sender -> phone_number` | Contact phone number (E.164) | | `meta -> sender -> email` | Contact email address | | `meta -> sender -> availability_status` | Availability status of the contact. Enum: `online`, `offline` | | `meta -> sender -> identifier` | A unique identifier for the contact in an external system | | `meta -> sender -> thumbnail` | Avatar URL of the contact | | `meta -> sender -> custom_attributes` | Object containing custom attributes related to the contact | | `meta -> sender -> additional_attributes` | Object containing additional attributes related to the contact | | `meta -> sender -> last_activity_at` | Timestamp of the last activity (Unix time) | | `meta -> sender -> blocked` | Whether the contact is blocked | | `meta -> sender -> created_at` | Timestamp of the contact's creation time (Unix time) | | `meta -> channel` | Channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email` | | `meta -> assignee` | Object containing the assignee's details | | `meta -> assignee -> id` | Assignee ID | | `meta -> assignee -> account_id` | Numeric ID of the account | | `meta -> assignee -> availability_status` | The availability status of the assignee. Enum: `online`, `busy`, `offline` | | `meta -> assignee -> auto_offline` | Indicates whether the availability status of the agent is configured to go offline automatically when away | | `meta -> assignee -> confirmed` | Indicates whether the agent has been validated by clicking on the invitation email they received | | `meta -> assignee -> email` | Agent email address | | `meta -> assignee -> available_name` | Display name of the agent | | `meta -> assignee -> name` | Agent full name | | `meta -> assignee -> role` | Assignee role: the custom role's name (new rules system), or `agent` / `administrator` (legacy roles) | | `meta -> assignee -> see_all_conversations` | Indicates whether the assignee can see all conversations in the account | | `meta -> assignee -> thumbnail` | Assignee avatar URL | | `meta -> hmac_verified` | Whether the contact's identity was HMAC-verified (website widget) | | `id` | Numeric ID of the conversation (its display ID, used in every path) | | `account_id` | Numeric ID of the account | | `inbox_id` | Numeric ID of the inbox | | `status` | The status of the conversation. Enum: `open` (Bot), `pending` (Manual), `snoozed`, `resolved` | | `created_at` | The time at which the conversation was created (Unix time) | | `muted` | Whether the conversation is currently muted. A muted conversation does not notify agents | | `can_reply` | Whether the conversation is currently within the messaging window — `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window) | | `custom_attributes` | Object containing custom attributes related to the conversation | | `additional_attributes` | Object containing additional attributes related to the conversation | **Error responses** | Status | When | Body | | --- | --- | --- | | `404` | `inbox_id`, `contact_id` or `source_id` not found. | `{"error": "Resource could not be found"}` | | `403` | The role lacks **Inbox new message** / **Inbox reply** for the inbox. | `{"error": "You are not authorized to do this action"}` | | `422` | `source_id` already used by another contact inbox. | `{"error": "source_id should be unique"}` | | `422` | Only private notes are allowed in the inbox (incoming-calls API inbox). | `{"message": "Only private notes can be added in an incoming calls inbox", "attributes": ["base"]}` | ## Remarks - In one-shot mode, an unassigned conversation is assigned to the caller, unless the account uses queue management or `is_new_conversation` is `true`. - In one-shot mode, if the contact is blocked, the message is silently dropped. - The status names differ from the dashboard: `open` (the default) is **Bot** and `pending` is **Manual**. See [Statuses](https://docs.99digital.co.il/online-api/conversations/conversation-basics#statuses). - A new conversation fires the `conversation_created` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `inbox_id` | integer | Yes | The inbox to create the conversation in. Example: `31`. | | `source_id` | string | No | The source ID of the contact's existing link to the inbox (its contact inbox), which ties the conversation and its messages to the contact on that channel: the phone number in a WhatsApp inbox, the email address in an email inbox, or a generated identifier in API and website inboxes. Required unless you send `contact_id` or `contact`. Example: `5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b`. | | `contact_id` | integer | No | The contact. Its link to the inbox is created if it is missing. Required unless you send `source_id` or `contact`. Example: `802`. | | `contact` | object | No | One-shot mode: find the contact — or create it — by phone number, email or ID, then find or create the conversation and send `message`. Required unless you send `source_id` or `contact_id`. | | `contact.phone_number` | string | No | The contact's phone number in E.164 format. You can send it as `phone` instead. Send `phone_number`, `email` or `id`. Example: `+972531234567`. | | `contact.phone` | string | No | The same as `phone_number`. | | `contact.email` | string | No | The contact's email. | | `contact.id` | integer | No | The ID of an existing contact. | | `contact.name` | string | No | The name of a new contact. Defaults to the phone number or email. Example: `Noa Mizrahi`. | | `is_new_conversation` | boolean | No | One-shot mode only: always open a new conversation, instead of reusing the contact's last conversation in the inbox. | | `message` | object | No | The first message, sent as an outgoing message from the caller. Accepts every field of [Create a Message](https://docs.99digital.co.il/online-api/messages/create-a-message). | | `message.content` | string | No | The message text. Example: `We received your request.`. | | `message.private` | boolean | No | `true` to add a private note instead of a reply. | | `message.content_attributes` | object | No | Extra data for the message — for example `template_info`, the approved WhatsApp template to send. See [Create a Message](https://docs.99digital.co.il/online-api/messages/create-a-message). | | `status` | string | No | The initial status. Ignored when an existing conversation is reused. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Snoozed until `snoozed_until`; `resolved` — Resolved. Default: `open`. | | `assignee_id` | integer | No | The agent to assign the conversation to. Example: `51`. | | `team_id` | integer | No | The team to assign the conversation to. | | `snoozed_until` | string | No | With `status` `snoozed`, when the conversation reopens. | | `custom_attributes` | object | No | The conversation's custom attributes, as key-value pairs. | | `additional_attributes` | object | No | Extra data to store on the conversation, such as browser information or the source of the conversation, as key-value pairs. | | `campaign_id` | integer | No | The campaign that started the conversation. | ### Example: With source_id The contact is already linked to the inbox. ```json { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b", "inbox_id": 31, "message": { "content": "Hello from the API." } } ``` ### Example: With contact_id A conversation in Manual status, assigned to an agent, with attributes. ```json { "inbox_id": 31, "contact_id": 802, "status": "pending", "assignee_id": 51, "custom_attributes": { "order_id": "A-1002" }, "additional_attributes": { "source": "crm" }, "message": { "content": "We received your request." } } ``` ### Example: One-shot by phone Find or create the contact by phone number, then send the message. ```json { "inbox_id": 31, "contact": { "phone_number": "+972531234567", "name": "Noa Mizrahi" }, "message": { "content": "Hi Noa, thanks for reaching out. How can we help?" } } ``` ## Responses ### 200 — The conversation — the new one, or the existing one that was reused. `messages` holds the last message. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The conversation's numeric ID: its display ID, used in every path and shown in the dashboard URL. | | `uuid` | string | A globally unique ID of the conversation. | | `account_id` | integer | The numeric ID of the account. | | `inbox_id` | integer | The numeric ID of the inbox. | | `status` | string | The status of the conversation. The status names in the API differ from the labels in the dashboard: the dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Hidden until `snoozed_until`, then reopened; `resolved` — Closed. | | `priority` | string \| null | The priority of the conversation, or `null` when none is set. One of: `low` — Low priority; `medium` — Medium priority; `high` — High priority; `urgent` — Urgent — the highest priority; `null` — No priority is set. | | `labels` | array of string | Array of strings — the titles of the conversation's labels. | | `custom_attributes` | object | Object containing the custom attributes related to the conversation (custom attribute keys and their values). | | `additional_attributes` | object | Object containing the additional attributes related to the conversation: channel or system data, such as `mail_subject`, `source` or `transcript_lmi`. | | `meta` | object | Object containing the conversation's metadata — its people and channel. | | `meta.sender` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `meta.sender.id` | integer | The contact's numeric ID. | | `meta.sender.name` | string | The full name of the contact. | | `meta.sender.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `meta.sender.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `meta.sender.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `meta.sender.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `meta.sender.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `meta.sender.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `meta.sender.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `meta.sender.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `meta.sender.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `meta.sender.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `meta.sender.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `meta.sender.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `meta.sender.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `meta.sender.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `meta.sender.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `meta.sender.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `meta.sender.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `meta.sender.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `meta.sender.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `meta.sender.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `meta.sender.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `meta.sender.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `meta.sender.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `meta.sender.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `meta.sender.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | | `meta.assignee` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `meta.assignee.id` | integer | The agent's numeric ID (user ID). | | `meta.assignee.account_id` | integer | The numeric ID of the account. | | `meta.assignee.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `meta.assignee.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `meta.assignee.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `meta.assignee.email` | string | The agent's login email address. | | `meta.assignee.available_name` | string | The agent's display name. | | `meta.assignee.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `meta.assignee.name` | string | The agent's full name. | | `meta.assignee.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `meta.assignee.operation_bot` | boolean | `true` for internal operation-bot users. | | `meta.assignee.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `meta.assignee.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `meta.assignee.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `meta.assignee.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `meta.assignee.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `meta.assignee.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `meta.assignee.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `meta.assignee.email1` | string \| null | The email address that receives two-factor codes by email. | | `meta.assignee.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `meta.team` | object | Object containing the assigned team's data, if a team is assigned. | | `meta.team.id` | integer | The numeric ID of the team. | | `meta.team.name` | string | The name of the team. Stored in lower case, and unique in the account. | | `meta.team.description` | string | The description of the team. | | `meta.team.allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `meta.team.account_id` | integer | The numeric ID of the account. | | `meta.team.members_count` | integer | The number of agents in the team. | | `meta.team.is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | | `meta.channel` | string | The channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `meta.hmac_verified` | boolean | Whether the contact's identity was HMAC-verified (website widget). | | `contact_inbox` | object | The contact's link (contact inbox) to the conversation's inbox. | | `contact_inbox.wa_id` | string \| null | The contact's WhatsApp ID in this inbox, for WhatsApp users who hide their phone number; otherwise `null`. | | `messages` | array of object | Array of message objects — the **last** message only. Use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. | | `messages[].id` | integer | The numeric ID of the message. | | `messages[].content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `messages[].inbox_id` | integer | The numeric ID of the inbox. | | `messages[].conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `messages[].message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `messages[].content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `messages[].content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `messages[].private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `messages[].status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `messages[].status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `messages[].source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `messages[].echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `messages[].sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `messages[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `messages[].sender.name` | string | The sender's name. | | `messages[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `messages[].sender.available_name` | string | An agent's display name. | | `messages[].sender.email` | string \| null | The sender's email address. | | `messages[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `messages[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `messages[].sender.avatar_url` | string | An agent's avatar image URL. | | `messages[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `messages[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `messages[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `messages[].sender.blocked` | boolean | Whether a contact is blocked. | | `messages[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `messages[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `messages[].sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `messages[].sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `messages[].attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `messages[].attachments[].id` | integer | The numeric ID of the file (attachment). | | `messages[].attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `messages[].attachments[].account_id` | integer | The numeric ID of the account. | | `messages[].attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `messages[].attachments[].filename` | string | The name of the file. | | `messages[].attachments[].extension` | string \| null | The file extension, when known. | | `messages[].attachments[].data_url` | string | The URL of the file. | | `messages[].attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `messages[].attachments[].file_size` | integer | The file size, in bytes. | | `messages[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `messages[].delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `messages[].created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `messages[].created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `last_non_activity_message` | object | A message in a conversation. Outgoing messages are delivered to the contact through the inbox's channel (WhatsApp, SMS, email, Facebook, API webhook, and so on). | | `last_non_activity_message.id` | integer | The numeric ID of the message. | | `last_non_activity_message.content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `last_non_activity_message.inbox_id` | integer | The numeric ID of the inbox. | | `last_non_activity_message.conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `last_non_activity_message.message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `last_non_activity_message.content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `last_non_activity_message.content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `last_non_activity_message.private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `last_non_activity_message.status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `last_non_activity_message.status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `last_non_activity_message.source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `last_non_activity_message.echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `last_non_activity_message.sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `last_non_activity_message.sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `last_non_activity_message.sender.name` | string | The sender's name. | | `last_non_activity_message.sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `last_non_activity_message.sender.available_name` | string | An agent's display name. | | `last_non_activity_message.sender.email` | string \| null | The sender's email address. | | `last_non_activity_message.sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `last_non_activity_message.sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `last_non_activity_message.sender.avatar_url` | string | An agent's avatar image URL. | | `last_non_activity_message.sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `last_non_activity_message.sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `last_non_activity_message.sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `last_non_activity_message.sender.blocked` | boolean | Whether a contact is blocked. | | `last_non_activity_message.sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `last_non_activity_message.sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `last_non_activity_message.sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `last_non_activity_message.sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `last_non_activity_message.attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `last_non_activity_message.attachments[].id` | integer | The numeric ID of the file (attachment). | | `last_non_activity_message.attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `last_non_activity_message.attachments[].account_id` | integer | The numeric ID of the account. | | `last_non_activity_message.attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `last_non_activity_message.attachments[].filename` | string | The name of the file. | | `last_non_activity_message.attachments[].extension` | string \| null | The file extension, when known. | | `last_non_activity_message.attachments[].data_url` | string | The URL of the file. | | `last_non_activity_message.attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `last_non_activity_message.attachments[].file_size` | integer | The file size, in bytes. | | `last_non_activity_message.ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `last_non_activity_message.delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `last_non_activity_message.created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `last_non_activity_message.created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `can_reply` | boolean | Whether the conversation is currently within the messaging window: `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window). | | `muted` | boolean | Whether the conversation is currently muted. A muted conversation does not notify agents. | | `snoozed_until` | integer \| null | The time at which a snoozed conversation is reactivated (reopened), in **milliseconds** since the Unix epoch, or `null`. | | `unread_count` | integer | The number of unread messages — incoming messages the agents have not read. | | `has_incoming_messages` | boolean | Whether the contact has written at least one public message. | | `created_at` | integer | The time at which the conversation was created, measured in seconds since the Unix epoch. | | `timestamp` | integer | The same as `last_activity_at`. | | `last_activity_at` | integer | The time of the conversation's last activity (Unix timestamp, in seconds). | | `first_reply_created_at` | integer | The time at which the first reply was sent to the contact (Unix timestamp, in seconds), or `0` when there is none yet. | | `waiting_since` | integer | Since when the contact has been waiting for a reply (Unix timestamp, in seconds), or `0`. | | `agent_last_seen_at` | integer | The last time an agent saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `assignee_last_seen_at` | integer | The last time the assignee saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `contact_last_seen_at` | integer | The last time the contact interacted with your service — when they last saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `last_incoming_message_time` | string \| null | The time of the last incoming message (ISO 8601), or `null`. | | `sla_policy_id` | integer \| null | The ID of the applied SLA policy, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `applied_sla` | object \| null | The applied SLA policy's details and thresholds, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `sla_events` | array of object | The SLA events of the conversation (missed thresholds). | | `sla_events_with_distinct_event_type` | array of object | The SLA events, one per event type. | | `feature_enabled_sla` | boolean | Whether the account uses SLA policies (the SLA feature is enabled). | | `campaign_id` | integer \| null | The ID of the campaign that started the conversation, or `null`. | | `pinned` | boolean | Whether the caller pinned this conversation. | | `file` | object | `{url, file_type}` when a file is attached to the conversation itself (rare). | #### Example: With contact_id The answer to the "With contact_id" request: a new conversation in Manual status, assigned to Jane Agent. ```json { "meta": { "sender": { "additional_attributes": {}, "availability_status": "offline", "email": null, "id": 802, "name": "Avi Levi", "phone_number": "+972521234567", "identifier": null, "thumbnail": "", "custom_attributes": {}, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470600 }, "channel": "Channel::Api", "assignee": { "id": 51, "account_id": 12, "availability_status": "online", "auto_offline": true, "confirmed": true, "email": "jane.agent@example.com", "available_name": "Jane Agent", "custom_attributes": {}, "name": "Jane Agent", "role": "General Manager", "operation_bot": false, "see_all_conversations": true, "assignable_to_inbox": [ 31, 32, 33 ], "new_role": "General Manager", "thumbnail": "", "two_factor_type": "sms", "phone1": "+972541234567", "email1": null, "create_time": 1790000000 }, "hmac_verified": false }, "contact_inbox": { "wa_id": null }, "id": 1504, "messages": [ { "id": 40121, "content": "We received your request.", "inbox_id": 31, "conversation_id": 1504, "message_type": 1, "content_type": "text", "content_attributes": {}, "private": false, "status": "sent", "source_id": null, "sender": { "id": 51, "name": "Jane Agent", "available_name": "Jane Agent", "email": "jane.agent@example.com", "avatar_url": "", "type": "user", "availability_status": "online", "thumbnail": "" }, "ticket_id": 904, "created_at": 1794472200, "created_at_exact": "2026-11-12T08:30:00.000Z" } ], "account_id": 12, "uuid": "3c9e7b2a-5d1f-4a8e-b6c4-2f0e9d8c7b6a", "additional_attributes": { "source": "crm" }, "agent_last_seen_at": 0, "assignee_last_seen_at": 0, "can_reply": true, "last_incoming_message_time": null, "contact_last_seen_at": 0, "custom_attributes": { "order_id": "A-1002" }, "inbox_id": 31, "labels": [], "muted": false, "snoozed_until": null, "status": "pending", "created_at": 1794472200, "timestamp": 1794472200, "first_reply_created_at": 1794472200, "unread_count": 0, "has_incoming_messages": false, "last_non_activity_message": { "id": 40121, "content": "We received your request.", "inbox_id": 31, "conversation_id": 1504, "message_type": 1, "content_type": "text", "content_attributes": {}, "private": false, "status": "sent", "source_id": null, "sender": { "id": 51, "name": "Jane Agent", "available_name": "Jane Agent", "email": "jane.agent@example.com", "avatar_url": "", "type": "user", "availability_status": "online", "thumbnail": "" }, "ticket_id": 904, "created_at": 1794472200, "created_at_exact": "2026-11-12T08:30:00.000Z" }, "last_activity_at": 1794472200, "priority": null, "waiting_since": 0, "sla_policy_id": null, "feature_enabled_sla": true, "applied_sla": null, "sla_events": [], "sla_events_with_distinct_event_type": [], "campaign_id": null, "pinned": false } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The `inbox_id`, `contact_id` or `source_id` was not found in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — The conversation could not be created. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | Returned when the `source_id` is taken. | | `message` | string | What failed, in the account's language. | | `attributes` | array of string | The fields that failed. | #### Example: Source ID taken The `source_id` is already used by another contact inbox. ```json { "error": "source_id should be unique" } ``` #### Example: Private notes only The inbox accepts only private notes (an incoming-calls API inbox). ```json { "message": "Only private notes can be added in an incoming calls inbox", "attributes": [ "base" ] } ``` --- # Find or Create by Phone Source: https://docs.99digital.co.il/online-api/conversations/find-conversation-by-phone Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/find-conversation-by-phone.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/by_phone_number` Looks up a contact by its exact E.164 phone number and returns its conversation in the given inbox, creating whatever is missing. Missing pieces are created: the contact (with the given attributes), the contact inbox (the contact's link to the inbox) and the conversation. No message is sent — to send one, use [Create a Message](https://docs.99digital.co.il/online-api/messages/create-a-message) with the returned `conversation_id`, or call [Add Conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation) in one-shot mode instead. Built for WhatsApp integrations: `wa_id` identifies WhatsApp users who hide their phone number. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/conversations/by_phone_number` | | **Authorization** | User token. The caller must be allowed to view the inbox. | **Permissions:** - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `inbox_id` | integer | Yes | Inbox ID. | | `phone_number` | string | Conditional | Phone in exact E.164 (`+972...`). Local formats like `0501234567` are **not** matched and fail with `422` if the normalised number already exists. Required unless `wa_id` is sent. | | `wa_id` | string | No | WhatsApp ID. Without `phone_number`, the contact is found or created by `wa_id`. With both, the `wa_id` is saved on the contact inbox (WhatsApp v2 inboxes). | | `name`, `email`, `identifier`, `additional_attributes`, `custom_attributes`, `avatar_url` | | No | Attributes for a **new** contact (ignored when the contact exists). | **Example: existing contact** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/by_phone_number' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "inbox_id": 31, "phone_number": "+972501234567" }' ``` Response (`200 OK`). `conversation_id` is the display ID (see [Conversation Basics](https://docs.99digital.co.il/online-api/conversations/conversation-basics)). ```json { "contact_id": 801, "conversation_id": 1501 } ``` **Example: new contact** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/by_phone_number' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "inbox_id": 32, "phone_number": "+972547654321", "name": "Yossi Ben David" }' ``` Response (`200 OK`): ```json { "contact_id": 804, "conversation_id": 1503 } ``` **Error responses** | Status | When | Body | | --- | --- | --- | | `422` | The contact could not be created — for example, the phone number was sent in a local format and the normalised number already belongs to a contact. | `{"message": "Phone number has already been taken", "attributes": ["phone_number"]}` | | `404` | The inbox was not found. | `{"error": "Resource could not be found"}` | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `inbox_id` | integer | Yes | The inbox of the conversation. Example: `31`. | | `phone_number` | string | No | The contact's phone number in exact E.164 format. Required unless you send `wa_id`. Example: `+972501234567`. | | `wa_id` | string | No | The contact's WhatsApp ID. Without `phone_number`, the contact is found or created by `wa_id`. With both, the `wa_id` is saved on the contact's link to the inbox (WhatsApp v2 inboxes). | | `name` | string | No | The name of a new contact. | | `email` | string | No | The email of a new contact. | | `identifier` | string | No | Your own external ID for a new contact. | | `additional_attributes` | object | No | The additional attributes of a new contact, such as `company_name` or `city`. | | `custom_attributes` | object | No | The custom attributes of a new contact. | | `avatar_url` | string | No | The URL of a new contact's avatar image. | ### Example: Existing contact The contact and its conversation already exist. ```json { "inbox_id": 31, "phone_number": "+972501234567" } ``` ### Example: New contact No contact has this phone number, so the contact, its link to the inbox and the conversation are created. ```json { "inbox_id": 32, "phone_number": "+972547654321", "name": "Yossi Ben David" } ``` ## Responses ### 200 — The contact and its conversation in the inbox. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `contact_id` | integer | The contact ID. | | `conversation_id` | integer | The conversation's display ID. | #### Example: Existing contact The answer to the "Existing contact" request. ```json { "contact_id": 801, "conversation_id": 1501 } ``` #### Example: New contact The answer to the "New contact" request. ```json { "contact_id": 804, "conversation_id": 1503 } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The inbox was not found in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — The contact could not be created — for example, the phone number was sent in a local format and its normalized form already belongs to a contact. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `message` | string | What failed, in the account's language. | | `attributes` | array of string | The fields that failed. | #### Example ```json { "message": "Phone number has already been taken", "attributes": [ "phone_number" ] } ``` --- # Get Conversation Source: https://docs.99digital.co.il/online-api/conversations/get-conversation Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/get-conversation.md Section: Online API › Conversations `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}` Retrieve details regarding a conversation by ID. The response is the full conversation object: the contact, the assignee and team, the status, labels, attributes, and the last message. To read the message history, use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages). **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}` | | Method | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token: any agent who may see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). Otherwise the answer is `403`. - Agent-bot token: allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `conversation_id` | The numeric ID of the conversation: its display ID, the `id` in conversation responses and the number in the dashboard URL | Yes | **Response:** ```json { "meta": { "sender": { "additional_attributes": {}, "availability_status": "offline", "email": null, "id": 802, "name": "Avi Levi", "phone_number": "+972521234567", "identifier": null, "thumbnail": "", "custom_attributes": {}, "last_activity_at": 1794472200, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470600 }, "channel": "Channel::Api", "team": { "id": 7, "name": "support", "description": "First-line support", "allow_auto_assign": true, "account_id": 12, "is_member": true }, "assignee": { "id": 51, "account_id": 12, "availability_status": "online", "auto_offline": true, "confirmed": true, "email": "jane.agent@example.com", "available_name": "Jane Agent", "name": "Jane Agent", "role": "General Manager", "see_all_conversations": true, "thumbnail": "" }, "hmac_verified": false }, "contact_inbox": { "wa_id": null }, "id": 1504, "uuid": "3c9e7b2a-5d1f-4a8e-b6c4-2f0e9d8c7b6a", "messages": [ { "id": 40121, "content": "We received your request.", "inbox_id": 31, "conversation_id": 1504, "message_type": 1, "private": false, "status": "sent", "source_id": null, "content_type": "text", "content_attributes": {}, "sender_type": "User", "sender_id": 51, "ticket_id": 904, "created_at": 1794472200, "created_at_exact": "2026-11-12T08:30:00.000Z" } ], "account_id": 12, "additional_attributes": { "source": "crm" }, "agent_last_seen_at": 0, "assignee_last_seen_at": 0, "can_reply": true, "contact_last_seen_at": 0, "custom_attributes": { "order_id": "A-1002" }, "inbox_id": 31, "labels": ["billing"], "muted": false, "snoozed_until": null, "status": "pending", "priority": null, "created_at": 1794472200, "timestamp": 1794472200, "last_activity_at": 1794472200, "first_reply_created_at": 1794472200, "waiting_since": 0, "unread_count": 0, "has_incoming_messages": false, "last_incoming_message_time": null, "last_non_activity_message": { "id": 40121, "content": "We received your request.", "inbox_id": 31, "conversation_id": 1504, "message_type": 1, "private": false, "status": "sent", "source_id": null, "content_type": "text", "content_attributes": {}, "ticket_id": 904, "created_at": 1794472200, "created_at_exact": "2026-11-12T08:30:00.000Z", "sender": { "id": 51, "name": "Jane Agent", "available_name": "Jane Agent", "email": "jane.agent@example.com", "avatar_url": "", "logo_user_url": null, "type": "user", "availability_status": "online", "thumbnail": "" } }, "sla_policy_id": null, "applied_sla": null, "sla_events": [], "sla_events_with_distinct_event_type": [], "feature_enabled_sla": true, "campaign_id": null, "pinned": false } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `meta` | Object containing the conversation's metadata: its people and channel | | `meta -> sender` | Object containing the sender's data: the [contact](https://docs.99digital.co.il/online-api/contacts/retrieve-contact), without `contact_inboxes` | | `meta -> channel` | Channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email` | | `meta -> team` | Object containing the assigned team's data, if a team is assigned | | `meta -> assignee` | Object containing the assignee's data (the assigned [agent](https://docs.99digital.co.il/online-api/agents/list-of-all-agents)), if an agent is assigned | | `meta -> hmac_verified` | Whether the contact's identity was HMAC-verified (website widget) | | `contact_inbox -> wa_id` | The contact's WhatsApp ID in this inbox, for WhatsApp users who hide their phone number; otherwise `null` | | `id` | Conversation numeric ID: the display ID, used in every path | | `uuid` | A globally unique ID of the conversation | | `status` | The status of the conversation. Enum: `open` (Bot), `pending` (Manual), `snoozed`, `resolved` | | `priority` | The priority: `low`, `medium`, `high`, `urgent`, or `null` | | `messages` | Array of message objects — only the **last** message. Use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. In these entries the sender is given as `sender_type` (`User`, `Contact` or `AgentBot`) and `sender_id` | | `account_id` | Account numeric ID | | `inbox_id` | Inbox numeric ID | | `labels` | Array of strings: the titles of the conversation's labels | | `unread_count` | The number of unread messages: incoming messages the agents have not read | | `has_incoming_messages` | Whether the contact has written at least one public message | | `contact_last_seen_at` | The last time a contact interacted with your service (Unix time; `0` when never set) | | `can_reply` | Whether the conversation is currently within the messaging window — `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window) | | `muted` | Whether the conversation is currently muted. A muted conversation does not notify agents | | `snoozed_until` | The time at which a previously snoozed conversation is reactivated, in **milliseconds** since the epoch, or `null` | | `assignee_last_seen_at` | The last time at which the assignee saw the conversation (Unix time; `0` when never set) | | `agent_last_seen_at` | The last time at which an agent saw the conversation (Unix time; `0` when never set) | | `additional_attributes` | Object containing additional attributes related to the conversation: channel or system data, such as `mail_subject` or `source` | | `custom_attributes` | Object containing custom attributes related to the conversation | | `created_at` | The time at which the conversation was created (Unix time) | | `timestamp` | The same as `last_activity_at` | | `last_activity_at` | The time of the conversation's last activity (Unix time) | | `first_reply_created_at` | The time at which the first reply was sent (Unix time; `0` when never set) | | `waiting_since` | Since when the contact has been waiting for a reply (Unix time; `0` when not waiting) | | `last_incoming_message_time` | The time of the last incoming message (ISO 8601), or `null` | | `last_non_activity_message` | Object containing the last non-activity message (incoming, outgoing, template) | | `sla_policy_id`, `applied_sla`, `sla_events`, `sla_events_with_distinct_event_type`, `feature_enabled_sla` | SLA data — see [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy) | | `campaign_id` | The campaign that started the conversation, or `null` | | `pinned` | Whether the caller pinned this conversation | | `file` | `{url, file_type}` when a file is attached to the conversation itself (rare) | **Error responses:** `404 {"error": "Resource could not be found"}`, `403 {"error": "You are not authorized to do this action"}`. ## Remarks - `snoozed_until` is in **milliseconds**; the other timestamps are Unix seconds. - The same `GET` URL under `/conversations` can be called at most 10 times per minute from one IP address; above that the answer is `429`. To follow changes, use [webhook events](https://docs.99digital.co.il/online-api/webhooks/webhook-events) instead of polling. See [Rate limits](https://docs.99digital.co.il/online-api/getting-started#rate-limits). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Responses ### 200 — The conversation. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The conversation's numeric ID: its display ID, used in every path and shown in the dashboard URL. | | `uuid` | string | A globally unique ID of the conversation. | | `account_id` | integer | The numeric ID of the account. | | `inbox_id` | integer | The numeric ID of the inbox. | | `status` | string | The status of the conversation. The status names in the API differ from the labels in the dashboard: the dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Hidden until `snoozed_until`, then reopened; `resolved` — Closed. | | `priority` | string \| null | The priority of the conversation, or `null` when none is set. One of: `low` — Low priority; `medium` — Medium priority; `high` — High priority; `urgent` — Urgent — the highest priority; `null` — No priority is set. | | `labels` | array of string | Array of strings — the titles of the conversation's labels. | | `custom_attributes` | object | Object containing the custom attributes related to the conversation (custom attribute keys and their values). | | `additional_attributes` | object | Object containing the additional attributes related to the conversation: channel or system data, such as `mail_subject`, `source` or `transcript_lmi`. | | `meta` | object | Object containing the conversation's metadata — its people and channel. | | `meta.sender` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `meta.sender.id` | integer | The contact's numeric ID. | | `meta.sender.name` | string | The full name of the contact. | | `meta.sender.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `meta.sender.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `meta.sender.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `meta.sender.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `meta.sender.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `meta.sender.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `meta.sender.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `meta.sender.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `meta.sender.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `meta.sender.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `meta.sender.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `meta.sender.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `meta.sender.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `meta.sender.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `meta.sender.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `meta.sender.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `meta.sender.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `meta.sender.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `meta.sender.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `meta.sender.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `meta.sender.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `meta.sender.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `meta.sender.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `meta.sender.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `meta.sender.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | | `meta.assignee` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `meta.assignee.id` | integer | The agent's numeric ID (user ID). | | `meta.assignee.account_id` | integer | The numeric ID of the account. | | `meta.assignee.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `meta.assignee.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `meta.assignee.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `meta.assignee.email` | string | The agent's login email address. | | `meta.assignee.available_name` | string | The agent's display name. | | `meta.assignee.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `meta.assignee.name` | string | The agent's full name. | | `meta.assignee.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `meta.assignee.operation_bot` | boolean | `true` for internal operation-bot users. | | `meta.assignee.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `meta.assignee.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `meta.assignee.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `meta.assignee.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `meta.assignee.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `meta.assignee.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `meta.assignee.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `meta.assignee.email1` | string \| null | The email address that receives two-factor codes by email. | | `meta.assignee.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `meta.team` | object | Object containing the assigned team's data, if a team is assigned. | | `meta.team.id` | integer | The numeric ID of the team. | | `meta.team.name` | string | The name of the team. Stored in lower case, and unique in the account. | | `meta.team.description` | string | The description of the team. | | `meta.team.allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `meta.team.account_id` | integer | The numeric ID of the account. | | `meta.team.members_count` | integer | The number of agents in the team. | | `meta.team.is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | | `meta.channel` | string | The channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `meta.hmac_verified` | boolean | Whether the contact's identity was HMAC-verified (website widget). | | `contact_inbox` | object | The contact's link (contact inbox) to the conversation's inbox. | | `contact_inbox.wa_id` | string \| null | The contact's WhatsApp ID in this inbox, for WhatsApp users who hide their phone number; otherwise `null`. | | `messages` | array of object | Array of message objects — the **last** message only. Use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. | | `messages[].id` | integer | The numeric ID of the message. | | `messages[].content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `messages[].inbox_id` | integer | The numeric ID of the inbox. | | `messages[].conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `messages[].message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `messages[].content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `messages[].content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `messages[].private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `messages[].status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `messages[].status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `messages[].source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `messages[].echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `messages[].sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `messages[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `messages[].sender.name` | string | The sender's name. | | `messages[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `messages[].sender.available_name` | string | An agent's display name. | | `messages[].sender.email` | string \| null | The sender's email address. | | `messages[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `messages[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `messages[].sender.avatar_url` | string | An agent's avatar image URL. | | `messages[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `messages[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `messages[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `messages[].sender.blocked` | boolean | Whether a contact is blocked. | | `messages[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `messages[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `messages[].sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `messages[].sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `messages[].attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `messages[].attachments[].id` | integer | The numeric ID of the file (attachment). | | `messages[].attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `messages[].attachments[].account_id` | integer | The numeric ID of the account. | | `messages[].attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `messages[].attachments[].filename` | string | The name of the file. | | `messages[].attachments[].extension` | string \| null | The file extension, when known. | | `messages[].attachments[].data_url` | string | The URL of the file. | | `messages[].attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `messages[].attachments[].file_size` | integer | The file size, in bytes. | | `messages[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `messages[].delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `messages[].created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `messages[].created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `last_non_activity_message` | object | A message in a conversation. Outgoing messages are delivered to the contact through the inbox's channel (WhatsApp, SMS, email, Facebook, API webhook, and so on). | | `last_non_activity_message.id` | integer | The numeric ID of the message. | | `last_non_activity_message.content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `last_non_activity_message.inbox_id` | integer | The numeric ID of the inbox. | | `last_non_activity_message.conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `last_non_activity_message.message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `last_non_activity_message.content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `last_non_activity_message.content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `last_non_activity_message.private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `last_non_activity_message.status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `last_non_activity_message.status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `last_non_activity_message.source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `last_non_activity_message.echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `last_non_activity_message.sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `last_non_activity_message.sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `last_non_activity_message.sender.name` | string | The sender's name. | | `last_non_activity_message.sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `last_non_activity_message.sender.available_name` | string | An agent's display name. | | `last_non_activity_message.sender.email` | string \| null | The sender's email address. | | `last_non_activity_message.sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `last_non_activity_message.sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `last_non_activity_message.sender.avatar_url` | string | An agent's avatar image URL. | | `last_non_activity_message.sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `last_non_activity_message.sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `last_non_activity_message.sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `last_non_activity_message.sender.blocked` | boolean | Whether a contact is blocked. | | `last_non_activity_message.sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `last_non_activity_message.sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `last_non_activity_message.sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `last_non_activity_message.sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `last_non_activity_message.attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `last_non_activity_message.attachments[].id` | integer | The numeric ID of the file (attachment). | | `last_non_activity_message.attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `last_non_activity_message.attachments[].account_id` | integer | The numeric ID of the account. | | `last_non_activity_message.attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `last_non_activity_message.attachments[].filename` | string | The name of the file. | | `last_non_activity_message.attachments[].extension` | string \| null | The file extension, when known. | | `last_non_activity_message.attachments[].data_url` | string | The URL of the file. | | `last_non_activity_message.attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `last_non_activity_message.attachments[].file_size` | integer | The file size, in bytes. | | `last_non_activity_message.ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `last_non_activity_message.delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `last_non_activity_message.created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `last_non_activity_message.created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `can_reply` | boolean | Whether the conversation is currently within the messaging window: `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window). | | `muted` | boolean | Whether the conversation is currently muted. A muted conversation does not notify agents. | | `snoozed_until` | integer \| null | The time at which a snoozed conversation is reactivated (reopened), in **milliseconds** since the Unix epoch, or `null`. | | `unread_count` | integer | The number of unread messages — incoming messages the agents have not read. | | `has_incoming_messages` | boolean | Whether the contact has written at least one public message. | | `created_at` | integer | The time at which the conversation was created, measured in seconds since the Unix epoch. | | `timestamp` | integer | The same as `last_activity_at`. | | `last_activity_at` | integer | The time of the conversation's last activity (Unix timestamp, in seconds). | | `first_reply_created_at` | integer | The time at which the first reply was sent to the contact (Unix timestamp, in seconds), or `0` when there is none yet. | | `waiting_since` | integer | Since when the contact has been waiting for a reply (Unix timestamp, in seconds), or `0`. | | `agent_last_seen_at` | integer | The last time an agent saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `assignee_last_seen_at` | integer | The last time the assignee saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `contact_last_seen_at` | integer | The last time the contact interacted with your service — when they last saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `last_incoming_message_time` | string \| null | The time of the last incoming message (ISO 8601), or `null`. | | `sla_policy_id` | integer \| null | The ID of the applied SLA policy, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `applied_sla` | object \| null | The applied SLA policy's details and thresholds, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `sla_events` | array of object | The SLA events of the conversation (missed thresholds). | | `sla_events_with_distinct_event_type` | array of object | The SLA events, one per event type. | | `feature_enabled_sla` | boolean | Whether the account uses SLA policies (the SLA feature is enabled). | | `campaign_id` | integer \| null | The ID of the campaign that started the conversation, or `null`. | | `pinned` | boolean | Whether the caller pinned this conversation. | | `file` | object | `{url, file_type}` when a file is attached to the conversation itself (rare). | #### Example: Conversation A Bot conversation with an unread message from the contact, and no assignee. ```json { "meta": { "sender": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500, "last_activity_at": 1794471300 }, "channel": "Channel::Api", "hmac_verified": false }, "contact_inbox": { "wa_id": null }, "id": 1501, "messages": [ { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "content_attributes": {}, "private": false, "status": "sent", "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "ticket_id": 903, "created_at": 1794471300, "created_at_exact": "2026-11-12T08:15:00.000Z" } ], "account_id": 12, "uuid": "8d4e2f1a-6b7c-4d8e-9f0a-1b2c3d4e5f60", "additional_attributes": {}, "agent_last_seen_at": 1794471250, "assignee_last_seen_at": 0, "can_reply": true, "last_incoming_message_time": "2026-11-12T08:15:00.000Z", "contact_last_seen_at": 0, "custom_attributes": { "order_id": "A-1001" }, "inbox_id": 31, "labels": [ "vip" ], "muted": false, "snoozed_until": null, "status": "open", "created_at": 1794470520, "timestamp": 1794471300, "first_reply_created_at": 1794470700, "unread_count": 1, "has_incoming_messages": true, "last_non_activity_message": { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "content_attributes": {}, "private": false, "status": "sent", "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "ticket_id": 903, "created_at": 1794471300, "created_at_exact": "2026-11-12T08:15:00.000Z" }, "last_activity_at": 1794471300, "priority": null, "waiting_since": 1794471300, "sla_policy_id": null, "feature_enabled_sla": true, "applied_sla": null, "sla_events": [], "sla_events_with_distinct_event_type": [], "campaign_id": null, "pinned": false } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 429 — The same URL was requested more than 10 times in a minute from this IP address. See [Rate limits](https://docs.99digital.co.il/online-api/getting-started#rate-limits). --- # Toggle Conversation Status Source: https://docs.99digital.co.il/online-api/conversations/toggle-conversation-status Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/toggle-conversation-status.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_status` This endpoint allows you to toggle the status of the conversation between open and resolved, or to set it to a given status. Send `status` to set it: `pending` hands a Bot conversation over to a human agent (Manual), `snoozed` hides it until `snoozed_until`, `resolved` closes it, and `open` returns it to the bot. Without `status`, the status is toggled: a `resolved`, `pending` or `snoozed` conversation becomes `open`, and an `open` one becomes `resolved`. The status names differ from the dashboard: `open` is **Bot** and `pending` is **Manual**. See [Statuses](https://docs.99digital.co.il/online-api/conversations/conversation-basics#statuses). **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_status` | | Method | JSON via POST | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token: the caller must be able to see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). New rules system: the inbox permission depends on the change, in the conversation's inbox: - to `resolved` → **Inbox resolve**; - to `snoozed` → **Inbox move to pending** (labelled "Snooze conversation" in the role editor); - from `resolved` or `snoozed` back to `open` or `pending` → **Inbox reopen**; - between `open` and `pending` (Bot ↔ Manual) → **Inbox manual/bot switch**. - Agent-bot token: allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `conversation_id` | The numeric ID of the conversation (its display ID) | Yes | **Request body Parameters:** | Parameter | type | Description | Required | | --- | --- | --- | --- | | `status` | string | The status of the conversation. Enum: `open` (Bot), `pending` (Manual), `snoozed`, `resolved`. Leave it out to toggle | No | | `snoozed_until` | string | With `snoozed`: when to reopen the conversation, as an ISO 8601 date-time (for example `2026-11-13T09:00:00Z`). If it cannot be parsed, one hour from now is used | No | **Request body example:** ```json { "status": "resolved" } ``` **Response:** ```json { "payload": { "success": true, "conversation_id": 1501, "current_status": "resolved", "snoozed_until": null } } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `payload` | Object containing the response | | `payload -> success` | Indicates whether the status of the conversation has changed | | `payload -> conversation_id` | Numeric ID of the conversation (its display ID) | | `payload -> current_status` | The current status of the conversation. Enum: `open` (Bot), `pending` (Manual), `snoozed`, `resolved` | | `payload -> snoozed_until` | If set, this is the time in the future when this conversation will be marked as open, i.e. it will be in a snoozed state until this time. In **milliseconds** since the epoch; `null` when the conversation is not snoozed | **Error responses:** `403` (missing inbox permission). ## Remarks - Fires the `conversation_status_changed` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events). - Resolving a conversation closes its current [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets); reopening it starts a new one. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Request body Content type: `application/json` | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | No | The status of the conversation to set. Leave it out to toggle between `open` and `resolved`. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Snoozed until `snoozed_until`, then reopened; `resolved` — Resolved. | | `snoozed_until` | string (date-time) | No | With `snoozed`: when to reopen the conversation, as an ISO 8601 date-time. If it cannot be parsed, the conversation is snoozed for one hour. Example: `2026-11-13T09:00:00Z`. | ### Example: Hand over to a human Bot → Manual, so an agent takes over. ```json { "status": "pending" } ``` ### Example: Snooze until a time Hide the conversation until the given time. ```json { "status": "snoozed", "snoozed_until": "2026-11-13T09:00:00Z" } ``` ### Example: Resolve Close the conversation. ```json { "status": "resolved" } ``` ### Example: Toggle No body: an `open` conversation is resolved, any other is reopened as `open`. ```json {} ``` ## Responses ### 200 — The conversation's status after the change. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | object | Object containing the response — the result of the change. | | `payload.success` | boolean | `true` when the status of the conversation was changed and saved. | | `payload.conversation_id` | integer | The conversation's display ID. | | `payload.current_status` | string | The status of the conversation after the change. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Snoozed until `snoozed_until`, then reopened; `resolved` — Resolved. | | `payload.snoozed_until` | integer \| null | For a snoozed conversation, the time in the future when it is reopened as `open` — it stays snoozed until then — in **milliseconds** since the epoch. Otherwise `null`. | #### Example: Hand over to a human The conversation is now Manual. ```json { "payload": { "success": true, "conversation_id": 1501, "current_status": "pending", "snoozed_until": null } } ``` #### Example: Snooze until a time Snoozed until 2026-11-13T09:00:00Z, in milliseconds. ```json { "payload": { "success": true, "conversation_id": 1501, "current_status": "snoozed", "snoozed_until": 1794560400000 } } ``` #### Example: Resolve The conversation is resolved. ```json { "payload": { "success": true, "conversation_id": 1501, "current_status": "resolved", "snoozed_until": null } } ``` #### Example: Toggle A resolved conversation, toggled, is open (Bot) again. ```json { "payload": { "success": true, "conversation_id": 1501, "current_status": "open", "snoozed_until": null } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Toggle Conversation Priority Source: https://docs.99digital.co.il/online-api/conversations/toggle-conversation-priority Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/toggle-conversation-priority.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_priority` Set or clear the priority of a conversation. Send `priority` with the new value. Leave it out, or send `null`, to clear the priority. The conversation's `priority` field shows the result. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/toggle_priority` | | **Authorization** | User token or **agent-bot token**. New rules: **Inbox priority of conversations** for the inbox. | **Permissions:** - User token: the caller must also be able to see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `priority` | string | No | `low`, `medium`, `high`, `urgent`. Omit or send `null` to clear it. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/toggle_priority' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "priority": "urgent" }' ``` **Example response**: `200 OK` with an empty body. The conversation now has `"priority": "urgent"`. ## Remarks - Despite its name, the endpoint does not cycle through the priorities: it sets the value you send. - A change fires the `conversation_updated` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Request body Content type: `application/json` | Field | Type | Required | Description | | --- | --- | --- | --- | | `priority` | string \| null | No | The new priority. Leave it out or send `null` to clear it. One of: `low` — The lowest priority; `medium` — Medium priority; `high` — High priority; `urgent` — The highest priority; `null` — No priority — clears the current one. | ### Example: Set the priority Mark the conversation as urgent. ```json { "priority": "urgent" } ``` ### Example: Clear the priority Remove the priority. ```json { "priority": null } ``` ## Responses ### 200 — The priority was changed, with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Assign Conversation Source: https://docs.99digital.co.il/online-api/conversations/assign-conversation Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/assign-conversation.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/assignments` This endpoint allows you to assign a conversation to an agent or a team. Send exactly one of `assignee_id` and `team_id`, or `null` to remove the agent or the team. The answer depends on what you sent: the assigned agent, the assigned team, or `null`. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/assignments` | | Method | JSON via POST | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token: the caller must be able to see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). New rules system: **Inbox can assign** (to assign an agent) or **Inbox assign to group** (to assign a team) for the conversation's inbox. - The agent you assign must be assignable in the conversation's inbox. New rules system: their role has **Inbox can be assigned** for that inbox. Legacy roles: they are a member of the inbox. [List Assignable Agents](https://docs.99digital.co.il/online-api/agents/list-assignable-agents) lists them. - Agent-bot token: allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `conversation_id` | The numeric ID of the conversation (its display ID) | Yes | **Request body Parameters:** | Parameter | type | Description | Required | | --- | --- | --- | --- | | `assignee_id` | integer | ID of the agent to whom the conversation is to be assigned. `null` unassigns the agent | Conditional — send this or `team_id` | | `team_id` | integer | ID of the team. If `assignee_id` is present, this parameter is ignored. `null` removes the team | Conditional — send this or `assignee_id` | **Request body example:** ```json { "assignee_id": 51, "team_id": 7 } ``` Here `team_id` is ignored, because `assignee_id` is present. To assign a team, send only `{"team_id": 7}`; to unassign the agent, send `{"assignee_id": null}` (and `{"team_id": null}` to remove the team). **Response:** When you assign an agent, the response is the assigned agent: ```json { "id": 51, "account_id": 12, "availability_status": "online", "auto_offline": true, "confirmed": true, "email": "jane.agent@example.com", "available_name": "Jane Agent", "name": "Jane Agent", "role": "agent", "see_all_conversations": true, "thumbnail": "" } ``` When you assign a team, the response is the raw team record — its shape differs from the team object of the [Teams](https://docs.99digital.co.il/online-api/teams/list-of-all-teams) endpoints. When you unassign, the response is `null`. Both are shown under Responses below. **Response-Explain:** | Parameter | Description | | --- | --- | | `id` | Agent numeric ID | | `account_id` | Account numeric ID | | `availability_status` | The availability status of the agent. Enum: `online`, `busy`, `offline` | | `auto_offline` | Indicates whether the availability status of the agent is configured to go offline automatically when away | | `confirmed` | Indicates whether the agent has been validated by clicking on the invitation email they received | | `email` | Email of the agent | | `available_name` | Display name of the agent | | `name` | Full name of the agent | | `role` | The agent's role: the custom role's name (new rules system), or `agent` / `administrator` (legacy roles) | | `see_all_conversations` | Indicates whether the agent can see all conversations in the account | | `thumbnail` | Agent thumbnail (avatar URL) | **Error responses** | Status | When | Body | | --- | --- | --- | | `403` | The target agent cannot be assigned in this inbox. | `{"error": "Agent cannot be assigned to this inbox"}` | | `403` | The caller lacks **Inbox can assign** / **Inbox assign to group**. | `{"error": "You are not authorized to do this action"}` | ## Remarks - The assigned agent becomes a [participant](https://docs.99digital.co.il/online-api/conversations/participants/list-participants) of the conversation and is notified. - With queue management enabled, assigning an agent to a queue-routed conversation goes through the queue engine, as a manual assignment. - A change fires the `conversation_updated` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `assignee_id` | integer \| null | No | The ID of the agent to whom the conversation is to be assigned. `null` unassigns the agent. Send this or `team_id`. Example: `51`. | | `team_id` | integer \| null | No | The ID of the team to assign the conversation to. If `assignee_id` is present, this parameter is ignored. `null` removes the team. Example: `7`. | ### Example: Assign an agent Assign the conversation to an agent. ```json { "assignee_id": 51 } ``` ### Example: Assign a team Assign the conversation to a team. ```json { "team_id": 7 } ``` ### Example: Unassign Remove the agent. Send `{"team_id": null}` to remove the team the same way. ```json { "assignee_id": null } ``` ## Responses ### 200 — The assigned agent, the assigned team, or `null` when you removed the assignment. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | (one of: Agent) The agent's numeric ID (user ID). | | `account_id` | integer | (one of: Agent) The numeric ID of the account. | | `availability_status` | string | (one of: Agent) The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `auto_offline` | boolean | (one of: Agent) Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `confirmed` | boolean | (one of: Agent) Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `email` | string | (one of: Agent) The agent's login email address. | | `available_name` | string | (one of: Agent) The agent's display name. | | `custom_attributes` | object | (one of: Agent) Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `name` | string | (one of: Agent) The agent's full name. | | `role` | string | (one of: Agent) The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `operation_bot` | boolean | (one of: Agent) `true` for internal operation-bot users. | | `see_all_conversations` | boolean | (one of: Agent) Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `assignable_to_inbox` | array \| null | (one of: Agent) The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `new_role` | string \| null | (one of: Agent) The agent's custom role name, or `null` on accounts with legacy roles. | | `thumbnail` | string | (one of: Agent) The agent's thumbnail (avatar image) URL, or an empty string. | | `capacity_cap` | integer \| null | (one of: Agent) The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `two_factor_type` | string \| null | (one of: Agent) The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `phone1` | string \| null | (one of: Agent) The phone number that receives two-factor codes by SMS. | | `email1` | string \| null | (one of: Agent) The email address that receives two-factor codes by email. | | `create_time` | integer | (one of: Agent) When the agent was created (Unix timestamp, in seconds). | | `id` | integer | (one of: Team) The team ID. | | `name` | string | (one of: Team) The team name, in lower case. | | `description` | string | (one of: Team) The description. | | `allow_auto_assign` | boolean | (one of: Team) Whether a conversation assigned to the team is assigned to one of its available members automatically. | | `account_id` | integer | (one of: Team) The account ID. | | `created_at` | string | (one of: Team) When the team was created (ISO 8601). | | `updated_at` | string | (one of: Team) The team's last update (ISO 8601). | #### Example: Assign an agent The assigned agent. ```json { "id": 51, "account_id": 12, "availability_status": "online", "auto_offline": true, "confirmed": true, "email": "jane.agent@example.com", "available_name": "Jane Agent", "custom_attributes": {}, "name": "Jane Agent", "role": "General Manager", "operation_bot": false, "see_all_conversations": true, "assignable_to_inbox": [ 31, 32, 33 ], "new_role": "General Manager", "thumbnail": "", "two_factor_type": "sms", "phone1": "+972541234567", "email1": null, "create_time": 1790000000 } ``` #### Example: Assign a team The raw team record. ```json { "id": 7, "name": "support", "description": "", "allow_auto_assign": true, "account_id": 12, "created_at": "2026-11-12T08:00:00.000Z", "updated_at": "2026-11-12T08:00:00.000Z" } ``` #### Example: Unassign The body is `null`. ```json null ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The caller lacks the permission, or the agent cannot be assigned in the conversation's inbox. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Agent not assignable The agent cannot be assigned in this inbox. ```json { "error": "Agent cannot be assigned to this inbox" } ``` #### Example: No permission The caller lacks **Inbox can assign** or **Inbox assign to group**, or may not see the conversation. ```json { "error": "You are not authorized to do this action" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List Conversation Labels Source: https://docs.99digital.co.il/online-api/conversations/list-conversation-labels Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/list-conversation-labels.md Section: Online API › Conversations `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/labels` List all labels associated to a conversation. The response holds the label titles. The labels themselves — their colors and descriptions — are managed with the [Labels](https://docs.99digital.co.il/online-api/labels/list-labels) endpoints. To change a conversation's labels, use [Set Conversation Labels](https://docs.99digital.co.il/online-api/conversations/set-conversation-labels). **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/labels` | | Method | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token: any agent who may see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `conversation_id` | The numeric ID of the conversation (its display ID) | Yes | **Response:** ```json { "payload": ["vip", "billing"] } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `payload` | Array of strings (label): the titles of the conversation's labels | ## Remarks - The same `GET` URL under `/conversations` can be called at most 10 times per minute from one IP address; above that the answer is `429`. See [Rate limits](https://docs.99digital.co.il/online-api/getting-started#rate-limits). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Responses ### 200 — The conversation's labels. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of string | The titles of the conversation's labels. | #### Example ```json { "payload": [ "vip", "billing" ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 429 — The same URL was requested more than 10 times in a minute from this IP address. See [Rate limits](https://docs.99digital.co.il/online-api/getting-started#rate-limits). --- # Set Conversation Labels Source: https://docs.99digital.co.il/online-api/conversations/set-conversation-labels Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/set-conversation-labels.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/labels` Add labels to a conversation. :::note Using this request will overwrite the existing list of labels associated to the conversation: labels you leave out are removed. Send the full list — or `[]` to remove every label. ::: To add or remove single labels without sending the full list, use [Bulk Update Conversations](https://docs.99digital.co.il/online-api/conversations/bulk-update-conversations) with `labels.add` / `labels.remove`. The labels themselves are managed with the [Labels](https://docs.99digital.co.il/online-api/labels/list-labels) endpoints. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/labels` | | Method | JSON via POST | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token: the caller must be able to see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). New rules system: **Inbox assign labels** for the conversation's inbox. - Agent-bot token: allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `conversation_id` | The numeric ID of the conversation (its display ID) | Yes | **Request body:** | Parameter | type | Description | Required | | --- | --- | --- | --- | | `labels` | array of strings | An array of labels: the full list of label titles the conversation should have (see [List Labels](https://docs.99digital.co.il/online-api/labels/list-labels)) | Yes | **Request body example:** ```json { "labels": ["vip", "billing"] } ``` **Response:** ```json { "payload": [ "vip", "billing" ] } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `payload` | Array of strings (label): the titles of the conversation's labels after the change | ## Remarks - A change fires the `conversation_updated` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `labels` | array of string | Yes | An array of labels: the full list of label titles the conversation should have. Labels you leave out are removed, and `[]` removes every label. See [List Labels](https://docs.99digital.co.il/online-api/labels/list-labels) for the account's labels. | ### Example: Set labels The conversation gets exactly these two labels. ```json { "labels": [ "vip", "billing" ] } ``` ### Example: Remove all labels An empty list removes every label. ```json { "labels": [] } ``` ## Responses ### 200 — The conversation's labels after the change. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of string | The titles of the conversation's labels. | #### Example: Set labels The answer to the "Set labels" request. ```json { "payload": [ "vip", "billing" ] } ``` #### Example: Remove all labels The answer to the "Remove all labels" request. ```json { "payload": [] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Set Conversation Custom Attributes Source: https://docs.99digital.co.il/online-api/conversations/set-conversation-custom-attributes Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/set-conversation-custom-attributes.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/custom_attributes` Replaces the conversation's custom attributes with the given object. :::warning This call **overwrites** the conversation's `custom_attributes`: keys you leave out are removed, so send the full object. ::: | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/custom_attributes` | | **Authorization** | User token or **agent-bot token**. | **Permissions:** - User token: any agent who may see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `custom_attributes` | object | Yes | Key/value pairs. Use the keys of conversation custom attributes defined in Settings → Custom attributes so they show in the dashboard. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/custom_attributes' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "custom_attributes": { "order_id": "A-1001", "items_count": 2 } }' ``` **Example response** (`200 OK`) ```json { "custom_attributes": { "order_id": "A-1001", "items_count": 2 } } ``` ## Remarks - A change fires the `conversation_updated` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `custom_attributes` | object | Yes | The conversation's complete custom attributes, as key-value pairs. This object replaces the current one, so keys you leave out are removed. Use the keys of the conversation custom attributes defined in Settings → Custom attributes so the values show in the dashboard. | ### Example (generated from the schema) ```json { "custom_attributes": { "order_id": "A-1001", "items_count": 2 } } ``` ## Responses ### 200 — The conversation's custom attributes after the change. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `custom_attributes` | object | The conversation's custom attributes. | #### Example ```json { "custom_attributes": { "order_id": "A-1001", "items_count": 2 } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Mute Conversation Source: https://docs.99digital.co.il/online-api/conversations/mute-conversation Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/mute-conversation.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/mute` Mute a conversation: muting resolves it, and new incoming messages from the contact no longer reopen it until it is unmuted. Muting **resolves** the conversation and sets `muted` to `true`. Until you [unmute](https://docs.99digital.co.il/online-api/conversations/unmute-conversation) it, new incoming messages from the contact do not reopen the conversation, and it does not notify agents. An activity message is added to the conversation. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/mute` (or `/unmute`) | | **Authorization** | User token. | **Permissions:** - User token: any agent who may see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/mute' \ -H 'api_access_token: ' ``` **Example response**: `200 OK` with an empty body. The conversation now has `"muted": true` and `"status": "resolved"`. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Responses ### 200 — The conversation is muted (`"muted": true`) and resolved (`"status": "resolved"`), with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Unmute Conversation Source: https://docs.99digital.co.il/online-api/conversations/unmute-conversation Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/unmute-conversation.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/unmute` Unmute a conversation, so that new incoming messages from the contact reopen it again. Muting **resolves** the conversation, and new incoming messages from the contact no longer reopen it until it is unmuted. Unmuting sets `muted` to `false` and does not change the status: a conversation that was resolved when it was [muted](https://docs.99digital.co.il/online-api/conversations/mute-conversation) stays resolved until the contact writes again or an agent reopens it. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/unmute` (or `/mute`) | | **Authorization** | User token. | **Permissions:** - User token: any agent who may see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/unmute' \ -H 'api_access_token: ' ``` **Example response**: `200 OK` with an empty body. `POST .../unmute` sets `"muted": false` and does not change the status. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Responses ### 200 — The conversation is unmuted (`"muted": false`), with an empty body. Its status is unchanged. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List Conversation Attachments Source: https://docs.99digital.co.il/online-api/conversations/list-conversation-attachments Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/list-conversation-attachments.md Section: Online API › Conversations `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/attachments` Returns all files sent in the conversation, from both the contact and agents. Each item is one file, with the message it belongs to and who sent it. The whole list is returned at once. | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/attachments` | | **Authorization** | User token. | **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/attachments' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`). A conversation without files returns `{"payload": []}`. ```json { "payload": [ { "message_id": 40111, "thumb_url": "https://online.99digital.co.il/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "data_url": "https://online.99digital.co.il/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "file_size": 48213, "file_type": "image", "extension": null, "created_at": 1794471100, "sender": { "id": 51, "name": "Jane Agent", "type": "user" } } ] } ``` ## Remarks - For a paginated list of the files, with their attachment IDs, use [List Conversation Files](https://docs.99digital.co.il/online-api/messages/list-conversation-files). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Responses ### 200 — The files of the conversation. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of object | The files. Empty when the conversation has no files. | | `payload[].message_id` | integer | The message the file belongs to. | | `payload[].thumb_url` | string | The URL of a thumbnail, for images. | | `payload[].data_url` | string | The URL of the file. | | `payload[].file_size` | integer | The size in bytes. | | `payload[].file_type` | string | The kind of file: `image`, `audio`, `video`, `file`, `location`, `fallback`, …. | | `payload[].extension` | string \| null | The file extension, when known. | | `payload[].created_at` | integer | When the message was sent (Unix time, seconds). | | `payload[].sender` | object | An object containing the sender's data: who sent a message — the contact (`type` `contact`), an agent (`user`) or an agent bot (`agent_bot`). Its fields follow the kind of sender — a contact has `phone_number` and `identifier`, an agent has `available_name` and `availability_status`. Activity messages have no sender. | | `payload[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `payload[].sender.name` | string | The sender's name. | | `payload[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `payload[].sender.available_name` | string | An agent's display name. | | `payload[].sender.email` | string \| null | The sender's email address. | | `payload[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `payload[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `payload[].sender.avatar_url` | string | An agent's avatar image URL. | | `payload[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `payload[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `payload[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `payload[].sender.blocked` | boolean | Whether a contact is blocked. | | `payload[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `payload[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | #### Example ```json { "payload": [ { "message_id": 40111, "thumb_url": "https://online.99digital.co.il/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "data_url": "https://online.99digital.co.il/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "file_size": 48213, "file_type": "image", "extension": null, "created_at": 1794471100, "sender": { "id": 51, "name": "Jane Agent", "type": "user" } } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Send Conversation Transcript Source: https://docs.99digital.co.il/online-api/conversations/send-conversation-transcript Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/send-conversation-transcript.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/transcript` Emails the conversation transcript (incoming and outgoing messages) to an address, or previews it. With `meta: true` it only returns a preview (message count and first message) without sending anything. Rate-limited to 30 transcript requests per hour per account. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/transcript` | | **Authorization** | User token. New rules: **Inbox send Transcript** for the inbox. | **Permissions:** - User token: the caller must also be able to see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `period.type_id` | string | Yes | Which messages: `all`, `today`, `h1` / `h3` / `h5` / `h24` (last 1/3/5/24 hours), `new` (since the last transcript), `custom` (from `period.from`), `last_ai_summary` (only the last AI-summary note). | | `period.from` | integer | Conditional | Unix timestamp, with `type_id: custom`. | | `email` | string | Conditional | Recipient. Required unless `to_assignee` is `true` or `meta` is `true`. | | `to_assignee` | boolean | No | Send to the conversation's assignee instead of `email`. | | `meta` | boolean | No | Return a preview only. | **Example: preview** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/transcript' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "period": { "type_id": "h24" }, "meta": true }' ``` Response (`200 OK`): ```json { "count": 4, "first": { "content": "Hello, I have a question about my order.", "created_at": 1794471000 } } ``` **Example: send by email** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/transcript' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "period": { "type_id": "all" }, "email": "dana.cohen@example.com" }' ``` Response: `200 OK` with an empty body. The email is sent in the background. **Error responses** | Status | When | Body | | --- | --- | --- | | `422` | `email` is missing, and neither `to_assignee` nor `meta` is `true`. | `{"error": "email param missing"}` | | `429` | More than 30 transcript requests in an hour for the account (rate limit). See [Rate limits](https://docs.99digital.co.il/online-api/getting-started#rate-limits). | | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `period` | object | Yes | Which messages the transcript holds. | | `period.type_id` | string | Yes | Which messages of the conversation to include. One of: `all` — Every message of the conversation; `today` — Today's messages; `h1` — The last hour; `h3` — The last 3 hours; `h5` — The last 5 hours; `h24` — The last 24 hours; `new` — The messages since the last transcript; `custom` — The messages from `period.from` on; `last_ai_summary` — Only the last AI-summary note. Example: `all`. | | `period.from` | integer | No | The start of the period (Unix time, seconds). Required when `type_id` is `custom`. Example: `1794470400`. | | `email` | string | No | The recipient. Required unless `to_assignee` or `meta` is `true`. Example: `dana.cohen@example.com`. | | `to_assignee` | boolean | No | Send the transcript to the conversation's assignee instead of `email`. | | `meta` | boolean | No | Return a preview only, without sending anything. | ### Example: Send by email The whole conversation, to an email address. ```json { "period": { "type_id": "all" }, "email": "dana.cohen@example.com" } ``` ### Example: Since a time The messages from a given time on. ```json { "period": { "type_id": "custom", "from": 1794470400 }, "email": "dana.cohen@example.com" } ``` ### Example: To the assignee Today's messages, to the conversation's assignee. ```json { "period": { "type_id": "today" }, "to_assignee": true } ``` ### Example: Preview Preview the last 24 hours without sending anything. ```json { "period": { "type_id": "h24" }, "meta": true } ``` ## Responses ### 200 — The transcript is being emailed, and the response has an empty body. With `meta: true`, nothing is sent and the response is the preview below. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `count` | integer | The number of messages the transcript would hold. | | `first` | object | The first message of the transcript. | | `first.content` | string | The text. | | `first.created_at` | integer | When the message was created (Unix time, seconds). | #### Example: Preview The response to `meta: true`. ```json { "count": 4, "first": { "content": "Hello, I have a question about my order.", "created_at": 1794471000 } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — `email` is missing, and neither `to_assignee` nor `meta` is `true`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "email param missing" } ``` ### 429 — The account sent more than 30 transcript requests in the last hour. --- # Send CSAT Survey Source: https://docs.99digital.co.il/online-api/conversations/send-csat-survey Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/send-csat-survey.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/send_survey` Sends a customer-satisfaction (CSAT) survey message to the contact in this conversation. The survey is sent as an outgoing message with `content_type` `input_csat`, which holds a link to the survey. When the contact answers, the `csat_survey_submitted` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events) is sent. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/send_survey` | | **Authorization** | User token or **agent-bot token**. | **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `survey_id` | integer | No | CSAT survey ID (from the account's CSAT surveys). Omit to send the built-in default survey. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/send_survey' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{}' ``` **Example response**: `200 OK` with an empty body. An outgoing message with `content_type: "input_csat"` is added to the conversation — here, for survey `3`: ```json { "id": 40120, "content": "Please rate this conversation, https://online.99digital.co.il/survey/responses/NDAxMjA=", "message_type": 1, "content_type": "input_csat", "content_attributes": { "submitted_values": { "csat_survey_response": { "csat_survey_id": 3 } } } } ``` **Error responses** | Status | When | Body | | --- | --- | --- | | `404` | No CSAT survey with this `survey_id`. | `{"error": "Survey not found"}` | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Request body Content type: `application/json` | Field | Type | Required | Description | | --- | --- | --- | --- | | `survey_id` | integer | No | The ID of one of the account's CSAT surveys. Leave it out to send the built-in default survey. Example: `3`. | ### Example: Default survey The built-in default survey. ```json {} ``` ### Example: A specific survey One of the account's CSAT surveys. ```json { "survey_id": 3 } ``` ## Responses ### 200 — The survey was sent, with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The conversation or the survey does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Survey not found No CSAT survey with this `survey_id`. ```json { "error": "Survey not found" } ``` #### Example: Conversation not found No conversation with this ID. ```json { "error": "Resource could not be found" } ``` --- # Apply SLA Policy Source: https://docs.99digital.co.il/online-api/conversations/apply-sla-policy Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/apply-sla-policy.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/apply_sla` Applies an SLA policy to the conversation, or removes it, and returns the full conversation. The policy is removed when `sla_policy_id` is `null`. The SLA is in the conversation's `sla_policy_id` and `applied_sla`. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/apply_sla` | | **Authorization** | User token or **agent-bot token**. | **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `sla_policy_id` | integer | Yes | SLA policy ID, or `null` to remove the policy. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/apply_sla' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "sla_policy_id": 4 }' ``` **Example response** (`200 OK`): a full conversation object. Only the SLA fields are shown here. ```json { "id": 1501, "sla_policy_id": 4, "applied_sla": { "id": 210, "sla_id": 4, "sla_status": "active", "created_at": 1794473400, "updated_at": 1794473400, "sla_description": "Standard response times", "sla_name": "Standard", "sla_first_response_time_threshold": 60.0, "sla_next_response_time_threshold": 180.0, "sla_only_during_business_hours": false, "sla_resolution_time_threshold": 240.0 }, "sla_events": [] } ``` Thresholds are in seconds. `applied_sla` holds: | Field | Description | | --- | --- | | `id` | The ID of the applied SLA. | | `sla_id` | The SLA policy's ID. | | `sla_status` | The SLA's state, for example `active`. | | `sla_name`, `sla_description` | The policy's name and description. | | `sla_first_response_time_threshold`, `sla_next_response_time_threshold`, `sla_resolution_time_threshold` | The policy's thresholds, in seconds. | | `sla_only_during_business_hours` | Whether the thresholds apply only during business hours. | | `created_at`, `updated_at` | Unix time, seconds. | `DELETE /conversations/{conversation_id}/cancel_sla` also removes the policy, but it is deprecated; send `{"sla_policy_id": null}` instead. **Error responses** | Status | When | Body | | --- | --- | --- | | `404` | No SLA policy with this `sla_policy_id`. | `{"error": "SLA policy not found"}` | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `sla_policy_id` | integer \| null | Yes | The SLA policy to apply, or `null` to remove the conversation's policy. Example: `4`. | ### Example: Apply a policy Apply SLA policy 4. ```json { "sla_policy_id": 4 } ``` ### Example: Remove the policy Remove the conversation's SLA policy. ```json { "sla_policy_id": null } ``` ## Responses ### 200 — The full conversation. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The conversation's numeric ID: its display ID, used in every path and shown in the dashboard URL. | | `uuid` | string | A globally unique ID of the conversation. | | `account_id` | integer | The numeric ID of the account. | | `inbox_id` | integer | The numeric ID of the inbox. | | `status` | string | The status of the conversation. The status names in the API differ from the labels in the dashboard: the dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Hidden until `snoozed_until`, then reopened; `resolved` — Closed. | | `priority` | string \| null | The priority of the conversation, or `null` when none is set. One of: `low` — Low priority; `medium` — Medium priority; `high` — High priority; `urgent` — Urgent — the highest priority; `null` — No priority is set. | | `labels` | array of string | Array of strings — the titles of the conversation's labels. | | `custom_attributes` | object | Object containing the custom attributes related to the conversation (custom attribute keys and their values). | | `additional_attributes` | object | Object containing the additional attributes related to the conversation: channel or system data, such as `mail_subject`, `source` or `transcript_lmi`. | | `meta` | object | Object containing the conversation's metadata — its people and channel. | | `meta.sender` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `meta.sender.id` | integer | The contact's numeric ID. | | `meta.sender.name` | string | The full name of the contact. | | `meta.sender.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `meta.sender.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `meta.sender.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `meta.sender.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `meta.sender.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `meta.sender.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `meta.sender.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `meta.sender.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `meta.sender.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `meta.sender.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `meta.sender.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `meta.sender.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `meta.sender.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `meta.sender.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `meta.sender.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `meta.sender.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `meta.sender.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `meta.sender.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `meta.sender.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `meta.sender.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `meta.sender.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `meta.sender.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `meta.sender.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `meta.sender.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `meta.sender.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | | `meta.assignee` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `meta.assignee.id` | integer | The agent's numeric ID (user ID). | | `meta.assignee.account_id` | integer | The numeric ID of the account. | | `meta.assignee.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `meta.assignee.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `meta.assignee.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `meta.assignee.email` | string | The agent's login email address. | | `meta.assignee.available_name` | string | The agent's display name. | | `meta.assignee.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `meta.assignee.name` | string | The agent's full name. | | `meta.assignee.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `meta.assignee.operation_bot` | boolean | `true` for internal operation-bot users. | | `meta.assignee.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `meta.assignee.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `meta.assignee.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `meta.assignee.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `meta.assignee.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `meta.assignee.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `meta.assignee.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `meta.assignee.email1` | string \| null | The email address that receives two-factor codes by email. | | `meta.assignee.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `meta.team` | object | Object containing the assigned team's data, if a team is assigned. | | `meta.team.id` | integer | The numeric ID of the team. | | `meta.team.name` | string | The name of the team. Stored in lower case, and unique in the account. | | `meta.team.description` | string | The description of the team. | | `meta.team.allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `meta.team.account_id` | integer | The numeric ID of the account. | | `meta.team.members_count` | integer | The number of agents in the team. | | `meta.team.is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | | `meta.channel` | string | The channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `meta.hmac_verified` | boolean | Whether the contact's identity was HMAC-verified (website widget). | | `contact_inbox` | object | The contact's link (contact inbox) to the conversation's inbox. | | `contact_inbox.wa_id` | string \| null | The contact's WhatsApp ID in this inbox, for WhatsApp users who hide their phone number; otherwise `null`. | | `messages` | array of object | Array of message objects — the **last** message only. Use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. | | `messages[].id` | integer | The numeric ID of the message. | | `messages[].content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `messages[].inbox_id` | integer | The numeric ID of the inbox. | | `messages[].conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `messages[].message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `messages[].content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `messages[].content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `messages[].private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `messages[].status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `messages[].status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `messages[].source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `messages[].echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `messages[].sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `messages[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `messages[].sender.name` | string | The sender's name. | | `messages[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `messages[].sender.available_name` | string | An agent's display name. | | `messages[].sender.email` | string \| null | The sender's email address. | | `messages[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `messages[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `messages[].sender.avatar_url` | string | An agent's avatar image URL. | | `messages[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `messages[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `messages[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `messages[].sender.blocked` | boolean | Whether a contact is blocked. | | `messages[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `messages[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `messages[].sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `messages[].sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `messages[].attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `messages[].attachments[].id` | integer | The numeric ID of the file (attachment). | | `messages[].attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `messages[].attachments[].account_id` | integer | The numeric ID of the account. | | `messages[].attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `messages[].attachments[].filename` | string | The name of the file. | | `messages[].attachments[].extension` | string \| null | The file extension, when known. | | `messages[].attachments[].data_url` | string | The URL of the file. | | `messages[].attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `messages[].attachments[].file_size` | integer | The file size, in bytes. | | `messages[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `messages[].delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `messages[].created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `messages[].created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `last_non_activity_message` | object | A message in a conversation. Outgoing messages are delivered to the contact through the inbox's channel (WhatsApp, SMS, email, Facebook, API webhook, and so on). | | `last_non_activity_message.id` | integer | The numeric ID of the message. | | `last_non_activity_message.content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `last_non_activity_message.inbox_id` | integer | The numeric ID of the inbox. | | `last_non_activity_message.conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `last_non_activity_message.message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `last_non_activity_message.content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `last_non_activity_message.content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `last_non_activity_message.private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `last_non_activity_message.status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `last_non_activity_message.status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `last_non_activity_message.source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `last_non_activity_message.echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `last_non_activity_message.sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `last_non_activity_message.sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `last_non_activity_message.sender.name` | string | The sender's name. | | `last_non_activity_message.sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `last_non_activity_message.sender.available_name` | string | An agent's display name. | | `last_non_activity_message.sender.email` | string \| null | The sender's email address. | | `last_non_activity_message.sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `last_non_activity_message.sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `last_non_activity_message.sender.avatar_url` | string | An agent's avatar image URL. | | `last_non_activity_message.sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `last_non_activity_message.sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `last_non_activity_message.sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `last_non_activity_message.sender.blocked` | boolean | Whether a contact is blocked. | | `last_non_activity_message.sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `last_non_activity_message.sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `last_non_activity_message.sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `last_non_activity_message.sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `last_non_activity_message.attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `last_non_activity_message.attachments[].id` | integer | The numeric ID of the file (attachment). | | `last_non_activity_message.attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `last_non_activity_message.attachments[].account_id` | integer | The numeric ID of the account. | | `last_non_activity_message.attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `last_non_activity_message.attachments[].filename` | string | The name of the file. | | `last_non_activity_message.attachments[].extension` | string \| null | The file extension, when known. | | `last_non_activity_message.attachments[].data_url` | string | The URL of the file. | | `last_non_activity_message.attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `last_non_activity_message.attachments[].file_size` | integer | The file size, in bytes. | | `last_non_activity_message.ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `last_non_activity_message.delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `last_non_activity_message.created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `last_non_activity_message.created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `can_reply` | boolean | Whether the conversation is currently within the messaging window: `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window). | | `muted` | boolean | Whether the conversation is currently muted. A muted conversation does not notify agents. | | `snoozed_until` | integer \| null | The time at which a snoozed conversation is reactivated (reopened), in **milliseconds** since the Unix epoch, or `null`. | | `unread_count` | integer | The number of unread messages — incoming messages the agents have not read. | | `has_incoming_messages` | boolean | Whether the contact has written at least one public message. | | `created_at` | integer | The time at which the conversation was created, measured in seconds since the Unix epoch. | | `timestamp` | integer | The same as `last_activity_at`. | | `last_activity_at` | integer | The time of the conversation's last activity (Unix timestamp, in seconds). | | `first_reply_created_at` | integer | The time at which the first reply was sent to the contact (Unix timestamp, in seconds), or `0` when there is none yet. | | `waiting_since` | integer | Since when the contact has been waiting for a reply (Unix timestamp, in seconds), or `0`. | | `agent_last_seen_at` | integer | The last time an agent saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `assignee_last_seen_at` | integer | The last time the assignee saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `contact_last_seen_at` | integer | The last time the contact interacted with your service — when they last saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `last_incoming_message_time` | string \| null | The time of the last incoming message (ISO 8601), or `null`. | | `sla_policy_id` | integer \| null | The ID of the applied SLA policy, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `applied_sla` | object \| null | The applied SLA policy's details and thresholds, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `sla_events` | array of object | The SLA events of the conversation (missed thresholds). | | `sla_events_with_distinct_event_type` | array of object | The SLA events, one per event type. | | `feature_enabled_sla` | boolean | Whether the account uses SLA policies (the SLA feature is enabled). | | `campaign_id` | integer \| null | The ID of the campaign that started the conversation, or `null`. | | `pinned` | boolean | Whether the caller pinned this conversation. | | `file` | object | `{url, file_type}` when a file is attached to the conversation itself (rare). | #### Example: Policy applied Only the SLA fields are shown; the response is the full conversation. ```json { "id": 1501, "sla_policy_id": 4, "applied_sla": { "id": 210, "sla_id": 4, "sla_status": "active", "created_at": 1794473400, "updated_at": 1794473400, "sla_description": "Standard response times", "sla_name": "Standard", "sla_first_response_time_threshold": 60, "sla_next_response_time_threshold": 180, "sla_only_during_business_hours": false, "sla_resolution_time_threshold": 240 }, "sla_events": [] } ``` #### Example: Policy removed Only the SLA fields are shown; the response is the full conversation. ```json { "id": 1501, "sla_policy_id": null, "applied_sla": null, "sla_events": [] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The conversation or the SLA policy does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: SLA policy not found No SLA policy with this `sla_policy_id`. ```json { "error": "SLA policy not found" } ``` #### Example: Conversation not found No conversation with this ID. ```json { "error": "Resource could not be found" } ``` --- # Mark Conversation as Read Source: https://docs.99digital.co.il/online-api/conversations/mark-conversation-as-read Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/mark-conversation-as-read.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/update_last_seen` Mark a conversation as read. Sets the conversation's `agent_last_seen_at` to now — and `assignee_last_seen_at` too, when the caller is the assignee — so its incoming messages count as read. The three read / unread endpoints: | Action | Method | Path | Effect | | --- | --- | --- | --- | | [Mark as read](https://docs.99digital.co.il/online-api/conversations/mark-conversation-as-read) | `POST` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/update_last_seen` | Sets the agent's last-seen time to now (also the assignee's, when the caller is the assignee). | | [Mark as unread (by last incoming message)](https://docs.99digital.co.il/online-api/conversations/mark-conversation-as-unread) | `POST` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/unread` | Moves last-seen to just before the last incoming message, so it counts as unread again. | | [Mark as unread (flag)](https://docs.99digital.co.il/online-api/conversations/set-conversation-unread) | `POST` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/set_unread` | Marks the conversation unread and fires `conversation.unread`. | **Authorization**: user token. **Response** (`200 OK`): the full [conversation object](https://docs.99digital.co.il/online-api/conversations/get-conversation). The request has no body. **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/update_last_seen' \ -H 'api_access_token: ' ``` ## Remarks - For several conversations at once, use [Bulk Mark as Read](https://docs.99digital.co.il/online-api/conversations/bulk-mark-as-read). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Responses ### 200 — The full conversation. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The conversation's numeric ID: its display ID, used in every path and shown in the dashboard URL. | | `uuid` | string | A globally unique ID of the conversation. | | `account_id` | integer | The numeric ID of the account. | | `inbox_id` | integer | The numeric ID of the inbox. | | `status` | string | The status of the conversation. The status names in the API differ from the labels in the dashboard: the dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Hidden until `snoozed_until`, then reopened; `resolved` — Closed. | | `priority` | string \| null | The priority of the conversation, or `null` when none is set. One of: `low` — Low priority; `medium` — Medium priority; `high` — High priority; `urgent` — Urgent — the highest priority; `null` — No priority is set. | | `labels` | array of string | Array of strings — the titles of the conversation's labels. | | `custom_attributes` | object | Object containing the custom attributes related to the conversation (custom attribute keys and their values). | | `additional_attributes` | object | Object containing the additional attributes related to the conversation: channel or system data, such as `mail_subject`, `source` or `transcript_lmi`. | | `meta` | object | Object containing the conversation's metadata — its people and channel. | | `meta.sender` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `meta.sender.id` | integer | The contact's numeric ID. | | `meta.sender.name` | string | The full name of the contact. | | `meta.sender.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `meta.sender.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `meta.sender.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `meta.sender.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `meta.sender.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `meta.sender.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `meta.sender.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `meta.sender.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `meta.sender.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `meta.sender.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `meta.sender.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `meta.sender.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `meta.sender.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `meta.sender.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `meta.sender.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `meta.sender.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `meta.sender.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `meta.sender.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `meta.sender.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `meta.sender.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `meta.sender.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `meta.sender.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `meta.sender.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `meta.sender.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `meta.sender.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | | `meta.assignee` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `meta.assignee.id` | integer | The agent's numeric ID (user ID). | | `meta.assignee.account_id` | integer | The numeric ID of the account. | | `meta.assignee.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `meta.assignee.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `meta.assignee.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `meta.assignee.email` | string | The agent's login email address. | | `meta.assignee.available_name` | string | The agent's display name. | | `meta.assignee.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `meta.assignee.name` | string | The agent's full name. | | `meta.assignee.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `meta.assignee.operation_bot` | boolean | `true` for internal operation-bot users. | | `meta.assignee.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `meta.assignee.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `meta.assignee.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `meta.assignee.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `meta.assignee.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `meta.assignee.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `meta.assignee.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `meta.assignee.email1` | string \| null | The email address that receives two-factor codes by email. | | `meta.assignee.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `meta.team` | object | Object containing the assigned team's data, if a team is assigned. | | `meta.team.id` | integer | The numeric ID of the team. | | `meta.team.name` | string | The name of the team. Stored in lower case, and unique in the account. | | `meta.team.description` | string | The description of the team. | | `meta.team.allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `meta.team.account_id` | integer | The numeric ID of the account. | | `meta.team.members_count` | integer | The number of agents in the team. | | `meta.team.is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | | `meta.channel` | string | The channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `meta.hmac_verified` | boolean | Whether the contact's identity was HMAC-verified (website widget). | | `contact_inbox` | object | The contact's link (contact inbox) to the conversation's inbox. | | `contact_inbox.wa_id` | string \| null | The contact's WhatsApp ID in this inbox, for WhatsApp users who hide their phone number; otherwise `null`. | | `messages` | array of object | Array of message objects — the **last** message only. Use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. | | `messages[].id` | integer | The numeric ID of the message. | | `messages[].content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `messages[].inbox_id` | integer | The numeric ID of the inbox. | | `messages[].conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `messages[].message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `messages[].content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `messages[].content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `messages[].private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `messages[].status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `messages[].status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `messages[].source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `messages[].echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `messages[].sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `messages[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `messages[].sender.name` | string | The sender's name. | | `messages[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `messages[].sender.available_name` | string | An agent's display name. | | `messages[].sender.email` | string \| null | The sender's email address. | | `messages[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `messages[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `messages[].sender.avatar_url` | string | An agent's avatar image URL. | | `messages[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `messages[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `messages[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `messages[].sender.blocked` | boolean | Whether a contact is blocked. | | `messages[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `messages[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `messages[].sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `messages[].sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `messages[].attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `messages[].attachments[].id` | integer | The numeric ID of the file (attachment). | | `messages[].attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `messages[].attachments[].account_id` | integer | The numeric ID of the account. | | `messages[].attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `messages[].attachments[].filename` | string | The name of the file. | | `messages[].attachments[].extension` | string \| null | The file extension, when known. | | `messages[].attachments[].data_url` | string | The URL of the file. | | `messages[].attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `messages[].attachments[].file_size` | integer | The file size, in bytes. | | `messages[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `messages[].delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `messages[].created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `messages[].created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `last_non_activity_message` | object | A message in a conversation. Outgoing messages are delivered to the contact through the inbox's channel (WhatsApp, SMS, email, Facebook, API webhook, and so on). | | `last_non_activity_message.id` | integer | The numeric ID of the message. | | `last_non_activity_message.content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `last_non_activity_message.inbox_id` | integer | The numeric ID of the inbox. | | `last_non_activity_message.conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `last_non_activity_message.message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `last_non_activity_message.content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `last_non_activity_message.content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `last_non_activity_message.private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `last_non_activity_message.status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `last_non_activity_message.status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `last_non_activity_message.source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `last_non_activity_message.echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `last_non_activity_message.sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `last_non_activity_message.sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `last_non_activity_message.sender.name` | string | The sender's name. | | `last_non_activity_message.sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `last_non_activity_message.sender.available_name` | string | An agent's display name. | | `last_non_activity_message.sender.email` | string \| null | The sender's email address. | | `last_non_activity_message.sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `last_non_activity_message.sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `last_non_activity_message.sender.avatar_url` | string | An agent's avatar image URL. | | `last_non_activity_message.sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `last_non_activity_message.sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `last_non_activity_message.sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `last_non_activity_message.sender.blocked` | boolean | Whether a contact is blocked. | | `last_non_activity_message.sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `last_non_activity_message.sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `last_non_activity_message.sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `last_non_activity_message.sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `last_non_activity_message.attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `last_non_activity_message.attachments[].id` | integer | The numeric ID of the file (attachment). | | `last_non_activity_message.attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `last_non_activity_message.attachments[].account_id` | integer | The numeric ID of the account. | | `last_non_activity_message.attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `last_non_activity_message.attachments[].filename` | string | The name of the file. | | `last_non_activity_message.attachments[].extension` | string \| null | The file extension, when known. | | `last_non_activity_message.attachments[].data_url` | string | The URL of the file. | | `last_non_activity_message.attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `last_non_activity_message.attachments[].file_size` | integer | The file size, in bytes. | | `last_non_activity_message.ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `last_non_activity_message.delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `last_non_activity_message.created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `last_non_activity_message.created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `can_reply` | boolean | Whether the conversation is currently within the messaging window: `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window). | | `muted` | boolean | Whether the conversation is currently muted. A muted conversation does not notify agents. | | `snoozed_until` | integer \| null | The time at which a snoozed conversation is reactivated (reopened), in **milliseconds** since the Unix epoch, or `null`. | | `unread_count` | integer | The number of unread messages — incoming messages the agents have not read. | | `has_incoming_messages` | boolean | Whether the contact has written at least one public message. | | `created_at` | integer | The time at which the conversation was created, measured in seconds since the Unix epoch. | | `timestamp` | integer | The same as `last_activity_at`. | | `last_activity_at` | integer | The time of the conversation's last activity (Unix timestamp, in seconds). | | `first_reply_created_at` | integer | The time at which the first reply was sent to the contact (Unix timestamp, in seconds), or `0` when there is none yet. | | `waiting_since` | integer | Since when the contact has been waiting for a reply (Unix timestamp, in seconds), or `0`. | | `agent_last_seen_at` | integer | The last time an agent saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `assignee_last_seen_at` | integer | The last time the assignee saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `contact_last_seen_at` | integer | The last time the contact interacted with your service — when they last saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `last_incoming_message_time` | string \| null | The time of the last incoming message (ISO 8601), or `null`. | | `sla_policy_id` | integer \| null | The ID of the applied SLA policy, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `applied_sla` | object \| null | The applied SLA policy's details and thresholds, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `sla_events` | array of object | The SLA events of the conversation (missed thresholds). | | `sla_events_with_distinct_event_type` | array of object | The SLA events, one per event type. | | `feature_enabled_sla` | boolean | Whether the account uses SLA policies (the SLA feature is enabled). | | `campaign_id` | integer \| null | The ID of the campaign that started the conversation, or `null`. | | `pinned` | boolean | Whether the caller pinned this conversation. | | `file` | object | `{url, file_type}` when a file is attached to the conversation itself (rare). | #### Example: Read The conversation after it was read. `meta.assignee` is shortened. ```json { "id": 1501, "uuid": "8d4e2f1a-6b7c-4d8e-9f0a-1b2c3d4e5f60", "account_id": 12, "inbox_id": 31, "status": "open", "priority": null, "labels": [ "vip" ], "custom_attributes": { "order_id": "A-1001" }, "additional_attributes": {}, "meta": { "sender": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500 }, "channel": "Channel::Api", "assignee": { "id": 51, "account_id": 12, "availability_status": "online", "available_name": "Jane Agent", "name": "Jane Agent", "email": "jane.agent@example.com", "role": "General Manager", "thumbnail": "" }, "hmac_verified": false }, "contact_inbox": { "wa_id": null }, "messages": [ { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794472860 }, "content_attributes": {}, "private": false, "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "ticket_id": 903, "delay_hours": null, "created_at": 1794472860, "created_at_exact": "2026-11-12T08:41:00.000Z" } ], "last_non_activity_message": { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794472860 }, "content_attributes": {}, "private": false, "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "ticket_id": 903, "delay_hours": null, "created_at": 1794472860, "created_at_exact": "2026-11-12T08:41:00.000Z" }, "can_reply": true, "muted": false, "snoozed_until": null, "unread_count": 0, "has_incoming_messages": true, "created_at": 1794471000, "timestamp": 1794472860, "last_activity_at": 1794472860, "first_reply_created_at": 1794471120, "waiting_since": 1794472860, "agent_last_seen_at": 1794473100, "assignee_last_seen_at": 1794473100, "contact_last_seen_at": 0, "last_incoming_message_time": "2026-11-12T08:41:00.000Z", "sla_policy_id": null, "feature_enabled_sla": true, "applied_sla": null, "sla_events": [], "sla_events_with_distinct_event_type": [], "campaign_id": null, "pinned": false } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Mark Conversation as Unread Source: https://docs.99digital.co.il/online-api/conversations/mark-conversation-as-unread Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/mark-conversation-as-unread.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/unread` Mark a conversation as unread by moving its last-seen time back to its last incoming message. Moves the conversation's last-seen time (`agent_last_seen_at`) to just before its last incoming message, so that message counts as unread again (`unread_count` is at least `1`). The three read / unread endpoints: | Action | Method | Path | Effect | | --- | --- | --- | --- | | [Mark as read](https://docs.99digital.co.il/online-api/conversations/mark-conversation-as-read) | `POST` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/update_last_seen` | Sets the agent's last-seen time to now (also the assignee's, when the caller is the assignee). | | [Mark as unread (by last incoming message)](https://docs.99digital.co.il/online-api/conversations/mark-conversation-as-unread) | `POST` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/unread` | Moves last-seen to just before the last incoming message, so it counts as unread again. | | [Mark as unread (flag)](https://docs.99digital.co.il/online-api/conversations/set-conversation-unread) | `POST` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/set_unread` | Marks the conversation unread and fires `conversation.unread`. | **Authorization**: user token. **Response** (`200 OK`): the full [conversation object](https://docs.99digital.co.il/online-api/conversations/get-conversation). The request has no body. **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/unread' \ -H 'api_access_token: ' ``` ## Remarks - For several conversations at once, use [Bulk Mark as Unread](https://docs.99digital.co.il/online-api/conversations/bulk-mark-as-unread). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Responses ### 200 — The full conversation. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The conversation's numeric ID: its display ID, used in every path and shown in the dashboard URL. | | `uuid` | string | A globally unique ID of the conversation. | | `account_id` | integer | The numeric ID of the account. | | `inbox_id` | integer | The numeric ID of the inbox. | | `status` | string | The status of the conversation. The status names in the API differ from the labels in the dashboard: the dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Hidden until `snoozed_until`, then reopened; `resolved` — Closed. | | `priority` | string \| null | The priority of the conversation, or `null` when none is set. One of: `low` — Low priority; `medium` — Medium priority; `high` — High priority; `urgent` — Urgent — the highest priority; `null` — No priority is set. | | `labels` | array of string | Array of strings — the titles of the conversation's labels. | | `custom_attributes` | object | Object containing the custom attributes related to the conversation (custom attribute keys and their values). | | `additional_attributes` | object | Object containing the additional attributes related to the conversation: channel or system data, such as `mail_subject`, `source` or `transcript_lmi`. | | `meta` | object | Object containing the conversation's metadata — its people and channel. | | `meta.sender` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `meta.sender.id` | integer | The contact's numeric ID. | | `meta.sender.name` | string | The full name of the contact. | | `meta.sender.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `meta.sender.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `meta.sender.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `meta.sender.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `meta.sender.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `meta.sender.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `meta.sender.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `meta.sender.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `meta.sender.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `meta.sender.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `meta.sender.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `meta.sender.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `meta.sender.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `meta.sender.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `meta.sender.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `meta.sender.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `meta.sender.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `meta.sender.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `meta.sender.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `meta.sender.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `meta.sender.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `meta.sender.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `meta.sender.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `meta.sender.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `meta.sender.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | | `meta.assignee` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `meta.assignee.id` | integer | The agent's numeric ID (user ID). | | `meta.assignee.account_id` | integer | The numeric ID of the account. | | `meta.assignee.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `meta.assignee.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `meta.assignee.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `meta.assignee.email` | string | The agent's login email address. | | `meta.assignee.available_name` | string | The agent's display name. | | `meta.assignee.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `meta.assignee.name` | string | The agent's full name. | | `meta.assignee.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `meta.assignee.operation_bot` | boolean | `true` for internal operation-bot users. | | `meta.assignee.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `meta.assignee.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `meta.assignee.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `meta.assignee.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `meta.assignee.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `meta.assignee.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `meta.assignee.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `meta.assignee.email1` | string \| null | The email address that receives two-factor codes by email. | | `meta.assignee.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `meta.team` | object | Object containing the assigned team's data, if a team is assigned. | | `meta.team.id` | integer | The numeric ID of the team. | | `meta.team.name` | string | The name of the team. Stored in lower case, and unique in the account. | | `meta.team.description` | string | The description of the team. | | `meta.team.allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `meta.team.account_id` | integer | The numeric ID of the account. | | `meta.team.members_count` | integer | The number of agents in the team. | | `meta.team.is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | | `meta.channel` | string | The channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `meta.hmac_verified` | boolean | Whether the contact's identity was HMAC-verified (website widget). | | `contact_inbox` | object | The contact's link (contact inbox) to the conversation's inbox. | | `contact_inbox.wa_id` | string \| null | The contact's WhatsApp ID in this inbox, for WhatsApp users who hide their phone number; otherwise `null`. | | `messages` | array of object | Array of message objects — the **last** message only. Use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. | | `messages[].id` | integer | The numeric ID of the message. | | `messages[].content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `messages[].inbox_id` | integer | The numeric ID of the inbox. | | `messages[].conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `messages[].message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `messages[].content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `messages[].content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `messages[].private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `messages[].status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `messages[].status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `messages[].source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `messages[].echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `messages[].sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `messages[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `messages[].sender.name` | string | The sender's name. | | `messages[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `messages[].sender.available_name` | string | An agent's display name. | | `messages[].sender.email` | string \| null | The sender's email address. | | `messages[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `messages[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `messages[].sender.avatar_url` | string | An agent's avatar image URL. | | `messages[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `messages[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `messages[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `messages[].sender.blocked` | boolean | Whether a contact is blocked. | | `messages[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `messages[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `messages[].sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `messages[].sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `messages[].attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `messages[].attachments[].id` | integer | The numeric ID of the file (attachment). | | `messages[].attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `messages[].attachments[].account_id` | integer | The numeric ID of the account. | | `messages[].attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `messages[].attachments[].filename` | string | The name of the file. | | `messages[].attachments[].extension` | string \| null | The file extension, when known. | | `messages[].attachments[].data_url` | string | The URL of the file. | | `messages[].attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `messages[].attachments[].file_size` | integer | The file size, in bytes. | | `messages[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `messages[].delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `messages[].created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `messages[].created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `last_non_activity_message` | object | A message in a conversation. Outgoing messages are delivered to the contact through the inbox's channel (WhatsApp, SMS, email, Facebook, API webhook, and so on). | | `last_non_activity_message.id` | integer | The numeric ID of the message. | | `last_non_activity_message.content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `last_non_activity_message.inbox_id` | integer | The numeric ID of the inbox. | | `last_non_activity_message.conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `last_non_activity_message.message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `last_non_activity_message.content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `last_non_activity_message.content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `last_non_activity_message.private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `last_non_activity_message.status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `last_non_activity_message.status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `last_non_activity_message.source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `last_non_activity_message.echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `last_non_activity_message.sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `last_non_activity_message.sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `last_non_activity_message.sender.name` | string | The sender's name. | | `last_non_activity_message.sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `last_non_activity_message.sender.available_name` | string | An agent's display name. | | `last_non_activity_message.sender.email` | string \| null | The sender's email address. | | `last_non_activity_message.sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `last_non_activity_message.sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `last_non_activity_message.sender.avatar_url` | string | An agent's avatar image URL. | | `last_non_activity_message.sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `last_non_activity_message.sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `last_non_activity_message.sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `last_non_activity_message.sender.blocked` | boolean | Whether a contact is blocked. | | `last_non_activity_message.sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `last_non_activity_message.sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `last_non_activity_message.sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `last_non_activity_message.sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `last_non_activity_message.attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `last_non_activity_message.attachments[].id` | integer | The numeric ID of the file (attachment). | | `last_non_activity_message.attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `last_non_activity_message.attachments[].account_id` | integer | The numeric ID of the account. | | `last_non_activity_message.attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `last_non_activity_message.attachments[].filename` | string | The name of the file. | | `last_non_activity_message.attachments[].extension` | string \| null | The file extension, when known. | | `last_non_activity_message.attachments[].data_url` | string | The URL of the file. | | `last_non_activity_message.attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `last_non_activity_message.attachments[].file_size` | integer | The file size, in bytes. | | `last_non_activity_message.ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `last_non_activity_message.delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `last_non_activity_message.created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `last_non_activity_message.created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `can_reply` | boolean | Whether the conversation is currently within the messaging window: `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window). | | `muted` | boolean | Whether the conversation is currently muted. A muted conversation does not notify agents. | | `snoozed_until` | integer \| null | The time at which a snoozed conversation is reactivated (reopened), in **milliseconds** since the Unix epoch, or `null`. | | `unread_count` | integer | The number of unread messages — incoming messages the agents have not read. | | `has_incoming_messages` | boolean | Whether the contact has written at least one public message. | | `created_at` | integer | The time at which the conversation was created, measured in seconds since the Unix epoch. | | `timestamp` | integer | The same as `last_activity_at`. | | `last_activity_at` | integer | The time of the conversation's last activity (Unix timestamp, in seconds). | | `first_reply_created_at` | integer | The time at which the first reply was sent to the contact (Unix timestamp, in seconds), or `0` when there is none yet. | | `waiting_since` | integer | Since when the contact has been waiting for a reply (Unix timestamp, in seconds), or `0`. | | `agent_last_seen_at` | integer | The last time an agent saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `assignee_last_seen_at` | integer | The last time the assignee saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `contact_last_seen_at` | integer | The last time the contact interacted with your service — when they last saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `last_incoming_message_time` | string \| null | The time of the last incoming message (ISO 8601), or `null`. | | `sla_policy_id` | integer \| null | The ID of the applied SLA policy, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `applied_sla` | object \| null | The applied SLA policy's details and thresholds, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `sla_events` | array of object | The SLA events of the conversation (missed thresholds). | | `sla_events_with_distinct_event_type` | array of object | The SLA events, one per event type. | | `feature_enabled_sla` | boolean | Whether the account uses SLA policies (the SLA feature is enabled). | | `campaign_id` | integer \| null | The ID of the campaign that started the conversation, or `null`. | | `pinned` | boolean | Whether the caller pinned this conversation. | | `file` | object | `{url, file_type}` when a file is attached to the conversation itself (rare). | #### Example: Unread The last incoming message counts as unread again. `meta.assignee` is shortened. ```json { "id": 1501, "uuid": "8d4e2f1a-6b7c-4d8e-9f0a-1b2c3d4e5f60", "account_id": 12, "inbox_id": 31, "status": "open", "priority": null, "labels": [ "vip" ], "custom_attributes": { "order_id": "A-1001" }, "additional_attributes": {}, "meta": { "sender": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500 }, "channel": "Channel::Api", "assignee": { "id": 51, "account_id": 12, "availability_status": "online", "available_name": "Jane Agent", "name": "Jane Agent", "email": "jane.agent@example.com", "role": "General Manager", "thumbnail": "" }, "hmac_verified": false }, "contact_inbox": { "wa_id": null }, "messages": [ { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794472860 }, "content_attributes": {}, "private": false, "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "ticket_id": 903, "delay_hours": null, "created_at": 1794472860, "created_at_exact": "2026-11-12T08:41:00.000Z" } ], "last_non_activity_message": { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794472860 }, "content_attributes": {}, "private": false, "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "ticket_id": 903, "delay_hours": null, "created_at": 1794472860, "created_at_exact": "2026-11-12T08:41:00.000Z" }, "can_reply": true, "muted": false, "snoozed_until": null, "unread_count": 1, "has_incoming_messages": true, "created_at": 1794471000, "timestamp": 1794472860, "last_activity_at": 1794472860, "first_reply_created_at": 1794471120, "waiting_since": 1794472860, "agent_last_seen_at": 1794472859, "assignee_last_seen_at": 1794472859, "contact_last_seen_at": 0, "last_incoming_message_time": "2026-11-12T08:41:00.000Z", "sla_policy_id": null, "feature_enabled_sla": true, "applied_sla": null, "sla_events": [], "sla_events_with_distinct_event_type": [], "campaign_id": null, "pinned": false } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Set Conversation Unread Source: https://docs.99digital.co.il/online-api/conversations/set-conversation-unread Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/set-conversation-unread.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/set_unread` Flag a conversation as unread. Marks the conversation unread and fires the `conversation.unread` event. The three read / unread endpoints: | Action | Method | Path | Effect | | --- | --- | --- | --- | | [Mark as read](https://docs.99digital.co.il/online-api/conversations/mark-conversation-as-read) | `POST` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/update_last_seen` | Sets the agent's last-seen time to now (also the assignee's, when the caller is the assignee). | | [Mark as unread (by last incoming message)](https://docs.99digital.co.il/online-api/conversations/mark-conversation-as-unread) | `POST` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/unread` | Moves last-seen to just before the last incoming message, so it counts as unread again. | | [Mark as unread (flag)](https://docs.99digital.co.il/online-api/conversations/set-conversation-unread) | `POST` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/set_unread` | Marks the conversation unread and fires `conversation.unread`. | **Authorization**: user token. **Response** (`200 OK`): the full [conversation object](https://docs.99digital.co.il/online-api/conversations/get-conversation). The request has no body. **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/set_unread' \ -H 'api_access_token: ' ``` ## Remarks - `conversation.unread` is not one of the [webhook events](https://docs.99digital.co.il/online-api/webhooks/webhook-events) you can subscribe to. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Responses ### 200 — The full conversation. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The conversation's numeric ID: its display ID, used in every path and shown in the dashboard URL. | | `uuid` | string | A globally unique ID of the conversation. | | `account_id` | integer | The numeric ID of the account. | | `inbox_id` | integer | The numeric ID of the inbox. | | `status` | string | The status of the conversation. The status names in the API differ from the labels in the dashboard: the dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Hidden until `snoozed_until`, then reopened; `resolved` — Closed. | | `priority` | string \| null | The priority of the conversation, or `null` when none is set. One of: `low` — Low priority; `medium` — Medium priority; `high` — High priority; `urgent` — Urgent — the highest priority; `null` — No priority is set. | | `labels` | array of string | Array of strings — the titles of the conversation's labels. | | `custom_attributes` | object | Object containing the custom attributes related to the conversation (custom attribute keys and their values). | | `additional_attributes` | object | Object containing the additional attributes related to the conversation: channel or system data, such as `mail_subject`, `source` or `transcript_lmi`. | | `meta` | object | Object containing the conversation's metadata — its people and channel. | | `meta.sender` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `meta.sender.id` | integer | The contact's numeric ID. | | `meta.sender.name` | string | The full name of the contact. | | `meta.sender.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `meta.sender.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `meta.sender.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `meta.sender.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `meta.sender.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `meta.sender.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `meta.sender.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `meta.sender.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `meta.sender.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `meta.sender.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `meta.sender.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `meta.sender.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `meta.sender.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `meta.sender.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `meta.sender.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `meta.sender.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `meta.sender.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `meta.sender.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `meta.sender.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `meta.sender.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `meta.sender.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `meta.sender.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `meta.sender.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `meta.sender.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `meta.sender.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | | `meta.assignee` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `meta.assignee.id` | integer | The agent's numeric ID (user ID). | | `meta.assignee.account_id` | integer | The numeric ID of the account. | | `meta.assignee.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `meta.assignee.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `meta.assignee.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `meta.assignee.email` | string | The agent's login email address. | | `meta.assignee.available_name` | string | The agent's display name. | | `meta.assignee.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `meta.assignee.name` | string | The agent's full name. | | `meta.assignee.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `meta.assignee.operation_bot` | boolean | `true` for internal operation-bot users. | | `meta.assignee.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `meta.assignee.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `meta.assignee.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `meta.assignee.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `meta.assignee.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `meta.assignee.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `meta.assignee.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `meta.assignee.email1` | string \| null | The email address that receives two-factor codes by email. | | `meta.assignee.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `meta.team` | object | Object containing the assigned team's data, if a team is assigned. | | `meta.team.id` | integer | The numeric ID of the team. | | `meta.team.name` | string | The name of the team. Stored in lower case, and unique in the account. | | `meta.team.description` | string | The description of the team. | | `meta.team.allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `meta.team.account_id` | integer | The numeric ID of the account. | | `meta.team.members_count` | integer | The number of agents in the team. | | `meta.team.is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | | `meta.channel` | string | The channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `meta.hmac_verified` | boolean | Whether the contact's identity was HMAC-verified (website widget). | | `contact_inbox` | object | The contact's link (contact inbox) to the conversation's inbox. | | `contact_inbox.wa_id` | string \| null | The contact's WhatsApp ID in this inbox, for WhatsApp users who hide their phone number; otherwise `null`. | | `messages` | array of object | Array of message objects — the **last** message only. Use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. | | `messages[].id` | integer | The numeric ID of the message. | | `messages[].content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `messages[].inbox_id` | integer | The numeric ID of the inbox. | | `messages[].conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `messages[].message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `messages[].content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `messages[].content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `messages[].private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `messages[].status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `messages[].status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `messages[].source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `messages[].echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `messages[].sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `messages[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `messages[].sender.name` | string | The sender's name. | | `messages[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `messages[].sender.available_name` | string | An agent's display name. | | `messages[].sender.email` | string \| null | The sender's email address. | | `messages[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `messages[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `messages[].sender.avatar_url` | string | An agent's avatar image URL. | | `messages[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `messages[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `messages[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `messages[].sender.blocked` | boolean | Whether a contact is blocked. | | `messages[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `messages[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `messages[].sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `messages[].sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `messages[].attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `messages[].attachments[].id` | integer | The numeric ID of the file (attachment). | | `messages[].attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `messages[].attachments[].account_id` | integer | The numeric ID of the account. | | `messages[].attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `messages[].attachments[].filename` | string | The name of the file. | | `messages[].attachments[].extension` | string \| null | The file extension, when known. | | `messages[].attachments[].data_url` | string | The URL of the file. | | `messages[].attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `messages[].attachments[].file_size` | integer | The file size, in bytes. | | `messages[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `messages[].delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `messages[].created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `messages[].created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `last_non_activity_message` | object | A message in a conversation. Outgoing messages are delivered to the contact through the inbox's channel (WhatsApp, SMS, email, Facebook, API webhook, and so on). | | `last_non_activity_message.id` | integer | The numeric ID of the message. | | `last_non_activity_message.content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `last_non_activity_message.inbox_id` | integer | The numeric ID of the inbox. | | `last_non_activity_message.conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `last_non_activity_message.message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `last_non_activity_message.content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `last_non_activity_message.content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `last_non_activity_message.private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `last_non_activity_message.status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `last_non_activity_message.status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `last_non_activity_message.source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `last_non_activity_message.echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `last_non_activity_message.sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `last_non_activity_message.sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `last_non_activity_message.sender.name` | string | The sender's name. | | `last_non_activity_message.sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `last_non_activity_message.sender.available_name` | string | An agent's display name. | | `last_non_activity_message.sender.email` | string \| null | The sender's email address. | | `last_non_activity_message.sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `last_non_activity_message.sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `last_non_activity_message.sender.avatar_url` | string | An agent's avatar image URL. | | `last_non_activity_message.sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `last_non_activity_message.sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `last_non_activity_message.sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `last_non_activity_message.sender.blocked` | boolean | Whether a contact is blocked. | | `last_non_activity_message.sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `last_non_activity_message.sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `last_non_activity_message.sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `last_non_activity_message.sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `last_non_activity_message.attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `last_non_activity_message.attachments[].id` | integer | The numeric ID of the file (attachment). | | `last_non_activity_message.attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `last_non_activity_message.attachments[].account_id` | integer | The numeric ID of the account. | | `last_non_activity_message.attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `last_non_activity_message.attachments[].filename` | string | The name of the file. | | `last_non_activity_message.attachments[].extension` | string \| null | The file extension, when known. | | `last_non_activity_message.attachments[].data_url` | string | The URL of the file. | | `last_non_activity_message.attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `last_non_activity_message.attachments[].file_size` | integer | The file size, in bytes. | | `last_non_activity_message.ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `last_non_activity_message.delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `last_non_activity_message.created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `last_non_activity_message.created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `can_reply` | boolean | Whether the conversation is currently within the messaging window: `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window). | | `muted` | boolean | Whether the conversation is currently muted. A muted conversation does not notify agents. | | `snoozed_until` | integer \| null | The time at which a snoozed conversation is reactivated (reopened), in **milliseconds** since the Unix epoch, or `null`. | | `unread_count` | integer | The number of unread messages — incoming messages the agents have not read. | | `has_incoming_messages` | boolean | Whether the contact has written at least one public message. | | `created_at` | integer | The time at which the conversation was created, measured in seconds since the Unix epoch. | | `timestamp` | integer | The same as `last_activity_at`. | | `last_activity_at` | integer | The time of the conversation's last activity (Unix timestamp, in seconds). | | `first_reply_created_at` | integer | The time at which the first reply was sent to the contact (Unix timestamp, in seconds), or `0` when there is none yet. | | `waiting_since` | integer | Since when the contact has been waiting for a reply (Unix timestamp, in seconds), or `0`. | | `agent_last_seen_at` | integer | The last time an agent saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `assignee_last_seen_at` | integer | The last time the assignee saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `contact_last_seen_at` | integer | The last time the contact interacted with your service — when they last saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `last_incoming_message_time` | string \| null | The time of the last incoming message (ISO 8601), or `null`. | | `sla_policy_id` | integer \| null | The ID of the applied SLA policy, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `applied_sla` | object \| null | The applied SLA policy's details and thresholds, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `sla_events` | array of object | The SLA events of the conversation (missed thresholds). | | `sla_events_with_distinct_event_type` | array of object | The SLA events, one per event type. | | `feature_enabled_sla` | boolean | Whether the account uses SLA policies (the SLA feature is enabled). | | `campaign_id` | integer \| null | The ID of the campaign that started the conversation, or `null`. | | `pinned` | boolean | Whether the caller pinned this conversation. | | `file` | object | `{url, file_type}` when a file is attached to the conversation itself (rare). | #### Example: Unread The conversation marked as unread. `meta.assignee` is shortened. ```json { "id": 1501, "uuid": "8d4e2f1a-6b7c-4d8e-9f0a-1b2c3d4e5f60", "account_id": 12, "inbox_id": 31, "status": "open", "priority": null, "labels": [ "vip" ], "custom_attributes": { "order_id": "A-1001" }, "additional_attributes": {}, "meta": { "sender": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500 }, "channel": "Channel::Api", "assignee": { "id": 51, "account_id": 12, "availability_status": "online", "available_name": "Jane Agent", "name": "Jane Agent", "email": "jane.agent@example.com", "role": "General Manager", "thumbnail": "" }, "hmac_verified": false }, "contact_inbox": { "wa_id": null }, "messages": [ { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794472860 }, "content_attributes": {}, "private": false, "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "ticket_id": 903, "delay_hours": null, "created_at": 1794472860, "created_at_exact": "2026-11-12T08:41:00.000Z" } ], "last_non_activity_message": { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794472860 }, "content_attributes": {}, "private": false, "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "ticket_id": 903, "delay_hours": null, "created_at": 1794472860, "created_at_exact": "2026-11-12T08:41:00.000Z" }, "can_reply": true, "muted": false, "snoozed_until": null, "unread_count": 1, "has_incoming_messages": true, "created_at": 1794471000, "timestamp": 1794472860, "last_activity_at": 1794472860, "first_reply_created_at": 1794471120, "waiting_since": 1794472860, "agent_last_seen_at": 1794472859, "assignee_last_seen_at": 1794472859, "contact_last_seen_at": 0, "last_incoming_message_time": "2026-11-12T08:41:00.000Z", "sla_policy_id": null, "feature_enabled_sla": true, "applied_sla": null, "sla_events": [], "sla_events_with_distinct_event_type": [], "campaign_id": null, "pinned": false } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List Conversation Events Source: https://docs.99digital.co.il/online-api/conversations/list-conversation-events Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/list-conversation-events.md Section: Online API › Conversations `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/conversation_events` List a conversation's events: its audit trail of status, assignment, label and other changes. The audit trail of a conversation: status changes, Bot/Manual switches, assignments, team changes, labels, priority, SLA, custom and additional attribute changes, and mentions. Each event carries the `ticket_id` it belongs to (see [Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets)). | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/conversation_events` ([list](https://docs.99digital.co.il/online-api/conversations/list-conversation-events), oldest first) and `/conversation_events/{event_id}` ([one event](https://docs.99digital.co.il/online-api/conversations/get-conversation-event)) | | **Authorization** | User token. | **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Query parameters (list)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `event_type` | string | No | `agent`, `team`, `label`, `status`, `sla`, `custom_attribute`, `additional_attributes`, `priority`, `agent_mentions`, `bot_mode`, `human_mode`, `other`. | | `ticket_id` | integer | No | Only events of this ticket. | **Event fields** | Field | Description | | --- | --- | | `event_type` | `agent`, `team`, `label`, `status`, `sla`, `custom_attribute`, `additional_attributes`, `priority`, `agent_mentions`, `bot_mode`, `human_mode`, `other`. `bot_mode` / `human_mode` are switches to `open` (Bot) / `pending` (Manual). | | `created_by` | `system`, `agent_create` (an agent or API user), `agent_bot`, `user` (the contact). | | `type_old_status`, `type_new_status` | For `status`, `bot_mode` and `human_mode` events. | | `type_agent` + `type_agent_old_value` / `type_agent_new_value` | `add_agent` / `remove_agent` / `change_agent` and the agent IDs. | | `type_team` + `team_type_old_value` / `team_type_new_value` | `add_team` / `remove_team` / `change_team` and the team IDs. | | `type_label` + `type_label_value` | `add_label` / `remove_label` and the labels. | | `type_priority`, `type_sla_event`, `type_custom_attribute`, `type_additional_attributes`, `type_agent_mentions` | Details of the other event types. | | `account_id`, `contact_id`, `conversation_id`, `inbox_id`, `ticket_id` | Related IDs (`conversation_id` is the internal ID, not the display ID used in paths). | | `created_at`, `updated_at` | Unix timestamps. | The fields that describe the change depend on `event_type`; the others are `null`. **Example: label events only** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/conversation_events?event_type=label' \ -H 'api_access_token: ' ``` Response (`200 OK`): ```json { "payload": [ { "id": 6102, "created_by": "agent_create", "event_type": "label", "team_type_new_value": null, "team_type_old_value": null, "type_additional_attributes": null, "type_agent": null, "type_agent_mentions": null, "type_agent_new_value": null, "type_agent_old_value": null, "type_custom_attribute": null, "type_label": "add_label", "type_label_value": "[\"vip\"]", "type_new_status": null, "type_old_status": null, "type_priority": null, "type_sla_event": null, "type_team": null, "created_at": 1794472950, "updated_at": 1794472950, "account_id": 12, "contact_id": 801, "conversation_id": 2301, "inbox_id": 31, "ticket_id": 903 } ] } ``` To get one event, use [Get Conversation Event](https://docs.99digital.co.il/online-api/conversations/get-conversation-event). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | | `event_type` | query | string | No | Return only events of this type. The values are explained under `event_type` in the response. One of: `agent` — Changes of the assigned agent; `team` — Changes of the assigned team; `label` — Labels added or removed; `status` — Status changes; `sla` — SLA events; `custom_attribute` — Custom attribute changes; `additional_attributes` — Additional attribute changes; `priority` — Priority changes; `agent_mentions` — Agent mentions; `bot_mode` — Switches to Bot (`open`); `human_mode` — Switches to Manual (`pending`); `other` — Any other change. Example: `label`. | | `ticket_id` | query | integer | No | Return only the events of this ticket. Example: `903`. | ## Responses ### 200 — The conversation's events, oldest first. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of object | The events. | | `payload[].id` | integer | The event ID. | | `payload[].event_type` | string | What changed. One of: `agent` — The assigned agent changed — see `type_agent`; `team` — The assigned team changed — see `type_team`; `label` — Labels were added or removed — see `type_label`; `status` — The status changed — see `type_old_status` and `type_new_status`; `sla` — An SLA event — see `type_sla_event`; `custom_attribute` — A custom attribute changed — see `type_custom_attribute`; `additional_attributes` — An additional attribute changed — see `type_additional_attributes`; `priority` — The priority changed — see `type_priority`; `agent_mentions` — An agent was mentioned — see `type_agent_mentions`; `bot_mode` — A switch to Bot (`open`) — see `type_old_status` and `type_new_status`; `human_mode` — A switch to Manual (`pending`) — see `type_old_status` and `type_new_status`; `other` — Any other change. | | `payload[].created_by` | string | Who made the change. One of: `system` — The system; `agent_create` — An agent, or an API call with a user token; `agent_bot` — An agent bot; `user` — The contact. | | `payload[].type_old_status` | string \| null | In `status`, `bot_mode` and `human_mode` events, the previous status. | | `payload[].type_new_status` | string \| null | In `status`, `bot_mode` and `human_mode` events, the new status. | | `payload[].type_agent` | string \| null | In `agent` events, what happened to the assigned agent. One of: `add_agent` — An agent was added to the conversation; `remove_agent` — The agent was removed from the conversation; `change_agent` — The assigned agent changed. The previous value can be `null`; `null` — Not an `agent` event. | | `payload[].type_agent_old_value` | integer \| null | In `agent` events, the previous agent's ID. | | `payload[].type_agent_new_value` | integer \| null | In `agent` events, the new agent's ID. | | `payload[].type_team` | string \| null | In `team` events, what happened to the assigned team. One of: `add_team` — A team was added to the conversation; `remove_team` — The team was removed from the conversation; `change_team` — The assigned team changed; `null` — Not a `team` event. | | `payload[].team_type_old_value` | integer \| null | In `team` events, the previous team's ID. | | `payload[].team_type_new_value` | integer \| null | In `team` events, the new team's ID. | | `payload[].type_label` | string \| null | In `label` events, whether labels were added or removed. One of: `add_label` — Labels were added — listed in `type_label_value`; `remove_label` — Labels were removed — listed in `type_label_value`; `null` — Not a `label` event. | | `payload[].type_label_value` | string \| null | In `label` events, the labels added or removed, as a JSON-encoded array in a string. | | `payload[].type_priority` | any | The details of a `priority` event, or `null`. | | `payload[].type_sla_event` | any | The details of an `sla` event, or `null`. | | `payload[].type_custom_attribute` | any | The details of a `custom_attribute` event, or `null`. | | `payload[].type_additional_attributes` | any | The details of an `additional_attributes` event, or `null`. | | `payload[].type_agent_mentions` | any | The details of an `agent_mentions` event, or `null`. | | `payload[].account_id` | integer | The account ID. | | `payload[].contact_id` | integer | The contact ID. | | `payload[].conversation_id` | integer | The conversation's **internal** ID — not the display ID used in paths. | | `payload[].inbox_id` | integer | The inbox ID. | | `payload[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the event belongs to. | | `payload[].created_at` | integer | When the event happened (Unix time, seconds). | | `payload[].updated_at` | integer | The last update (Unix time, seconds). | #### Example: All events An assignment, then a label, oldest first. ```json { "payload": [ { "id": 6101, "created_by": "agent_create", "event_type": "agent", "team_type_new_value": null, "team_type_old_value": null, "type_additional_attributes": null, "type_agent": "change_agent", "type_agent_mentions": null, "type_agent_new_value": 51, "type_agent_old_value": null, "type_custom_attribute": null, "type_label": null, "type_label_value": null, "type_new_status": null, "type_old_status": null, "type_priority": null, "type_sla_event": null, "type_team": null, "created_at": 1794472920, "updated_at": 1794472920, "account_id": 12, "contact_id": 801, "conversation_id": 2301, "inbox_id": 31, "ticket_id": 903 }, { "id": 6102, "created_by": "agent_create", "event_type": "label", "team_type_new_value": null, "team_type_old_value": null, "type_additional_attributes": null, "type_agent": null, "type_agent_mentions": null, "type_agent_new_value": null, "type_agent_old_value": null, "type_custom_attribute": null, "type_label": "add_label", "type_label_value": "[\"vip\"]", "type_new_status": null, "type_old_status": null, "type_priority": null, "type_sla_event": null, "type_team": null, "created_at": 1794472950, "updated_at": 1794472950, "account_id": 12, "contact_id": 801, "conversation_id": 2301, "inbox_id": 31, "ticket_id": 903 } ] } ``` #### Example: Label events With `event_type=label`. ```json { "payload": [ { "id": 6102, "created_by": "agent_create", "event_type": "label", "team_type_new_value": null, "team_type_old_value": null, "type_additional_attributes": null, "type_agent": null, "type_agent_mentions": null, "type_agent_new_value": null, "type_agent_old_value": null, "type_custom_attribute": null, "type_label": "add_label", "type_label_value": "[\"vip\"]", "type_new_status": null, "type_old_status": null, "type_priority": null, "type_sla_event": null, "type_team": null, "created_at": 1794472950, "updated_at": 1794472950, "account_id": 12, "contact_id": 801, "conversation_id": 2301, "inbox_id": 31, "ticket_id": 903 } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Get Conversation Event Source: https://docs.99digital.co.il/online-api/conversations/get-conversation-event Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/get-conversation-event.md Section: Online API › Conversations `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/conversation_events/{event_id}` Get one event from a conversation's audit trail. The audit trail of a conversation: status changes, Bot/Manual switches, assignments, team changes, labels, priority, SLA, custom and additional attribute changes, and mentions. Each event carries the `ticket_id` it belongs to (see [Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets)). | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/conversation_events` ([list](https://docs.99digital.co.il/online-api/conversations/list-conversation-events), oldest first) and `/conversation_events/{event_id}` ([one event](https://docs.99digital.co.il/online-api/conversations/get-conversation-event)) | | **Authorization** | User token. | **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | | `event_id` | integer | Yes | The event's ID, as returned by [List Conversation Events](https://docs.99digital.co.il/online-api/conversations/list-conversation-events). | **Event fields** | Field | Description | | --- | --- | | `event_type` | `agent`, `team`, `label`, `status`, `sla`, `custom_attribute`, `additional_attributes`, `priority`, `agent_mentions`, `bot_mode`, `human_mode`, `other`. `bot_mode` / `human_mode` are switches to `open` (Bot) / `pending` (Manual). | | `created_by` | `system`, `agent_create` (an agent or API user), `agent_bot`, `user` (the contact). | | `type_old_status`, `type_new_status` | For `status`, `bot_mode` and `human_mode` events. | | `type_agent` + `type_agent_old_value` / `type_agent_new_value` | `add_agent` / `remove_agent` / `change_agent` and the agent IDs. | | `type_team` + `team_type_old_value` / `team_type_new_value` | `add_team` / `remove_team` / `change_team` and the team IDs. | | `type_label` + `type_label_value` | `add_label` / `remove_label` and the labels. | | `type_priority`, `type_sla_event`, `type_custom_attribute`, `type_additional_attributes`, `type_agent_mentions` | Details of the other event types. | | `account_id`, `contact_id`, `conversation_id`, `inbox_id`, `ticket_id` | Related IDs (`conversation_id` is the internal ID, not the display ID used in paths). | | `created_at`, `updated_at` | Unix timestamps. | The fields that describe the change depend on `event_type`; the others are `null`. **Example: one event (an assignment)** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/conversation_events/6101' \ -H 'api_access_token: ' ``` Response (`200 OK`). The event object is not wrapped in `payload`; null fields are trimmed here. ```json { "id": 6101, "created_by": "agent_create", "event_type": "agent", "type_agent": "change_agent", "type_agent_new_value": 51, "type_agent_old_value": null, "created_at": 1794472920, "updated_at": 1794472920, "account_id": 12, "contact_id": 801, "conversation_id": 2301, "inbox_id": 31, "ticket_id": 903 } ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | | `event_id` | path | integer | Yes | The event's ID, as returned by [List Conversation Events](https://docs.99digital.co.il/online-api/conversations/list-conversation-events). Example: `6101`. | ## Responses ### 200 — The event. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The event ID. | | `event_type` | string | What changed. One of: `agent` — The assigned agent changed — see `type_agent`; `team` — The assigned team changed — see `type_team`; `label` — Labels were added or removed — see `type_label`; `status` — The status changed — see `type_old_status` and `type_new_status`; `sla` — An SLA event — see `type_sla_event`; `custom_attribute` — A custom attribute changed — see `type_custom_attribute`; `additional_attributes` — An additional attribute changed — see `type_additional_attributes`; `priority` — The priority changed — see `type_priority`; `agent_mentions` — An agent was mentioned — see `type_agent_mentions`; `bot_mode` — A switch to Bot (`open`) — see `type_old_status` and `type_new_status`; `human_mode` — A switch to Manual (`pending`) — see `type_old_status` and `type_new_status`; `other` — Any other change. | | `created_by` | string | Who made the change. One of: `system` — The system; `agent_create` — An agent, or an API call with a user token; `agent_bot` — An agent bot; `user` — The contact. | | `type_old_status` | string \| null | In `status`, `bot_mode` and `human_mode` events, the previous status. | | `type_new_status` | string \| null | In `status`, `bot_mode` and `human_mode` events, the new status. | | `type_agent` | string \| null | In `agent` events, what happened to the assigned agent. One of: `add_agent` — An agent was added to the conversation; `remove_agent` — The agent was removed from the conversation; `change_agent` — The assigned agent changed. The previous value can be `null`; `null` — Not an `agent` event. | | `type_agent_old_value` | integer \| null | In `agent` events, the previous agent's ID. | | `type_agent_new_value` | integer \| null | In `agent` events, the new agent's ID. | | `type_team` | string \| null | In `team` events, what happened to the assigned team. One of: `add_team` — A team was added to the conversation; `remove_team` — The team was removed from the conversation; `change_team` — The assigned team changed; `null` — Not a `team` event. | | `team_type_old_value` | integer \| null | In `team` events, the previous team's ID. | | `team_type_new_value` | integer \| null | In `team` events, the new team's ID. | | `type_label` | string \| null | In `label` events, whether labels were added or removed. One of: `add_label` — Labels were added — listed in `type_label_value`; `remove_label` — Labels were removed — listed in `type_label_value`; `null` — Not a `label` event. | | `type_label_value` | string \| null | In `label` events, the labels added or removed, as a JSON-encoded array in a string. | | `type_priority` | any | The details of a `priority` event, or `null`. | | `type_sla_event` | any | The details of an `sla` event, or `null`. | | `type_custom_attribute` | any | The details of a `custom_attribute` event, or `null`. | | `type_additional_attributes` | any | The details of an `additional_attributes` event, or `null`. | | `type_agent_mentions` | any | The details of an `agent_mentions` event, or `null`. | | `account_id` | integer | The account ID. | | `contact_id` | integer | The contact ID. | | `conversation_id` | integer | The conversation's **internal** ID — not the display ID used in paths. | | `inbox_id` | integer | The inbox ID. | | `ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the event belongs to. | | `created_at` | integer | When the event happened (Unix time, seconds). | | `updated_at` | integer | The last update (Unix time, seconds). | #### Example: Assignment Agent 51 was assigned to the conversation. ```json { "id": 6101, "created_by": "agent_create", "event_type": "agent", "team_type_new_value": null, "team_type_old_value": null, "type_additional_attributes": null, "type_agent": "change_agent", "type_agent_mentions": null, "type_agent_new_value": 51, "type_agent_old_value": null, "type_custom_attribute": null, "type_label": null, "type_label_value": null, "type_new_status": null, "type_old_status": null, "type_priority": null, "type_sla_event": null, "type_team": null, "created_at": 1794472920, "updated_at": 1794472920, "account_id": 12, "contact_id": 801, "conversation_id": 2301, "inbox_id": 31, "ticket_id": 903 } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Bulk Update Conversations Source: https://docs.99digital.co.il/online-api/conversations/bulk-update-conversations Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/bulk-update-conversations.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/bulk_actions` Updates many conversations at once: status, priority, assignee, team, snooze time, and adding or removing labels. The update runs in the background, so the response is immediate. The request is rejected as a whole (`403`) if any conversation is not visible to the caller, or if the caller lacks the inbox permission for a field being changed (the same permissions as the single-conversation endpoints); then no conversation is changed. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/bulk_actions` | | **Authorization** | User token. Per-field inbox permissions as in [Toggle Conversation Status](https://docs.99digital.co.il/online-api/conversations/toggle-conversation-status), [Toggle Conversation Priority](https://docs.99digital.co.il/online-api/conversations/toggle-conversation-priority), [Assign Conversation](https://docs.99digital.co.il/online-api/conversations/assign-conversation) and [Set Conversation Labels](https://docs.99digital.co.il/online-api/conversations/set-conversation-labels). | **Permissions:** - User token: the caller must be able to see every conversation in `ids` — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). New rules system, for each field you change, in every conversation's inbox: - `fields.status`: **Inbox resolve**, **Inbox move to pending**, **Inbox reopen** or **Inbox manual/bot switch**, by the status. - `fields.priority`: **Inbox priority of conversations**. - `fields.assignee_id`: **Inbox can assign**. `fields.team_id`: **Inbox assign to group**. - `labels`: **Inbox assign labels**. - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `type` | string | Yes | Must be `Conversation`. Anything else returns `422 {"success": false}`. | | `ids` | integer[] | Yes | Conversation display IDs. | | `fields.status` | string | No | New status: `open` (Bot), `pending` (Manual), `snoozed`, `resolved`. | | `fields.priority` | string | No | New priority: `low`, `medium`, `high`, `urgent`. | | `fields.assignee_id` | integer | No | Agent to assign (must be assignable in every affected inbox). | | `fields.team_id` | integer | No | Team to assign. | | `fields.snoozed_until` | string | No | Snooze end time. | | `labels.add` | string[] | No | Labels to add. | | `labels.remove` | string[] | No | Labels to remove. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/bulk_actions' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "type": "Conversation", "ids": [1501], "fields": { "status": "pending", "priority": "high" }, "labels": { "add": ["billing"], "remove": ["follow_up"] } }' ``` **Example response**: `200 OK` with an empty body. A few seconds later conversation `1501` had status `pending`, priority `high` and labels `["vip", "billing"]`. **Error responses** | Status | When | Body | | --- | --- | --- | | `403` | A conversation is not visible to the caller, or the caller lacks the inbox permission for a field. The whole request is rejected. | | | `422` | `type` is not `Conversation`. | `{"success": false}` | ## Remarks - `labels.add` and `labels.remove` change single labels without sending the full list, unlike [Set Conversation Labels](https://docs.99digital.co.il/online-api/conversations/set-conversation-labels), which replaces it. This works for a single conversation too. - To mark conversations as read or unread, use [Bulk Mark as Read](https://docs.99digital.co.il/online-api/conversations/bulk-mark-as-read) and [Bulk Mark as Unread](https://docs.99digital.co.il/online-api/conversations/bulk-mark-as-unread). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `type` | string | Yes | The kind of records to update. Must be `Conversation`; any other value returns `422` with `{"success": false}`. One of: `Conversation`. | | `ids` | array of integer | Yes | The conversations' display IDs. See [Conversation Basics](https://docs.99digital.co.il/online-api/conversations/conversation-basics). | | `fields` | object | No | The new values. Send only the fields to change. | | `fields.status` | string | No | The new status. The dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Snoozed until `fields.snoozed_until`, then reopened; `resolved` — Resolved. | | `fields.priority` | string | No | The new priority. One of: `low` — The lowest priority; `medium` — Medium priority; `high` — High priority; `urgent` — The highest priority. | | `fields.assignee_id` | integer | No | The agent to assign. The agent must be assignable in the inbox of every conversation. | | `fields.team_id` | integer | No | The team to assign. | | `fields.snoozed_until` | string | No | With `status` `snoozed`: when the snoozed conversations reopen. | | `labels` | object | No | Labels to add or remove, by title. | | `labels.add` | array of string | No | The labels to add. | | `labels.remove` | array of string | No | The labels to remove. | ### Example: Resolve Resolve two conversations. ```json { "type": "Conversation", "ids": [ 1501, 1502 ], "fields": { "status": "resolved" } } ``` ### Example: Status, priority and labels Hand over to a human, raise the priority, and change labels. ```json { "type": "Conversation", "ids": [ 1501, 1502 ], "fields": { "status": "pending", "priority": "high" }, "labels": { "add": [ "vip" ], "remove": [ "follow_up" ] } } ``` ### Example: Assign Assign an agent and a team. ```json { "type": "Conversation", "ids": [ 1501, 1502 ], "fields": { "assignee_id": 52, "team_id": 7 } } ``` ## Responses ### 200 — The update was accepted and runs in the background, with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 422 — `type` is not `Conversation`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `success` | boolean | Always `false` in this response. | #### Example ```json { "success": false } ``` --- # Bulk Mark as Read Source: https://docs.99digital.co.il/online-api/conversations/bulk-mark-as-read Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/bulk-mark-as-read.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/bulk_actions/mark_as_read_all` Mark several conversations as read at once. Marks every conversation in `ids` as read. The response has an empty body. For one conversation, you can also use [Mark Conversation as Read](https://docs.99digital.co.il/online-api/conversations/mark-conversation-as-read), which returns the conversation. The two bulk read / unread endpoints: | Action | Method | Path | Body | Response | | --- | --- | --- | --- | --- | | [Mark as read](https://docs.99digital.co.il/online-api/conversations/bulk-mark-as-read) | `POST` | `/api/v1/accounts/{account_id}/bulk_actions/mark_as_read_all` | `{"ids": [1501]}` | `200 OK`, empty body | | [Mark as unread](https://docs.99digital.co.il/online-api/conversations/bulk-mark-as-unread) | `POST` | `/api/v1/accounts/{account_id}/bulk_actions/mark_as_unread` | `{"ids": [1501]}` | `200 OK`, `{"payload": [...conversations that were marked unread...]}`. A conversation without incoming messages is skipped. | **Permissions:** - User token: allowed. - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `ids` | integer[] | Yes | Conversation display IDs. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/bulk_actions/mark_as_read_all' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "ids": [1501, 1502] }' ``` **Example response**: `200 OK` with an empty body. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `ids` | array of integer | Yes | The conversations' display IDs. See [Conversation Basics](https://docs.99digital.co.il/online-api/conversations/conversation-basics). | ### Example (generated from the schema) ```json { "ids": [ 1501, 1502 ] } ``` ## Responses ### 200 — The conversations were marked as read, with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` --- # Bulk Mark as Unread Source: https://docs.99digital.co.il/online-api/conversations/bulk-mark-as-unread Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/bulk-mark-as-unread.md Section: Online API › Conversations `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/bulk_actions/mark_as_unread` Mark several conversations as unread at once. Marks every conversation in `ids` as unread, and returns the conversations that were marked. A conversation without incoming messages is skipped, and is not in the response. For one conversation, you can also use [Mark Conversation as Unread](https://docs.99digital.co.il/online-api/conversations/mark-conversation-as-unread). The two bulk read / unread endpoints: | Action | Method | Path | Body | Response | | --- | --- | --- | --- | --- | | [Mark as read](https://docs.99digital.co.il/online-api/conversations/bulk-mark-as-read) | `POST` | `/api/v1/accounts/{account_id}/bulk_actions/mark_as_read_all` | `{"ids": [1501]}` | `200 OK`, empty body | | [Mark as unread](https://docs.99digital.co.il/online-api/conversations/bulk-mark-as-unread) | `POST` | `/api/v1/accounts/{account_id}/bulk_actions/mark_as_unread` | `{"ids": [1501]}` | `200 OK`, `{"payload": [...conversations that were marked unread...]}`. A conversation without incoming messages is skipped. | **Permissions:** - User token: allowed. - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `ids` | integer[] | Yes | Conversation display IDs. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/bulk_actions/mark_as_unread' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "ids": [1501, 1502] }' ``` **Example response** (`200 OK`): `{"payload": [...]}` with the conversations that were marked unread — here only `1501`, because `1502` has no incoming messages. The full conversation objects are under Responses below. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `ids` | array of integer | Yes | The conversations' display IDs. See [Conversation Basics](https://docs.99digital.co.il/online-api/conversations/conversation-basics). | ### Example (generated from the schema) ```json { "ids": [ 1501, 1502 ] } ``` ## Responses ### 200 — The conversations that were marked as unread. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of object | The conversations that were marked as unread. | | `payload[].id` | integer | The conversation's numeric ID: its display ID, used in every path and shown in the dashboard URL. | | `payload[].uuid` | string | A globally unique ID of the conversation. | | `payload[].account_id` | integer | The numeric ID of the account. | | `payload[].inbox_id` | integer | The numeric ID of the inbox. | | `payload[].status` | string | The status of the conversation. The status names in the API differ from the labels in the dashboard: the dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Hidden until `snoozed_until`, then reopened; `resolved` — Closed. | | `payload[].priority` | string \| null | The priority of the conversation, or `null` when none is set. One of: `low` — Low priority; `medium` — Medium priority; `high` — High priority; `urgent` — Urgent — the highest priority; `null` — No priority is set. | | `payload[].labels` | array of string | Array of strings — the titles of the conversation's labels. | | `payload[].custom_attributes` | object | Object containing the custom attributes related to the conversation (custom attribute keys and their values). | | `payload[].additional_attributes` | object | Object containing the additional attributes related to the conversation: channel or system data, such as `mail_subject`, `source` or `transcript_lmi`. | | `payload[].meta` | object | Object containing the conversation's metadata — its people and channel. | | `payload[].meta.sender` | object | A contact — a customer (person or company) who talks to you through one or more inboxes. A contact is linked to an inbox through a **contact inbox**, and its `source_id` identifies the contact on that channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].meta.sender.id` | integer | The contact's numeric ID. | | `payload[].meta.sender.name` | string | The full name of the contact. | | `payload[].meta.sender.email` | string \| null | The email address of the contact, stored in lower case, or `null`. | | `payload[].meta.sender.phone_number` | string \| null | The phone number of the contact in E.164 format (`+` and the country code, then the number, for example `+972501234567`), or `null`. Israeli mobile numbers are normalized automatically: `0501234567`, `501234567` and `972501234567` are all saved as `+972501234567`. | | `payload[].meta.sender.identifier` | string \| null | A unique identifier for the contact in your external system (your own ID for the contact), unique in the account, or `null`. | | `payload[].meta.sender.thumbnail` | string | The avatar URL of the contact, or an empty string. | | `payload[].meta.sender.availability_status` | string | The availability status of the contact: whether the contact is connected right now (website widget). One of: `online` — The contact is connected right now (website widget); `offline` — The contact is not connected. | | `payload[].meta.sender.additional_attributes` | object | Object containing the additional attributes related to the contact: standard extra fields, such as `company_name`, `city`, `country`, `country_code`, `description` and `social_profiles`. Blocking data (`blocked`, `blocked_at`, `block_source`) is kept here too. | | `payload[].meta.sender.custom_attributes` | object | Object containing the custom attributes related to the contact: values of the account's contact custom attributes (Settings → Custom attributes), plus any free-form keys you sent. | | `payload[].meta.sender.blocked` | boolean | Indicates whether the contact is blocked — `true` while the contact is blocked. | | `payload[].meta.sender.is_whatsapp_contact` | boolean | `true` if the contact belongs to a WhatsApp API inbox. | | `payload[].meta.sender.created_at` | integer | The time at which the contact was created (Unix timestamp, in seconds). | | `payload[].meta.sender.last_activity_at` | integer | The time of the contact's last activity (Unix timestamp, in seconds). Present only when set. | | `payload[].meta.sender.email_or_phone_optional` | boolean | `true` when the contact has a WhatsApp ID, so email and phone may both be empty. Returned only together with `contact_inboxes`. | | `payload[].meta.sender.contact_inboxes` | array of object | Array of contact inbox objects: the inboxes the contact is linked to, each with the contact's `source_id` there and the inbox's details. Returned by the endpoints that return one contact, and by the list, search and filter endpoints unless you send `include_contact_inboxes=false`. | | `payload[].meta.sender.contact_inboxes[].source_id` | string | The contact inbox's source ID: the contact's ID on the inbox's channel (a phone number, an email address, or a generated ID for API and website inboxes). | | `payload[].meta.sender.contact_inboxes[].inbox` | object | Object containing the details of the inbox. | | `payload[].meta.sender.contact_inboxes[].inbox.id` | integer | The numeric ID of the inbox. | | `payload[].meta.sender.contact_inboxes[].inbox.channel_id` | integer | The numeric ID of the inbox's channel. | | `payload[].meta.sender.contact_inboxes[].inbox.account_id` | integer | The numeric ID of the account. | | `payload[].meta.sender.contact_inboxes[].inbox.name` | string | The name of the inbox. | | `payload[].meta.sender.contact_inboxes[].inbox.channel_type` | string | The type of the inbox (its channel), for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].meta.sender.contact_inboxes[].inbox.enable_auto_assignment` | boolean | Whether auto-assignment is enabled: new conversations in the inbox are assigned to agents automatically. | | `payload[].meta.sender.contact_inboxes[].inbox.timezone` | string | The inbox's time zone. | | `payload[].meta.sender.contact_inboxes[].inbox.webhook_url` | string | For API inboxes, the inbox's own webhook URL. | | `payload[].meta.sender.contact_inboxes[].inbox.api_type` | string | For API inboxes, the kind of API inbox, for example `incoming_calls`. | | `payload[].meta.sender.conversations` | array of object | The contact's conversations, each a conversation object as returned by [Get Conversation](https://docs.99digital.co.il/online-api/conversations/get-conversation). Returned only by [Filter Contacts](https://docs.99digital.co.il/online-api/contacts/filter-contacts) with `include_conversations=true`. | | `payload[].meta.assignee` | object | An agent: a user that belongs to the account. Each agent has a legacy role (`agent` / `administrator`) and, on accounts with the new rules system, a custom role (for example `General Manager` or `Shift Manager`) that grants the permissions described in [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). **Reduced payload:** on accounts with the new rules system, a caller whose role lacks **Agents → read** gets agents without personal details — `auto_offline`, `email`, `custom_attributes`, `role`, `operation_bot`, `two_factor_type`, `phone1`, `email1` and `create_time` are left out. Agent-bot tokens always get every field. | | `payload[].meta.assignee.id` | integer | The agent's numeric ID (user ID). | | `payload[].meta.assignee.account_id` | integer | The numeric ID of the account. | | `payload[].meta.assignee.availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `payload[].meta.assignee.auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `payload[].meta.assignee.confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `payload[].meta.assignee.email` | string | The agent's login email address. | | `payload[].meta.assignee.available_name` | string | The agent's display name. | | `payload[].meta.assignee.custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `payload[].meta.assignee.name` | string | The agent's full name. | | `payload[].meta.assignee.role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `payload[].meta.assignee.operation_bot` | boolean | `true` for internal operation-bot users. | | `payload[].meta.assignee.see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `payload[].meta.assignee.assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `payload[].meta.assignee.new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `payload[].meta.assignee.thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `payload[].meta.assignee.capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `payload[].meta.assignee.two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `payload[].meta.assignee.phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `payload[].meta.assignee.email1` | string \| null | The email address that receives two-factor codes by email. | | `payload[].meta.assignee.create_time` | integer | When the agent was created (Unix timestamp, in seconds). | | `payload[].meta.team` | object | Object containing the assigned team's data, if a team is assigned. | | `payload[].meta.team.id` | integer | The numeric ID of the team. | | `payload[].meta.team.name` | string | The name of the team. Stored in lower case, and unique in the account. | | `payload[].meta.team.description` | string | The description of the team. | | `payload[].meta.team.allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `payload[].meta.team.account_id` | integer | The numeric ID of the account. | | `payload[].meta.team.members_count` | integer | The number of agents in the team. | | `payload[].meta.team.is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | | `payload[].meta.channel` | string | The channel type of the inbox, for example `Channel::Api`, `Channel::Whatsapp` or `Channel::Email`. | | `payload[].meta.hmac_verified` | boolean | Whether the contact's identity was HMAC-verified (website widget). | | `payload[].contact_inbox` | object | The contact's link (contact inbox) to the conversation's inbox. | | `payload[].contact_inbox.wa_id` | string \| null | The contact's WhatsApp ID in this inbox, for WhatsApp users who hide their phone number; otherwise `null`. | | `payload[].messages` | array of object | Array of message objects — the **last** message only. Use [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages) for the history. | | `payload[].messages[].id` | integer | The numeric ID of the message. | | `payload[].messages[].content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `payload[].messages[].inbox_id` | integer | The numeric ID of the inbox. | | `payload[].messages[].conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `payload[].messages[].message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `payload[].messages[].content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `payload[].messages[].content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `payload[].messages[].private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `payload[].messages[].status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `payload[].messages[].status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `payload[].messages[].source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `payload[].messages[].echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `payload[].messages[].sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `payload[].messages[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `payload[].messages[].sender.name` | string | The sender's name. | | `payload[].messages[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `payload[].messages[].sender.available_name` | string | An agent's display name. | | `payload[].messages[].sender.email` | string \| null | The sender's email address. | | `payload[].messages[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `payload[].messages[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `payload[].messages[].sender.avatar_url` | string | An agent's avatar image URL. | | `payload[].messages[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `payload[].messages[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `payload[].messages[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `payload[].messages[].sender.blocked` | boolean | Whether a contact is blocked. | | `payload[].messages[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `payload[].messages[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `payload[].messages[].sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `payload[].messages[].sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `payload[].messages[].attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `payload[].messages[].attachments[].id` | integer | The numeric ID of the file (attachment). | | `payload[].messages[].attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `payload[].messages[].attachments[].account_id` | integer | The numeric ID of the account. | | `payload[].messages[].attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `payload[].messages[].attachments[].filename` | string | The name of the file. | | `payload[].messages[].attachments[].extension` | string \| null | The file extension, when known. | | `payload[].messages[].attachments[].data_url` | string | The URL of the file. | | `payload[].messages[].attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `payload[].messages[].attachments[].file_size` | integer | The file size, in bytes. | | `payload[].messages[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `payload[].messages[].delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `payload[].messages[].created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `payload[].messages[].created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `payload[].last_non_activity_message` | object | A message in a conversation. Outgoing messages are delivered to the contact through the inbox's channel (WhatsApp, SMS, email, Facebook, API webhook, and so on). | | `payload[].last_non_activity_message.id` | integer | The numeric ID of the message. | | `payload[].last_non_activity_message.content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `payload[].last_non_activity_message.inbox_id` | integer | The numeric ID of the inbox. | | `payload[].last_non_activity_message.conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `payload[].last_non_activity_message.message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `payload[].last_non_activity_message.content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `payload[].last_non_activity_message.content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `payload[].last_non_activity_message.private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `payload[].last_non_activity_message.status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `payload[].last_non_activity_message.status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `payload[].last_non_activity_message.source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `payload[].last_non_activity_message.echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `payload[].last_non_activity_message.sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `payload[].last_non_activity_message.sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `payload[].last_non_activity_message.sender.name` | string | The sender's name. | | `payload[].last_non_activity_message.sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `payload[].last_non_activity_message.sender.available_name` | string | An agent's display name. | | `payload[].last_non_activity_message.sender.email` | string \| null | The sender's email address. | | `payload[].last_non_activity_message.sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `payload[].last_non_activity_message.sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `payload[].last_non_activity_message.sender.avatar_url` | string | An agent's avatar image URL. | | `payload[].last_non_activity_message.sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `payload[].last_non_activity_message.sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `payload[].last_non_activity_message.sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `payload[].last_non_activity_message.sender.blocked` | boolean | Whether a contact is blocked. | | `payload[].last_non_activity_message.sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `payload[].last_non_activity_message.sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `payload[].last_non_activity_message.sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `payload[].last_non_activity_message.sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `payload[].last_non_activity_message.attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `payload[].last_non_activity_message.attachments[].id` | integer | The numeric ID of the file (attachment). | | `payload[].last_non_activity_message.attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `payload[].last_non_activity_message.attachments[].account_id` | integer | The numeric ID of the account. | | `payload[].last_non_activity_message.attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `payload[].last_non_activity_message.attachments[].filename` | string | The name of the file. | | `payload[].last_non_activity_message.attachments[].extension` | string \| null | The file extension, when known. | | `payload[].last_non_activity_message.attachments[].data_url` | string | The URL of the file. | | `payload[].last_non_activity_message.attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `payload[].last_non_activity_message.attachments[].file_size` | integer | The file size, in bytes. | | `payload[].last_non_activity_message.ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `payload[].last_non_activity_message.delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `payload[].last_non_activity_message.created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `payload[].last_non_activity_message.created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | | `payload[].can_reply` | boolean | Whether the conversation is currently within the messaging window: `false` when the channel's reply window is closed (for example WhatsApp's 24-hour window). | | `payload[].muted` | boolean | Whether the conversation is currently muted. A muted conversation does not notify agents. | | `payload[].snoozed_until` | integer \| null | The time at which a snoozed conversation is reactivated (reopened), in **milliseconds** since the Unix epoch, or `null`. | | `payload[].unread_count` | integer | The number of unread messages — incoming messages the agents have not read. | | `payload[].has_incoming_messages` | boolean | Whether the contact has written at least one public message. | | `payload[].created_at` | integer | The time at which the conversation was created, measured in seconds since the Unix epoch. | | `payload[].timestamp` | integer | The same as `last_activity_at`. | | `payload[].last_activity_at` | integer | The time of the conversation's last activity (Unix timestamp, in seconds). | | `payload[].first_reply_created_at` | integer | The time at which the first reply was sent to the contact (Unix timestamp, in seconds), or `0` when there is none yet. | | `payload[].waiting_since` | integer | Since when the contact has been waiting for a reply (Unix timestamp, in seconds), or `0`. | | `payload[].agent_last_seen_at` | integer | The last time an agent saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `payload[].assignee_last_seen_at` | integer | The last time the assignee saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `payload[].contact_last_seen_at` | integer | The last time the contact interacted with your service — when they last saw the conversation (Unix timestamp, in seconds), or `0` when never set. | | `payload[].last_incoming_message_time` | string \| null | The time of the last incoming message (ISO 8601), or `null`. | | `payload[].sla_policy_id` | integer \| null | The ID of the applied SLA policy, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `payload[].applied_sla` | object \| null | The applied SLA policy's details and thresholds, or `null`. See [Apply SLA Policy](https://docs.99digital.co.il/online-api/conversations/apply-sla-policy). | | `payload[].sla_events` | array of object | The SLA events of the conversation (missed thresholds). | | `payload[].sla_events_with_distinct_event_type` | array of object | The SLA events, one per event type. | | `payload[].feature_enabled_sla` | boolean | Whether the account uses SLA policies (the SLA feature is enabled). | | `payload[].campaign_id` | integer \| null | The ID of the campaign that started the conversation, or `null`. | | `payload[].pinned` | boolean | Whether the caller pinned this conversation. | | `payload[].file` | object | `{url, file_type}` when a file is attached to the conversation itself (rare). | #### Example: One skipped Conversation 1502 has no incoming messages, so only 1501 was marked. `meta.assignee` is shortened. ```json { "payload": [ { "id": 1501, "uuid": "8d4e2f1a-6b7c-4d8e-9f0a-1b2c3d4e5f60", "account_id": 12, "inbox_id": 31, "status": "open", "priority": null, "labels": [ "vip" ], "custom_attributes": { "order_id": "A-1001" }, "additional_attributes": {}, "meta": { "sender": { "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "availability_status": "offline", "email": "dana.cohen@example.com", "id": 801, "name": "Dana Cohen", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "custom_attributes": { "customer_tier": "gold" }, "blocked": false, "is_whatsapp_contact": false, "created_at": 1794470500 }, "channel": "Channel::Api", "assignee": { "id": 51, "account_id": 12, "availability_status": "online", "available_name": "Jane Agent", "name": "Jane Agent", "email": "jane.agent@example.com", "role": "General Manager", "thumbnail": "" }, "hmac_verified": false }, "contact_inbox": { "wa_id": null }, "messages": [ { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794472860 }, "content_attributes": {}, "private": false, "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "ticket_id": 903, "delay_hours": null, "created_at": 1794472860, "created_at_exact": "2026-11-12T08:41:00.000Z" } ], "last_non_activity_message": { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794472860 }, "content_attributes": {}, "private": false, "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "ticket_id": 903, "delay_hours": null, "created_at": 1794472860, "created_at_exact": "2026-11-12T08:41:00.000Z" }, "can_reply": true, "muted": false, "snoozed_until": null, "unread_count": 1, "has_incoming_messages": true, "created_at": 1794471000, "timestamp": 1794472860, "last_activity_at": 1794472860, "first_reply_created_at": 1794471120, "waiting_since": 1794472860, "agent_last_seen_at": 1794472859, "assignee_last_seen_at": 1794472859, "contact_last_seen_at": 0, "last_incoming_message_time": "2026-11-12T08:41:00.000Z", "sla_policy_id": null, "feature_enabled_sla": true, "applied_sla": null, "sla_events": [], "sla_events_with_distinct_event_type": [], "campaign_id": null, "pinned": false } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` --- # List Participants Source: https://docs.99digital.co.il/online-api/conversations/participants/list-participants Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/participants/list-participants.md Section: Online API › Conversations › Participants `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/participants` List the agents who participate in a conversation. Participants are agents who follow a conversation and get its notifications, without being the assignee. Assigned agents are added automatically. | Action | Method | Path | Body | | --- | --- | --- | --- | | [List participants](https://docs.99digital.co.il/online-api/conversations/participants/list-participants) | `GET` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/participants` | | | [Add participants](https://docs.99digital.co.il/online-api/conversations/participants/add-participants) | `POST` | same | `{"user_ids": [52]}` | | [Replace the participant list](https://docs.99digital.co.il/online-api/conversations/participants/replace-participants) | `PATCH` | same | `{"user_ids": [51, 52]}` | | [Remove participants](https://docs.99digital.co.il/online-api/conversations/participants/remove-participants) | `DELETE` | same | `{"user_ids": [52]}` | **Authorization**: user token; the caller must be able to see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). **Permissions:** - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Example: list participants** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/participants' \ -H 'api_access_token: ' ``` Response (`200 OK`): an array of [agent objects](https://docs.99digital.co.il/online-api/agents/list-of-all-agents). Here there were two agents, IDs `51` and `52`; the first was added automatically when it was assigned. The full objects are under Responses below. ## Remarks - On accounts with the new rules system, the agents' personal details are returned only when the caller's role grants **Agents → read** — see the `Agent` object below. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Responses ### 200 — The participants. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The agent's numeric ID (user ID). | | `[].account_id` | integer | The numeric ID of the account. | | `[].availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `[].auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `[].confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `[].email` | string | The agent's login email address. | | `[].available_name` | string | The agent's display name. | | `[].custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `[].name` | string | The agent's full name. | | `[].role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `[].operation_bot` | boolean | `true` for internal operation-bot users. | | `[].see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `[].assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `[].new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `[].thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `[].capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `[].two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `[].phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `[].email1` | string \| null | The email address that receives two-factor codes by email. | | `[].create_time` | integer | When the agent was created (Unix timestamp, in seconds). | #### Example: Participants Jane Agent was added automatically when she was assigned; Dana Levi was added. ```json [ { "id": 51, "account_id": 12, "availability_status": "online", "auto_offline": true, "confirmed": true, "email": "jane.agent@example.com", "available_name": "Jane Agent", "custom_attributes": {}, "name": "Jane Agent", "role": "General Manager", "operation_bot": false, "see_all_conversations": true, "assignable_to_inbox": [ 31, 32, 33 ], "new_role": "General Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": "sms", "phone1": "+972541234567", "email1": null, "create_time": 1790000000 }, { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": true, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [ 31, 32 ], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": "+972507654321", "email1": null, "create_time": 1794470400 } ] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Add Participants Source: https://docs.99digital.co.il/online-api/conversations/participants/add-participants Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/participants/add-participants.md Section: Online API › Conversations › Participants `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/participants` Add agents as participants of a conversation. Participants are agents who follow a conversation and get its notifications, without being the assignee. Assigned agents are added automatically. | Action | Method | Path | Body | | --- | --- | --- | --- | | [List participants](https://docs.99digital.co.il/online-api/conversations/participants/list-participants) | `GET` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/participants` | | | [Add participants](https://docs.99digital.co.il/online-api/conversations/participants/add-participants) | `POST` | same | `{"user_ids": [52]}` | | [Replace the participant list](https://docs.99digital.co.il/online-api/conversations/participants/replace-participants) | `PATCH` | same | `{"user_ids": [51, 52]}` | | [Remove participants](https://docs.99digital.co.il/online-api/conversations/participants/remove-participants) | `DELETE` | same | `{"user_ids": [52]}` | **Authorization**: user token; the caller must be able to see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). **Permissions:** - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | integer[] | Yes | Agent IDs. The agents to add. | **Example: add participants** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/participants' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "user_ids": [52] }' ``` Response (`200 OK`): only the **newly added** participants, as [agent objects](https://docs.99digital.co.il/online-api/agents/list-of-all-agents). Agents who were already participants are skipped, so the list can be `[]` — for example when agent 52 was already a participant. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | array of integer | Yes | The agents to add, by user ID. | ### Example (generated from the schema) ```json { "user_ids": [ 52 ] } ``` ## Responses ### 200 — The agents that were added. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The agent's numeric ID (user ID). | | `[].account_id` | integer | The numeric ID of the account. | | `[].availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `[].auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `[].confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `[].email` | string | The agent's login email address. | | `[].available_name` | string | The agent's display name. | | `[].custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `[].name` | string | The agent's full name. | | `[].role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `[].operation_bot` | boolean | `true` for internal operation-bot users. | | `[].see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `[].assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `[].new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `[].thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `[].capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `[].two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `[].phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `[].email1` | string \| null | The email address that receives two-factor codes by email. | | `[].create_time` | integer | When the agent was created (Unix timestamp, in seconds). | #### Example: Added Dana Levi was added. ```json [ { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": true, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [ 31, 32 ], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": "+972507654321", "email1": null, "create_time": 1794470400 } ] ``` #### Example: Already participants Every agent in `user_ids` was already a participant. ```json [] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Replace Participants Source: https://docs.99digital.co.il/online-api/conversations/participants/replace-participants Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/participants/replace-participants.md Section: Online API › Conversations › Participants `PATCH https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/participants` Replace the participant list of a conversation. Participants are agents who follow a conversation and get its notifications, without being the assignee. Assigned agents are added automatically. | Action | Method | Path | Body | | --- | --- | --- | --- | | [List participants](https://docs.99digital.co.il/online-api/conversations/participants/list-participants) | `GET` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/participants` | | | [Add participants](https://docs.99digital.co.il/online-api/conversations/participants/add-participants) | `POST` | same | `{"user_ids": [52]}` | | [Replace the participant list](https://docs.99digital.co.il/online-api/conversations/participants/replace-participants) | `PATCH` | same | `{"user_ids": [51, 52]}` | | [Remove participants](https://docs.99digital.co.il/online-api/conversations/participants/remove-participants) | `DELETE` | same | `{"user_ids": [52]}` | **Authorization**: user token; the caller must be able to see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). **Permissions:** - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | integer[] | Yes | Agent IDs. The new participants: every other participant is removed, and `[]` removes them all. | **Example: replace** ```bash curl -X PATCH 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/participants' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "user_ids": [] }' ``` Response (`200 OK`): the full participant list after the change (`[]` here). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | array of integer | Yes | The new participants, by user ID. An empty list removes every participant. | ### Example: Replace the list Jane Agent becomes the only participant. ```json { "user_ids": [ 51 ] } ``` ### Example: Remove everyone Remove every participant. ```json { "user_ids": [] } ``` ## Responses ### 200 — The participants after the change. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The agent's numeric ID (user ID). | | `[].account_id` | integer | The numeric ID of the account. | | `[].availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `[].auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `[].confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `[].email` | string | The agent's login email address. | | `[].available_name` | string | The agent's display name. | | `[].custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `[].name` | string | The agent's full name. | | `[].role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `[].operation_bot` | boolean | `true` for internal operation-bot users. | | `[].see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `[].assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `[].new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `[].thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `[].capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `[].two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `[].phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `[].email1` | string \| null | The email address that receives two-factor codes by email. | | `[].create_time` | integer | When the agent was created (Unix timestamp, in seconds). | #### Example: Replaced The list after `user_ids: [51]`. ```json [ { "id": 51, "account_id": 12, "availability_status": "online", "auto_offline": true, "confirmed": true, "email": "jane.agent@example.com", "available_name": "Jane Agent", "custom_attributes": {}, "name": "Jane Agent", "role": "General Manager", "operation_bot": false, "see_all_conversations": true, "assignable_to_inbox": [ 31, 32, 33 ], "new_role": "General Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": "sms", "phone1": "+972541234567", "email1": null, "create_time": 1790000000 } ] ``` #### Example: Emptied The list after `user_ids: []`. ```json [] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Remove Participants Source: https://docs.99digital.co.il/online-api/conversations/participants/remove-participants Markdown: https://docs.99digital.co.il/markdown/online-api/conversations/participants/remove-participants.md Section: Online API › Conversations › Participants `DELETE https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/participants` Remove agents from a conversation's participants. Participants are agents who follow a conversation and get its notifications, without being the assignee. Assigned agents are added automatically. | Action | Method | Path | Body | | --- | --- | --- | --- | | [List participants](https://docs.99digital.co.il/online-api/conversations/participants/list-participants) | `GET` | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/participants` | | | [Add participants](https://docs.99digital.co.il/online-api/conversations/participants/add-participants) | `POST` | same | `{"user_ids": [52]}` | | [Replace the participant list](https://docs.99digital.co.il/online-api/conversations/participants/replace-participants) | `PATCH` | same | `{"user_ids": [51, 52]}` | | [Remove participants](https://docs.99digital.co.il/online-api/conversations/participants/remove-participants) | `DELETE` | same | `{"user_ids": [52]}` | **Authorization**: user token; the caller must be able to see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). **Permissions:** - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | integer[] | Yes | Agent IDs. The agents to remove. | **Example: remove** ```bash curl -X DELETE 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/participants' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "user_ids": [52] }' ``` Response: `200 OK` with an empty body. To see the list after the change, use [List Participants](https://docs.99digital.co.il/online-api/conversations/participants/list-participants). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | array of integer | Yes | The agents to remove, by user ID. | ### Example (generated from the schema) ```json { "user_ids": [ 52 ] } ``` ## Responses ### 200 — The agents were removed, with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List Tickets Source: https://docs.99digital.co.il/online-api/tickets/list-tickets Markdown: https://docs.99digital.co.il/markdown/online-api/tickets/list-tickets.md Section: Online API › Tickets `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets` Returns all tickets of the conversation, oldest first. ## Tickets A ticket is one "case" inside a conversation. The first ticket opens when the conversation is created. It is **closed** when the conversation is resolved, and a **new** ticket opens when the conversation is reopened. So one long-lived conversation (for example a WhatsApp thread) can hold many tickets. Messages and [conversation events](https://docs.99digital.co.il/online-api/conversations/list-conversation-events) carry the `ticket_id` they belong to. Closing a ticket fires the `ticket_resolved` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events). Tickets are created and closed automatically; there is no endpoint to create or delete one. Through the API you can read tickets and store **custom attributes** on them (for example a case type or a refund amount). All ticket endpoints are nested under a conversation (`{conversation_id}` is the display ID — see [Conversation Basics](https://docs.99digital.co.il/online-api/conversations/conversation-basics)). **Endpoints in this section** - `GET /api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets`: [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) - `GET /api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/{ticket_id}`: [Get Ticket](https://docs.99digital.co.il/online-api/tickets/get-ticket) - `GET /api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/current`: [Get Current Ticket](https://docs.99digital.co.il/online-api/tickets/get-current-ticket) - `PATCH /api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/{ticket_id}`: [Set Ticket Custom Attributes](https://docs.99digital.co.il/online-api/tickets/set-ticket-custom-attributes) - `PUT /api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/{ticket_id}/destroy_custom_attributes`: [Delete Ticket Custom Attributes](https://docs.99digital.co.il/online-api/tickets/delete-ticket-custom-attributes) **Authorization (all ticket endpoints)**: user token; the caller must be able to see the conversation (see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation)). **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. ## The ticket object | Field | Type | Description | | --- | --- | --- | | `id` | integer | Ticket ID. | | `ticket_status` | string | `open` or `closed`. | | `initiated_by` | string | Who started the conversation: `user` (the contact), `agent`, `agent_bot`. | | `channel_name` | string | Inbox channel type, e.g. `Channel::Api`, `Channel::Whatsapp`. | | `created_at` | string | When the ticket opened (ISO 8601). | | `resolved_at` | string | When it was closed, or `null`. | | `total_time` | integer | Seconds from opening to closing, or `null` while open. | | `resolved_by_id`, `resolved_agent_id` | integer | Agent who resolved the conversation, or `null` (e.g. closed by a bot or automation). | | `custom_attributes` | object | Your data for this ticket. | | `account_id`, `contact_id`, `inbox_id` | integer | Related IDs. | | `conversation_id` | integer | The conversation's **display ID** in *List Tickets* and *Get Ticket*. In *Get Current Ticket*, *Set Ticket Custom Attributes* and *Delete Ticket Custom Attributes* it is the **internal** conversation ID (see the note there). | | `updated_at` | string | Last update (ISO 8601). | ## List tickets | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets` | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/tickets' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`). The conversation was resolved twice and reopened, so it has two closed tickets and one open ticket. ```json { "payload": [ { "id": 901, "channel_name": "Channel::Api", "initiated_by": "user", "resolved_at": "2026-11-12T08:20:00.000Z", "ticket_status": "closed", "total_time": 600, "created_at": "2026-11-12T08:10:00.000Z", "updated_at": "2026-11-12T08:20:00.004Z", "account_id": 12, "contact_id": 801, "conversation_id": 1501, "inbox_id": 31, "resolved_agent_id": 51, "resolved_by_id": 51, "custom_attributes": {} }, { "id": 902, "channel_name": "Channel::Api", "initiated_by": "user", "resolved_at": "2026-11-12T08:35:00.000Z", "ticket_status": "closed", "total_time": 300, "created_at": "2026-11-12T08:30:00.000Z", "updated_at": "2026-11-12T08:35:00.004Z", "account_id": 12, "contact_id": 801, "conversation_id": 1501, "inbox_id": 31, "resolved_agent_id": null, "resolved_by_id": null, "custom_attributes": {} }, { "id": 903, "channel_name": "Channel::Api", "initiated_by": "user", "resolved_at": null, "ticket_status": "open", "total_time": null, "created_at": "2026-11-12T08:40:00.000Z", "updated_at": "2026-11-12T08:40:00.000Z", "account_id": 12, "contact_id": 801, "conversation_id": 1501, "inbox_id": 31, "resolved_agent_id": null, "resolved_by_id": null, "custom_attributes": {} } ] } ``` To store your own data on a ticket, use [Set Ticket Custom Attributes](https://docs.99digital.co.il/online-api/tickets/set-ticket-custom-attributes). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Responses ### 200 — The conversation's tickets, oldest first. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of object | The tickets. | | `payload[].id` | integer | The numeric ID of the ticket. | | `payload[].ticket_status` | string | Whether the ticket is open or closed. One of: `open` — The ticket is open — the conversation has not been resolved since the ticket opened; `closed` — The ticket was closed, because the conversation was resolved. | | `payload[].initiated_by` | string | Who started the conversation. One of: `user` — The contact; `agent` — An agent; `agent_bot` — An agent bot. | | `payload[].channel_name` | string | The channel type of the inbox, for example `Channel::Api` or `Channel::Whatsapp`. | | `payload[].created_at` | string | When the ticket opened (ISO 8601). | | `payload[].updated_at` | string | The last update (ISO 8601). | | `payload[].resolved_at` | string \| null | When the ticket was closed (ISO 8601), or `null`. | | `payload[].total_time` | integer \| null | Seconds from opening to closing, or `null` while open. | | `payload[].resolved_by_id` | integer \| null | The ID of the agent who resolved the conversation, or `null` (for example when a bot or an automation closed it). | | `payload[].resolved_agent_id` | integer \| null | The same as `resolved_by_id`. | | `payload[].custom_attributes` | object | Your data for this ticket, as key-value pairs (for example a case type or a refund amount). | | `payload[].account_id` | integer | The numeric ID of the account. | | `payload[].contact_id` | integer | The numeric ID of the contact. | | `payload[].inbox_id` | integer | The numeric ID of the inbox. | | `payload[].conversation_id` | integer | The conversation. [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) and [Get Ticket](https://docs.99digital.co.il/online-api/tickets/get-ticket) return its display ID; the other ticket endpoints return its internal ID. | #### Example: Three tickets The conversation was resolved and reopened twice, so it has two closed tickets and an open one. ```json { "payload": [ { "id": 901, "channel_name": "Channel::Api", "initiated_by": "user", "resolved_at": "2026-11-12T08:20:00.000Z", "ticket_status": "closed", "total_time": 600, "created_at": "2026-11-12T08:10:00.000Z", "updated_at": "2026-11-12T08:20:00.004Z", "account_id": 12, "contact_id": 801, "conversation_id": 1501, "inbox_id": 31, "resolved_agent_id": 51, "resolved_by_id": 51, "custom_attributes": {} }, { "id": 902, "channel_name": "Channel::Api", "initiated_by": "user", "resolved_at": "2026-11-12T08:35:00.000Z", "ticket_status": "closed", "total_time": 300, "created_at": "2026-11-12T08:30:00.000Z", "updated_at": "2026-11-12T08:35:00.004Z", "account_id": 12, "contact_id": 801, "conversation_id": 1501, "inbox_id": 31, "resolved_agent_id": null, "resolved_by_id": null, "custom_attributes": {} }, { "id": 903, "channel_name": "Channel::Api", "initiated_by": "user", "resolved_at": null, "ticket_status": "open", "total_time": null, "created_at": "2026-11-12T08:40:00.000Z", "updated_at": "2026-11-12T08:40:00.000Z", "account_id": 12, "contact_id": 801, "conversation_id": 1501, "inbox_id": 31, "resolved_agent_id": null, "resolved_by_id": null, "custom_attributes": {} } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Get Ticket Source: https://docs.99digital.co.il/online-api/tickets/get-ticket Markdown: https://docs.99digital.co.il/markdown/online-api/tickets/get-ticket.md Section: Online API › Tickets `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/{ticket_id}` Get one ticket of a conversation. The ticket must belong to the conversation in the path. See [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) for what a ticket is. | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/{ticket_id}` | **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | | `ticket_id` | integer | Yes | Ticket ID (must belong to this conversation). | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/tickets/901' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`) ```json { "id": 901, "channel_name": "Channel::Api", "initiated_by": "user", "resolved_at": "2026-11-12T08:20:00.000Z", "ticket_status": "closed", "total_time": 600, "created_at": "2026-11-12T08:10:00.000Z", "updated_at": "2026-11-12T08:20:00.004Z", "account_id": 12, "contact_id": 801, "conversation_id": 1501, "inbox_id": 31, "resolved_agent_id": 51, "resolved_by_id": 51, "custom_attributes": {} } ``` **Error responses**: `404 {"error": "Resource could not be found"}`. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | | `ticket_id` | path | integer | Yes | The numeric ID of the ticket. The ticket must belong to the conversation. Example: `903`. | ## Responses ### 200 — The ticket. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The numeric ID of the ticket. | | `ticket_status` | string | Whether the ticket is open or closed. One of: `open` — The ticket is open — the conversation has not been resolved since the ticket opened; `closed` — The ticket was closed, because the conversation was resolved. | | `initiated_by` | string | Who started the conversation. One of: `user` — The contact; `agent` — An agent; `agent_bot` — An agent bot. | | `channel_name` | string | The channel type of the inbox, for example `Channel::Api` or `Channel::Whatsapp`. | | `created_at` | string | When the ticket opened (ISO 8601). | | `updated_at` | string | The last update (ISO 8601). | | `resolved_at` | string \| null | When the ticket was closed (ISO 8601), or `null`. | | `total_time` | integer \| null | Seconds from opening to closing, or `null` while open. | | `resolved_by_id` | integer \| null | The ID of the agent who resolved the conversation, or `null` (for example when a bot or an automation closed it). | | `resolved_agent_id` | integer \| null | The same as `resolved_by_id`. | | `custom_attributes` | object | Your data for this ticket, as key-value pairs (for example a case type or a refund amount). | | `account_id` | integer | The numeric ID of the account. | | `contact_id` | integer | The numeric ID of the contact. | | `inbox_id` | integer | The numeric ID of the inbox. | | `conversation_id` | integer | The conversation. [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) and [Get Ticket](https://docs.99digital.co.il/online-api/tickets/get-ticket) return its display ID; the other ticket endpoints return its internal ID. | #### Example: Open ticket The conversation's current ticket. ```json { "id": 903, "channel_name": "Channel::Api", "initiated_by": "user", "resolved_at": null, "ticket_status": "open", "total_time": null, "created_at": "2026-11-12T08:40:00.000Z", "updated_at": "2026-11-12T08:40:00.000Z", "account_id": 12, "contact_id": 801, "conversation_id": 1501, "inbox_id": 31, "resolved_agent_id": null, "resolved_by_id": null, "custom_attributes": {} } ``` #### Example: Closed ticket A ticket that was closed when an agent resolved the conversation. ```json { "id": 901, "channel_name": "Channel::Api", "initiated_by": "user", "resolved_at": "2026-11-12T08:20:00.000Z", "ticket_status": "closed", "total_time": 600, "created_at": "2026-11-12T08:10:00.000Z", "updated_at": "2026-11-12T08:20:00.004Z", "account_id": 12, "contact_id": 801, "conversation_id": 1501, "inbox_id": 31, "resolved_agent_id": 51, "resolved_by_id": 51, "custom_attributes": {} } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Get Current Ticket Source: https://docs.99digital.co.il/online-api/tickets/get-current-ticket Markdown: https://docs.99digital.co.il/markdown/online-api/tickets/get-current-ticket.md Section: Online API › Tickets `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/current` Returns the conversation's open ticket. If none exists yet, one is created. This works only while the conversation status is `open` (Bot). See [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) for what a ticket is. | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/current` | **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/tickets/current' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`). Here `conversation_id` is the **internal** conversation ID (`2301`), not the display ID (`1501`). ```json { "id": 903, "account_id": 12, "inbox_id": 31, "channel_name": "Channel::Api", "conversation_id": 2301, "contact_id": 801, "initiated_by": "user", "resolved_by_id": null, "total_time": null, "resolved_at": null, "resolved_agent_id": null, "ticket_status": "open", "created_at": "2026-11-12T08:40:00.000Z", "updated_at": "2026-11-12T08:40:00.000Z", "custom_attributes": {} } ``` :::warning **When the conversation is not `open`** (for example `pending` / Manual, or `resolved`) the response is still HTTP **`200`**, with an error body: ```json { "error": "No open conversation", "status": "unprocessable_entity" } ``` Check for the `error` key instead of relying on the HTTP status. To find the open ticket of a Manual conversation, use [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) and pick the one with `ticket_status: "open"`. ::: ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Responses ### 200 — The open ticket — or, when the conversation is not `open`, an error body. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | (one of: Ticket) The numeric ID of the ticket. | | `ticket_status` | string | (one of: Ticket) Whether the ticket is open or closed. One of: `open` — The ticket is open — the conversation has not been resolved since the ticket opened; `closed` — The ticket was closed, because the conversation was resolved. | | `initiated_by` | string | (one of: Ticket) Who started the conversation. One of: `user` — The contact; `agent` — An agent; `agent_bot` — An agent bot. | | `channel_name` | string | (one of: Ticket) The channel type of the inbox, for example `Channel::Api` or `Channel::Whatsapp`. | | `created_at` | string | (one of: Ticket) When the ticket opened (ISO 8601). | | `updated_at` | string | (one of: Ticket) The last update (ISO 8601). | | `resolved_at` | string \| null | (one of: Ticket) When the ticket was closed (ISO 8601), or `null`. | | `total_time` | integer \| null | (one of: Ticket) Seconds from opening to closing, or `null` while open. | | `resolved_by_id` | integer \| null | (one of: Ticket) The ID of the agent who resolved the conversation, or `null` (for example when a bot or an automation closed it). | | `resolved_agent_id` | integer \| null | (one of: Ticket) The same as `resolved_by_id`. | | `custom_attributes` | object | (one of: Ticket) Your data for this ticket, as key-value pairs (for example a case type or a refund amount). | | `account_id` | integer | (one of: Ticket) The numeric ID of the account. | | `contact_id` | integer | (one of: Ticket) The numeric ID of the contact. | | `inbox_id` | integer | (one of: Ticket) The numeric ID of the inbox. | | `conversation_id` | integer | (one of: Ticket) The conversation. [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) and [Get Ticket](https://docs.99digital.co.il/online-api/tickets/get-ticket) return its display ID; the other ticket endpoints return its internal ID. | | `error` | string | (one of: Conversation not open) Why there is no ticket: `No open conversation` — the conversation's status is not `open` (Bot). | | `status` | string | (one of: Conversation not open) Always `unprocessable_entity`. The HTTP status itself is still `200`. | #### Example: Open ticket The open ticket. `conversation_id` is the internal ID. ```json { "id": 903, "account_id": 12, "inbox_id": 31, "channel_name": "Channel::Api", "conversation_id": 2301, "contact_id": 801, "initiated_by": "user", "resolved_by_id": null, "total_time": null, "resolved_at": null, "resolved_agent_id": null, "ticket_status": "open", "created_at": "2026-11-12T08:40:00.000Z", "updated_at": "2026-11-12T08:40:00.000Z", "custom_attributes": {} } ``` #### Example: Conversation not open The conversation is `pending` (Manual) or `resolved`. The HTTP status is still 200. ```json { "error": "No open conversation", "status": "unprocessable_entity" } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Set Ticket Custom Attributes Source: https://docs.99digital.co.il/online-api/tickets/set-ticket-custom-attributes Markdown: https://docs.99digital.co.il/markdown/online-api/tickets/set-ticket-custom-attributes.md Section: Online API › Tickets `PATCH https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/{ticket_id}` Replaces the ticket's custom attributes with the given object. The ticket's `custom_attributes` are **replaced**: keys you leave out are removed, so send the full object. To remove only some keys, use [Delete Ticket Custom Attributes](https://docs.99digital.co.il/online-api/tickets/delete-ticket-custom-attributes). See [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) for what a ticket is. | Setting | Value | | --- | --- | | **Method** | `PATCH` (or `PUT`) | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/{ticket_id}` | **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | | `ticket_id` | integer | Yes | Ticket ID (must belong to this conversation). | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `custom_attributes` | object | Yes | Key/value pairs to store on the ticket. Keys not sent are removed. | **Example request** ```bash curl -X PATCH 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/tickets/903' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "custom_attributes": { "case_type": "refund", "order_id": "A-1001", "refund_amount": 85 } }' ``` **Example response** (`200 OK`). `conversation_id` is the internal ID, not the display ID used in the path. ```json { "conversation_id": 2301, "custom_attributes": { "case_type": "refund", "order_id": "A-1001", "refund_amount": 85 }, "id": 903, "account_id": 12, "inbox_id": 31, "channel_name": "Channel::Api", "contact_id": 801, "initiated_by": "user", "resolved_by_id": null, "total_time": null, "resolved_at": null, "resolved_agent_id": null, "ticket_status": "open", "created_at": "2026-11-12T08:40:00.000Z", "updated_at": "2026-11-12T08:55:00.000Z" } ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | | `ticket_id` | path | integer | Yes | The numeric ID of the ticket. The ticket must belong to the conversation. Example: `903`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `custom_attributes` | object | Yes | Your data for the ticket, as key-value pairs — for example a case type or a refund amount. Replaces the ticket's current custom attributes: keys you leave out are removed. | ### Example (generated from the schema) ```json { "custom_attributes": { "case_type": "refund", "order_id": "A-1001", "refund_amount": 85 } } ``` ## Responses ### 200 — The ticket, with its new custom attributes. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The numeric ID of the ticket. | | `ticket_status` | string | Whether the ticket is open or closed. One of: `open` — The ticket is open — the conversation has not been resolved since the ticket opened; `closed` — The ticket was closed, because the conversation was resolved. | | `initiated_by` | string | Who started the conversation. One of: `user` — The contact; `agent` — An agent; `agent_bot` — An agent bot. | | `channel_name` | string | The channel type of the inbox, for example `Channel::Api` or `Channel::Whatsapp`. | | `created_at` | string | When the ticket opened (ISO 8601). | | `updated_at` | string | The last update (ISO 8601). | | `resolved_at` | string \| null | When the ticket was closed (ISO 8601), or `null`. | | `total_time` | integer \| null | Seconds from opening to closing, or `null` while open. | | `resolved_by_id` | integer \| null | The ID of the agent who resolved the conversation, or `null` (for example when a bot or an automation closed it). | | `resolved_agent_id` | integer \| null | The same as `resolved_by_id`. | | `custom_attributes` | object | Your data for this ticket, as key-value pairs (for example a case type or a refund amount). | | `account_id` | integer | The numeric ID of the account. | | `contact_id` | integer | The numeric ID of the contact. | | `inbox_id` | integer | The numeric ID of the inbox. | | `conversation_id` | integer | The conversation. [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) and [Get Ticket](https://docs.99digital.co.il/online-api/tickets/get-ticket) return its display ID; the other ticket endpoints return its internal ID. | #### Example ```json { "custom_attributes": { "case_type": "refund", "order_id": "A-1001", "refund_amount": 85 }, "id": 903, "account_id": 12, "inbox_id": 31, "channel_name": "Channel::Api", "conversation_id": 2301, "contact_id": 801, "initiated_by": "user", "resolved_by_id": null, "total_time": null, "resolved_at": null, "resolved_agent_id": null, "ticket_status": "open", "created_at": "2026-11-12T08:40:00.000Z", "updated_at": "2026-11-12T08:55:00.000Z" } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Delete Ticket Custom Attributes Source: https://docs.99digital.co.il/online-api/tickets/delete-ticket-custom-attributes Markdown: https://docs.99digital.co.il/markdown/online-api/tickets/delete-ticket-custom-attributes.md Section: Online API › Tickets `PUT https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/{ticket_id}/destroy_custom_attributes` Removes the given keys from the ticket's custom attributes. The other keys of the ticket's `custom_attributes` are kept. To replace them all, use [Set Ticket Custom Attributes](https://docs.99digital.co.il/online-api/tickets/set-ticket-custom-attributes). See [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) for what a ticket is. | Setting | Value | | --- | --- | | **Method** | `PUT` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/{ticket_id}/destroy_custom_attributes` | **Permissions:** - User token: any agent who can see the conversation — see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | | `ticket_id` | integer | Yes | Ticket ID (must belong to this conversation). | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `custom_attributes` | string[] | Yes | Keys to remove. | **Example request** ```bash curl -X PUT 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/tickets/903/destroy_custom_attributes' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "custom_attributes": ["refund_amount"] }' ``` **Example response** (`200 OK`): the ticket (same shape as [Set Ticket Custom Attributes](https://docs.99digital.co.il/online-api/tickets/set-ticket-custom-attributes)) with `"custom_attributes": {"case_type": "refund", "order_id": "A-1001"}`. In the response, `conversation_id` is the conversation's **internal** ID, not the display ID used in the path. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | | `ticket_id` | path | integer | Yes | The numeric ID of the ticket. The ticket must belong to the conversation. Example: `903`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `custom_attributes` | array of string | Yes | The keys to remove from the ticket's `custom_attributes`. Keys you do not list are kept. | ### Example (generated from the schema) ```json { "custom_attributes": [ "refund_amount" ] } ``` ## Responses ### 200 — The ticket, with its remaining custom attributes. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The numeric ID of the ticket. | | `ticket_status` | string | Whether the ticket is open or closed. One of: `open` — The ticket is open — the conversation has not been resolved since the ticket opened; `closed` — The ticket was closed, because the conversation was resolved. | | `initiated_by` | string | Who started the conversation. One of: `user` — The contact; `agent` — An agent; `agent_bot` — An agent bot. | | `channel_name` | string | The channel type of the inbox, for example `Channel::Api` or `Channel::Whatsapp`. | | `created_at` | string | When the ticket opened (ISO 8601). | | `updated_at` | string | The last update (ISO 8601). | | `resolved_at` | string \| null | When the ticket was closed (ISO 8601), or `null`. | | `total_time` | integer \| null | Seconds from opening to closing, or `null` while open. | | `resolved_by_id` | integer \| null | The ID of the agent who resolved the conversation, or `null` (for example when a bot or an automation closed it). | | `resolved_agent_id` | integer \| null | The same as `resolved_by_id`. | | `custom_attributes` | object | Your data for this ticket, as key-value pairs (for example a case type or a refund amount). | | `account_id` | integer | The numeric ID of the account. | | `contact_id` | integer | The numeric ID of the contact. | | `inbox_id` | integer | The numeric ID of the inbox. | | `conversation_id` | integer | The conversation. [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) and [Get Ticket](https://docs.99digital.co.il/online-api/tickets/get-ticket) return its display ID; the other ticket endpoints return its internal ID. | #### Example ```json { "custom_attributes": { "case_type": "refund", "order_id": "A-1001" }, "id": 903, "account_id": 12, "inbox_id": 31, "channel_name": "Channel::Api", "conversation_id": 2301, "contact_id": 801, "initiated_by": "user", "resolved_by_id": null, "total_time": null, "resolved_at": null, "resolved_agent_id": null, "ticket_status": "open", "created_at": "2026-11-12T08:40:00.000Z", "updated_at": "2026-11-12T09:00:00.000Z" } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List Forms Source: https://docs.99digital.co.il/online-api/forms/list-forms Markdown: https://docs.99digital.co.il/markdown/online-api/forms/list-forms.md Section: Online API › Forms `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/forms` Retrieve the forms in an account. **Settings:** | URL | Method | | --- | --- | | `https://online.99digital.co.il/api/v1/accounts/{account_id}/forms` | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key; access depends on the user's permissions. | **Permissions:** These apply to every Forms endpoint. - **User token**: on accounts with the new rules system, forms and fields need **Forms → read**; submissions need **Forms Responses → read**. Accounts on the legacy role system are not restricted. - **Agent-bot token**: all form endpoints are allowed (for example from Studio flows). **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | Account identifier. | Yes | **Query Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `status` | Only forms with this status: `published`, `draft` or `archived`. Only `published` forms can be turned into links. | No | **Request Example:** ``` curl -s -H "api_access_token: " "https://online.99digital.co.il/api/v1/accounts/12/forms" curl -s -H "api_access_token: " "https://online.99digital.co.il/api/v1/accounts/12/forms?status=published" ``` **Response:** ``` [ { "publicId": "45", "accountId": "2c7e9a4b-1d3f-4b6a-8e5c-0f9d8b7a6c51", "name": "Event registration", "status": "published", "submissionCount": 12, "updatedAt": "2026-11-12T08:00:00.000Z" }, { "publicId": "46", "accountId": "2c7e9a4b-1d3f-4b6a-8e5c-0f9d8b7a6c51", "name": "Customer feedback", "status": "published", "submissionCount": 3, "updatedAt": "2026-11-10T14:47:31.886Z" } ] ``` **Response-Explain:** | Parameter | Description | | --- | --- | | Root array | Form summaries. | | `publicId` | Public form identifier (string). This is the form ID to use as `{form_id}` in all other Forms endpoints. | | `accountId` | Account identifier (string): the account's ID in the Forms app. | | `name` | Form name. | | `status` | Form status. Enum: `draft`, `published`, `archived`. | | `submissionCount` | Number of submissions reported for the form. | | `updatedAt` | Last update timestamp in ISO 8601 format. | ## Forms Forms are built in the **99digital Forms** app and connected to the account through the Forms integration. Through this API you can list the account's forms, read their fields and submissions, and generate personal or public **form links** to send to contacts. When a contact submits a form, the submission is linked to the contact and conversation, and the `form_submitted` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events) fires. Generating a link fires `form_link_generated`. Form IDs in all paths are the form's **`publicId`** (as returned by *List Forms*), not the Forms app's internal ID. The responses come from the Forms app and are passed through as-is; their timestamps are ISO 8601 strings. **Endpoints in this section** - `GET /api/v1/accounts/{account_id}/forms`: [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms) - `GET /api/v1/accounts/{account_id}/forms/{form_id}`: [Get a Form](https://docs.99digital.co.il/online-api/forms/get-a-form) - `GET /api/v1/accounts/{account_id}/forms/{form_id}/fields`: [List Form Fields](https://docs.99digital.co.il/online-api/forms/list-form-fields) - `GET /api/v1/accounts/{account_id}/forms/{form_id}/submissions`: [List Form Submissions](https://docs.99digital.co.il/online-api/forms/list-form-submissions) - `GET /api/v1/accounts/{account_id}/forms/{form_id}/submissions/{submission_id}`: [Get Submission](https://docs.99digital.co.il/online-api/forms/get-submission) - `POST /api/v1/accounts/{account_id}/forms/{form_id}/links`: [Generate Form Link](https://docs.99digital.co.il/online-api/forms/generate-form-link) **Common error responses (all form endpoints)** | Status | When | Body | | --- | --- | --- | | `403` | Forms is not enabled for the account. | `{"error": "Forms is not enabled for this account"}` | | `503` | The Forms integration is not configured on the server. | `{"error": "Forms is not configured on this server"}` | | `404` | Form or submission not found in the Forms app. | `{"error": "Not found"}` | | `502` | The Forms app returned an error. | `{"error": "Failed to retrieve forms"}` (message depends on the endpoint) | | `500` | Unexpected error talking to the Forms app. | `{"error": ":
"}` | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `status` | query | string | No | Return only the forms with this status. Only `published` forms can be turned into links. One of: `published` — Published forms — the only ones that can be turned into links; `draft` — Drafts, not published yet; `archived` — Archived forms. Example: `published`. | ## Responses ### 200 — The account's forms, as an array of form summaries. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].publicId` | string | Public form identifier (a string): the form ID to use as `{form_id}` in all other Forms endpoints. | | `[].accountId` | string | Account identifier (a string): the account's ID in the Forms app. | | `[].name` | string | The form's name. | | `[].status` | string | The form's status. Only `published` forms can be turned into links. One of: `published` — Published. Links can be generated for it; `draft` — A draft, not published yet. No links can be generated for it; `archived` — Archived. No links can be generated for it. | | `[].submissionCount` | integer | The number of submissions the form has received. | | `[].updatedAt` | string | The last change (ISO 8601). | #### Example ```json [ { "publicId": "45", "accountId": "2c7e9a4b-1d3f-4b6a-8e5c-0f9d8b7a6c51", "name": "Event registration", "status": "published", "submissionCount": 12, "updatedAt": "2026-11-12T08:00:00.000Z" }, { "publicId": "46", "accountId": "2c7e9a4b-1d3f-4b6a-8e5c-0f9d8b7a6c51", "name": "Customer feedback", "status": "published", "submissionCount": 3, "updatedAt": "2026-11-10T14:47:31.886Z" } ] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — Forms is not enabled for the account, or (new rules system) the role lacks **Forms → read**. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Forms is not enabled for this account`, or `You are not authorized to do this action` when the role lacks the permission. | #### Example: Forms not enabled The account does not have Forms. ```json { "error": "Forms is not enabled for this account" } ``` #### Example: No permission The role lacks Forms → read. ```json { "error": "You are not authorized to do this action" } ``` ### 404 — The Forms app answered that the resource was not found. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message from the Forms app: `Not found`. | #### Example ```json { "error": "Not found" } ``` ### 500 — An unexpected error while talking to the Forms app. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | What failed, as `:
`. | #### Example ```json { "error": ":
" } ``` ### 502 — The Forms app returned an error. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Failed to retrieve forms`. | #### Example ```json { "error": "Failed to retrieve forms" } ``` ### 503 — The Forms integration is not configured on the server. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Forms is not configured on this server`. | #### Example ```json { "error": "Forms is not configured on this server" } ``` --- # Get a Form Source: https://docs.99digital.co.il/online-api/forms/get-a-form Markdown: https://docs.99digital.co.il/markdown/online-api/forms/get-a-form.md Section: Online API › Forms `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/forms/{form_id}` Retrieve a form and its field definitions. **Settings:** | URL | Method | | --- | --- | | `https://online.99digital.co.il/api/v1/accounts/{account_id}/forms/{form_id}` | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key; access depends on the user's permissions. | **Permissions:** - User token: on accounts with the new rules system, **Forms → read**. Accounts on the legacy role system are not restricted. - Agent-bot token: allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | Account identifier. | Yes | | `form_id` | Form identifier in the path: the form's `publicId`, as returned by [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). | Yes | **Request Example:** ``` curl -s -H "api_access_token: " "https://online.99digital.co.il/api/v1/accounts/12/forms/45" ``` **Response:** This abbreviated example shows three of the form's fields. ``` { "id": "45", "name": "Event registration", "description": null, "status": "published", "created_at": "2026-11-05T09:30:12.019Z", "updated_at": "2026-11-12T08:00:00.000Z", "fields": [ {"id": "text", "type": "text", "name": "text", "label": "Full name", "required": true}, {"id": "number", "type": "number", "name": "number", "label": "Age", "required": false}, {"id": "email", "type": "email", "name": "email", "label": "Email", "required": true} ] } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `id` | Form identifier (string): the form's `publicId`. | | `name` | Form name. | | `description` | Form description, or `null`. | | `status` | Form status. Enum: `draft`, `published`, `archived`. Only `published` forms can be turned into links. | | `created_at` | Creation timestamp in ISO 8601 format. | | `updated_at` | Last update timestamp in ISO 8601 format. | | `fields` | Array of field definitions. | | `fields[].id` | Field identifier; corresponds to `answers[].field_id` when the field is answered (see [Get Submission](https://docs.99digital.co.il/online-api/forms/get-submission)). | | `fields[].type` | Field type. Enum: `text`, `email`, `phone`, `number`, `textarea`, `radio`, `checkbox`, `multi_select`, `select`, `date`, `time`, `datetime`, `number_rating`, `slider`, `file_upload`, `star_rating`. | | `fields[].name` | Field name. | | `fields[].label` | Display label. | | `fields[].required` | Boolean indicating whether the field is required. | The response comes from the 99digital Forms app as it is. How forms work, and the errors every Forms endpoint can return, are explained in [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `form_id` | path | string | Yes | The form's `publicId`, as returned by [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). Example: `45`. | ## Responses ### 200 — The form, with its fields. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | string | Form identifier (a string): the form's `publicId`. | | `name` | string | The form's name. | | `description` | string \| null | The form's description, or `null`. | | `status` | string | The form's status. Only `published` forms can be turned into links. One of: `published` — Published. Links can be generated for it; `draft` — A draft, not published yet. No links can be generated for it; `archived` — Archived. No links can be generated for it. | | `created_at` | string | When the form was created (ISO 8601). | | `updated_at` | string | The last change (ISO 8601). | | `fields` | array of object | The form's fields. | | `fields[].id` | string | The field's ID. When the field is answered, the answer refers to it as `field_id` (see [Get Submission](https://docs.99digital.co.il/online-api/forms/get-submission)). | | `fields[].type` | string | The field type: `text`, `email`, `phone`, `number`, `textarea`, `radio`, `checkbox`, `multi_select`, `select`, `date`, `time`, `datetime`, `number_rating`, `slider`, `file_upload` or `star_rating`. | | `fields[].name` | string | The field's name. The text shown on the form is `label`. | | `fields[].label` | string | The label shown on the form. | | `fields[].required` | boolean | Whether the field is required — must be filled in. | #### Example ```json { "id": "45", "name": "Event registration", "description": null, "status": "published", "created_at": "2026-11-05T09:30:12.019Z", "updated_at": "2026-11-12T08:00:00.000Z", "fields": [ { "id": "text", "type": "text", "name": "text", "label": "Full name", "required": true }, { "id": "number", "type": "number", "name": "number", "label": "Age", "required": false }, { "id": "email", "type": "email", "name": "email", "label": "Email", "required": true } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — Forms is not enabled for the account, or (new rules system) the role lacks **Forms → read**. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Forms is not enabled for this account`, or `You are not authorized to do this action` when the role lacks the permission. | #### Example: Forms not enabled The account does not have Forms. ```json { "error": "Forms is not enabled for this account" } ``` #### Example: No permission The role lacks Forms → read. ```json { "error": "You are not authorized to do this action" } ``` ### 404 — The form was not found in the Forms app. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message from the Forms app: `Not found`. | #### Example ```json { "error": "Not found" } ``` ### 500 — An unexpected error while talking to the Forms app. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | What failed, as `:
`. | #### Example ```json { "error": ":
" } ``` ### 502 — The Forms app returned an error. `error` describes it. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message, which says what failed. | ### 503 — The Forms integration is not configured on the server. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Forms is not configured on this server`. | #### Example ```json { "error": "Forms is not configured on this server" } ``` --- # List Form Fields Source: https://docs.99digital.co.il/online-api/forms/list-form-fields Markdown: https://docs.99digital.co.il/markdown/online-api/forms/list-form-fields.md Section: Online API › Forms `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/forms/{form_id}/fields` Returns the form's fields in a normalised format, as used by automation rules. This is the format of the "Form response" conditions of automation rules, for the `form_response_submitted` event. For the fields as the form defines them, use [Get a Form](https://docs.99digital.co.il/online-api/forms/get-a-form). How forms work, and the errors every Forms endpoint can return, are explained in [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/forms/{form_id}/fields` | **Permissions:** - User token: on accounts with the new rules system, **Forms → read**. Accounts on the legacy role system are not restricted. - Agent-bot token: allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `form_id` | string | Yes | Form `publicId`. | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/forms/45/fields' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`) ```json { "fields": [ { "key": "text", "name": "Full name", "type": "plain_text", "options": [] }, { "key": "number", "name": "Age", "type": "number", "options": [] }, { "key": "email", "name": "Email", "type": "plain_text", "options": [] } ] } ``` `type` is the automation-condition type (`plain_text`, `number`, `list`, ...); `options` lists the choices of select-type fields. **Error responses**: the common Forms errors (`403`, `404`, `500`, `502`, `503`) listed in [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `form_id` | path | string | Yes | The form's `publicId`, as returned by [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). Example: `45`. | ## Responses ### 200 — The form's fields. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `fields` | array of object | The form's fields. | | `fields[].key` | string | The field's ID — the `id` of the field in [Get a Form](https://docs.99digital.co.il/online-api/forms/get-a-form). | | `fields[].name` | string | The field's label, as shown on the form. | | `fields[].type` | string | The automation-condition type, for example `plain_text`, `number` or `list`. | | `fields[].options` | array | The choices of a select-type field; empty for other fields. | #### Example ```json { "fields": [ { "key": "text", "name": "Full name", "type": "plain_text", "options": [] }, { "key": "number", "name": "Age", "type": "number", "options": [] }, { "key": "email", "name": "Email", "type": "plain_text", "options": [] } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — Forms is not enabled for the account, or (new rules system) the role lacks **Forms → read**. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Forms is not enabled for this account`, or `You are not authorized to do this action` when the role lacks the permission. | #### Example: Forms not enabled The account does not have Forms. ```json { "error": "Forms is not enabled for this account" } ``` #### Example: No permission The role lacks Forms → read. ```json { "error": "You are not authorized to do this action" } ``` ### 404 — The form was not found in the Forms app. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message from the Forms app: `Not found`. | #### Example ```json { "error": "Not found" } ``` ### 500 — An unexpected error while talking to the Forms app. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | What failed, as `:
`. | #### Example ```json { "error": ":
" } ``` ### 502 — The Forms app returned an error. `error` describes it. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message, which says what failed. | ### 503 — The Forms integration is not configured on the server. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Forms is not configured on this server`. | #### Example ```json { "error": "Forms is not configured on this server" } ``` --- # Generate Form Link Source: https://docs.99digital.co.il/online-api/forms/generate-form-link Markdown: https://docs.99digital.co.il/markdown/online-api/forms/generate-form-link.md Section: Online API › Forms `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/forms/{form_id}/links` Generate a link for an existing conversation or for a contact on a new conversation screen. **Settings:** | URL | Method | | --- | --- | | `https://online.99digital.co.il/api/v1/accounts/{account_id}/forms/{form_id}/links` | JSON via POST | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key; access depends on the user's permissions. | | `Content-Type` | `application/json` | **Permissions:** - User token: on accounts with the new rules system, **Forms → read**. Accounts on the legacy role system are not restricted. - Agent-bot token: allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | Account identifier. | Yes | | `form_id` | Form identifier in the path: the form's `publicId`, as returned by [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). | Yes | **Request Body:** For an existing conversation, `conversation_id` is the conversation **display ID**: ``` {"conversation_id": 1501} ``` For a contact who may not exist yet: ``` {"inbox_id": 32, "contact": {"email": "dana.cohen@example.com", "name": "Dana Cohen"}} ``` | Parameter | Description | | --- | --- | | `conversation_id` | Conversation display ID (conversation link). | | `inbox_id` | Inbox identifier. Required for a contact link; optional for a public link, where it records which inbox the link came from. | | `contact.phone_number` | Contact phone (contact link). Phone or email is required for a contact link. | | `contact.email` | Contact email address (contact link). | | `contact.name` | Contact name, used for a new contact (contact link). | **Request Examples:** ``` curl -s -X POST -H "api_access_token: " -H "Content-Type: application/json" \ "https://online.99digital.co.il/api/v1/accounts/12/forms/45/links" \ -d '{"conversation_id": 1501}' curl -s -X POST -H "api_access_token: " -H "Content-Type: application/json" \ "https://online.99digital.co.il/api/v1/accounts/12/forms/45/links" \ -d '{"inbox_id": 32, "contact": {"email": "dana.cohen@example.com", "name": "Dana Cohen"}}' ``` **Response:** ``` {"form_link": "https://forms.example.com/forms/45/answer?t=X7kP2mQ9"} ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `form_link` | Generated URL for opening the form. Its domain is the Forms app's; `t` is the link's own token. | ## Kinds of link Creates a link to fill in the form. What the body contains decides which kind of link you get: 1. **Conversation link** (`conversation_id`): tied to an existing conversation and its contact. The submission appears in that conversation. 2. **Contact link** (`contact` + `inbox_id`): the contact is found by email/phone, or created if missing. Use this before a conversation exists, for example together with an outbound WhatsApp template sent with [Add Conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation). 3. **Public link** (neither): an anonymous link that anyone can use. `inbox_id` is optional and records which inbox it came from. The form must be **published**. Each link has a unique token. Generating a link fires the `form_link_generated` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events). **Example: link for a contact (by phone) in an inbox** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/forms/45/links' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "inbox_id": 32, "contact": { "phone_number": "+972501234567", "name": "Dana Cohen" } }' ``` Response (`200 OK`): ```json { "form_link": "https://forms.example.com/forms/45/answer?t=X7kP2mQ9" } ``` **Example: public link** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/forms/45/links' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{}' ``` Response (`200 OK`): ```json { "form_link": "https://forms.example.com/forms/45/answer?t=Q4nR8sT2" } ``` **Error responses** | Status | When | Body | | --- | --- | --- | | `400` | `contact` sent without email or phone. | `{"error": "Missing email or phone_number"}` | | `404` | `conversation_id` not found. | `{"error": "Conversation not found"}` | | `404` | The conversation has no contact. | `{"error": "Contact not found for conversation"}` | | `404` | `inbox_id` not found (contact link). | `{"error": "Inbox not found"}` | | `502` | The form is not published (draft/archived), or the Forms app failed. | `{"error": "Failed to generate form link"}` | The common Forms errors are listed in [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). ## Remarks - A form that is not published (a draft or archived form) is answered with `502`, the same as a failure of the Forms app. Check the form's `status` with [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms) first. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `form_id` | path | string | Yes | The form's `publicId`, as returned by [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). Example: `45`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `conversation_id` | integer | No | For a conversation link — the conversation's display ID. | | `contact` | object | No | For a contact link — the contact to find, or to create if missing. Send `phone_number` or `email`, and `inbox_id`. | | `contact.phone_number` | string | No | The contact's phone number. `phone_number` or `email` is required. | | `contact.email` | string | No | The contact's email address. `phone_number` or `email` is required. | | `contact.name` | string | No | The name for a new contact. | | `inbox_id` | integer | No | The inbox identifier. Required for a contact link. Optional for a public link, where it records which inbox the link came from. | ### Example: Conversation link A link for an existing conversation and its contact. ```json { "conversation_id": 1501 } ``` ### Example: Contact link A link for a contact, found by phone number or created, in an inbox. ```json { "inbox_id": 32, "contact": { "phone_number": "+972501234567", "name": "Dana Cohen" } } ``` ### Example: Public link An anonymous link that anyone can use. ```json {} ``` ## Responses ### 200 — The form link. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `form_link` | string | The generated URL for opening the form. Its domain is the Forms app's; `t` is the link's own token. | #### Example ```json { "form_link": "https://forms.example.com/forms/45/answer?t=X7kP2mQ9" } ``` ### 400 — `contact` was sent without `phone_number` or `email`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Missing email or phone_number`. | #### Example ```json { "error": "Missing email or phone_number" } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — Forms is not enabled for the account, or (new rules system) the role lacks **Forms → read**. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Forms is not enabled for this account`, or `You are not authorized to do this action` when the role lacks the permission. | #### Example: Forms not enabled The account does not have Forms. ```json { "error": "Forms is not enabled for this account" } ``` #### Example: No permission The role lacks Forms → read. ```json { "error": "You are not authorized to do this action" } ``` ### 404 — The form, the conversation, its contact or the inbox was not found. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. It names what was not found: the form, the conversation, its contact or the inbox. | #### Example: Form not found The form was not found in the Forms app. ```json { "error": "Not found" } ``` #### Example: Conversation not found `conversation_id` does not exist in this account. ```json { "error": "Conversation not found" } ``` #### Example: No contact The conversation has no contact. ```json { "error": "Contact not found for conversation" } ``` #### Example: Inbox not found `inbox_id` of a contact link does not exist in this account. ```json { "error": "Inbox not found" } ``` ### 500 — An unexpected error while talking to the Forms app. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | What failed, as `:
`. | #### Example ```json { "error": ":
" } ``` ### 502 — The form is not published (a draft or archived form), or the Forms app failed. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Failed to generate form link`. | #### Example ```json { "error": "Failed to generate form link" } ``` ### 503 — The Forms integration is not configured on the server. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Forms is not configured on this server`. | #### Example ```json { "error": "Forms is not configured on this server" } ``` --- # List Form Submissions Source: https://docs.99digital.co.il/online-api/forms/list-form-submissions Markdown: https://docs.99digital.co.il/markdown/online-api/forms/list-form-submissions.md Section: Online API › Forms `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/forms/{form_id}/submissions` Retrieve submission summaries for a form, newest first, 50 per page. **Settings:** | URL | Method | | --- | --- | | `https://online.99digital.co.il/api/v1/accounts/{account_id}/forms/{form_id}/submissions` | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key; access depends on the user's permissions. | **Permissions:** - User token: on accounts with the new rules system, **Forms Responses → read**. Accounts on the legacy role system are not restricted. - Agent-bot token: allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | Account identifier. | Yes | | `form_id` | Form identifier in the path: the form's `publicId`, as returned by [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). | Yes | **Query Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `page` | Page number, starting at 1. Invalid values mean page 1. | No | **Request Example:** ``` curl -s -H "api_access_token: " "https://online.99digital.co.il/api/v1/accounts/12/forms/45/submissions" curl -s -H "api_access_token: " "https://online.99digital.co.il/api/v1/accounts/12/forms/45/submissions?page=1" ``` **Response:** This example uses illustrative values. ``` { "data": [ { "id": "9b2f6c1e-4d3a-4f8b-a1c2-5e6f7a8b9c0d", "form_id": "45", "status": "completed", "created_at": "2026-11-12T08:04:51.210Z", "updated_at": "2026-11-12T08:09:38.775Z", "submitted_at": "2026-11-12T08:09:38.775Z" }, { "id": "7a1e5d2c-3b4f-4a6e-9d8c-1f2e3a4b5c6d", "form_id": "45", "status": "completed", "created_at": "2026-11-11T13:21:44.508Z", "updated_at": "2026-11-11T13:24:10.092Z", "submitted_at": "2026-11-11T13:24:10.092Z" } ], "pagination": {"page": 1, "limit": 50, "total": 2, "total_pages": 1} } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `data` | Array of submission summaries for this page, newest first. | | `data[].id` | Submission identifier (UUID string); use it as `{submission_id}` in [Get Submission](https://docs.99digital.co.il/online-api/forms/get-submission). | | `data[].form_id` | Associated form identifier (string). | | `data[].status` | Submission status. | | `data[].created_at` | Creation timestamp in ISO 8601 format. | | `data[].updated_at` | Last update timestamp in ISO 8601 format. | | `data[].submitted_at` | Submission timestamp in ISO 8601 format. | | `pagination.page` | Page represented by `data`. | | `pagination.limit` | Reported page size (50). | | `pagination.total` | Total submissions across pages. | | `pagination.total_pages` | Total number of pages. | Each summary has the submission's ID and times. For the answers, use [Get Submission](https://docs.99digital.co.il/online-api/forms/get-submission). How forms work, and the errors every Forms endpoint can return, are explained in [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `form_id` | path | string | Yes | The form's `publicId`, as returned by [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). Example: `45`. | | `page` | query | integer | No | The page number, starting at `1`. An invalid value means page 1. Default: `1`. Example: `1`. | ## Responses ### 200 — A page of the form's submissions, newest first. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `data` | array of object | The submissions on this page. | | `data[].id` | string | The submission's ID (a UUID), to use as `{submission_id}` in [Get Submission](https://docs.99digital.co.il/online-api/forms/get-submission). | | `data[].form_id` | string | The form's `publicId`. | | `data[].status` | string | The submission's status, for example `completed`. | | `data[].created_at` | string | When the submission was created (ISO 8601). | | `data[].updated_at` | string | The last change (ISO 8601). | | `data[].submitted_at` | string | When the form was submitted (ISO 8601). | | `pagination` | object | Where this page is. | | `pagination.page` | integer | This page's number. | | `pagination.limit` | integer | The page size (`50`). | | `pagination.total` | integer | The number of submissions, across all pages. | | `pagination.total_pages` | integer | The number of pages. | #### Example ```json { "data": [ { "id": "9b2f6c1e-4d3a-4f8b-a1c2-5e6f7a8b9c0d", "form_id": "45", "status": "completed", "created_at": "2026-11-12T08:04:51.210Z", "updated_at": "2026-11-12T08:09:38.775Z", "submitted_at": "2026-11-12T08:09:38.775Z" }, { "id": "7a1e5d2c-3b4f-4a6e-9d8c-1f2e3a4b5c6d", "form_id": "45", "status": "completed", "created_at": "2026-11-11T13:21:44.508Z", "updated_at": "2026-11-11T13:24:10.092Z", "submitted_at": "2026-11-11T13:24:10.092Z" } ], "pagination": { "page": 1, "limit": 50, "total": 2, "total_pages": 1 } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — Forms is not enabled for the account, or (new rules system) the role lacks **Forms Responses → read**. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Forms is not enabled for this account`, or `You are not authorized to do this action` when the role lacks the permission. | #### Example: Forms not enabled The account does not have Forms. ```json { "error": "Forms is not enabled for this account" } ``` #### Example: No permission The role lacks Forms Responses → read. ```json { "error": "You are not authorized to do this action" } ``` ### 404 — The form was not found in the Forms app. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message from the Forms app: `Not found`. | #### Example ```json { "error": "Not found" } ``` ### 500 — An unexpected error while talking to the Forms app. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | What failed, as `:
`. | #### Example ```json { "error": ":
" } ``` ### 502 — The Forms app returned an error. `error` describes it. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message, which says what failed. | ### 503 — The Forms integration is not configured on the server. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Forms is not configured on this server`. | #### Example ```json { "error": "Forms is not configured on this server" } ``` --- # Get Submission Source: https://docs.99digital.co.il/online-api/forms/get-submission Markdown: https://docs.99digital.co.il/markdown/online-api/forms/get-submission.md Section: Online API › Forms `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/forms/{form_id}/submissions/{submission_id}` Retrieve a submission and its answers. **Settings:** | URL | Method | | --- | --- | | `https://online.99digital.co.il/api/v1/accounts/{account_id}/forms/{form_id}/submissions/{submission_id}` | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key; access depends on the user's permissions. | **Permissions:** - User token: on accounts with the new rules system, **Forms Responses → read**. Accounts on the legacy role system are not restricted. - Agent-bot token: allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | Account identifier. | Yes | | `form_id` | Form identifier in the path: the form's `publicId`, as returned by [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). | Yes | | `submission_id` | Submission identifier (UUID) from the list response ([List Form Submissions](https://docs.99digital.co.il/online-api/forms/list-form-submissions)). | Yes | **Request Example:** ``` curl -s -H "api_access_token: " \ "https://online.99digital.co.il/api/v1/accounts/12/forms/45/submissions/9b2f6c1e-4d3a-4f8b-a1c2-5e6f7a8b9c0d" ``` **Response:** Contact details have been replaced with sample values. ``` { "id": "9b2f6c1e-4d3a-4f8b-a1c2-5e6f7a8b9c0d", "form_id": "45", "status": "completed", "created_at": "2026-11-12T08:04:51.210Z", "updated_at": "2026-11-12T08:09:38.775Z", "submitted_at": "2026-11-12T08:09:38.775Z", "answers": [ {"field_id": "text", "value": "Dana Cohen", "type": "text"}, {"field_id": "number", "value": "35", "type": "number"}, {"field_id": "email", "value": "dana.cohen@example.com", "type": "email"}, {"field_id": "contactPhone", "value": "+972501234567", "type": null} ] } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `id` | Submission identifier (UUID string). | | `form_id` | Associated form identifier (string). | | `status` | Submission status. | | `created_at` | Creation timestamp in ISO 8601 format. | | `updated_at` | Last update timestamp in ISO 8601 format. | | `submitted_at` | Submission timestamp in ISO 8601 format. | | `answers` | Array of recorded answers; may contain personal information. | | `answers[].field_id` | Identifier of the answered form field. | | `answers[].value` | Answer value. | | `answers[].type` | Field type. | `field_id` matches the `id` of the form's fields (see [Get a Form](https://docs.99digital.co.il/online-api/forms/get-a-form)). Fields filled automatically from the contact (such as `contactPhone`) appear with `type: null`. How forms work, and the errors every Forms endpoint can return, are explained in [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `form_id` | path | string | Yes | The form's `publicId`, as returned by [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). Example: `45`. | | `submission_id` | path | string | Yes | The submission's ID (a UUID), as returned by [List Form Submissions](https://docs.99digital.co.il/online-api/forms/list-form-submissions). Example: `9b2f6c1e-4d3a-4f8b-a1c2-5e6f7a8b9c0d`. | ## Responses ### 200 — The submission, with its answers. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | string | The submission's ID (a UUID). | | `form_id` | string | The form's `publicId`. | | `status` | string | The submission's status, for example `completed`. | | `created_at` | string | When the submission was created (ISO 8601). | | `updated_at` | string | The last change (ISO 8601). | | `submitted_at` | string | When the form was submitted (ISO 8601). | | `answers` | array of object | The recorded answers, one per answered field. They may contain personal data. | | `answers[].field_id` | string | The `id` of the form field. | | `answers[].value` | any | The answer's value. For a field filled in automatically, such as `contactPhone`, the value taken from the contact. | | `answers[].type` | string \| null | The field type, or `null` for a field filled in automatically from the contact. | #### Example ```json { "id": "9b2f6c1e-4d3a-4f8b-a1c2-5e6f7a8b9c0d", "form_id": "45", "status": "completed", "created_at": "2026-11-12T08:04:51.210Z", "updated_at": "2026-11-12T08:09:38.775Z", "submitted_at": "2026-11-12T08:09:38.775Z", "answers": [ { "field_id": "text", "value": "Dana Cohen", "type": "text" }, { "field_id": "number", "value": "35", "type": "number" }, { "field_id": "email", "value": "dana.cohen@example.com", "type": "email" }, { "field_id": "contactPhone", "value": "+972501234567", "type": null } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — Forms is not enabled for the account, or (new rules system) the role lacks **Forms Responses → read**. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Forms is not enabled for this account`, or `You are not authorized to do this action` when the role lacks the permission. | #### Example: Forms not enabled The account does not have Forms. ```json { "error": "Forms is not enabled for this account" } ``` #### Example: No permission The role lacks Forms Responses → read. ```json { "error": "You are not authorized to do this action" } ``` ### 404 — The form or the submission was not found in the Forms app. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message from the Forms app: `Not found`. | #### Example ```json { "error": "Not found" } ``` ### 500 — An unexpected error while talking to the Forms app. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | What failed, as `:
`. | #### Example ```json { "error": ":
" } ``` ### 502 — The Forms app returned an error. `error` describes it. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message, which says what failed. | ### 503 — The Forms integration is not configured on the server. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Forms is not configured on this server`. | #### Example ```json { "error": "Forms is not configured on this server" } ``` --- # List Labels Source: https://docs.99digital.co.il/online-api/labels/list-labels Markdown: https://docs.99digital.co.il/markdown/online-api/labels/list-labels.md Section: Online API › Labels `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/labels` Returns all labels of the account, sorted by title. :::tip To list or set the labels of one conversation, see [List Conversation Labels](https://docs.99digital.co.il/online-api/conversations/list-conversation-labels) and [Set Conversation Labels](https://docs.99digital.co.il/online-api/conversations/set-conversation-labels). ::: Labels are account-wide tags (with a color) that you attach to conversations and contacts. This section manages the label **definitions**. To attach labels to a record, use: - Conversations: [List Conversation Labels](https://docs.99digital.co.il/online-api/conversations/list-conversation-labels), [Set Conversation Labels](https://docs.99digital.co.il/online-api/conversations/set-conversation-labels), or `labels.add` / `labels.remove` in [Bulk Update Conversations](https://docs.99digital.co.il/online-api/conversations/bulk-update-conversations). - Contacts: [List Contact Labels](https://docs.99digital.co.il/online-api/contacts/list-contact-labels), [Set Contact Labels](https://docs.99digital.co.il/online-api/contacts/set-contact-labels). In those endpoints a label is referenced by its **title**. | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/labels` | | **Authorization** | User token. Any agent or administrator of the account. Not available to agent-bot tokens. | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/labels' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`). Truncated to two of the account's labels. ```json { "payload": [ { "id": 16, "title": "billing", "description": "Payments and invoices", "color": "#1f93ff", "show_on_sidebar": true }, { "id": 15, "title": "vip", "description": "High-value customers", "color": "#ff6b6b", "show_on_sidebar": true } ] } ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Responses ### 200 — The labels of the account, in `payload`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of object | The labels, sorted by title. | | `payload[].id` | integer | The numeric ID of the label. | | `payload[].title` | string | The label's name, unique in the account. Stored in lower case, and may contain only letters (any language), digits, `-` and `_` — no spaces. Conversations and contacts reference a label by this title. | | `payload[].description` | string | The description of the label. | | `payload[].color` | string | The label's color, as a hex code, for example `#1f93ff`. | | `payload[].show_on_sidebar` | boolean | Whether the label is shown as a filter in the dashboard sidebar. | #### Example ```json { "payload": [ { "id": 16, "title": "billing", "description": "Payments and invoices", "color": "#1f93ff", "show_on_sidebar": true }, { "id": 17, "title": "follow_up", "description": "Needs a call back", "color": "#1f93ff", "show_on_sidebar": false }, { "id": 15, "title": "vip", "description": "High-value customers", "color": "#ff6b6b", "show_on_sidebar": true } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` --- # Add Label Source: https://docs.99digital.co.il/online-api/labels/add-labels Markdown: https://docs.99digital.co.il/markdown/online-api/labels/add-labels.md Section: Online API › Labels `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/labels` Create a label definition in the account. :::tip To set or list the labels of a conversation, see [Set Conversation Labels](https://docs.99digital.co.il/online-api/conversations/set-conversation-labels) and [List Conversation Labels](https://docs.99digital.co.il/online-api/conversations/list-conversation-labels). For a contact, see [Set Contact Labels](https://docs.99digital.co.il/online-api/contacts/set-contact-labels) and [List Contact Labels](https://docs.99digital.co.il/online-api/contacts/list-contact-labels). ::: Labels are account-wide tags, each with a color, that you attach to conversations and contacts. Once created, a label is attached by its `title`. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/labels` | | **Authorization** | User token. Legacy: `administrator`. New rules: **Labels → create**. Not available to agent-bot tokens. | **Body parameters (JSON)** The fields go inside a `label` object. In a JSON request the wrapper is optional: top-level fields are wrapped for you. | Name | Type | Required | Description | | --- | --- | --- | --- | | `label.title` | string | Yes | Unique title: letters (any language), digits, `-`, `_` — no spaces. Converted to lower case; unique regardless of case. | | `label.description` | string | No | Description. | | `label.color` | string | No | Hex color. Default `#1f93ff`. | | `label.show_on_sidebar` | boolean | No | Show in the sidebar. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/labels' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "label": { "title": "VIP", "description": "High-value customers", "color": "#ff6b6b", "show_on_sidebar": true } }' ``` **Example response** (`200 OK`). The title was lower-cased. ```json { "id": 15, "title": "vip", "description": "High-value customers", "color": "#ff6b6b", "show_on_sidebar": true } ``` **Error responses** | Status | When | Body | | --- | --- | --- | | `422` | Title contains spaces or other invalid characters. | `{"message": "Title is invalid", "attributes": ["title"]}` | | `422` | Title already exists (case-insensitive). | `{"message": "Title has already been taken", "attributes": ["title"]}` | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `label` | object | Yes | The new label's details. In a JSON request the wrapper is optional: top-level fields are wrapped for you. | | `label.title` | string | Yes | The label's name, by which it is attached to conversations and contacts. Only letters (any language), digits, `-` and `_` — no spaces. Converted to lower case; must be unique in the account, regardless of case. Example: `VIP`. | | `label.description` | string | No | A description of the label. Example: `High-value customers`. | | `label.color` | string | No | The label's color, as a hex code. Defaults to `#1f93ff`. Default: `#1f93ff`. Example: `#ff6b6b`. | | `label.show_on_sidebar` | boolean | No | Whether to show the label as a filter in the dashboard sidebar. | ### Example: Label A label with a title only. It gets the default color. ```json { "label": { "title": "VIP" } } ``` ### Example: All fields A title, a description, a color and a sidebar filter. ```json { "label": { "title": "VIP", "description": "High-value customers", "color": "#ff6b6b", "show_on_sidebar": true } } ``` ## Responses ### 200 — The new label. The title is in lower case. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The numeric ID of the label. | | `title` | string | The label's name, unique in the account. Stored in lower case, and may contain only letters (any language), digits, `-` and `_` — no spaces. Conversations and contacts reference a label by this title. | | `description` | string | The description of the label. | | `color` | string | The label's color, as a hex code, for example `#1f93ff`. | | `show_on_sidebar` | boolean | Whether the label is shown as a filter in the dashboard sidebar. | #### Example ```json { "id": 15, "title": "vip", "description": "High-value customers", "color": "#ff6b6b", "show_on_sidebar": true } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 422 — The title has invalid characters, or is already taken. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `message` | string | What failed, in the account's language. | | `attributes` | array of string | The fields that failed. | #### Example: Invalid title The title has spaces or other characters that are not allowed. ```json { "message": "Title is invalid", "attributes": [ "title" ] } ``` #### Example: Title taken A label with this title (regardless of case) already exists. ```json { "message": "Title has already been taken", "attributes": [ "title" ] } ``` --- # Get a Label Source: https://docs.99digital.co.il/online-api/labels/get-a-label Markdown: https://docs.99digital.co.il/markdown/online-api/labels/get-a-label.md Section: Online API › Labels `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/labels/{label_id}` Retrieve one label definition of the account. | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/labels/{label_id}` | | **Authorization** | User token. Legacy: `administrator`. New rules: **Labels → read**. Not available to agent-bot tokens. | Unlike [List Labels](https://docs.99digital.co.il/online-api/labels/list-labels), which any agent may call, this endpoint needs the permission above. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `label_id` | integer | Yes | Label ID. | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/labels/15' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`) ```json { "id": 15, "title": "vip", "description": "High-value customers", "color": "#ff6b6b", "show_on_sidebar": true } ``` **Error responses**: `404 {"error": "Resource could not be found"}`. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `label_id` | path | integer | Yes | The numeric ID of the label. Example: `15`. | ## Responses ### 200 — The label. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The numeric ID of the label. | | `title` | string | The label's name, unique in the account. Stored in lower case, and may contain only letters (any language), digits, `-` and `_` — no spaces. Conversations and contacts reference a label by this title. | | `description` | string | The description of the label. | | `color` | string | The label's color, as a hex code, for example `#1f93ff`. | | `show_on_sidebar` | boolean | Whether the label is shown as a filter in the dashboard sidebar. | #### Example ```json { "id": 15, "title": "vip", "description": "High-value customers", "color": "#ff6b6b", "show_on_sidebar": true } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Update a Label Source: https://docs.99digital.co.il/online-api/labels/update-a-label Markdown: https://docs.99digital.co.il/markdown/online-api/labels/update-a-label.md Section: Online API › Labels `PATCH https://online.99digital.co.il/api/v1/accounts/{account_id}/labels/{label_id}` Update a label definition. Updates the fields you send. If you change the `title`, the new title is applied to all conversations and contacts that had the old one (in the background). | Setting | Value | | --- | --- | | **Method** | `PATCH` (or `PUT`) | | **Path** | `/api/v1/accounts/{account_id}/labels/{label_id}` | | **Authorization** | User token. Legacy: `administrator`. New rules: **Labels → update**. Not available to agent-bot tokens. | **Body parameters (JSON)**: the same fields as in [Add Label](https://docs.99digital.co.il/online-api/labels/add-labels), all optional, inside a `label` object (in a JSON request the wrapper is optional). A new title follows the same rules: letters, digits, `-` and `_` only, stored in lower case, unique in the account. **Example request** ```bash curl -X PATCH 'https://online.99digital.co.il/api/v1/accounts/12/labels/15' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "label": { "description": "Top customers", "color": "#ff6b6b", "show_on_sidebar": false } }' ``` **Example response** (`200 OK`) ```json { "id": 15, "title": "vip", "description": "Top customers", "color": "#ff6b6b", "show_on_sidebar": false } ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `label_id` | path | integer | Yes | The numeric ID of the label. Example: `15`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `label` | object | Yes | The fields to change. Every field is optional. | | `label.title` | string | No | A new name for the label. Only letters (any language), digits, `-` and `_` — no spaces. Converted to lower case; must be unique in the account, regardless of case. The new title replaces the old one on every conversation and contact that has the label, in the background. Example: `vip`. | | `label.description` | string | No | A description of the label. Example: `Top customers`. | | `label.color` | string | No | The label's color, as a hex code. Example: `#ff6b6b`. | | `label.show_on_sidebar` | boolean | No | Whether to show the label as a filter in the dashboard sidebar. | ### Example: Change the color A new color only. ```json { "label": { "color": "#ff6b6b" } } ``` ### Example: Several fields A new description and color, and hide it from the sidebar. ```json { "label": { "description": "Top customers", "color": "#ff6b6b", "show_on_sidebar": false } } ``` ## Responses ### 200 — The updated label. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The numeric ID of the label. | | `title` | string | The label's name, unique in the account. Stored in lower case, and may contain only letters (any language), digits, `-` and `_` — no spaces. Conversations and contacts reference a label by this title. | | `description` | string | The description of the label. | | `color` | string | The label's color, as a hex code, for example `#1f93ff`. | | `show_on_sidebar` | boolean | Whether the label is shown as a filter in the dashboard sidebar. | #### Example ```json { "id": 15, "title": "vip", "description": "Top customers", "color": "#ff6b6b", "show_on_sidebar": false } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — The new title has invalid characters, or is already taken. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `message` | string | What failed, in the account's language. | | `attributes` | array of string | The fields that failed. | #### Example: Invalid title The title has spaces or other characters that are not allowed. ```json { "message": "Title is invalid", "attributes": [ "title" ] } ``` #### Example: Title taken Another label has this title (regardless of case). ```json { "message": "Title has already been taken", "attributes": [ "title" ] } ``` --- # Delete a Label Source: https://docs.99digital.co.il/online-api/labels/delete-a-label Markdown: https://docs.99digital.co.il/markdown/online-api/labels/delete-a-label.md Section: Online API › Labels `DELETE https://online.99digital.co.il/api/v1/accounts/{account_id}/labels/{label_id}` Delete a label definition from the account. | Setting | Value | | --- | --- | | **Method** | `DELETE` | | **Path** | `/api/v1/accounts/{account_id}/labels/{label_id}` | | **Authorization** | User token. Legacy: `administrator`. New rules: **Labels → delete**. Not available to agent-bot tokens. | **Example request** ```bash curl -X DELETE 'https://online.99digital.co.il/api/v1/accounts/12/labels/15' \ -H 'api_access_token: ' ``` **Example response**: `200 OK` with an empty body. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `label_id` | path | integer | Yes | The numeric ID of the label. Example: `15`. | ## Responses ### 200 — The label was deleted, with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List of Messages Source: https://docs.99digital.co.il/online-api/messages/list-of-messages Markdown: https://docs.99digital.co.il/markdown/online-api/messages/list-of-messages.md Section: Online API › Messages `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages` List of all messages in a conversation. Returns the messages of a conversation, oldest first. Without parameters you get the **latest 20** messages. To page through older history, use `before` with the oldest ID you have. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages` | | Method | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token — the caller must be able to see the conversation (see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation)). New rules system: when the conversation was resolved before, messages from before the last resolution are returned only if the role has **Inbox see conversations history** for the inbox. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `conversation_id` | The numeric ID of the conversation (its display ID) | Yes | **Query Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `before` | Return up to 20 messages with an ID lower than this one. | No | | `after` | Return up to 100 messages with an ID higher than this one. | No | | `before` + `after` | Return the messages between the two IDs (`after` inclusive), up to 1000. | No | | `page` | Page-number mode instead of cursors (25 per page). Adds pagination counts to `meta`. | No | | `ticket_id` | Only messages of this [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets). | No | | `filter_internal_messages` | `true` excludes private notes and activity messages. | No | **Response:** ``` { "meta": { "labels": ["vip", "billing"], "additional_attributes": { "source": "crm" }, "contact": { "additional_attributes": { "city": "Tel Aviv", "company_name": "Example Ltd" }, "custom_attributes": { "customer_tier": "gold" }, "email": "dana.cohen@example.com", "id": 801, "identifier": "crm-801", "name": "Dana Cohen", "phone_number": "+972501234567", "thumbnail": "", "type": "contact" }, "agent_last_seen_at": "2026-11-12T08:01:05.114Z", "assignee_last_seen_at": null }, "payload": [ { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794470417 }, "content_attributes": {}, "created_at": 1794470417, "private": false, "source_id": null, "sender": { "additional_attributes": { "city": "Tel Aviv", "company_name": "Example Ltd" }, "custom_attributes": { "customer_tier": "gold" }, "email": "dana.cohen@example.com", "id": 801, "identifier": "crm-801", "name": "Dana Cohen", "phone_number": "+972501234567", "thumbnail": "", "type": "contact" }, "created_at_exact": "2026-11-12T08:00:17.903Z", "delay_hours": null, "ticket_id": 903 } ] } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | meta | An object containing metadata about the conversation | | meta -> labels | A list of labels associated with the conversation | | meta -> contact | An object containing data about the contact related to the conversation | | meta -> contact -> id | Contact numeric ID | | meta -> contact -> name | The contact's name | | meta -> contact -> phone_number | The contact's phone number | | meta -> contact -> email | The contact's email address | | meta -> contact -> identifier | A unique identifier for the contact in an external system | | meta -> contact -> thumbnail | Avatar URL of the contact | | meta -> contact -> additional_attributes | An object containing additional attributes associated with the contact | | meta -> contact -> custom_attributes | An object containing the different custom attributes associated with the contact | | meta -> contact -> type | Contact type (`contact` / `user`) | | meta -> agent_last_seen_at | The last time at which an agent saw the conversation (ISO 8601 format), or `null` | | meta -> assignee_last_seen_at | The last time at which the assignee saw the conversation (ISO 8601 format), or `null` | | meta -> additional_attributes | An object containing additional attributes related to the conversation | | meta -> all_count | Page mode only: the number of messages that match | | meta -> total_pages | Page mode only: the number of pages | | meta -> current_page | Page mode only: this page's number | | meta -> limit_value | Page mode only: the page size (25) | | payload | The messages, oldest first | | payload -> id | Message numeric ID | | payload -> content | The message text content (up to 160,000 characters). Deleted messages contain "This message was deleted". | | payload -> inbox_id | Inbox numeric ID | | payload -> conversation_id | Conversation numeric ID (the display ID) | | payload -> message_type | The type of the message: `0` - incoming (from the contact), `1` - outgoing (agent / bot / API), `2` - activity (system note such as "Conversation was resolved"), `3` - template | | payload -> content_type | The type of the message content. Enum: `text`, `input_select`, `buttons`, `cards`, `form`, `article`, `input_text`, `input_textarea`, `input_email`, `input_csat`, `incoming_email`, `integrations`, `referral`, `contact_info`, `request_phone`. Default: `text` | | payload -> status | The status of the message. Enum: `sent`, `delivered`, `read`, `failed`, `deleted` | | payload -> status_history | Unix time of each status reached, e.g. `{"sent": 1794470412, "delivered": 1794470447}` | | payload -> content_attributes | An object containing content attributes for the content_type: `items` (options), `in_reply_to` + `reply_data` (quoted message), `deleted`, `reaction_icon`, `email` (email headers/HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, ... | | payload -> created_at | The time at which message was created (Unix timestamp) | | payload -> private | A Boolean indicating whether the message is private or not (a private note is visible to agents only, never sent to the contact) | | payload -> source_id | Message source ID: the message ID on the external channel (e.g. the WhatsApp message ID), or `null` | | payload -> echo_id | Your own correlation ID, if you sent one | | payload -> attachments | An array of objects (attachment). Present only when the message has files. | | payload -> attachments -> id | File numeric ID | | payload -> attachments -> message_id | Message numeric ID | | payload -> attachments -> file_type | The type of file. Enum: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback` | | payload -> attachments -> account_id | Account numeric ID | | payload -> attachments -> extension | The file extension, when known | | payload -> attachments -> filename | The file name | | payload -> attachments -> data_url | File URL | | payload -> attachments -> thumb_url | Thumbnail URL, for images | | payload -> attachments -> file_size | The file size (in bytes) | | payload -> sender | An object containing sender data (contact / user / agent_bot). Activity messages have no sender. | | payload -> sender -> id | Sender ID | | payload -> sender -> name | Sender name | | payload -> sender -> phone_number | Sender phone number | | payload -> sender -> email | Sender email address | | payload -> sender -> identifier | A unique identifier for the contact in an external system | | payload -> sender -> type | Sender type (contact / user / agent_bot) | | payload -> sender -> thumbnail | Avatar URL | | payload -> sender -> custom_attributes | An object containing custom attributes related to the sender | | payload -> sender -> additional_attributes | An object containing additional attributes related to the sender | | payload -> created_at_exact | The time at which message was created (ISO 8601 format, with milliseconds) | | payload -> ticket_id | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to | | payload -> delay_hours | For scheduled messages: hours after `created_at` when it will be sent. Otherwise `null` | **Example: latest messages** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/messages' \ -H 'api_access_token: ' ``` Response (`200 OK`): the latest 20 messages, oldest first, in the shape above (see the **Latest messages** response example below). **Example: older messages (cursor)** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/messages?before=40113' \ -H 'api_access_token: ' ``` Response (`200 OK`): the 20 messages before `40113`, oldest first, in the same shape. **Example: page mode without notes and activity messages** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/messages?page=1&filter_internal_messages=true' \ -H 'api_access_token: ' ``` Response (`200 OK`). `meta` also contains the pagination counts: ```json { "meta": { "labels": ["vip", "billing"], "all_count": 6, "total_pages": 1, "current_page": 1, "limit_value": 25 }, "payload": [] } ``` (`meta` also includes the other fields shown above, and `payload` held the 6 messages. Both are trimmed here.) ## Remarks - **Cursors are message IDs.** Message IDs grow over time, so `before` walks back in history and `after` walks forward. The results are always oldest first, whichever cursor you send. - **Polling.** This is a `GET` under `/conversations`: requesting the same URL more than 10 times a minute from one IP address is answered with `429` (see [Rate limits](https://docs.99digital.co.il/online-api/getting-started#rate-limits)). To follow new messages, subscribe to the `message_created_*` [webhook events](https://docs.99digital.co.il/online-api/webhooks/webhook-events) instead. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | | `before` | query | integer | No | Return up to 20 messages with an ID lower than this one. With `after`, return the messages between the two IDs (up to 1,000). Example: `40113`. | | `after` | query | integer | No | Return up to 100 messages with an ID higher than this one. With `before`, this ID is included. | | `page` | query | integer | No | Page-number mode instead of cursors: 25 messages per page, starting at `1`. Adds pagination counts to `meta`. | | `ticket_id` | query | integer | No | Return only the messages of this [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets). | | `filter_internal_messages` | query | boolean | No | `true` leaves out private notes and activity messages. | ## Responses ### 200 — The conversation's details and its messages, oldest first. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `meta` | object | The conversation's details. | | `meta.labels` | array of string | The titles of the conversation's labels. | | `meta.additional_attributes` | object | The conversation's additional attributes: channel or system data, such as `mail_subject` or `source`. | | `meta.contact` | object | An object containing the sender's data: who sent a message — the contact (`type` `contact`), an agent (`user`) or an agent bot (`agent_bot`). Its fields follow the kind of sender — a contact has `phone_number` and `identifier`, an agent has `available_name` and `availability_status`. Activity messages have no sender. | | `meta.contact.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `meta.contact.name` | string | The sender's name. | | `meta.contact.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `meta.contact.available_name` | string | An agent's display name. | | `meta.contact.email` | string \| null | The sender's email address. | | `meta.contact.phone_number` | string \| null | The sender's phone number (a contact's). | | `meta.contact.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `meta.contact.avatar_url` | string | An agent's avatar image URL. | | `meta.contact.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `meta.contact.thumbnail` | string | The sender's avatar URL, or an empty string. | | `meta.contact.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `meta.contact.blocked` | boolean | Whether a contact is blocked. | | `meta.contact.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `meta.contact.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `meta.agent_last_seen_at` | string \| null | When an agent last saw the conversation (ISO 8601), or `null`. | | `meta.assignee_last_seen_at` | string \| null | When the assignee last saw the conversation (ISO 8601), or `null`. | | `meta.all_count` | integer | Page mode only — the number of messages that match. | | `meta.total_pages` | integer | Page mode only — the number of pages. | | `meta.current_page` | integer | Page mode only — this page's number. | | `meta.limit_value` | integer | Page mode only — the page size (`25`). | | `payload` | array of object | The messages, oldest first. | | `payload[].id` | integer | The numeric ID of the message. | | `payload[].content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `payload[].inbox_id` | integer | The numeric ID of the inbox. | | `payload[].conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `payload[].message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `payload[].content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `payload[].content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `payload[].private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `payload[].status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `payload[].status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `payload[].source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `payload[].echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `payload[].sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `payload[].sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `payload[].sender.name` | string | The sender's name. | | `payload[].sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `payload[].sender.available_name` | string | An agent's display name. | | `payload[].sender.email` | string \| null | The sender's email address. | | `payload[].sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `payload[].sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `payload[].sender.avatar_url` | string | An agent's avatar image URL. | | `payload[].sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `payload[].sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `payload[].sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `payload[].sender.blocked` | boolean | Whether a contact is blocked. | | `payload[].sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `payload[].sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `payload[].sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `payload[].sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `payload[].attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `payload[].attachments[].id` | integer | The numeric ID of the file (attachment). | | `payload[].attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `payload[].attachments[].account_id` | integer | The numeric ID of the account. | | `payload[].attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `payload[].attachments[].filename` | string | The name of the file. | | `payload[].attachments[].extension` | string \| null | The file extension, when known. | | `payload[].attachments[].data_url` | string | The URL of the file. | | `payload[].attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `payload[].attachments[].file_size` | integer | The file size, in bytes. | | `payload[].ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `payload[].delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `payload[].created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `payload[].created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | #### Example: Latest messages Without parameters. 2 of the 20 messages are shown, and `meta.contact` is shortened. ```json { "meta": { "labels": [ "vip", "billing" ], "additional_attributes": { "source": "crm" }, "contact": { "id": 801, "name": "Dana Cohen", "type": "contact" }, "agent_last_seen_at": "2026-11-12T08:01:05.114Z", "assignee_last_seen_at": null }, "payload": [ { "id": 40112, "content": "Your order A-1001 is ready for pickup.", "inbox_id": 31, "echo_id": "crm-msg-1001", "conversation_id": 1501, "message_type": 1, "content_type": "text", "status": "read", "status_history": { "sent": 1794470412, "delivered": 1794470447, "read": 1794470447 }, "content_attributes": {}, "created_at": 1794470412, "private": false, "source_id": null, "sender": { "id": 51, "name": "Jane Agent", "available_name": "Jane Agent", "email": "jane.agent@example.com", "avatar_url": "", "type": "user", "availability_status": "online", "thumbnail": "" }, "created_at_exact": "2026-11-12T08:00:12.417Z", "delay_hours": null, "ticket_id": 903 }, { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794470417 }, "content_attributes": { "reaction_icon": "👍" }, "created_at": 1794470417, "private": false, "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "created_at_exact": "2026-11-12T08:00:17.903Z", "delay_hours": null, "ticket_id": 903 } ] } ``` #### Example: Page mode `page=1&filter_internal_messages=true`. `meta` holds the pagination counts; `payload` is shortened to one message. ```json { "meta": { "labels": [ "vip", "billing" ], "additional_attributes": { "source": "crm" }, "contact": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false, "additional_attributes": { "city": "Tel Aviv", "company_name": "Example Ltd" }, "custom_attributes": { "customer_tier": "gold" } }, "agent_last_seen_at": "2026-11-12T08:01:05.114Z", "assignee_last_seen_at": null, "all_count": 6, "total_pages": 1, "current_page": 1, "limit_value": 25 }, "payload": [ { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794470417 }, "content_attributes": { "reaction_icon": "👍" }, "created_at": 1794470417, "private": false, "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "created_at_exact": "2026-11-12T08:00:17.903Z", "delay_hours": null, "ticket_id": 903 } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Create a Message Source: https://docs.99digital.co.il/online-api/messages/create-a-message Markdown: https://docs.99digital.co.il/markdown/online-api/messages/create-a-message.md Section: Online API › Messages `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages` This endpoint allows you to create a new message in a conversation. It sends a message in a conversation: a reply to the contact, a private note, an interactive message, a file, a location, a scheduled message, a WhatsApp template, or (in API inboxes) an incoming message on behalf of the contact. Outgoing messages are delivered to the contact through the inbox's channel (WhatsApp, SMS, email, Facebook, API webhook, and so on). Every new message fires the `message_created` [webhook event](https://docs.99digital.co.il/online-api/webhooks/webhook-events), delivered to the `message_created_agent`, `message_created_bot` or `message_created_customer` subscription, depending on who sent it. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages` | | Method | JSON via POST (or `multipart/form-data` when uploading files) | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token — any agent who can see the conversation (see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation)). New rules system, per inbox: a reply needs **Inbox reply**, a private note **Inbox private notes**; with `attachments` also **Inbox attach files**; with `delay_hours` also **Inbox delay message**. - Agent-bot token: allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `conversation_id` | The numeric ID of the conversation (its display ID) | Yes | **Request body:** | Parameter | type | Description | Required | | --- | --- | --- | --- | | `content` | string | The content of the message (up to 160,000 characters). Required unless you send attachments, a location or an interactive payload. | Conditional | | `message_type` | string | The type of the message. Enum: `outgoing` (default), `incoming`. `incoming` is allowed only in **API** (and Line) inboxes, to post a message from the contact. | No | | `private` | boolean | A Boolean indicating whether the message is private or not. `true` = private note (not sent to the contact). Default `false`. | No | | `content_type` | string | The type of the message content. Enum: `text` (default), `input_select`, `buttons`, `cards`, `form`, `article`, `input_email`, `contact_info`, `request_phone` (WhatsApp: ask the contact to share their phone number). | No | | `content_attributes` | object | Attributes based on the message content type (see the rows below). | No | | `content_attributes.items` | array | Options for `input_select` / `cards` / `form`: `[{"title": "...", "value": "..."}]`. | No | | `content_attributes.in_reply_to` | integer | ID of a message in this conversation to reply to (quoted reply). | No | | `content_attributes.buttons_info` / `buttons_info` | object | Buttons definition for `content_type: buttons`. | No | | `content_attributes.contact_info` / `contact_info` | object | Contact card for `content_type: contact_info`. | No | | `content_attributes.template_info` | object | **Online WhatsApp inboxes** (API inboxes connected to the 99digital WhatsApp server): the approved template to send. Use a template object from `GET /api/v1/accounts/{account_id}/online_wa/templates`, plus `parameters: [{"key": "1", "value": "..."}]` and, for URL buttons, `websiteVariable` / `websiteVariable2`. Required to message a contact outside the 24-hour window. Can also be sent top-level as `template_info`. | No | | `attachments[]` | file / string | Files to send. Send **files** with `multipart/form-data`, or **signed blob IDs** from `POST /api/v1/accounts/{account_id}/direct_uploads`, or **public URLs** (a string, or `{"url": "...", "filename": "..."}`) that the server downloads. | No | | `template_params` | object | Native WhatsApp Cloud channel templates: `{"name", "category", "language", "namespace", "processed_params": {"1": "value"}}`. | No | | `echo_id` | string | Your correlation ID, returned on the message and in webhooks. | No | | `delay_hours` | integer | Schedule the message to be sent this many hours from now. Until then it is stored with `delay_hours` set, and webhooks/channel delivery happen only at send time. | No | | `location` | object | Send a location: `{"latitude": 32.08, "longitude": 34.78, "name": "...", "address": "...", "url": "..."}`. | No | | `to_emails`, `cc_emails`, `bcc_emails` | string | Email inboxes: comma-separated addresses. | No | | `forwarded`, `forward_html_content`, `from_email` | | Email inboxes: forward a message (with original HTML), choose the sender alias. | No | | `campaign_id` | integer | Campaign the message belongs to. | No | | `sender_type` + `sender_id` | string + integer | `sender_type: "AgentBot"` and an agent-bot ID to send as that bot. | No | | `external_created_at` | integer | Original timestamp on the external platform. | No | | `skip_duplicates` | boolean | Do not create the message if one with the same content and time already exists. | No | | `wa_id` | string | Incoming WhatsApp v2 messages: the sender's current WhatsApp ID, saved on the contact inbox. | No | **Request body example:** ``` { "content": "Your order A-1001 is ready for pickup.", "message_type": "outgoing", "private": false, "content_type": "text", "content_attributes": {} } ``` **Response:** ``` { "id": 40112, "content": "Your order A-1001 is ready for pickup.", "inbox_id": 31, "echo_id": "crm-msg-1001", "conversation_id": 1501, "message_type": 1, "content_type": "text", "status": "sent", "status_history": { "sent": 1794470412 }, "content_attributes": {}, "created_at": 1794470412, "private": false, "source_id": null, "sender": { "id": 51, "name": "Jane Agent", "available_name": "Jane Agent", "email": "jane.agent@example.com", "avatar_url": "", "logo_user_url": null, "type": "user", "availability_status": "online", "thumbnail": "" }, "created_at_exact": "2026-11-12T08:00:12.417Z", "delay_hours": null, "ticket_id": 903 } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | id | The numeric ID of the message | | content | The message text content | | inbox_id | The numeric ID of the inbox | | conversation_id | The numeric ID of the conversation (the display ID) | | message_type | The type of the message: `0` - incoming, `1` - outgoing, `2` - activity, `3` - template. In the request it is a word (`outgoing`, `incoming`); in the response it is a number. | | content_type | The type of the message content. Enum: `text`, `input_select`, `buttons`, `cards`, `form`, `article`, `input_text`, `input_textarea`, `input_email`, `input_csat`, `incoming_email`, `integrations`, `referral`, `contact_info`, `request_phone`. Default: `text` | | status | The status of the message. Enum: `sent`, `delivered`, `read`, `failed`, `deleted` | | status_history | Unix time of each status reached, e.g. `{"sent": 1794470412}` | | content_attributes | An object containing content attributes for the content_type | | created_at | Time at which the message was created. Measured in seconds since the Unix epoch. | | private | A Boolean indicating whether the message is private or not | | source_id | Message source ID: the message ID on the external channel (e.g. the WhatsApp message ID), or `null` | | echo_id | Your own correlation ID, if you sent one | | created_at_exact | The time at which message was created (ISO 8601 format) | | sender | An object containing sender data (contact / user / agent_bot) | | attachments | The files of the message (present only when it has files): `id`, `message_id`, `file_type`, `filename`, `data_url`, `thumb_url`, `file_size`, `extension` | | delay_hours | For scheduled messages: hours after `created_at` when it will be sent. Otherwise `null` | | ticket_id | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to | :::note If the contact is **blocked**, incoming messages are not saved: the response is `200 OK` with `{"warning": {"message": "Contact is blocked. Message was ignored!", "params": ...}}` (see the **Blocked contact** response). ::: ## What to send What the body contains decides the kind of message. Each kind has a ready example under the request body: | To send | Send | | --- | --- | | A reply to the contact | `content` | | A private note, seen by agents only | `content` and `private: true` | | A message from the contact (API inboxes) | `content` and `message_type: incoming` | | An options menu | `content_type: input_select` and `content_attributes.items` | | A quoted reply | `content` and `content_attributes.in_reply_to` | | A scheduled message | `content` and `delay_hours` | | A location | `location` | | A WhatsApp template | `content` and `content_attributes.template_info` (see below) | | Files | `attachments`: public URLs or signed blob IDs in JSON, or files from disk with `multipart/form-data` (see Remarks) | ## WhatsApp templates In **Online WhatsApp inboxes** (API inboxes connected to the 99digital WhatsApp server), send an approved template in `content_attributes.template_info`, or in `template_info` at the top level. A template is required to message a contact outside WhatsApp's 24-hour window. 1. Take the template object from `GET /api/v1/accounts/{account_id}/online_wa/templates`. 2. Add `parameters`, one `{"key": "1", "value": "…"}` per placeholder of the template text, and, for URL buttons, `websiteVariable` / `websiteVariable2`. 3. Set `content` to the rendered text. `content` is the rendered text shown in the conversation. The WhatsApp server sends the template named in `template_info.name` with the given parameters. The same `message` object can be sent in the one-shot [Add Conversation](https://docs.99digital.co.il/online-api/conversations/add-conversation) call to start a new WhatsApp conversation. Native WhatsApp Cloud inboxes take `template_params` instead. **Error responses** | Status | When | Body | | --- | --- | --- | | `422` | `incoming` message in a non-API inbox. | `{"error": "Incoming messages are only allowed in Api inboxes"}` | | `422` | Outgoing message in an incoming-calls inbox. | `{"error": "Validation failed: Only private notes can be added in an incoming calls inbox"}` | | `422` | Other validation errors. | `{"error": ""}` | | `403` | Missing inbox permission (**Inbox reply**, **Inbox private notes**, **Inbox attach files** or **Inbox delay message**). | `{"error": "You are not authorized to do this action"}` | File types and sizes are checked against the account's upload policy. A rejected file returns an error status (for example `415`) with `{"error": ""}`. ## Remarks - **Scheduled messages** are stored at once, with `delay_hours` set. Webhook events and delivery to the contact happen only at send time. To cancel one, [delete it](https://docs.99digital.co.il/online-api/messages/delete-a-message) before then. - **Uploading files from disk.** Send the request as `multipart/form-data`, with each file in an `attachments[]` field and the other body fields as form fields: ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/messages' \ -H 'api_access_token: ' \ -F 'content=Here is the invoice image' \ -F 'attachments[]=@invoice.png;type=image/png' ``` The response is the new message, with its `attachments` (see the **File attachment** response). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `content` | string | No | The content of the message: its text, up to 160,000 characters. Required unless you send `attachments`, a `location` or an interactive payload. Max length: 160000. Example: `Your order A-1001 is ready for pickup.`. | | `message_type` | string | No | The type of the message: who it is from. `outgoing` (the default) or `incoming`. In the response it is a number (`1`, `0`). One of: `outgoing` — From the caller to the contact; `incoming` — From the contact. Allowed only in API (and Line) inboxes, to post a message on the contact's behalf. Default: `outgoing`. | | `private` | boolean | No | A Boolean indicating whether the message is private or not. `true` for a private note: seen by agents only, never sent to the contact. Default: `false`. | | `content_type` | string | No | The type of the message content. `input_select`, `cards` and `form` take `content_attributes.items`; `buttons` takes `buttons_info`; `contact_info` takes `contact_info`; `request_phone` (WhatsApp) asks the contact to share their phone number. One of: `text` — Plain text. The default; `input_select` — An options menu. The options go in `content_attributes.items`; `buttons` — A message with buttons, defined in `buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_email` — A request for the contact's email address; `contact_info` — A contact card, given in `contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. Default: `text`. | | `content_attributes` | object | No | Attributes based on the message content type. | | `content_attributes.items` | array of object | No | The options of an `input_select`, `cards` or `form` message. | | `content_attributes.items[].title` | string | No | The text the contact sees. | | `content_attributes.items[].value` | string | No | The value you get back when the contact chooses it. | | `content_attributes.in_reply_to` | integer | No | The ID of a message in this conversation to quote. The response adds `reply_data`, a summary of the quoted message. | | `content_attributes.buttons_info` | object | No | The buttons of a `buttons` message. Can also be sent at the top level. | | `content_attributes.contact_info` | object | No | The contact card of a `contact_info` message. Can also be sent at the top level. | | `content_attributes.template_info` | object | No | **Online WhatsApp inboxes**: the approved template to send — the template object from `GET /api/v1/accounts/{account_id}/online_wa/templates`, plus `parameters` and, for URL buttons, `websiteVariable` / `websiteVariable2`. Send the template object as you got it; its main fields are listed here. Required to message a contact outside the 24-hour window. Can also be sent at the top level as `template_info`. | | `content_attributes.template_info.name` | string | No | The template's name. | | `content_attributes.template_info.language` | string | No | The template's language code, for example `he` or `en`. | | `content_attributes.template_info.category` | integer | No | The template's category, as in the template object. | | `content_attributes.template_info.headerType` | integer | No | The template's header type, as in the template object. | | `content_attributes.template_info.text` | string | No | The template text, with numbered placeholders. | | `content_attributes.template_info.parameters` | array of object | No | The value of each numbered placeholder. | | `content_attributes.template_info.parameters[].key` | string | No | The placeholder's number, for example `1`. | | `content_attributes.template_info.parameters[].value` | string | No | The text to put in its place. | | `content_attributes.template_info.websiteVariable` | string | No | For a URL button, the variable part of its URL. | | `content_attributes.template_info.websiteVariable2` | string | No | For a second URL button, the variable part of its URL. | | `attachments` | array of string or object | No | Files to send. In JSON, each item is a public URL that the server downloads, a signed blob ID from `POST /api/v1/accounts/{account_id}/direct_uploads`, or an object with the file's `url` and `filename`. To upload files from disk, use `multipart/form-data` (see Remarks). | | `attachments[].url` | string | Yes | (one of: URL with file name) A public URL of the file. | | `attachments[].filename` | string | No | (one of: URL with file name) The file name to give it. | | `buttons_info` | object | No | The same as `content_attributes.buttons_info`, at the top level. | | `contact_info` | object | No | The same as `content_attributes.contact_info`, at the top level. | | `template_info` | object | No | The same as `content_attributes.template_info`, at the top level. | | `template_params` | object | No | Native WhatsApp Cloud inboxes — the template to send. | | `template_params.name` | string | No | The template's name. | | `template_params.category` | string | No | The template's category. | | `template_params.language` | string | No | The template's language code. | | `template_params.namespace` | string | No | The template's namespace. | | `template_params.processed_params` | object | No | The value of each numbered placeholder, for example `{"1": "Dana"}`. | | `echo_id` | string | No | Your own correlation ID, returned on the message and in webhook events. | | `delay_hours` | integer | No | Schedule the message to be sent this many hours from now. Until then it is stored with `delay_hours` set; webhook events and delivery to the contact happen only at send time. | | `location` | object | No | Send a location. | | `location.latitude` | number | No | The latitude. | | `location.longitude` | number | No | The longitude. | | `location.name` | string | No | The place's name. | | `location.address` | string | No | The place's address. | | `location.url` | string | No | A link to the place. | | `to_emails` | string | No | Email inboxes — the recipients, comma-separated. | | `cc_emails` | string | No | Email inboxes — the Cc recipients, comma-separated. | | `bcc_emails` | string | No | Email inboxes — the Bcc recipients, comma-separated. | | `forwarded` | boolean | No | Email inboxes — forward a message. | | `forward_html_content` | string | No | Email inboxes — the original HTML of the forwarded message. | | `from_email` | string | No | Email inboxes — the sender alias to send from. | | `campaign_id` | integer | No | The campaign the message belongs to. | | `sender_type` | string | No | `AgentBot`, with `sender_id`, sends the message as that agent bot. One of: `AgentBot`. | | `sender_id` | integer | No | The agent bot's ID, with `sender_type`. | | `external_created_at` | integer | No | The message's original time on the external platform (Unix time, seconds). | | `skip_duplicates` | boolean | No | `true` skips creating the message when one with the same content and time already exists. | | `wa_id` | string | No | Incoming WhatsApp v2 messages: the sender's current WhatsApp ID, saved on the contact inbox. | ### Example: Reply A reply to the contact, with your own correlation ID. ```json { "content": "Your order A-1001 is ready for pickup.", "message_type": "outgoing", "private": false, "echo_id": "crm-msg-1001" } ``` ### Example: Private note A note for agents only. It is not sent to the contact. ```json { "content": "Customer is a VIP, handle with care.", "private": true } ``` ### Example: Incoming message In an API inbox, post a message from the contact. ```json { "content": "Hi, where is my order?", "message_type": "incoming" } ``` ### Example: Options menu A question with options the contact can choose from. ```json { "content": "How can we help?", "content_type": "input_select", "content_attributes": { "items": [ { "title": "Track my order", "value": "track" }, { "title": "Talk to an agent", "value": "agent" } ] } } ``` ### Example: Quoted reply A reply that quotes an earlier message of the conversation. ```json { "content": "It will arrive tomorrow.", "content_attributes": { "in_reply_to": 40113 } } ``` ### Example: Scheduled message A message sent two hours from now. ```json { "content": "Reminder: your appointment is tomorrow.", "delay_hours": 2 } ``` ### Example: Location A location, without text. ```json { "location": { "latitude": 32.0853, "longitude": 34.7818, "name": "Example Ltd", "address": "1 Example St, Tel Aviv", "url": "https://maps.example.com/?q=32.0853,34.7818" } } ``` ### Example: WhatsApp template An approved template in an Online WhatsApp inbox, with two parameters. `content` is the rendered text shown in the conversation. The WhatsApp server sends the template named in `template_info.name` with the given parameters. ```json { "content": "Hello Dana, your order A-1001 is ready for pickup.", "private": false, "content_attributes": { "template_info": { "name": "order_ready", "language": "en", "category": 1, "headerType": 1, "text": "Hello {{1}}, your order {{2}} is ready for pickup.", "parameters": [ { "key": "1", "value": "Dana" }, { "key": "2", "value": "A-1001" } ] } } } ``` ### Example: File by URL Files the server downloads from public URLs — one with a file name. ```json { "content": "Here is the invoice image", "attachments": [ { "url": "https://example.com/files/invoice-a1001.png", "filename": "invoice.png" }, "https://example.com/files/price-list.pdf" ] } ``` ## Responses ### 200 — The new message. For an incoming message from a blocked contact, a `warning` instead: the message is not saved. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | (one of: Message) The numeric ID of the message. | | `content` | string \| null | (one of: Message) The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `inbox_id` | integer | (one of: Message) The numeric ID of the inbox. | | `conversation_id` | integer | (one of: Message) The numeric ID of the conversation (its display ID). | | `message_type` | integer | (one of: Message) The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `content_type` | string | (one of: Message) The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `content_attributes` | object | (one of: Message) An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `private` | boolean | (one of: Message) Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `status` | string | (one of: Message) The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `status_history` | object | (one of: Message) When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `source_id` | string \| null | (one of: Message) The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `echo_id` | string | (one of: Message) Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `sender` | object | (one of: Message) An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `sender.id` | integer | (one of: Message) The sender's ID — the ID of the contact, agent or agent bot. | | `sender.name` | string | (one of: Message) The sender's name. | | `sender.type` | string | (one of: Message) The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `sender.available_name` | string | (one of: Message) An agent's display name. | | `sender.email` | string \| null | (one of: Message) The sender's email address. | | `sender.phone_number` | string \| null | (one of: Message) The sender's phone number (a contact's). | | `sender.identifier` | string \| null | (one of: Message) A unique identifier for the contact in your external system (contacts only). | | `sender.avatar_url` | string | (one of: Message) An agent's avatar image URL. | | `sender.logo_user_url` | string \| null | (one of: Message) An agent's logo URL, or `null`. | | `sender.thumbnail` | string | (one of: Message) The sender's avatar URL, or an empty string. | | `sender.availability_status` | string | (one of: Message) An agent's live presence (`online`, `busy` or `offline`). | | `sender.blocked` | boolean | (one of: Message) Whether a contact is blocked. | | `sender.additional_attributes` | object | (one of: Message) An object containing the additional attributes related to the sender (a contact). | | `sender.custom_attributes` | object | (one of: Message) An object containing the custom attributes related to the sender (a contact). | | `sender_type` | string \| null | (one of: Message) In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `sender_id` | integer \| null | (one of: Message) In a conversation's `messages`, the sender's ID. | | `attachments` | array of object | (one of: Message) An array of attachment objects — the files of the message. Present only when it has files. | | `attachments[].id` | integer | (one of: Message) The numeric ID of the file (attachment). | | `attachments[].message_id` | integer | (one of: Message) The numeric ID of the message the file belongs to. | | `attachments[].account_id` | integer | (one of: Message) The numeric ID of the account. | | `attachments[].file_type` | string | (one of: Message) The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `attachments[].filename` | string | (one of: Message) The name of the file. | | `attachments[].extension` | string \| null | (one of: Message) The file extension, when known. | | `attachments[].data_url` | string | (one of: Message) The URL of the file. | | `attachments[].thumb_url` | string | (one of: Message) The URL of the file's thumbnail (for images). | | `attachments[].file_size` | integer | (one of: Message) The file size, in bytes. | | `ticket_id` | integer | (one of: Message) The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `delay_hours` | integer \| null | (one of: Message) For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `created_at` | integer | (one of: Message) The time at which the message was created, measured in seconds since the Unix epoch. | | `created_at_exact` | string | (one of: Message) The time at which the message was created, in ISO 8601 format with milliseconds. | | `warning` | object | (one of: Blocked contact) The incoming message was ignored because the contact is blocked. | | `warning.message` | string | (one of: Blocked contact) What happened. | | `warning.params` | object | (one of: Blocked contact) The parameters of the ignored request. | #### Example: Reply A reply sent by an agent. ```json { "id": 40112, "content": "Your order A-1001 is ready for pickup.", "inbox_id": 31, "echo_id": "crm-msg-1001", "conversation_id": 1501, "message_type": 1, "content_type": "text", "status": "sent", "status_history": { "sent": 1794470412 }, "content_attributes": {}, "created_at": 1794470412, "private": false, "source_id": null, "sender": { "id": 51, "name": "Jane Agent", "available_name": "Jane Agent", "email": "jane.agent@example.com", "avatar_url": "", "type": "user", "availability_status": "online", "thumbnail": "" }, "created_at_exact": "2026-11-12T08:00:12.417Z", "delay_hours": null, "ticket_id": 903 } ``` #### Example: Incoming message A message posted on the contact's behalf in an API inbox. The sender is the contact. ```json { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794470417 }, "content_attributes": {}, "created_at": 1794470417, "private": false, "source_id": null, "sender": { "additional_attributes": { "city": "Tel Aviv", "company_name": "Example Ltd" }, "custom_attributes": { "customer_tier": "gold" }, "email": "dana.cohen@example.com", "id": 801, "identifier": "crm-801", "name": "Dana Cohen", "phone_number": "+972501234567", "thumbnail": "", "type": "contact", "blocked": false }, "created_at_exact": "2026-11-12T08:00:17.903Z", "delay_hours": null, "ticket_id": 903 } ``` #### Example: Quoted reply A quoted reply, shortened to the relevant fields. ```json { "id": 40116, "content": "It will arrive tomorrow.", "content_attributes": { "in_reply_to": 40113, "reply_data": { "sender": { "name": "Dana Cohen" }, "content": "Hi, where is my order?", "message_type": 0, "file_type": null, "thumb_url": null, "source_id": null }, "in_reply_to_external_id": null } } ``` #### Example: File attachment A message with an image. The sender is shortened. ```json { "id": 40117, "content": "Here is the invoice image", "inbox_id": 31, "conversation_id": 1501, "message_type": 1, "content_type": "text", "status": "sent", "status_history": { "sent": 1794470430 }, "content_attributes": {}, "created_at": 1794470430, "private": false, "source_id": null, "sender": { "id": 51, "type": "user" }, "attachments": [ { "id": 3201, "message_id": 40117, "file_type": "image", "account_id": 12, "extension": null, "filename": "invoice.png", "data_url": "https://online.99digital.co.il/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "thumb_url": "https://online.99digital.co.il/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "file_size": 48213 } ], "created_at_exact": "2026-11-12T08:00:30.256Z", "delay_hours": null, "ticket_id": 903 } ``` #### Example: Blocked contact An incoming message from a blocked contact was not saved. `params` is left out here. ```json { "warning": { "message": "Contact is blocked. Message was ignored!" } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The caller cannot see the conversation, or the role lacks the inbox permission the message needs: **Inbox reply**, **Inbox private notes**, **Inbox attach files** or **Inbox delay message**. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `You are not authorized to do this action`. | #### Example ```json { "error": "You are not authorized to do this action" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 415 — A file was rejected by the account's upload policy (its type or size). Other error statuses are possible; `error` gives the reason. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | Why the file was rejected. | ### 422 — The message is not allowed in this inbox, or failed validation. `error` says why. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | What failed. | #### Example: Incoming in another inbox `message_type: incoming` in an inbox that is not an API inbox. ```json { "error": "Incoming messages are only allowed in Api inboxes" } ``` #### Example: Incoming-calls inbox An outgoing message in an incoming-calls inbox, which takes private notes only. ```json { "error": "Validation failed: Only private notes can be added in an incoming calls inbox" } ``` --- # Delete a Message Source: https://docs.99digital.co.il/online-api/messages/delete-a-message Markdown: https://docs.99digital.co.il/markdown/online-api/messages/delete-a-message.md Section: Online API › Messages `DELETE https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}` This endpoint allows you to delete a message and its attachments from the conversation. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}` | | Method | JSON via DELETE | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained on the profile page. **Permissions:** - User token — any agent who can see the conversation (see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation)). New rules system: **Inbox delete message** for the inbox. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `conversation_id` | The numeric ID of the conversation (its display ID) | Yes | | `message_id` | The numeric ID of the message | Yes | ## What is deleted A normal message is kept with its text replaced by "This message was deleted", `content_attributes.deleted: true`, and its attachments removed. A **scheduled** message that has not been sent yet is removed completely, so it will not be sent. On Facebook pages, TikTok and 99Hub Facebook comments the message is also deleted on the platform. On other channels (e.g. WhatsApp) the contact keeps the message they received. **Example request** ```bash curl -X DELETE 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/messages/40116' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`). The sender is omitted here. ```json { "id": 40116, "content": "This message was deleted", "inbox_id": 31, "conversation_id": 1501, "message_type": 1, "content_type": "text", "status": "sent", "status_history": { "sent": 1794470424 }, "content_attributes": { "deleted": true }, "created_at": 1794470424, "private": false, "source_id": null, "created_at_exact": "2026-11-12T08:00:24.640Z", "delay_hours": null, "ticket_id": 903 } ``` For a scheduled message the response is the message as it was before deletion (still with `delay_hours` set). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | | `message_id` | path | integer | Yes | The numeric ID of the message. Example: `40112`. | ## Responses ### 200 — The deleted message. For a scheduled message, the message as it was before the deletion. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The numeric ID of the message. | | `content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `inbox_id` | integer | The numeric ID of the inbox. | | `conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `sender.name` | string | The sender's name. | | `sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `sender.available_name` | string | An agent's display name. | | `sender.email` | string \| null | The sender's email address. | | `sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `sender.avatar_url` | string | An agent's avatar image URL. | | `sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `sender.blocked` | boolean | Whether a contact is blocked. | | `sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `attachments[].id` | integer | The numeric ID of the file (attachment). | | `attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `attachments[].account_id` | integer | The numeric ID of the account. | | `attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `attachments[].filename` | string | The name of the file. | | `attachments[].extension` | string \| null | The file extension, when known. | | `attachments[].data_url` | string | The URL of the file. | | `attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `attachments[].file_size` | integer | The file size, in bytes. | | `ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | #### Example: Sent message The message is kept, marked as deleted. The sender is left out here. ```json { "id": 40116, "content": "This message was deleted", "inbox_id": 31, "conversation_id": 1501, "message_type": 1, "content_type": "text", "status": "sent", "status_history": { "sent": 1794470424 }, "content_attributes": { "deleted": true }, "created_at": 1794470424, "private": false, "source_id": null, "created_at_exact": "2026-11-12T08:00:24.640Z", "delay_hours": null, "ticket_id": 903 } ``` #### Example: Scheduled message A scheduled message that was not sent yet, as it was before the deletion. Shortened to the relevant fields. ```json { "id": 40118, "content": "Reminder: your appointment is tomorrow.", "status": "sent", "delay_hours": 2, "created_at": 1794470435 } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Update Message Status Source: https://docs.99digital.co.il/online-api/messages/update-message-status Markdown: https://docs.99digital.co.il/markdown/online-api/messages/update-message-status.md Section: Online API › Messages `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}/status` Sets the delivery status of a message. Channel integrations (such as the WhatsApp API server) use it to report delivery and read receipts. The status can only move **forward**: `sent` → `delivered` → `read` → `failed` → `deleted`. Each status reached is recorded in `status_history`. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}/status` | | **Authorization** | User token. | **Permissions:** - User token — any agent who can see the conversation (see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation)). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | | `message_id` | integer | Yes | Message ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | `delivered`, `read`, `failed` or `deleted`. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/messages/40112/status' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "status": "read" }' ``` **Example response** (`200 OK`): the full message object. The relevant fields: ```json { "id": 40112, "status": "read", "status_history": { "sent": 1794470412, "delivered": 1794470447, "read": 1794470447 } } ``` **Error responses**: `422 {"error": "New status must be greater than current status"}` (for example `delivered` after `read`). ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | | `message_id` | path | integer | Yes | The numeric ID of the message. Example: `40112`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | The new status. It must come after the current status in the order `sent` → `delivered` → `read` → `failed` → `deleted`. One of: `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | ### Example (generated from the schema) ```json { "status": "read" } ``` ## Responses ### 200 — The message, with its new status. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The numeric ID of the message. | | `content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `inbox_id` | integer | The numeric ID of the inbox. | | `conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `sender.name` | string | The sender's name. | | `sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `sender.available_name` | string | An agent's display name. | | `sender.email` | string \| null | The sender's email address. | | `sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `sender.avatar_url` | string | An agent's avatar image URL. | | `sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `sender.blocked` | boolean | Whether a contact is blocked. | | `sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `attachments[].id` | integer | The numeric ID of the file (attachment). | | `attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `attachments[].account_id` | integer | The numeric ID of the account. | | `attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `attachments[].filename` | string | The name of the file. | | `attachments[].extension` | string \| null | The file extension, when known. | | `attachments[].data_url` | string | The URL of the file. | | `attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `attachments[].file_size` | integer | The file size, in bytes. | | `ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | #### Example ```json { "id": 40112, "content": "Your order A-1001 is ready for pickup.", "inbox_id": 31, "echo_id": "crm-msg-1001", "conversation_id": 1501, "message_type": 1, "content_type": "text", "status": "read", "status_history": { "sent": 1794470412, "delivered": 1794470447, "read": 1794470447 }, "content_attributes": {}, "created_at": 1794470412, "private": false, "source_id": null, "sender": { "id": 51, "name": "Jane Agent", "available_name": "Jane Agent", "email": "jane.agent@example.com", "avatar_url": "", "type": "user", "availability_status": "online", "thumbnail": "" }, "created_at_exact": "2026-11-12T08:00:12.417Z", "delay_hours": null, "ticket_id": 903 } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — The new status is not after the message's current status. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `New status must be greater than current status`. | #### Example ```json { "error": "New status must be greater than current status" } ``` --- # Set Message Reaction Source: https://docs.99digital.co.il/online-api/messages/set-message-reaction Markdown: https://docs.99digital.co.il/markdown/online-api/messages/set-message-reaction.md Section: Online API › Messages `PATCH https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}/reaction` Stores an emoji reaction on a message. The reaction is stored in `content_attributes.reaction_icon`. Send an empty string to clear it. | Setting | Value | | --- | --- | | **Method** | `PATCH` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}/reaction` | | **Authorization** | User token. | **Permissions:** - User token — any agent who can see the conversation (see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation)). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | | `message_id` | integer | Yes | Message ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `reaction_icon` | string | Yes | A single emoji, e.g. `👍`. Send an empty string to clear the reaction. | **Example request** ```bash curl -X PATCH 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/messages/40113/reaction' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "reaction_icon": "👍" }' ``` **Example response** (`200 OK`): the full message object, with: ```json { "id": 40113, "content_attributes": { "reaction_icon": "👍" } } ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | | `message_id` | path | integer | Yes | The numeric ID of the message. Example: `40112`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `reaction_icon` | string | Yes | A single emoji, for example `👍`, or an empty string to clear the reaction. | ### Example: Add a reaction React with a thumbs-up. ```json { "reaction_icon": "👍" } ``` ### Example: Clear the reaction Remove the message's reaction. ```json { "reaction_icon": "" } ``` ## Responses ### 200 — The message, with the reaction in `content_attributes.reaction_icon`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The numeric ID of the message. | | `content` | string \| null | The message text content, up to 160,000 characters. A deleted message reads "This message was deleted". | | `inbox_id` | integer | The numeric ID of the inbox. | | `conversation_id` | integer | The numeric ID of the conversation (its display ID). | | `message_type` | integer | The type of the message — who the message is from. One of: `0` — Incoming — from the contact; `1` — Outgoing — from an agent, a bot or the API; `2` — Activity — a system note, such as "Conversation was resolved"; `3` — Template. | | `content_type` | string | The type of the message content. Default: `text`; the other types are interactive or special messages. One of: `text` — Plain text. The default; `input_select` — An options menu. The options are in `content_attributes.items`; `buttons` — A message with buttons, defined in `content_attributes.buttons_info`; `cards` — Cards, given in `content_attributes.items`; `form` — A form, given in `content_attributes.items`; `article` — An article message; `input_text` — A request for a text answer from the contact; `input_textarea` — A request for a longer text answer from the contact; `input_email` — A request for the contact's email address; `input_csat` — A CSAT survey (customer satisfaction rating); `incoming_email` — An email received in an email inbox. The headers and HTML are in `content_attributes.email`; `integrations` — A message created by an integration; `referral` — A referral — information about where the contact came from, such as an ad; `contact_info` — A contact card, given in `content_attributes.contact_info`; `request_phone` — WhatsApp — asks the contact to share their phone number. | | `content_attributes` | object | An object containing the content attributes for the `content_type`: `items` (options), `in_reply_to` and `reply_data` (a quoted message), `deleted`, `reaction_icon`, `email` (email headers and HTML), `template_info`, `buttons_info`, `contact_info`, `external_error`, `translations`, …. | | `private` | boolean | Whether the message is private: `true` for a private note, seen by agents only and never sent to the contact. | | `status` | string | The delivery status of the message. One of: `sent` — The message was sent; `delivered` — The message was delivered to the contact; `read` — The contact read the message; `failed` — The message could not be delivered; `deleted` — The message was deleted. | | `status_history` | object | When each status was reached (Unix timestamp, in seconds), for example `{"sent": 1794500000, "delivered": 1794500035}`. | | `source_id` | string \| null | The message's source ID: its ID on the external channel (for example the WhatsApp message ID), or `null`. | | `echo_id` | string | Your own correlation ID, if you sent one. It is returned on the message and in webhooks. | | `sender` | object | An object containing the sender's data: the contact (`type` `contact`), an agent (`type` `user`) or an agent bot (`type` `agent_bot`). Activity messages have no sender. | | `sender.id` | integer | The sender's ID — the ID of the contact, agent or agent bot. | | `sender.name` | string | The sender's name. | | `sender.type` | string | The sender type. One of: `contact` — The contact; `user` — An agent; `agent_bot` — An agent bot. | | `sender.available_name` | string | An agent's display name. | | `sender.email` | string \| null | The sender's email address. | | `sender.phone_number` | string \| null | The sender's phone number (a contact's). | | `sender.identifier` | string \| null | A unique identifier for the contact in your external system (contacts only). | | `sender.avatar_url` | string | An agent's avatar image URL. | | `sender.logo_user_url` | string \| null | An agent's logo URL, or `null`. | | `sender.thumbnail` | string | The sender's avatar URL, or an empty string. | | `sender.availability_status` | string | An agent's live presence (`online`, `busy` or `offline`). | | `sender.blocked` | boolean | Whether a contact is blocked. | | `sender.additional_attributes` | object | An object containing the additional attributes related to the sender (a contact). | | `sender.custom_attributes` | object | An object containing the custom attributes related to the sender (a contact). | | `sender_type` | string \| null | In a conversation's `messages`, the kind of sender instead of the `sender` object: `User` (an agent), `Contact` or `AgentBot`. | | `sender_id` | integer \| null | In a conversation's `messages`, the sender's ID. | | `attachments` | array of object | An array of attachment objects — the files of the message. Present only when it has files. | | `attachments[].id` | integer | The numeric ID of the file (attachment). | | `attachments[].message_id` | integer | The numeric ID of the message the file belongs to. | | `attachments[].account_id` | integer | The numeric ID of the account. | | `attachments[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `attachments[].filename` | string | The name of the file. | | `attachments[].extension` | string \| null | The file extension, when known. | | `attachments[].data_url` | string | The URL of the file. | | `attachments[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `attachments[].file_size` | integer | The file size, in bytes. | | `ticket_id` | integer | The [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) the message belongs to. | | `delay_hours` | integer \| null | For a scheduled message, the number of hours after `created_at` at which it is sent; otherwise `null`. | | `created_at` | integer | The time at which the message was created, measured in seconds since the Unix epoch. | | `created_at_exact` | string | The time at which the message was created, in ISO 8601 format with milliseconds. | #### Example ```json { "id": 40113, "content": "Hi, where is my order?", "inbox_id": 31, "conversation_id": 1501, "message_type": 0, "content_type": "text", "status": "sent", "status_history": { "sent": 1794470417 }, "content_attributes": { "reaction_icon": "👍" }, "created_at": 1794470417, "private": false, "source_id": null, "sender": { "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "thumbnail": "", "type": "contact", "blocked": false }, "created_at_exact": "2026-11-12T08:00:17.903Z", "delay_hours": null, "ticket_id": 903 } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Translate a Message Source: https://docs.99digital.co.il/online-api/messages/translate-a-message Markdown: https://docs.99digital.co.il/markdown/online-api/messages/translate-a-message.md Section: Online API › Messages `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}/translate` Translates a message with the account's OpenAI integration. The translation is stored in `content_attributes.translations`. If a translation to that language already exists, it returns `200` with an empty body; the stored translation is then in the message's `content_attributes.translations`, for example in [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages). | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}/translate` | | **Authorization** | User token. New rules: **Inbox ai assistance** for the inbox. | **Permissions:** - User token — any agent who can see the conversation (see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation)). New rules system: also **Inbox ai assistance** for the conversation's inbox. - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | | `message_id` | integer | Yes | Message ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `target_language` | string | Yes | Language code, e.g. `he`, `en`, `ar`, `ru`. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/messages/40113/translate' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "target_language": "he" }' ``` **Example response** (`200 OK`) ```json { "content": "היי, איפה ההזמנה שלי?" } ``` **Error responses**: `422 {"error": "OpenAI integration is not enabled"}`. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | | `message_id` | path | integer | Yes | The numeric ID of the message. Example: `40112`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `target_language` | string | Yes | The language code to translate to, for example `he`, `en`, `ar` or `ru`. | ### Example (generated from the schema) ```json { "target_language": "he" } ``` ## Responses ### 200 — The translation. If the message already has a translation to `target_language`, an empty body. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `content` | string | The translated text. | #### Example ```json { "content": "היי, איפה ההזמנה שלי?" } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — The account's OpenAI integration is not enabled. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `OpenAI integration is not enabled`. | #### Example ```json { "error": "OpenAI integration is not enabled" } ``` --- # List Conversation Files Source: https://docs.99digital.co.il/online-api/messages/list-conversation-files Markdown: https://docs.99digital.co.il/markdown/online-api/messages/list-conversation-files.md Section: Online API › Messages `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/files` Returns the attachments of all messages in the conversation, newest first. The list is paginated with a cursor: up to `limit` files per request (200 by default). For the next page, send the lowest `id` you received as `before`. | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/files` | | **Authorization** | User token. | **Permissions:** - User token — any agent who can see the conversation (see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation)). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | **Query parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | No | Page size, 1–200. Default 200. | | `before` | integer | No | Return attachments with an ID lower than this one (next page). | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/messages/files?limit=10' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`) ```json [ { "id": 3201, "message_id": 40117, "account_id": 12, "file_type": "image", "data_url": "https://online.99digital.co.il/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "thumb_url": "https://online.99digital.co.il/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png" } ] ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | | `limit` | query | integer | No | The number of files to return, from 1 to 200. The default is 200. Default: `200`. Minimum: 1. Maximum: 200. Example: `10`. | | `before` | query | integer | No | Return files with an ID lower than this one — the lowest `id` of the previous page — to get the next page. | ## Responses ### 200 — The conversation's files, newest first. Each file has `id`, `message_id`, `account_id`, `file_type`, `data_url` and `thumb_url`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The numeric ID of the file (attachment). | | `[].message_id` | integer | The numeric ID of the message the file belongs to. | | `[].account_id` | integer | The numeric ID of the account. | | `[].file_type` | string | The type of file: `image`, `video`, `audio`, `file`, `location`, `contact`, `share`, `story_mention`, `fallback`, …. | | `[].filename` | string | The name of the file. | | `[].extension` | string \| null | The file extension, when known. | | `[].data_url` | string | The URL of the file. | | `[].thumb_url` | string | The URL of the file's thumbnail (for images). | | `[].file_size` | integer | The file size, in bytes. | #### Example ```json [ { "id": 3201, "message_id": 40117, "account_id": 12, "file_type": "image", "data_url": "https://online.99digital.co.il/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png", "thumb_url": "https://online.99digital.co.il/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIwMX19--b7c1/invoice.png" } ] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Get Forward Quotes Source: https://docs.99digital.co.il/online-api/messages/get-forward-quotes Markdown: https://docs.99digital.co.il/markdown/online-api/messages/get-forward-quotes.md Section: Online API › Messages `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}/forward_quotes` Returns the public incoming and outgoing messages before a given message, for building a quoted history when forwarding (mainly email). Only the messages **before** the given message are returned, oldest first. Private notes and activity messages are left out. Very long histories are cut down to the most recent messages; send `limit` to get only the last few. | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/messages/{message_id}/forward_quotes` | | **Authorization** | User token. | **Permissions:** - User token — any agent who can see the conversation (see [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation)). - Agent-bot token: not allowed. **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `conversation_id` | integer | Yes | Conversation display ID. | | `message_id` | integer | Yes | Message ID. The messages before this one are returned. | **Query parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | No | Return only the last N messages. | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/messages/40117/forward_quotes?limit=2' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`) ```json { "payload": [ { "sender": { "email": null, "name": "Jane Agent", "from_original": "Jane Agent <>" }, "created_at": 1794470423, "private": false, "content": "How can we help?", "html_content": null, "forwarded": null }, { "sender": { "email": null, "name": "Jane Agent", "from_original": "Jane Agent <>" }, "created_at": 1794470424, "private": false, "content": "It will arrive tomorrow.", "html_content": null, "forwarded": null } ] } ``` **Error responses**: `404 {"error": "Message not found"}`. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. | | `message_id` | path | integer | Yes | The numeric ID of the message. Example: `40112`. | | `limit` | query | integer | No | Return only the last N messages. Example: `2`. | ## Responses ### 200 — The messages before the given message. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | array of object | The messages, oldest first. | | `payload[].sender` | object | Who sent the message. | | `payload[].sender.email` | string \| null | The sender's email address, or `null`. | | `payload[].sender.name` | string | The sender's name. | | `payload[].sender.from_original` | string | The sender as an email `From` value — the name, then the email address in angle brackets. | | `payload[].created_at` | integer | When the message was created (Unix time, seconds). | | `payload[].private` | boolean | Whether the message is a private note. | | `payload[].content` | string \| null | The message text. | | `payload[].html_content` | string \| null | The message's HTML (email messages), or `null`. | | `payload[].forwarded` | any | The message's forwarding data, or `null`. | #### Example ```json { "payload": [ { "sender": { "email": null, "name": "Jane Agent", "from_original": "Jane Agent <>" }, "created_at": 1794470423, "private": false, "content": "How can we help?", "html_content": null, "forwarded": null }, { "sender": { "email": null, "name": "Jane Agent", "from_original": "Jane Agent <>" }, "created_at": 1794470424, "private": false, "content": "It will arrive tomorrow.", "html_content": null, "forwarded": null } ] } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The conversation or the message does not exist. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message: `Message not found` for the message, or `Resource could not be found` for the conversation. | #### Example: Message not found The message does not exist in this conversation. ```json { "error": "Message not found" } ``` #### Example: Conversation not found The conversation does not exist in this account. ```json { "error": "Resource could not be found" } ``` --- # List of all Teams Source: https://docs.99digital.co.il/online-api/teams/list-of-all-teams Markdown: https://docs.99digital.co.il/markdown/online-api/teams/list-of-all-teams.md Section: Online API › Teams `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/teams` List of all teams available in the account. A team is a group of agents. You can [assign a conversation](https://docs.99digital.co.il/online-api/conversations/assign-conversation) to a team, and with `allow_auto_assign` the conversation is then assigned to one of the team's available members automatically. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/teams` | | Method | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token: any agent of the account. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | **Response:** ```json [ { "id": 7, "name": "support", "description": "Customer support", "allow_auto_assign": true, "account_id": 12, "members_count": 2, "is_member": true }, {...}, {...} ] ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `id` | The numeric ID of the team | | `name` | The name of the team. Stored in lower case, and unique in the account. | | `description` | The description about the team | | `allow_auto_assign` | Indicates whether the auto assignment setting is enabled: a conversation assigned to the team is then assigned to one of its available members automatically | | `account_id` | The numeric ID of the account | | `members_count` | The number of members in the team | | `is_member` | Indicates whether the current user is a member of the team | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Responses ### 200 — The teams of the account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The numeric ID of the team. | | `[].name` | string | The name of the team. Stored in lower case, and unique in the account. | | `[].description` | string | The description of the team. | | `[].allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `[].account_id` | integer | The numeric ID of the account. | | `[].members_count` | integer | The number of agents in the team. | | `[].is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | #### Example ```json [ { "id": 7, "name": "support", "description": "Customer support", "allow_auto_assign": true, "account_id": 12, "members_count": 2, "is_member": true }, { "id": 8, "name": "sales", "description": "", "allow_auto_assign": false, "account_id": 12, "members_count": 1, "is_member": false } ] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` --- # Create a Team Source: https://docs.99digital.co.il/online-api/teams/create-a-team Markdown: https://docs.99digital.co.il/markdown/online-api/teams/create-a-team.md Section: Online API › Teams `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/teams` Create a new team in an account. The new team has no members. Add agents with [Add Team Members](https://docs.99digital.co.il/online-api/teams/members/add-team-members). **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/teams` | | Method | JSON via POST | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token — legacy roles: `administrator`. New rules system: **Teams → create**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | **Request body:** The fields go inside a `team` object. In a JSON request the wrapper is optional: top-level fields, as in the example below, are wrapped for you. | Parameter | Type | Description | Required | | --- | --- | --- | --- | | `name` | string | The name of the team. It is converted to lower case before saving, and must be unique in the account (regardless of case). | Yes | | `description` | string | The description of the team | No | | `allow_auto_assign` | boolean | If set to `true`, the system automatically assigns the conversation to an agent in the team when the conversation is assigned to the team. Default `true`. | No | **Request body example:** ```json { "name": "Support", "description": "Customer support", "allow_auto_assign": true } ``` **Response:** The name is returned in lower case. ```json { "id": 7, "name": "support", "description": "Customer support", "allow_auto_assign": true, "account_id": 12, "members_count": 0, "is_member": false } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `id` | The numeric ID of the team | | `name` | The name of the team. Stored in lower case, and unique in the account. | | `description` | The description about the team | | `allow_auto_assign` | Indicates whether the auto assignment setting is enabled: a conversation assigned to the team is then assigned to one of its available members automatically | | `account_id` | The numeric ID of the account | | `members_count` | The number of members in the team | | `is_member` | Indicates whether the current user is a member of the team | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `team` | object | Yes | The new team's details. In a JSON request the wrapper is optional: top-level fields are wrapped for you. | | `team.name` | string | Yes | The name of the team. It is converted to lower case before saving, and must be unique in the account, regardless of case. Example: `Support`. | | `team.description` | string | No | The description of the team. Example: `Customer support`. | | `team.allow_auto_assign` | boolean | No | If set to `true`, the system automatically assigns the conversation to an available agent in the team when the conversation is assigned to the team. Default `true`. Default: `true`. | ### Example: Team A team with a name only. ```json { "team": { "name": "Support" } } ``` ### Example: All fields A name, a description and automatic assignment. ```json { "team": { "name": "Support", "description": "Customer support", "allow_auto_assign": true } } ``` ## Responses ### 200 — The new team. The name is in lower case. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The numeric ID of the team. | | `name` | string | The name of the team. Stored in lower case, and unique in the account. | | `description` | string | The description of the team. | | `allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `account_id` | integer | The numeric ID of the account. | | `members_count` | integer | The number of agents in the team. | | `is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | #### Example ```json { "id": 7, "name": "support", "description": "Customer support", "allow_auto_assign": true, "account_id": 12, "members_count": 0, "is_member": false } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 422 — A team with the same name (regardless of case) already exists. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `message` | string | What failed, in the account's language. | | `attributes` | array of string | The fields that failed. | #### Example ```json { "message": "Name has already been taken", "attributes": [ "name" ] } ``` --- # Get a Team Source: https://docs.99digital.co.il/online-api/teams/get-a-team Markdown: https://docs.99digital.co.il/markdown/online-api/teams/get-a-team.md Section: Online API › Teams `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/teams/{team_id}` Retrieve details about a team in an account. To get the team's agents, use [List Team Members](https://docs.99digital.co.il/online-api/teams/members/list-team-members). **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/teams/{team_id}` | | Method | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token: any agent of the account. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `team_id` | The numeric ID of the team | Yes | **Response:** ```json { "id": 7, "name": "support", "description": "Customer support", "allow_auto_assign": true, "account_id": 12, "members_count": 2, "is_member": true } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `id` | The numeric ID of the team | | `name` | The name of the team. Stored in lower case, and unique in the account. | | `description` | The description about the team | | `allow_auto_assign` | Indicates whether the auto assignment setting is enabled: a conversation assigned to the team is then assigned to one of its available members automatically | | `account_id` | The numeric ID of the account | | `members_count` | The number of members in the team | | `is_member` | Indicates whether the current user is a member of the team | **Error responses:** `404 {"error": "Resource could not be found"}` when the team does not exist in the account. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `team_id` | path | integer | Yes | The numeric ID of the team. Example: `7`. | ## Responses ### 200 — The team. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The numeric ID of the team. | | `name` | string | The name of the team. Stored in lower case, and unique in the account. | | `description` | string | The description of the team. | | `allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `account_id` | integer | The numeric ID of the account. | | `members_count` | integer | The number of agents in the team. | | `is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | #### Example ```json { "id": 7, "name": "support", "description": "Customer support", "allow_auto_assign": true, "account_id": 12, "members_count": 2, "is_member": true } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Update a Team Source: https://docs.99digital.co.il/online-api/teams/update-a-team Markdown: https://docs.99digital.co.il/markdown/online-api/teams/update-a-team.md Section: Online API › Teams `PATCH https://online.99digital.co.il/api/v1/accounts/{account_id}/teams/{team_id}` Update team details. Only the fields you send are changed. To change the members, use [Replace Team Members](https://docs.99digital.co.il/online-api/teams/members/replace-team-members). **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/teams/{team_id}` | | Method | JSON via PATCH (`PUT` works the same way) | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token — legacy roles: `administrator`. New rules system: **Teams → update**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `team_id` | The numeric ID of the team | Yes | **Request body:** The fields go inside a `team` object. In a JSON request the wrapper is optional: top-level fields, as in the example below, are wrapped for you. | Parameter | Type | Description | Required | | --- | --- | --- | --- | | `name` | string | The name of the team. It is converted to lower case before saving, and must be unique in the account (regardless of case). | No | | `description` | string | The description of the team | No | | `allow_auto_assign` | boolean | If set to `true`, the system automatically assigns the conversation to an agent in the team when the conversation is assigned to the team | No | **Request body example:** ```json { "allow_auto_assign": false } ``` **Response:** ```json { "id": 7, "name": "support", "description": "Customer support", "allow_auto_assign": false, "account_id": 12, "members_count": 2, "is_member": true } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `id` | The numeric ID of the team | | `name` | The name of the team. Stored in lower case, and unique in the account. | | `description` | The description about the team | | `allow_auto_assign` | Indicates whether the auto assignment setting is enabled: a conversation assigned to the team is then assigned to one of its available members automatically | | `account_id` | The numeric ID of the account | | `members_count` | The number of members in the team | | `is_member` | Indicates whether the current user is a member of the team | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `team_id` | path | integer | Yes | The numeric ID of the team. Example: `7`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `team` | object | Yes | The fields to change. Every field is optional. In a JSON request the wrapper is optional: top-level fields are wrapped for you. | | `team.name` | string | No | The name of the team. It is converted to lower case before saving, and must be unique in the account, regardless of case. Example: `Support`. | | `team.description` | string | No | The description of the team. Example: `Customer support and returns`. | | `team.allow_auto_assign` | boolean | No | If set to `true`, the system automatically assigns the conversation to an available agent in the team when the conversation is assigned to the team. | ### Example: Turn off auto-assignment Stop assigning the team's conversations automatically. ```json { "team": { "allow_auto_assign": false } } ``` ### Example: Description and auto-assignment Change two fields at once. ```json { "team": { "description": "Customer support and returns", "allow_auto_assign": false } } ``` ## Responses ### 200 — The updated team. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `id` | integer | The numeric ID of the team. | | `name` | string | The name of the team. Stored in lower case, and unique in the account. | | `description` | string | The description of the team. | | `allow_auto_assign` | boolean | Indicates whether the auto-assignment setting is enabled: when `true`, a conversation assigned to the team is automatically assigned to one of the team's available members. | | `account_id` | integer | The numeric ID of the account. | | `members_count` | integer | The number of agents in the team. | | `is_member` | boolean | Indicates whether the current user (the caller) is a member of the team. | #### Example ```json { "id": 7, "name": "support", "description": "Customer support and returns", "allow_auto_assign": false, "account_id": 12, "members_count": 2, "is_member": true } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — Another team already has this name (regardless of case). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `message` | string | What failed, in the account's language. | | `attributes` | array of string | The fields that failed. | #### Example ```json { "message": "Name has already been taken", "attributes": [ "name" ] } ``` --- # Delete a Team Source: https://docs.99digital.co.il/online-api/teams/delete-a-team Markdown: https://docs.99digital.co.il/markdown/online-api/teams/delete-a-team.md Section: Online API › Teams `DELETE https://online.99digital.co.il/api/v1/accounts/{account_id}/teams/{team_id}` Delete a team from an account. Conversations assigned to the team are kept, and their team is cleared. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/teams/{team_id}` | | Method | JSON via DELETE | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token — legacy roles: `administrator`. New rules system: **Teams → delete**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `team_id` | The numeric ID of the team | Yes | **Response:** `200 OK` with an empty body. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `team_id` | path | integer | Yes | The numeric ID of the team. Example: `7`. | ## Responses ### 200 — The team was deleted, with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # List Team Members Source: https://docs.99digital.co.il/online-api/teams/members/list-team-members Markdown: https://docs.99digital.co.il/markdown/online-api/teams/members/list-team-members.md Section: Online API › Teams › Members `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/teams/{team_id}/team_members` Returns the team's members as agent objects. Each member is a full agent object; see the response schema below. | Setting | Value | | --- | --- | | **Method** | `GET` | | **Path** | `/api/v1/accounts/{account_id}/teams/{team_id}/team_members` | | **Authorization** | User token. Any agent of the account. Not available to agent-bot tokens. | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `team_id` | integer | Yes | Team ID. | **Example request** ```bash curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/teams/7/team_members' \ -H 'api_access_token: ' ``` **Example response** (`200 OK`). One member is shown. ```json [ { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": true, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [31, 32], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": "+972507654321", "email1": null, "create_time": 1794470400 } ] ``` ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `team_id` | path | integer | Yes | The numeric ID of the team. Example: `7`. | ## Responses ### 200 — The team's members. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The agent's numeric ID (user ID). | | `[].account_id` | integer | The numeric ID of the account. | | `[].availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `[].auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `[].confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `[].email` | string | The agent's login email address. | | `[].available_name` | string | The agent's display name. | | `[].custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `[].name` | string | The agent's full name. | | `[].role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `[].operation_bot` | boolean | `true` for internal operation-bot users. | | `[].see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `[].assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `[].new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `[].thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `[].capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `[].two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `[].phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `[].email1` | string \| null | The email address that receives two-factor codes by email. | | `[].create_time` | integer | When the agent was created (Unix timestamp, in seconds). | #### Example ```json [ { "id": 51, "account_id": 12, "availability_status": "online", "auto_offline": true, "confirmed": true, "email": "jane.agent@example.com", "available_name": "Jane Agent", "custom_attributes": {}, "name": "Jane Agent", "role": "General Manager", "operation_bot": false, "see_all_conversations": true, "assignable_to_inbox": [ 31, 32, 33 ], "new_role": "General Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": "sms", "phone1": "+972541234567", "email1": null, "create_time": 1790000000 }, { "id": 53, "account_id": 12, "availability_status": "busy", "auto_offline": true, "confirmed": true, "email": "omer.katz@example.com", "available_name": "Omer Katz", "custom_attributes": {}, "name": "Omer Katz", "role": "Agent", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [ 31 ], "new_role": "Agent", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": null, "email1": null, "create_time": 1794470700 } ] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Add Team Members Source: https://docs.99digital.co.il/online-api/teams/members/add-team-members Markdown: https://docs.99digital.co.il/markdown/online-api/teams/members/add-team-members.md Section: Online API › Teams › Members `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/teams/{team_id}/team_members` Adds agents to the team. Agents who are already members are ignored. Returns only the **newly added** agents. | Setting | Value | | --- | --- | | **Method** | `POST` | | **Path** | `/api/v1/accounts/{account_id}/teams/{team_id}/team_members` | | **Authorization** | User token. Legacy: `administrator`. New rules: **Teams → create**. Not available to agent-bot tokens. | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `team_id` | integer | Yes | Team ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | integer[] | Yes | Agent (user) IDs to add. Every ID must belong to the account. | **Example request** ```bash curl -X POST 'https://online.99digital.co.il/api/v1/accounts/12/teams/7/team_members' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "user_ids": [52] }' ``` **Example response** (`200 OK`): an array with the added agent objects, in the same shape as [List Team Members](https://docs.99digital.co.il/online-api/teams/members/list-team-members). **Error responses** | Status | When | Body | | --- | --- | --- | | `422` | One of the IDs is not a user of this account. | `{"error": "Invalid User IDs"}` | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `team_id` | path | integer | Yes | The numeric ID of the team. Example: `7`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | array of integer | Yes | The user IDs of the agents to add. Every ID must be an agent of the account; agents who are already members are ignored. | ### Example (generated from the schema) ```json { "user_ids": [ 52 ] } ``` ## Responses ### 200 — The agents that were added to the team. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The agent's numeric ID (user ID). | | `[].account_id` | integer | The numeric ID of the account. | | `[].availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `[].auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `[].confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `[].email` | string | The agent's login email address. | | `[].available_name` | string | The agent's display name. | | `[].custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `[].name` | string | The agent's full name. | | `[].role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `[].operation_bot` | boolean | `true` for internal operation-bot users. | | `[].see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `[].assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `[].new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `[].thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `[].capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `[].two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `[].phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `[].email1` | string \| null | The email address that receives two-factor codes by email. | | `[].create_time` | integer | When the agent was created (Unix timestamp, in seconds). | #### Example ```json [ { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": true, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [ 31, 32 ], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": "+972507654321", "email1": null, "create_time": 1794470400 } ] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — One of the IDs is not an agent of this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Invalid User IDs" } ``` --- # Replace Team Members Source: https://docs.99digital.co.il/online-api/teams/members/replace-team-members Markdown: https://docs.99digital.co.il/markdown/online-api/teams/members/replace-team-members.md Section: Online API › Teams › Members `PATCH https://online.99digital.co.il/api/v1/accounts/{account_id}/teams/{team_id}/team_members` Sets the team's member list to exactly the agents you send. The list becomes exactly `user_ids`: missing agents are added, and members not in the list are removed. Returns the full member list after the change. | Setting | Value | | --- | --- | | **Method** | `PATCH` | | **Path** | `/api/v1/accounts/{account_id}/teams/{team_id}/team_members` | | **Authorization** | User token. Legacy: `administrator`. New rules: **Teams → update**. Not available to agent-bot tokens. | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `team_id` | integer | Yes | Team ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | integer[] | Yes | The complete list of member IDs. | **Example request**: the team had members `51` and `53`; after this call it has `51` and `52`. ```bash curl -X PATCH 'https://online.99digital.co.il/api/v1/accounts/12/teams/7/team_members' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "user_ids": [51, 52] }' ``` **Example response** (`200 OK`): an array of agent objects for all current members (here the agents with `"id": 51` and `"id": 52`). **Error responses**: `422 {"error": "Invalid User IDs"}`. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `team_id` | path | integer | Yes | The numeric ID of the team. Example: `7`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | array of integer | Yes | The complete list of the team's members, as user IDs. Every ID must be an agent of the account. | ### Example (generated from the schema) ```json { "user_ids": [ 51, 52 ] } ``` ## Responses ### 200 — All the team's members after the change. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].id` | integer | The agent's numeric ID (user ID). | | `[].account_id` | integer | The numeric ID of the account. | | `[].availability_status` | string | The availability status of the agent: their live presence, computed from the agent's connection — not only the availability the agent chose (`availability` in Add Agent and Update Agent). One of: `online` — Available — connected, with availability set to online; `busy` — Connected, with availability set to busy; `offline` — Not available — availability set to offline, or not connected. | | `[].auto_offline` | boolean | Whether the agent's availability is configured to go offline automatically when they are away (when they disconnect). | | `[].confirmed` | boolean | Whether the agent's account has been validated: `true` once the agent clicked the link in the invitation email they received (confirmed their email). | | `[].email` | string | The agent's login email address. | | `[].available_name` | string | The agent's display name. | | `[].custom_attributes` | object | Free-form attributes (key-value pairs) stored on the agent's membership in this account. | | `[].name` | string | The agent's full name. | | `[].role` | string | The agent's role. Legacy roles: whether the agent is an `administrator` or an `agent`. New rules system: the name of the agent's custom role (for example `Shift Manager`). | | `[].operation_bot` | boolean | `true` for internal operation-bot users. | | `[].see_all_conversations` | boolean | Whether the agent can see all the conversations in the account. On accounts with the new rules system the role decides this (**Inbox read all conversations** in every inbox). | | `[].assignable_to_inbox` | array \| null | The IDs of the inboxes in which the agent's role grants **Inbox can be assigned** (the agent may be assigned conversations there), or `null`. | | `[].new_role` | string \| null | The agent's custom role name, or `null` on accounts with legacy roles. | | `[].thumbnail` | string | The agent's thumbnail (avatar image) URL, or an empty string. | | `[].capacity_cap` | integer \| null | The agent's own cap of open tickets for queue routing. `null` means the account default (unlimited). Returned only when the account has the queue management (`queue_management`) feature. | | `[].two_factor_type` | string \| null | The agent's two-factor authentication method, or `null` when two-factor authentication is disabled. One of: `sms` — Two-factor codes are sent by SMS to `phone1`; `email` — Two-factor codes are sent by email to `email1`; `null` — Two-factor authentication is disabled. | | `[].phone1` | string \| null | The phone number that receives two-factor codes by SMS. | | `[].email1` | string \| null | The email address that receives two-factor codes by email. | | `[].create_time` | integer | When the agent was created (Unix timestamp, in seconds). | #### Example: Members after the change The team had agents 51 and 53; now it has 51 and 52. ```json [ { "id": 51, "account_id": 12, "availability_status": "online", "auto_offline": true, "confirmed": true, "email": "jane.agent@example.com", "available_name": "Jane Agent", "custom_attributes": {}, "name": "Jane Agent", "role": "General Manager", "operation_bot": false, "see_all_conversations": true, "assignable_to_inbox": [ 31, 32, 33 ], "new_role": "General Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": "sms", "phone1": "+972541234567", "email1": null, "create_time": 1790000000 }, { "id": 52, "account_id": 12, "availability_status": "offline", "auto_offline": true, "confirmed": true, "email": "dana.levi@example.com", "available_name": "Dana Levi", "custom_attributes": { "department": "sales" }, "name": "Dana Levi", "role": "Shift Manager", "operation_bot": false, "see_all_conversations": false, "assignable_to_inbox": [ 31, 32 ], "new_role": "Shift Manager", "thumbnail": "", "capacity_cap": null, "two_factor_type": null, "phone1": "+972507654321", "email1": null, "create_time": 1794470400 } ] ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — One of the IDs is not an agent of this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Invalid User IDs" } ``` --- # Remove Team Members Source: https://docs.99digital.co.il/online-api/teams/members/remove-team-members Markdown: https://docs.99digital.co.il/markdown/online-api/teams/members/remove-team-members.md Section: Online API › Teams › Members `DELETE https://online.99digital.co.il/api/v1/accounts/{account_id}/teams/{team_id}/team_members` Removes agents from the team. IDs of agents who are not members are ignored. The IDs go in the JSON body of the `DELETE` request. | Setting | Value | | --- | --- | | **Method** | `DELETE` | | **Path** | `/api/v1/accounts/{account_id}/teams/{team_id}/team_members` | | **Authorization** | User token. Legacy: `administrator`. New rules: **Teams → delete**. Not available to agent-bot tokens. | **Path parameters** | Name | Type | Required | Description | | --- | --- | --- | --- | | `account_id` | integer | Yes | Account ID. | | `team_id` | integer | Yes | Team ID. | **Body parameters (JSON)** | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | integer[] | Yes | Agent IDs to remove. IDs that are not members are ignored. | **Example request** ```bash curl -X DELETE 'https://online.99digital.co.il/api/v1/accounts/12/teams/7/team_members' \ -H 'api_access_token: ' \ -H 'Content-Type: application/json' \ -d '{ "user_ids": [53] }' ``` **Example response**: `200 OK` with an empty body. **Error responses**: `422 {"error": "Invalid User IDs"}`. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `team_id` | path | integer | Yes | The numeric ID of the team. Example: `7`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | array of integer | Yes | The user IDs of the agents to remove. Every ID must be an agent of the account; agents who are not members of the team are ignored. | ### Example (generated from the schema) ```json { "user_ids": [ 53 ] } ``` ## Responses ### 200 — The agents were removed from the team, with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — One of the IDs is not an agent of this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Invalid User IDs" } ``` --- # List Webhooks Source: https://docs.99digital.co.il/online-api/webhooks/list-webhooks Markdown: https://docs.99digital.co.il/markdown/online-api/webhooks/list-webhooks.md Section: Online API › Webhooks `GET https://online.99digital.co.il/api/v1/accounts/{account_id}/webhooks` List all webhooks in the account. A webhook sends an HTTP `POST` with a JSON body to its URL whenever one of its subscribed events happens in the account, optionally only for some inboxes. [Webhook Events](https://docs.99digital.co.il/online-api/webhooks/webhook-events) describes the events and their payloads. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/webhooks` | | Method | JSON via GET | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token — legacy roles: `administrator`. New rules system: **Webhooks → read**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | **Response:** ```json { "payload": { "webhooks": [ { "id": 6, "url": "https://example.com/hooks/online-7f3k9", "name": "CRM sync", "account_id": 12, "subscriptions": [ "conversation_created", "conversation_status_changed", "conversation_updated", "message_created_customer", "webwidget_triggered", "message_updated", "contact_created" ], "inbox_ids": [31], "updated_at": 1794470400 } ] } } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `payload -> webhooks` | Array of objects (webhook) | | `payload -> webhooks -> id` | The numeric ID of the webhook | | `payload -> webhooks -> url` | The URL to which the events will be sent | | `payload -> webhooks -> name` | The display name of the webhook | | `payload -> webhooks -> account_id` | The numeric ID of the account | | `payload -> webhooks -> subscriptions` | Array of strings (subscribed events) | | `payload -> webhooks -> inbox_ids` | Only events that belong to these inboxes are sent. Empty means all inboxes. | | `payload -> webhooks -> updated_at` | The last update, as a Unix timestamp | ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Responses ### 200 — The webhooks of the account, in `payload.webhooks`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | object | Holds the list of webhooks. | | `payload.webhooks` | array of object | The webhooks of the account, each with its details. | | `payload.webhooks[].id` | integer | The numeric ID of the webhook. | | `payload.webhooks[].name` | string | The webhook's display name. | | `payload.webhooks[].url` | string | The URL to which the events are sent (`http` or `https`). Unique in the account. | | `payload.webhooks[].subscriptions` | array of string | Array of strings — the subscribed events the webhook receives. See [Webhook Events](https://docs.99digital.co.il/online-api/webhooks/webhook-events). | | `payload.webhooks[].inbox_ids` | array of integer | Only events that belong to these inboxes are sent. Empty means every inbox. Account-wide events (contacts, the block list, inboxes, agents and signing links) are always sent. | | `payload.webhooks[].account_id` | integer | The numeric ID of the account. | | `payload.webhooks[].updated_at` | integer | When the webhook was last updated (Unix timestamp, in seconds). | #### Example ```json { "payload": { "webhooks": [ { "id": 6, "url": "https://example.com/hooks/online-7f3k9", "name": "CRM sync", "account_id": 12, "subscriptions": [ "conversation_created", "message_created_customer", "ticket_resolved" ], "inbox_ids": [ 31 ], "updated_at": 1794470400 } ] } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` --- # Add Webhook Source: https://docs.99digital.co.il/online-api/webhooks/add-webhook Markdown: https://docs.99digital.co.il/markdown/online-api/webhooks/add-webhook.md Section: Online API › Webhooks `POST https://online.99digital.co.il/api/v1/accounts/{account_id}/webhooks` Add a new webhook subscription to the account. From now on, Online sends an HTTP `POST` with a JSON body to `url` whenever one of the `subscriptions` happens. Send `inbox_ids` to get the events of some inboxes only. [Webhook Events](https://docs.99digital.co.il/online-api/webhooks/webhook-events) describes every event, its payload and how it is delivered. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/webhooks` | | Method | JSON via POST | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token — legacy roles: `administrator`. New rules system: **Webhooks → create**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | **Request body:** The fields go inside a `webhook` object. In a JSON request the wrapper is optional: top-level fields, as in the example below, are wrapped for you. | Parameter | Type | Description | Required | | --- | --- | --- | --- | | `url` | string | The URL where the events should be sent. An `http://` or `https://` URL, unique in the account. | Yes | | `subscriptions` | array of strings | The events to which you want to be subscribed — at least one. Enum: `conversation_created`, `conversation_status_changed`, `conversation_updated`, `message_created_customer`, `message_created_agent`, `message_created_bot`, `message_updated`, `csat_survey_submitted`, `ticket_resolved`, `webwidget_triggered`, `form_link_generated`, `form_submitted`, `contact_created`, `contact_updated`, `contact_deleted`, `block_list.contact_blocked`, `block_list.contact_unblocked`, `inbox_created`, `inbox_updated`, `agent_status_changed`, `signing_link_updated` | Yes | | `name` | string | Display name. | No | | `inbox_ids` | array of integers | Limit inbox-related events to these inboxes. Omit or `[]` for all inboxes. Account-wide events (contacts, block list, inboxes, agents, signing links) are always sent. | No | **Request body example:** ```json { "url": "https://example.com/hooks/online-7f3k9", "subscriptions": [ "conversation_created", "conversation_status_changed", "conversation_updated", "message_created_customer", "message_created_agent", "message_created_bot", "message_updated", "webwidget_triggered", "contact_created", "contact_updated" ] } ``` **Response:** ```json { "payload": { "webhook": { "id": 6, "url": "https://example.com/hooks/online-7f3k9", "name": "", "account_id": 12, "subscriptions": [ "conversation_created", "conversation_status_changed", "conversation_updated", "message_created_customer", "message_created_agent", "message_created_bot", "message_updated", "webwidget_triggered", "contact_created", "contact_updated" ], "inbox_ids": [], "updated_at": 1794470400 } } } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `payload -> webhook` | Object containing the webhook details | | `payload -> webhook -> id` | The numeric ID of the webhook | | `payload -> webhook -> url` | The URL to which the events will be sent | | `payload -> webhook -> name` | The display name of the webhook | | `payload -> webhook -> account_id` | The numeric ID of the account | | `payload -> webhook -> subscriptions` | Array of strings (subscribed events) | | `payload -> webhook -> inbox_ids` | Only events that belong to these inboxes are sent. Empty means all inboxes. | | `payload -> webhook -> updated_at` | The last update, as a Unix timestamp | ## Remarks - The three `message_created_*` subscriptions all deliver a payload with `"event": "message_created"`. Subscribe to each source you need. `message_created` itself is **not** a valid subscription, and `message_created_` (with a trailing underscore) is accepted but matches no event. - Online does not sign its requests and does not retry them, and waits up to 5 seconds for an answer. Use a hard-to-guess URL (for example with a secret token in the path), answer quickly with a `2xx`, and process the event afterwards. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `webhook` | object | Yes | The new webhook's details. In a JSON request the wrapper is optional: top-level fields are wrapped for you. | | `webhook.url` | string | Yes | The URL where the events should be sent, as an HTTP `POST` with a JSON body. An `http://` or `https://` URL, unique in the account. Example: `https://example.com/hooks/online-7f3k9`. | | `webhook.subscriptions` | array of string | Yes | The events to which you want to be subscribed — at least one. See [Webhook Events](https://docs.99digital.co.il/online-api/webhooks/webhook-events) for each event's payload. Min items: 1. | | `webhook.name` | string | No | The display name of the webhook. Example: `CRM sync`. | | `webhook.inbox_ids` | array of integer | No | Send the inbox-related events of these inboxes only. Omit it, or send `[]`, for every inbox. Account-wide events (contacts, block list, inboxes, agents, signing links) are always sent. | ### Example: Webhook Get every message the contacts send, in every inbox. ```json { "webhook": { "url": "https://example.com/hooks/online-7f3k9", "subscriptions": [ "message_created_customer" ] } } ``` ### Example: One inbox Conversation and message events of one inbox, with a name. ```json { "webhook": { "name": "CRM sync", "url": "https://example.com/hooks/online-7f3k9", "subscriptions": [ "conversation_created", "conversation_status_changed", "message_created_customer", "message_created_agent" ], "inbox_ids": [ 31 ] } } ``` ## Responses ### 200 — The new webhook, in `payload.webhook`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | object | Holds the webhook. | | `payload.webhook` | object | An account webhook: it sends an HTTP `POST` with a JSON body to your URL whenever one of the subscribed events happens in the account, optionally limited to specific inboxes. | | `payload.webhook.id` | integer | The numeric ID of the webhook. | | `payload.webhook.name` | string | The webhook's display name. | | `payload.webhook.url` | string | The URL to which the events are sent (`http` or `https`). Unique in the account. | | `payload.webhook.subscriptions` | array of string | Array of strings — the subscribed events the webhook receives. See [Webhook Events](https://docs.99digital.co.il/online-api/webhooks/webhook-events). | | `payload.webhook.inbox_ids` | array of integer | Only events that belong to these inboxes are sent. Empty means every inbox. Account-wide events (contacts, the block list, inboxes, agents and signing links) are always sent. | | `payload.webhook.account_id` | integer | The numeric ID of the account. | | `payload.webhook.updated_at` | integer | When the webhook was last updated (Unix timestamp, in seconds). | #### Example ```json { "payload": { "webhook": { "id": 6, "url": "https://example.com/hooks/online-7f3k9", "name": "CRM sync", "account_id": 12, "subscriptions": [ "conversation_created", "conversation_status_changed", "message_created_customer", "message_created_agent" ], "inbox_ids": [ 31 ], "updated_at": 1794470400 } } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 422 — The URL is invalid or already used, or the subscriptions are invalid. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `message` | string | What failed, in the account's language. | | `attributes` | array of string | The fields that failed. | #### Example: URL taken Another webhook of the account already uses this URL. ```json { "message": "Url has already been taken", "attributes": [ "url" ] } ``` #### Example: Invalid URL The URL is not a valid `http://` or `https://` URL. ```json { "message": "Url is invalid", "attributes": [ "url" ] } ``` #### Example: Invalid subscriptions An unknown event, or an empty `subscriptions` list. ```json { "message": "Subscriptions Invalid events", "attributes": [ "subscriptions" ] } ``` --- # Update Webhook Source: https://docs.99digital.co.il/online-api/webhooks/update-webhook Markdown: https://docs.99digital.co.il/markdown/online-api/webhooks/update-webhook.md Section: Online API › Webhooks `PATCH https://online.99digital.co.il/api/v1/accounts/{account_id}/webhooks/{webhook_id}` Update a webhook in the account. Only the fields you send are changed. `subscriptions` and `inbox_ids` **replace** the current lists, so send each list in full. [Webhook Events](https://docs.99digital.co.il/online-api/webhooks/webhook-events) describes every event and its payload. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/webhooks/{webhook_id}` | | Method | JSON via PATCH (`PUT` works the same way) | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token — legacy roles: `administrator`. New rules system: **Webhooks → update**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `webhook_id` | The numeric ID of the webhook | Yes | **Request body:** The fields go inside a `webhook` object. In a JSON request the wrapper is optional: top-level fields, as in the example below, are wrapped for you. | Parameter | Type | Description | Required | | --- | --- | --- | --- | | `url` | string | The URL where the events should be sent. An `http://` or `https://` URL, unique in the account. | No | | `subscriptions` | array of strings | The events to which you want to be subscribed — at least one. Replaces the current list. Enum: `conversation_created`, `conversation_status_changed`, `conversation_updated`, `message_created_customer`, `message_created_agent`, `message_created_bot`, `message_updated`, `csat_survey_submitted`, `ticket_resolved`, `webwidget_triggered`, `form_link_generated`, `form_submitted`, `contact_created`, `contact_updated`, `contact_deleted`, `block_list.contact_blocked`, `block_list.contact_unblocked`, `inbox_created`, `inbox_updated`, `agent_status_changed`, `signing_link_updated` | No | | `name` | string | Display name. | No | | `inbox_ids` | array of integers | Limit inbox-related events to these inboxes; replaces the current list. Send `[]` for all inboxes. Account-wide events (contacts, block list, inboxes, agents, signing links) are always sent. | No | **Request body example:** ```json { "subscriptions": ["conversation_created", "message_created_customer"] } ``` **Response:** ```json { "payload": { "webhook": { "id": 6, "url": "https://example.com/hooks/online-7f3k9", "name": "CRM sync", "account_id": 12, "subscriptions": [ "conversation_created", "message_created_customer" ], "inbox_ids": [31], "updated_at": 1794474000 } } } ``` **Response-Explain:** | Parameter | Description | | --- | --- | | `payload -> webhook` | Object containing the webhook details | | `payload -> webhook -> id` | The numeric ID of the webhook | | `payload -> webhook -> url` | The URL to which the events will be sent | | `payload -> webhook -> name` | The display name of the webhook | | `payload -> webhook -> account_id` | The numeric ID of the account | | `payload -> webhook -> subscriptions` | Array of strings (subscribed events) | | `payload -> webhook -> inbox_ids` | Only events that belong to these inboxes are sent. Empty means all inboxes. | | `payload -> webhook -> updated_at` | The last update, as a Unix timestamp | ## Remarks - The three `message_created_*` subscriptions all deliver a payload with `"event": "message_created"`. Subscribe to each source you need. `message_created` itself is **not** a valid subscription, and `message_created_` (with a trailing underscore) is accepted but matches no event. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `webhook_id` | path | integer | Yes | The numeric ID of the webhook. Example: `6`. | ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `webhook` | object | Yes | The fields to change. Every field is optional. In a JSON request the wrapper is optional: top-level fields are wrapped for you. | | `webhook.url` | string | No | The URL where the events should be sent, as an HTTP `POST` with a JSON body. An `http://` or `https://` URL, unique in the account. Example: `https://example.com/hooks/online-7f3k9`. | | `webhook.subscriptions` | array of string | No | The events to which you want to be subscribed — at least one. Replaces the current list, so send it in full. See [Webhook Events](https://docs.99digital.co.il/online-api/webhooks/webhook-events) for each event's payload. Min items: 1. | | `webhook.name` | string | No | The display name of the webhook. Example: `CRM sync`. | | `webhook.inbox_ids` | array of integer | No | Send the inbox-related events of these inboxes only; replaces the current list. Send `[]` for every inbox. Account-wide events (contacts, block list, inboxes, agents, signing links) are always sent. | ### Example: Change the events Replace the list of subscriptions. ```json { "webhook": { "subscriptions": [ "conversation_created", "message_created_customer", "ticket_resolved" ] } } ``` ### Example: All inboxes Remove the inbox filter, so every inbox's events are sent. ```json { "webhook": { "inbox_ids": [] } } ``` ### Example: Name, events and inboxes Change three fields at once. ```json { "webhook": { "name": "CRM sync", "subscriptions": [ "conversation_created", "message_created_customer", "ticket_resolved" ], "inbox_ids": [ 31 ] } } ``` ## Responses ### 200 — The updated webhook, in `payload.webhook`. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `payload` | object | Holds the webhook. | | `payload.webhook` | object | An account webhook: it sends an HTTP `POST` with a JSON body to your URL whenever one of the subscribed events happens in the account, optionally limited to specific inboxes. | | `payload.webhook.id` | integer | The numeric ID of the webhook. | | `payload.webhook.name` | string | The webhook's display name. | | `payload.webhook.url` | string | The URL to which the events are sent (`http` or `https`). Unique in the account. | | `payload.webhook.subscriptions` | array of string | Array of strings — the subscribed events the webhook receives. See [Webhook Events](https://docs.99digital.co.il/online-api/webhooks/webhook-events). | | `payload.webhook.inbox_ids` | array of integer | Only events that belong to these inboxes are sent. Empty means every inbox. Account-wide events (contacts, the block list, inboxes, agents and signing links) are always sent. | | `payload.webhook.account_id` | integer | The numeric ID of the account. | | `payload.webhook.updated_at` | integer | When the webhook was last updated (Unix timestamp, in seconds). | #### Example ```json { "payload": { "webhook": { "id": 6, "url": "https://example.com/hooks/online-7f3k9", "name": "CRM sync", "account_id": 12, "subscriptions": [ "conversation_created", "message_created_customer", "ticket_resolved" ], "inbox_ids": [ 31 ], "updated_at": 1794474000 } } } ``` ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The resource does not exist in this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` ### 422 — The new URL is invalid or already used, or the subscriptions are invalid. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `message` | string | What failed, in the account's language. | | `attributes` | array of string | The fields that failed. | #### Example: URL taken Another webhook of the account already uses this URL. ```json { "message": "Url has already been taken", "attributes": [ "url" ] } ``` #### Example: Invalid URL The URL is not a valid `http://` or `https://` URL. ```json { "message": "Url is invalid", "attributes": [ "url" ] } ``` #### Example: Invalid subscriptions An unknown event, or an empty `subscriptions` list. ```json { "message": "Subscriptions Invalid events", "attributes": [ "subscriptions" ] } ``` --- # Delete Webhook Source: https://docs.99digital.co.il/online-api/webhooks/delete-webhook Markdown: https://docs.99digital.co.il/markdown/online-api/webhooks/delete-webhook.md Section: Online API › Webhooks `DELETE https://online.99digital.co.il/api/v1/accounts/{account_id}/webhooks/{webhook_id}` Delete a webhook from the account. Online stops sending events to the webhook's URL. **Settings:** | Setting | Value | | --- | --- | | URL | `https://online.99digital.co.il/api/v1/accounts/{account_id}/webhooks/{webhook_id}` | | Method | JSON via DELETE | **Authorization:** | Header Parameter | Description | | --- | --- | | `api_access_token` | User API key | The user API key provides access to endpoints based on the user's permission level, and can be obtained by visiting the profile page. **Permissions:** - User token — legacy roles: `administrator`. New rules system: **Webhooks → delete**. - Agent-bot token: not allowed. **Path Parameters:** | Parameter | Description | Required | | --- | --- | --- | | `account_id` | The numeric ID of the account | Yes | | `webhook_id` | The numeric ID of the webhook | Yes | **Response:** `200 OK` with an empty body. A second delete returns `404 {"error": "Resource could not be found"}`. ## Authentication `api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication). ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. | | `webhook_id` | path | integer | Yes | The numeric ID of the webhook. Example: `6`. | ## Responses ### 200 — The webhook was deleted, with an empty body. ### 401 — The access token is missing or wrong, or its user does not belong to this account. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: Invalid token The api_access_token header is missing or wrong. ```json { "error": "Invalid Access Token" } ``` #### Example: Another account A valid token, for a user who is not in this account. ```json { "error": "You are not authorized to access this account" } ``` ### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization). Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example: No permission The role lacks the permission. ```json { "error": "You are not authorized to do this action" } ``` #### Example: Agent bot An agent-bot token on an endpoint that is not open to bots. ```json { "error": "Access to this endpoint is not authorized for bots" } ``` ### 404 — The webhook does not exist in this account — for example, it was already deleted. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `error` | string | The error message. | #### Example ```json { "error": "Resource could not be found" } ``` --- # Webhook Events Source: https://docs.99digital.co.il/online-api/webhooks/webhook-events Markdown: https://docs.99digital.co.il/markdown/online-api/webhooks/webhook-events.md Section: Online API › Webhooks › Webhook Events A webhook sends an HTTP `POST` with a JSON body to your URL whenever one of the subscribed events happens in the account. Optionally it can be limited to specific inboxes. Create a webhook with [Add Webhook](https://docs.99digital.co.il/online-api/webhooks/add-webhook) and choose its events in `subscriptions`. Every payload has `event`, which tells you what happened. **Settings:** | Setting | Value | | --- | --- | | URL | Your webhook URL | | Method | JSON via POST | ## Events Every kind of payload has its own page, with an example and every field explained: | Subscription | Sent when | Inbox filter applies | Payload | | --- | --- | --- | --- | | `conversation_created` | A conversation is created. | Yes | [Conversation Events](https://docs.99digital.co.il/online-api/webhooks/conversation-events) | | `conversation_status_changed` | A conversation's status changes (Bot, Manual, snoozed or resolved). | Yes | [Conversation Events](https://docs.99digital.co.il/online-api/webhooks/conversation-events) | | `conversation_updated` | A conversation changes — assignee, team, labels, custom attributes, priority, … Includes `changed_attributes`. | Yes | [Conversation Events](https://docs.99digital.co.il/online-api/webhooks/conversation-events) | | `message_created_customer` | The contact sent a message (`message_type` `incoming`). | Yes | [Message Events](https://docs.99digital.co.il/online-api/webhooks/message-events) | | `message_created_agent` | An agent or an API user sent a message. | Yes | [Message Events](https://docs.99digital.co.il/online-api/webhooks/message-events) | | `message_created_bot` | An agent bot sent a message. | Yes | [Message Events](https://docs.99digital.co.il/online-api/webhooks/message-events) | | `message_updated` | A message changed — status, content, deletion, … | Yes | [Message Events](https://docs.99digital.co.il/online-api/webhooks/message-events) | | `csat_survey_submitted` | The contact answered a CSAT survey. | Yes | [Message Events](https://docs.99digital.co.il/online-api/webhooks/message-events) | | `ticket_resolved` | A [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) was closed (the conversation was resolved). | Yes | [Ticket Resolved](https://docs.99digital.co.il/online-api/webhooks/ticket-resolved) | | `webwidget_triggered` | A visitor opened the website widget. | Yes | Not described yet | | `form_link_generated` | A [form link](https://docs.99digital.co.il/online-api/forms/generate-form-link) was generated. | Yes, when the link belongs to a conversation | [Form Events](https://docs.99digital.co.il/online-api/webhooks/form-events) | | `form_submitted` | A contact submitted a form. | Yes, when the submission belongs to a conversation | [Form Events](https://docs.99digital.co.il/online-api/webhooks/form-events) | | `contact_created` | A contact was created. | No (account-wide) | [Contact Events](https://docs.99digital.co.il/online-api/webhooks/contact-events) | | `contact_updated` | A contact changed. Includes `changed_attributes`. | No | [Contact Events](https://docs.99digital.co.il/online-api/webhooks/contact-events) | | `contact_deleted` | A contact was deleted. | No | [Contact Events](https://docs.99digital.co.il/online-api/webhooks/contact-events) | | `block_list.contact_blocked` | A contact was [blocked](https://docs.99digital.co.il/online-api/contacts/block-contact). | No | [Block-List Events](https://docs.99digital.co.il/online-api/webhooks/block-list-events) | | `block_list.contact_unblocked` | A contact was [unblocked](https://docs.99digital.co.il/online-api/contacts/unblock-contact). | No | [Block-List Events](https://docs.99digital.co.il/online-api/webhooks/block-list-events) | | `inbox_created`, `inbox_updated` | An inbox was created or changed. | No | Not described yet | | `agent_status_changed` | An agent's availability changed (online, busy or offline). | No | [Agent Status Changed](https://docs.99digital.co.il/online-api/webhooks/agent-status-changed) | | `signing_link_updated` | A Docal signing link changed status. | No | Not described yet | When the inbox filter applies, the event is sent only if its inbox is in the webhook's `inbox_ids`, or `inbox_ids` is empty. Account-wide events are always sent. The three `message_created_*` subscriptions all deliver a payload with `"event": "message_created"`: subscribe to each source you need. `message_created` itself is **not** a valid subscription. ## Delivery - Online sends a `POST` to the webhook's `url`, with the headers `Content-Type: application/json` and `Accept: application/json`, and waits up to 5 seconds for your answer. - There are **no retries** and **no signature header**. Use a hard-to-guess URL (for example with a secret token in the path), answer quickly with a `2xx`, and process the event asynchronously. - Every payload has `event`. Online also adds `allow_unverified_ssl` (`true` or `false`). - For API inboxes, the same conversation and message events are **also** sent to the inbox's own Webhook URL (set in the inbox settings), independently of the account webhooks. ## Remarks - The payloads of `webwidget_triggered`, `inbox_created`, `inbox_updated` and `signing_link_updated` are not described yet. Like every payload, they have `event`. - Some examples are shortened; each page says so. --- # Message Events Source: https://docs.99digital.co.il/online-api/webhooks/message-events Markdown: https://docs.99digital.co.il/markdown/online-api/webhooks/message-events.md Section: Online API › Webhooks › Webhook Events **Webhook.** Sent to the webhook URL you configure. Online sends a message event to your webhook when a message is created or changed, or when the contact answers a CSAT survey. | Subscription | Sent when | `event` in the payload | | --- | --- | --- | | `message_created_customer` | The contact sent a message (`message_type` `incoming`). | `message_created` | | `message_created_agent` | An agent or an API user sent a message. | `message_created` | | `message_created_bot` | An agent bot sent a message. | `message_created` | | `message_updated` | A message changed — status, content, deletion, … | `message_updated` | | `csat_survey_submitted` | The contact answered a CSAT survey. | `csat_survey_submitted` | The three `message_created_*` subscriptions all deliver a payload with `"event": "message_created"`: subscribe to each source you need. `message_created` itself is **not** a valid subscription. The event is sent only if its inbox is in the webhook's `inbox_ids`, or `inbox_ids` is empty. **Settings:** | Setting | Value | | --- | --- | | URL | Your webhook URL — create the webhook with [Add Webhook](https://docs.99digital.co.il/online-api/webhooks/add-webhook) and choose its events in `subscriptions` | | Method | JSON via POST | **Example** — `message_created`, a customer message (the conversation's last message is shortened): ```json { "event": "message_created", "id": 40113, "content": "Hi, where is my order?", "content_type": "text", "content_attributes": {}, "additional_attributes": {}, "message_type": "incoming", "private": false, "source_id": null, "created_at": "2026-11-12T08:05:00.000Z", "account": { "id": 12, "name": "Example Account" }, "inbox": { "id": 31, "name": "Website API" }, "sender": { "type": "contact", "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "custom_attributes": { "customer_tier": "gold" }, "avatar": "", "thumbnail": "", "account": { "id": 12, "name": "Example Account" } }, "conversation": { "id": 1501, "inbox_id": 31, "channel": "Channel::Api", "status": "open", "priority": null, "labels": [ "vip" ], "custom_attributes": {}, "additional_attributes": {}, "contact_inbox": { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b" }, "messages": [ { "id": 40113, "content": "Hi, where is my order?", "message_type": 0 } ], "meta": { "sender": { "id": 801, "name": "Dana Cohen", "type": "contact" }, "assignee": null, "team": null, "hmac_verified": false }, "unread_count": 1, "snoozed_until": null, "waiting_since": 1794470700, "last_activity_at": 1794470700, "agent_last_seen_at": 0, "contact_last_seen_at": 0, "assignee_last_seen_at": 0, "timestamp": 1794470700, "created_at": 1794470400 }, "allow_unverified_ssl": false } ``` ### Payload explained | Parameter | Description / Example | | --- | --- | | `event` | What happened. See the values below. | | `id` | The message ID. | | `content` | The text. | | `content_type` | The kind of content — `text` unless the message is interactive. The values are those of the message object (see [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages)). | | `content_attributes` | Data for the content type, as in the message object. | | `additional_attributes` | Extra data of the message. | | `message_type` | Who the message is from, as a word. See the values below. | | `private` | `true` for a private note: seen by agents only, never sent to the contact. | | `source_id` | The message's ID on the external channel, or `null`. | | `created_at` | When the message was created (ISO 8601, with milliseconds). | | `account` | The account. | | `inbox` | The inbox. | | `sender` | Who sent the message. The fields listed are a contact's (`type` `contact`). | | `conversation` | The conversation the message belongs to. | | `allow_unverified_ssl` | Added by Online to every payload. | #### `event` | Value | Explanation | | --- | --- | | message_created | A message was created. Sent for the sources you subscribed to: `message_created_customer`, `message_created_agent`, `message_created_bot`. | | message_updated | A message changed — status, content, deletion, … | | csat_survey_submitted | The contact answered a CSAT survey. | #### `message_type` | Value | Explanation | | --- | --- | | incoming | From the contact. | | outgoing | From an agent, a bot or the API. | | activity | A system note, such as "Conversation was resolved". | | template | A template message. | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `event` | string | Yes | What happened. One of: `message_created` — A message was created. Sent for the sources you subscribed to: `message_created_customer`, `message_created_agent`, `message_created_bot`; `message_updated` — A message changed — status, content, deletion, …; `csat_survey_submitted` — The contact answered a CSAT survey. | | `id` | integer | No | The message ID. | | `content` | string \| null | No | The text. | | `content_type` | string | No | The kind of content — `text` unless the message is interactive. The values are those of the message object (see [List of Messages](https://docs.99digital.co.il/online-api/messages/list-of-messages)). | | `content_attributes` | object | No | Data for the content type, as in the message object. | | `additional_attributes` | object | No | Extra data of the message. | | `message_type` | string | No | Who the message is from, as a word. One of: `incoming` — From the contact; `outgoing` — From an agent, a bot or the API; `activity` — A system note, such as "Conversation was resolved"; `template` — A template message. | | `private` | boolean | No | `true` for a private note: seen by agents only, never sent to the contact. | | `source_id` | string \| null | No | The message's ID on the external channel, or `null`. | | `created_at` | string | No | When the message was created (ISO 8601, with milliseconds). | | `account` | object | No | The account. | | `account.id` | integer | No | The account ID. | | `account.name` | string | No | The account name. | | `inbox` | object | No | The inbox. | | `inbox.id` | integer | No | The inbox ID. | | `inbox.name` | string | No | The inbox name. | | `sender` | object | No | Who sent the message. The fields listed are a contact's (`type` `contact`). | | `sender.type` | string | No | The kind of sender — `user` is an agent. One of: `contact`, `user`, `agent_bot`. | | `sender.id` | integer | No | The ID of the contact, agent or agent bot. | | `sender.name` | string | No | The name. | | `sender.email` | string \| null | No | The email. | | `sender.phone_number` | string \| null | No | The phone number in E.164 format. | | `sender.identifier` | string \| null | No | Your own external ID for the contact. | | `sender.additional_attributes` | object | No | The contact's additional attributes. | | `sender.custom_attributes` | object | No | The contact's custom attributes. | | `sender.avatar` | string | No | The avatar URL, or an empty string. | | `sender.thumbnail` | string | No | The avatar thumbnail URL, or an empty string. | | `sender.account` | object | No | The account, as `{id, name}`. | | `sender.account.id` | integer | No | | | `sender.account.name` | string | No | | | `conversation` | object | No | The conversation the message belongs to. | | `conversation.id` | integer | No | The conversation's display ID. | | `conversation.inbox_id` | integer | No | The inbox ID. | | `conversation.channel` | string | No | The inbox's channel type, for example `Channel::Api`. | | `conversation.status` | string | No | The status. The dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open`, `pending`, `snoozed`, `resolved`. | | `conversation.priority` | string \| null | No | The priority, or `null`. One of: `low`, `medium`, `high`, `urgent`, `null`. | | `conversation.labels` | array of string | No | The titles of the conversation's labels. | | `conversation.custom_attributes` | object | No | The conversation's custom attributes. | | `conversation.additional_attributes` | object | No | Channel or system data of the conversation. | | `conversation.contact_inbox` | object | No | The contact's link to the inbox. | | `conversation.contact_inbox.source_id` | string | No | The contact's ID on the inbox's channel. | | `conversation.messages` | array of object | No | The conversation's last message. | | `conversation.messages[].id` | integer | No | The message ID. | | `conversation.messages[].content` | string \| null | No | The text. | | `conversation.messages[].message_type` | integer | No | Who the message is from, as a number: `0` incoming, `1` outgoing, `2` activity, `3` template. One of: `0`, `1`, `2`, `3`. | | `conversation.meta` | object | No | The conversation's people. | | `conversation.meta.sender` | object | No | The contact, as `{id, name, type}`. | | `conversation.meta.sender.id` | integer | No | | | `conversation.meta.sender.name` | string | No | | | `conversation.meta.sender.type` | string | No | | | `conversation.meta.assignee` | object \| null | No | The assigned agent, or `null`. | | `conversation.meta.team` | object \| null | No | The assigned team, or `null`. | | `conversation.meta.hmac_verified` | boolean | No | Whether the contact's identity was HMAC-verified (website widget). | | `conversation.unread_count` | integer | No | Incoming messages the agents have not read. | | `conversation.snoozed_until` | any | No | When a snoozed conversation reopens, or `null`. | | `conversation.waiting_since` | integer | No | Since when the contact has been waiting for a reply (Unix time, seconds), or `0`. | | `conversation.last_activity_at` | integer | No | The last activity (Unix time, seconds). | | `conversation.agent_last_seen_at` | integer | No | When an agent last read the conversation (Unix time, seconds), or `0`. | | `conversation.contact_last_seen_at` | integer | No | When the contact last read the conversation (Unix time, seconds), or `0`. | | `conversation.assignee_last_seen_at` | integer | No | When the assignee last read the conversation (Unix time, seconds), or `0`. | | `conversation.timestamp` | integer | No | The same as `last_activity_at`. | | `conversation.created_at` | integer | No | When the conversation was created (Unix time, seconds). | | `allow_unverified_ssl` | boolean | Yes | Added by Online to every payload. | ### Example (generated from the schema) ```json { "event": "message_created", "id": 40113, "content": "Hi, where is my order?", "content_type": "text", "content_attributes": {}, "additional_attributes": {}, "message_type": "incoming", "private": false, "source_id": null, "created_at": "2026-11-12T08:05:00.000Z", "account": { "id": 12, "name": "Example Account" }, "inbox": { "id": 31, "name": "Website API" }, "sender": { "type": "contact", "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "custom_attributes": { "customer_tier": "gold" }, "avatar": "", "thumbnail": "", "account": { "id": 12, "name": "Example Account" } }, "conversation": { "id": 1501, "inbox_id": 31, "channel": "Channel::Api", "status": "open", "priority": null, "labels": [ "vip" ], "custom_attributes": {}, "additional_attributes": {}, "contact_inbox": { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b" }, "messages": [ { "id": 40113, "content": "Hi, where is my order?", "message_type": 0 } ], "meta": { "sender": { "id": 801, "name": "Dana Cohen", "type": "contact" }, "assignee": null, "team": null, "hmac_verified": false }, "unread_count": 1, "snoozed_until": null, "waiting_since": 1794470700, "last_activity_at": 1794470700, "agent_last_seen_at": 0, "contact_last_seen_at": 0, "assignee_last_seen_at": 0, "timestamp": 1794470700, "created_at": 1794470400 }, "allow_unverified_ssl": false } ``` ## Responses ### 200 — Answer with any `2xx` status within 5 seconds. Online ignores the body of your answer, and does not send the event again. --- # Conversation Events Source: https://docs.99digital.co.il/online-api/webhooks/conversation-events Markdown: https://docs.99digital.co.il/markdown/online-api/webhooks/conversation-events.md Section: Online API › Webhooks › Webhook Events **Webhook.** Sent to the webhook URL you configure. Online sends a conversation event to your webhook when a conversation is created, its status changes, or it changes in any other way. | Subscription | Sent when | | --- | --- | | `conversation_created` | A conversation is created. | | `conversation_status_changed` | A conversation's status changes (Bot, Manual, snoozed or resolved). | | `conversation_updated` | A conversation changes — assignee, team, labels, custom attributes, priority, … Includes `changed_attributes`, and also `sender`. | The payload is the conversation's fields, at the top level. `changed_attributes` lists the changes, for example `[{"status": {"previous_value": "open", "current_value": "resolved"}}]`. The event is sent only if its inbox is in the webhook's `inbox_ids`, or `inbox_ids` is empty. **Settings:** | Setting | Value | | --- | --- | | URL | Your webhook URL — create the webhook with [Add Webhook](https://docs.99digital.co.il/online-api/webhooks/add-webhook) and choose its events in `subscriptions` | | Method | JSON via POST | **Example** — `conversation_status_changed` (the last message is shortened): ```json { "event": "conversation_status_changed", "id": 1501, "inbox_id": 31, "channel": "Channel::Api", "status": "resolved", "priority": null, "labels": [ "vip" ], "custom_attributes": {}, "additional_attributes": {}, "contact_inbox": { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b" }, "messages": [ { "id": 40114, "content": "Your order A-1001 is ready for pickup.", "message_type": 1 } ], "meta": { "sender": { "id": 801, "name": "Dana Cohen", "type": "contact" }, "assignee": null, "team": null, "hmac_verified": false }, "unread_count": 0, "snoozed_until": null, "waiting_since": 0, "last_activity_at": 1794474000, "agent_last_seen_at": 1794473900, "contact_last_seen_at": 0, "assignee_last_seen_at": 0, "timestamp": 1794474000, "created_at": 1794470400, "changed_attributes": [ { "status": { "previous_value": "open", "current_value": "resolved" } } ], "allow_unverified_ssl": false } ``` ### Payload explained | Parameter | Description / Example | | --- | --- | | `event` | What happened. See the values below. | | `id` | The conversation's display ID. | | `inbox_id` | The inbox ID. | | `channel` | The inbox's channel type, for example `Channel::Api`. | | `status` | The status. The dashboard calls `open` **Bot** and `pending` **Manual**. See the values below. | | `priority` | The priority, or `null`. | | `labels` | The titles of the conversation's labels. | | `custom_attributes` | The conversation's custom attributes. | | `additional_attributes` | Channel or system data of the conversation. | | `contact_inbox` | The contact's link to the inbox. | | `messages` | The conversation's last message. | | `meta` | The conversation's people. | | `unread_count` | Incoming messages the agents have not read. | | `snoozed_until` | When a snoozed conversation reopens, or `null`. | | `waiting_since` | Since when the contact has been waiting for a reply (Unix time, seconds), or `0`. | | `last_activity_at` | The last activity (Unix time, seconds). | | `agent_last_seen_at` | When an agent last read the conversation (Unix time, seconds), or `0`. | | `contact_last_seen_at` | When the contact last read the conversation (Unix time, seconds), or `0`. | | `assignee_last_seen_at` | When the assignee last read the conversation (Unix time, seconds), or `0`. | | `timestamp` | The same as `last_activity_at`. | | `created_at` | When the conversation was created (Unix time, seconds). | | `changed_attributes` | What changed: one object per attribute, keyed by its name, with its `previous_value` and `current_value`. | | `sender` | Included with `conversation_updated`. | | `allow_unverified_ssl` | Added by Online to every payload. | #### `event` | Value | Explanation | | --- | --- | | conversation_created | A conversation was created. | | conversation_status_changed | The conversation's status changed. | | conversation_updated | The conversation changed — assignee, team, labels, custom attributes, priority, … | #### `status` | Value | Explanation | | --- | --- | | open | Bot — handled by the bot or automation. | | pending | Manual — handled by a human agent. | | snoozed | Hidden until it is reopened. | | resolved | Closed. | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `event` | string | Yes | What happened. One of: `conversation_created` — A conversation was created; `conversation_status_changed` — The conversation's status changed; `conversation_updated` — The conversation changed — assignee, team, labels, custom attributes, priority, …. | | `id` | integer | No | The conversation's display ID. | | `inbox_id` | integer | No | The inbox ID. | | `channel` | string | No | The inbox's channel type, for example `Channel::Api`. | | `status` | string | No | The status. The dashboard calls `open` **Bot** and `pending` **Manual**. One of: `open` — Bot — handled by the bot or automation; `pending` — Manual — handled by a human agent; `snoozed` — Hidden until it is reopened; `resolved` — Closed. | | `priority` | string \| null | No | The priority, or `null`. One of: `low`, `medium`, `high`, `urgent`, `null`. | | `labels` | array of string | No | The titles of the conversation's labels. | | `custom_attributes` | object | No | The conversation's custom attributes. | | `additional_attributes` | object | No | Channel or system data of the conversation. | | `contact_inbox` | object | No | The contact's link to the inbox. | | `contact_inbox.source_id` | string | No | The contact's ID on the inbox's channel. | | `messages` | array of object | No | The conversation's last message. | | `messages[].id` | integer | No | The message ID. | | `messages[].content` | string \| null | No | The text. | | `messages[].message_type` | integer | No | Who the message is from, as a number: `0` incoming, `1` outgoing, `2` activity, `3` template. One of: `0`, `1`, `2`, `3`. | | `meta` | object | No | The conversation's people. | | `meta.sender` | object | No | The contact, as `{id, name, type}`. | | `meta.sender.id` | integer | No | | | `meta.sender.name` | string | No | | | `meta.sender.type` | string | No | | | `meta.assignee` | object \| null | No | The assigned agent, or `null`. | | `meta.team` | object \| null | No | The assigned team, or `null`. | | `meta.hmac_verified` | boolean | No | Whether the contact's identity was HMAC-verified (website widget). | | `unread_count` | integer | No | Incoming messages the agents have not read. | | `snoozed_until` | any | No | When a snoozed conversation reopens, or `null`. | | `waiting_since` | integer | No | Since when the contact has been waiting for a reply (Unix time, seconds), or `0`. | | `last_activity_at` | integer | No | The last activity (Unix time, seconds). | | `agent_last_seen_at` | integer | No | When an agent last read the conversation (Unix time, seconds), or `0`. | | `contact_last_seen_at` | integer | No | When the contact last read the conversation (Unix time, seconds), or `0`. | | `assignee_last_seen_at` | integer | No | When the assignee last read the conversation (Unix time, seconds), or `0`. | | `timestamp` | integer | No | The same as `last_activity_at`. | | `created_at` | integer | No | When the conversation was created (Unix time, seconds). | | `changed_attributes` | array of object | No | What changed: one object per attribute, keyed by its name, with its `previous_value` and `current_value`. | | `sender` | object | No | Included with `conversation_updated`. | | `allow_unverified_ssl` | boolean | Yes | Added by Online to every payload. | ### Example (generated from the schema) ```json { "event": "conversation_status_changed", "id": 1501, "inbox_id": 31, "channel": "Channel::Api", "status": "resolved", "priority": null, "labels": [ "vip" ], "custom_attributes": {}, "additional_attributes": {}, "contact_inbox": { "source_id": "5f0c1a2b-3c4d-4e5f-8a9b-0c1d2e3f4a5b" }, "messages": [ { "id": 40114, "content": "Your order A-1001 is ready for pickup.", "message_type": 1 } ], "meta": { "sender": { "id": 801, "name": "Dana Cohen", "type": "contact" }, "assignee": null, "team": null, "hmac_verified": false }, "unread_count": 0, "snoozed_until": null, "waiting_since": 0, "last_activity_at": 1794474000, "agent_last_seen_at": 1794473900, "contact_last_seen_at": 0, "assignee_last_seen_at": 0, "timestamp": 1794474000, "created_at": 1794470400, "changed_attributes": [ { "status": { "previous_value": "open", "current_value": "resolved" } } ], "allow_unverified_ssl": false } ``` ## Responses ### 200 — Answer with any `2xx` status within 5 seconds. Online ignores the body of your answer, and does not send the event again. --- # Contact Events Source: https://docs.99digital.co.il/online-api/webhooks/contact-events Markdown: https://docs.99digital.co.il/markdown/online-api/webhooks/contact-events.md Section: Online API › Webhooks › Webhook Events **Webhook.** Sent to the webhook URL you configure. Online sends a contact event to your webhook when a contact is created, changed or deleted. | Subscription | Sent when | | --- | --- | | `contact_created` | A contact was created. | | `contact_updated` | A contact changed. Includes `changed_attributes`. | | `contact_deleted` | A contact was deleted. | The payload is the contact. Contact events are account-wide: they are sent for every inbox, whatever the webhook's `inbox_ids`. **Settings:** | Setting | Value | | --- | --- | | URL | Your webhook URL — create the webhook with [Add Webhook](https://docs.99digital.co.il/online-api/webhooks/add-webhook) and choose its events in `subscriptions` | | Method | JSON via POST | **Example** — `contact_updated`: ```json { "event": "contact_updated", "type": "contact", "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "custom_attributes": { "customer_tier": "gold" }, "avatar": "", "thumbnail": "", "account": { "id": 12, "name": "Example Account" }, "changed_attributes": [ { "name": { "previous_value": "Dana", "current_value": "Dana Cohen" } } ], "allow_unverified_ssl": false } ``` ### Payload explained | Parameter | Description / Example | | --- | --- | | `event` | What happened. See the values below. | | `type` | Always `contact`. | | `id` | The contact ID. | | `name` | The name. | | `email` | The email. | | `phone_number` | The phone number in E.164 format. | | `identifier` | Your own external ID for the contact. | | `additional_attributes` | Standard extra fields, such as `company_name` and `city`. | | `custom_attributes` | The contact's custom attributes. | | `avatar` | The avatar URL, or an empty string. | | `thumbnail` | The avatar thumbnail URL, or an empty string. | | `account` | The account. | | `changed_attributes` | `contact_updated` only. What changed: one object per attribute, keyed by its name, with its `previous_value` and `current_value`. | | `allow_unverified_ssl` | Added by Online to every payload. | #### `event` | Value | Explanation | | --- | --- | | contact_created | A contact was created. | | contact_updated | A contact changed. | | contact_deleted | A contact was deleted. | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `event` | string | Yes | What happened. One of: `contact_created` — A contact was created; `contact_updated` — A contact changed; `contact_deleted` — A contact was deleted. | | `type` | string | No | Always `contact`. | | `id` | integer | No | The contact ID. | | `name` | string | No | The name. | | `email` | string \| null | No | The email. | | `phone_number` | string \| null | No | The phone number in E.164 format. | | `identifier` | string \| null | No | Your own external ID for the contact. | | `additional_attributes` | object | No | Standard extra fields, such as `company_name` and `city`. | | `custom_attributes` | object | No | The contact's custom attributes. | | `avatar` | string | No | The avatar URL, or an empty string. | | `thumbnail` | string | No | The avatar thumbnail URL, or an empty string. | | `account` | object | No | The account. | | `account.id` | integer | No | The account ID. | | `account.name` | string | No | The account name. | | `changed_attributes` | array of object | No | `contact_updated` only. What changed: one object per attribute, keyed by its name, with its `previous_value` and `current_value`. | | `allow_unverified_ssl` | boolean | Yes | Added by Online to every payload. | ### Example (generated from the schema) ```json { "event": "contact_updated", "type": "contact", "id": 801, "name": "Dana Cohen", "email": "dana.cohen@example.com", "phone_number": "+972501234567", "identifier": "crm-801", "additional_attributes": { "company_name": "Example Ltd", "city": "Tel Aviv" }, "custom_attributes": { "customer_tier": "gold" }, "avatar": "", "thumbnail": "", "account": { "id": 12, "name": "Example Account" }, "changed_attributes": [ { "name": { "previous_value": "Dana", "current_value": "Dana Cohen" } } ], "allow_unverified_ssl": false } ``` ## Responses ### 200 — Answer with any `2xx` status within 5 seconds. Online ignores the body of your answer, and does not send the event again. --- # Block-List Events Source: https://docs.99digital.co.il/online-api/webhooks/block-list-events Markdown: https://docs.99digital.co.il/markdown/online-api/webhooks/block-list-events.md Section: Online API › Webhooks › Webhook Events **Webhook.** Sent to the webhook URL you configure. Online sends a block-list event to your webhook when a contact is [blocked](https://docs.99digital.co.il/online-api/contacts/block-contact) or [unblocked](https://docs.99digital.co.il/online-api/contacts/unblock-contact). | Subscription | Sent when | | --- | --- | | `block_list.contact_blocked` | A contact was blocked. | | `block_list.contact_unblocked` | A contact was unblocked. | Block-list events are account-wide: they are sent for every inbox, whatever the webhook's `inbox_ids`. **Settings:** | Setting | Value | | --- | --- | | URL | Your webhook URL — create the webhook with [Add Webhook](https://docs.99digital.co.il/online-api/webhooks/add-webhook) and choose its events in `subscriptions` | | Method | JSON via POST | **Example** — `block_list.contact_blocked`: ```json { "event": "block_list.contact_blocked", "account_id": 12, "timestamp": 1794471000, "contact": { "id": 801, "phone_number": "+972501234567", "normalized_phone": "972501234567" }, "source": "api", "allow_unverified_ssl": false } ``` ### Payload explained | Parameter | Description / Example | | --- | --- | | `event` | What happened. See the values below. | | `account_id` | The account ID. | | `timestamp` | When it happened (Unix time, seconds). | | `contact` | The contact. | | `source` | How the contact was blocked or unblocked. See the values below. | | `allow_unverified_ssl` | Added by Online to every payload. | #### `event` | Value | Explanation | | --- | --- | | block_list.contact_blocked | A contact was blocked. | | block_list.contact_unblocked | A contact was unblocked. | #### `source` | Value | Explanation | | --- | --- | | api | With an access token, through the API. | | manual | Not through the API — for example by an agent in the dashboard. | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `event` | string | Yes | What happened. One of: `block_list.contact_blocked` — A contact was blocked; `block_list.contact_unblocked` — A contact was unblocked. | | `account_id` | integer | No | The account ID. | | `timestamp` | integer | No | When it happened (Unix time, seconds). | | `contact` | object | No | The contact. | | `contact.id` | integer | No | The contact ID. | | `contact.phone_number` | string \| null | No | The phone number. | | `contact.normalized_phone` | string \| null | No | The phone number in normalized form. | | `source` | string | No | How the contact was blocked or unblocked. One of: `api` — With an access token, through the API; `manual` — Not through the API — for example by an agent in the dashboard. | | `allow_unverified_ssl` | boolean | Yes | Added by Online to every payload. | ### Example (generated from the schema) ```json { "event": "block_list.contact_blocked", "account_id": 12, "timestamp": 1794471000, "contact": { "id": 801, "phone_number": "+972501234567", "normalized_phone": "972501234567" }, "source": "api", "allow_unverified_ssl": false } ``` ## Responses ### 200 — Answer with any `2xx` status within 5 seconds. Online ignores the body of your answer, and does not send the event again. --- # Ticket Resolved Source: https://docs.99digital.co.il/online-api/webhooks/ticket-resolved Markdown: https://docs.99digital.co.il/markdown/online-api/webhooks/ticket-resolved.md Section: Online API › Webhooks › Webhook Events **Webhook.** Sent to the webhook URL you configure. Online sends `ticket_resolved` to your webhook when a [ticket](https://docs.99digital.co.il/online-api/tickets/list-tickets) was closed (the conversation was resolved). | Subscription | Sent when | | --- | --- | | `ticket_resolved` | A ticket was closed (the conversation was resolved). | The payload is the closed ticket, with its conversation, messages, contact and assignee. The event is sent only if its inbox is in the webhook's `inbox_ids`, or `inbox_ids` is empty. **Settings:** | Setting | Value | | --- | --- | | URL | Your webhook URL — create the webhook with [Add Webhook](https://docs.99digital.co.il/online-api/webhooks/add-webhook) and choose its events in `subscriptions` | | Method | JSON via POST | **Example** (`conversation`, `messages`, `contact` and `assignee` are shortened): ```json { "event": "ticket_resolved", "ticket": { "id": 902, "status": "closed", "conversation_id": 1501, "inbox_id": 31, "opened_at": 1794470400, "resolved_at": 1794474000, "channel": "Channel::Api", "priority": null, "labels": [ "vip" ], "custom_attributes": {}, "additional_attributes": {}, "ticket_custom_attributes": { "case_type": "delivery" }, "metrics": { "duration_seconds": 3600 } }, "conversation": { "id": 1501 }, "messages": [ { "id": 40113, "content": "Hi, where is my order?" } ], "contact": { "id": 801, "name": "Dana Cohen" }, "assignee": { "id": 51, "name": "Jane Agent" }, "allow_unverified_ssl": false } ``` ### Payload explained | Parameter | Description / Example | | --- | --- | | `event` | A ticket was closed (the conversation was resolved). | | `ticket` | The ticket. See [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets). | | `conversation` | The conversation. | | `messages` | The messages. | | `contact` | The contact. | | `assignee` | The assigned agent, or `null`. | | `allow_unverified_ssl` | Added by Online to every payload. | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `event` | string | Yes | A ticket was closed (the conversation was resolved). Always `ticket_resolved`. | | `ticket` | object | No | The ticket. See [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets). | | `ticket.id` | integer | No | The ticket ID. | | `ticket.status` | string | No | The ticket's status. | | `ticket.conversation_id` | integer | No | The conversation's ID. | | `ticket.inbox_id` | integer | No | The inbox ID. | | `ticket.opened_at` | integer | No | When the ticket opened. | | `ticket.resolved_at` | integer | No | When the ticket was closed. | | `ticket.closed_by` | any | No | Who closed the ticket. | | `ticket.channel` | string | No | The inbox's channel type, for example `Channel::Api`. | | `ticket.priority` | string \| null | No | The conversation's priority, or `null`. | | `ticket.labels` | array of string | No | The titles of the conversation's labels. | | `ticket.team` | any | No | The conversation's team. | | `ticket.custom_attributes` | object | No | The conversation's custom attributes. | | `ticket.additional_attributes` | object | No | The conversation's additional attributes. | | `ticket.ticket_custom_attributes` | object | No | The ticket's own custom attributes — see [Set Ticket Custom Attributes](https://docs.99digital.co.il/online-api/tickets/set-ticket-custom-attributes). | | `ticket.metrics` | object | No | Measurements of the ticket. | | `ticket.metrics.duration_seconds` | integer | No | Seconds from opening to closing. | | `conversation` | object | No | The conversation. | | `messages` | array of object | No | The messages. | | `contact` | object | No | The contact. | | `assignee` | object \| null | No | The assigned agent, or `null`. | | `allow_unverified_ssl` | boolean | Yes | Added by Online to every payload. | ### Example (generated from the schema) ```json { "event": "ticket_resolved", "ticket": { "id": 902, "status": "closed", "conversation_id": 1501, "inbox_id": 31, "opened_at": 1794470400, "resolved_at": 1794474000, "channel": "Channel::Api", "priority": null, "labels": [ "vip" ], "custom_attributes": {}, "additional_attributes": {}, "ticket_custom_attributes": { "case_type": "delivery" }, "metrics": { "duration_seconds": 3600 } }, "conversation": { "id": 1501 }, "messages": [ { "id": 40113, "content": "Hi, where is my order?" } ], "contact": { "id": 801, "name": "Dana Cohen" }, "assignee": { "id": 51, "name": "Jane Agent" }, "allow_unverified_ssl": false } ``` ## Responses ### 200 — Answer with any `2xx` status within 5 seconds. Online ignores the body of your answer, and does not send the event again. --- # Agent Status Changed Source: https://docs.99digital.co.il/online-api/webhooks/agent-status-changed Markdown: https://docs.99digital.co.il/markdown/online-api/webhooks/agent-status-changed.md Section: Online API › Webhooks › Webhook Events **Webhook.** Sent to the webhook URL you configure. Online sends `agent_status_changed` to your webhook when an agent's availability changed (online, busy or offline). | Subscription | Sent when | | --- | --- | | `agent_status_changed` | An agent's availability changed (online, busy or offline). | This event is account-wide: it is sent for every inbox, whatever the webhook's `inbox_ids`. **Settings:** | Setting | Value | | --- | --- | | URL | Your webhook URL — create the webhook with [Add Webhook](https://docs.99digital.co.il/online-api/webhooks/add-webhook) and choose its events in `subscriptions` | | Method | JSON via POST | **Example** (`agent` is shortened): ```json { "event": "agent_status_changed", "occurred_at": 1794471000, "account": { "id": 12, "name": "Example Account" }, "agent": { "id": 53, "name": "Omer Katz" }, "status_change": { "previous_status": "online", "new_status": "busy" }, "allow_unverified_ssl": false } ``` ### Payload explained | Parameter | Description / Example | | --- | --- | | `event` | An agent's availability changed. | | `occurred_at` | When it happened. | | `account` | The account. | | `agent` | The agent. | | `status_change` | The availability before and after the change. | | `allow_unverified_ssl` | Added by Online to every payload. | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `event` | string | Yes | An agent's availability changed. Always `agent_status_changed`. | | `occurred_at` | integer | No | When it happened. | | `account` | object | No | The account. | | `account.id` | integer | No | The account ID. | | `account.name` | string | No | The account name. | | `agent` | object | No | The agent. | | `status_change` | object | No | The availability before and after the change. | | `status_change.previous_status` | string | No | The availability before the change. One of: `online`, `busy`, `offline`. | | `status_change.new_status` | string | No | The availability after the change. One of: `online`, `busy`, `offline`. | | `allow_unverified_ssl` | boolean | Yes | Added by Online to every payload. | ### Example (generated from the schema) ```json { "event": "agent_status_changed", "occurred_at": 1794471000, "account": { "id": 12, "name": "Example Account" }, "agent": { "id": 53, "name": "Omer Katz" }, "status_change": { "previous_status": "online", "new_status": "busy" }, "allow_unverified_ssl": false } ``` ## Responses ### 200 — Answer with any `2xx` status within 5 seconds. Online ignores the body of your answer, and does not send the event again. --- # Form Events Source: https://docs.99digital.co.il/online-api/webhooks/form-events Markdown: https://docs.99digital.co.il/markdown/online-api/webhooks/form-events.md Section: Online API › Webhooks › Webhook Events **Webhook.** Sent to the webhook URL you configure. Online sends a form event to your webhook when a [form link](https://docs.99digital.co.il/online-api/forms/generate-form-link) is generated, and when a contact submits a form. | Subscription | Sent when | | --- | --- | | `form_link_generated` | A form link was generated. | | `form_submitted` | A contact submitted a form. | The payload is the form submission: its form, link, contact and conversation, plus the answers for `form_submitted`. When the link or the submission belongs to a conversation, the event is sent only if its inbox is in the webhook's `inbox_ids`, or `inbox_ids` is empty. **Settings:** | Setting | Value | | --- | --- | | URL | Your webhook URL — create the webhook with [Add Webhook](https://docs.99digital.co.il/online-api/webhooks/add-webhook) and choose its events in `subscriptions` | | Method | JSON via POST | **Example** — `form_submitted` (shortened: `link` is left out, and the other objects show a few fields): ```json { "event": "form_submitted", "form": { "id": "45", "name": "Event registration" }, "contact": { "id": 801, "name": "Dana Cohen" }, "conversation": { "id": 1501 }, "answers": [ { "field_id": "email", "value": "dana.cohen@example.com", "type": "email" } ], "allow_unverified_ssl": false } ``` ### Payload explained | Parameter | Description / Example | | --- | --- | | `event` | What happened. See the values below. | | `form` | The form. | | `link` | The form link. | | `contact` | The contact. | | `conversation` | The conversation, when the link belongs to one. | | `answers` | `form_submitted` only: the contact's answers. | | `allow_unverified_ssl` | Added by Online to every payload. | #### `event` | Value | Explanation | | --- | --- | | form_link_generated | A form link was generated with [Generate Form Link](https://docs.99digital.co.il/online-api/forms/generate-form-link). | | form_submitted | A contact submitted a form. | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `event` | string | Yes | What happened. One of: `form_link_generated` — A form link was generated with [Generate Form Link](https://docs.99digital.co.il/online-api/forms/generate-form-link); `form_submitted` — A contact submitted a form. | | `form` | object | No | The form. | | `link` | object | No | The form link. | | `contact` | object | No | The contact. | | `conversation` | object \| null | No | The conversation, when the link belongs to one. | | `answers` | array of object | No | `form_submitted` only: the contact's answers. | | `allow_unverified_ssl` | boolean | Yes | Added by Online to every payload. | ### Example (generated from the schema) ```json { "event": "form_submitted", "form": { "id": "45", "name": "Event registration" }, "contact": { "id": 801, "name": "Dana Cohen" }, "conversation": { "id": 1501 }, "answers": [ { "field_id": "email", "value": "dana.cohen@example.com", "type": "email" } ], "allow_unverified_ssl": false } ``` ## Responses ### 200 — Answer with any `2xx` status within 5 seconds. Online ignores the body of your answer, and does not send the event again. --- # Postman Collection Source: https://docs.99digital.co.il/online-api/postman-collection Markdown: https://docs.99digital.co.il/markdown/online-api/postman-collection.md Section: Online API [Download the Online API Postman Collection](pathname:///postman/99digital-online-api.postman_collection.json) The collection is built from this documentation every time it changes, so it always has every endpoint, with one sample request per example on the endpoint pages and the documented responses saved as examples. Download it again to get the latest version. ## Import it 1. In Postman, select **Import** and choose the downloaded file. You can also copy the download link above and paste it under **Import → Link**. 2. Open the collection's **Variables** tab and fill in: - `api_access_token` — your access token: in the Online dashboard, **Profile settings → Access Token**. - `account_id` — the number after `/app/accounts/` in your dashboard URL. - `base_url` — change it only if your account runs on its own Online domain. 3. Send **Conversations → Conversation Counts** to check the token, then open any folder and press **Send**. ## IDs in the requests The paths use variables — `{{contact_id}}`, `{{conversation_id}}`, `{{team_id}}` and so on — which start empty. Fill them in with IDs from your account. The create requests store the new ID for you: after **Create Contact**, `contact_id` is set; after **Add Conversation**, `conversation_id`; and so on. :::warning The sample bodies use example IDs of inboxes, agents, teams and conversations. Replace them with your own before you send a request that changes data — the requests run against your live account. ::: ## Webhooks **Webhooks → Webhook Events** holds a sample of every payload Online sends to a [webhook](https://docs.99digital.co.il/online-api/webhooks/webhook-events). Set `webhook_url` to your endpoint to see how it handles them. --- # Facebook API Source: https://docs.99digital.co.il/facebook-api Markdown: https://docs.99digital.co.il/markdown/facebook-api.md Section: Facebook API Publish and manage posts and comments on your Facebook Pages and Instagram accounts. ## Base URL ```text https://api.99digital.co.il ``` Facebook Page endpoints are under `/facebook/page/` and Instagram endpoints under `/instagram/page/`. ## Authentication Every request is a `POST` with a JSON body. Send your API key in the `apiKey` header, and the ID of your connection in `from`: ```http apiKey: Content-Type: application/json ``` ## Where to start - Facebook Pages: [Create Post](https://docs.99digital.co.il/facebook-api/facebook-pages/create-post), [All Posts](https://docs.99digital.co.il/facebook-api/facebook-pages/all-posts) and [All Comments](https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments). - Instagram: [Create Post](https://docs.99digital.co.il/facebook-api/instagram-pages/create-post), [All Posts](https://docs.99digital.co.il/facebook-api/instagram-pages/all-posts) and [All Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/all-comments). - Try every endpoint in Postman: [Postman Collection](https://docs.99digital.co.il/facebook-api/postman-collection). --- # Postman Collection Source: https://docs.99digital.co.il/facebook-api/postman-collection Markdown: https://docs.99digital.co.il/markdown/facebook-api/postman-collection.md Section: Facebook API [Download the Postman collection for the Facebook API](https://api.99digital.co.il/facebook-postman). The Postman collection is always updated with every change to the API, so make sure you always download the latest version. To use it, select **Import** in Postman and choose the downloaded file. Then, in the collection's **Variables** tab, fill in `apiKey` and the connection IDs you received — `from_fb_page` for Facebook Pages and `from_ig_page` for Instagram — and replace the sample media links with your own public `https` links. --- # All Posts Source: https://docs.99digital.co.il/facebook-api/facebook-pages/all-posts Markdown: https://docs.99digital.co.il/markdown/facebook-api/facebook-pages/all-posts.md Section: Facebook API › Facebook Pages `POST https://api.99digital.co.il/facebook/page/getPosts` This endpoint allows you to see all the posts in your page (posts that were created by the API or directly on Facebook). **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/facebook/page/getPosts` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | limit | How many posts to get (limit pagination), between 1 and 100. Default if not provided: 25 | no | 25 | | after | If you are using limit paging, you can provide the "after" value from the previous response to load the next batch | no | U56WDF34FA4TER3DA..... | **Response**: ```json { "status": "OK", "from": "463745743546345", "count": 25, "posts": [{ "id": "119324881085321_122093459712345", "message": "Hello fans!", "created_time": 1783596120, "updated_time": 1783596120, "permalink_url": "https://www.facebook.com/...", "full_picture": "https://scontent...", "is_published": true, "shares": 3, "total_comments": 3, "total_reactions": 5, "attachments": { "data": [ { "media_type": "photo", "url": "..." } ] } }], "paging": { "after": "QVFIU...", "hasNext": true }, "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | count | Total posts in this batch | | from | Your ID for the service | **posts** and **paging**: | Value | Information | | --- | --- | | id | This is the postId | | message | The body of the post | | created_time | Post create time. UNIX UTC timestamp (int seconds) | | updated_time | If the post was edited, this is the time. More exactly, it is the last time the post was updated: when it was created, edited or commented on. UNIX UTC timestamp (int seconds) | | permalink_url | Link directly to the post | | full_picture | Image that you provided for the post, if any | | is_published | true - the post is live in the page. false - this is a scheduled future post and not published yet | | scheduled_publish_time | Will only appear if "is_published" = false. This will show the future UNIX timestamp for when the post will be published | | shares | The total amount of shares this post has (int) | | total_comments | The total amount of comments this post has (int). For getting the actual comments, use the [All Comments](https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments) (getComments) API endpoint | | total_reactions | The total reactions (like) for the post | | attachments | An array of objects that contains media_type and url, to provide all the media that was uploaded for the post (photos/videos) | | paging | Key that contains two values: "after", which represents the parameter to send if you wish to get the next batch, and "hasNext", which is true if you have more data to load, or false if this is the last data | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint) | | 7 | Onboarding is still in progress (the connection is not active) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The postId is invalid or wrong: the Page or post was not found, or you have no access to it | | 15 | The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content | | 18 | General error, try again | **Remarks**: - The list also holds the posts you scheduled that are not published yet (`is_published` is `false`). The scheduled posts come first, in the first batch only, on top of `limit`. - Posts that visitors write on your Page are not part of the list. ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `limit` | integer | No | How many posts to get (limit pagination), between 1 and 100. Default if not provided: 25. Default: `25`. Minimum: 1. Maximum: 100. Example: `25`. | | `after` | string | No | If you are using limit paging, you can provide the `after` value from the previous response (`paging.after`) to load the next batch. Example: `QVFIUmRfZA2xYzRkNmJmWjNh`. | ### Example: First batch The latest 25 posts of your Page. ```json { "from": "463745743546345", "limit": 25 } ``` ### Example: Next batch The next 25 posts — `after` is `paging.after` from the previous response. ```json { "from": "463745743546345", "limit": 25, "after": "QVFIUmRfZA2xYzRkNmJmWjNh" } ``` ## 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 or FAIL. `OK` — the request succeeded, and the posts of this batch are in `posts`. Always `OK`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `count` | integer | (one of: OK) Total posts in this batch. Example: `25`. | | `posts` | array of object | (one of: OK) The posts of this batch. Empty when there are none. | | `posts[].id` | string | (one of: OK) This is the `postId`, for [Edit Post](https://docs.99digital.co.il/facebook-api/facebook-pages/edit-post), [Delete Post](https://docs.99digital.co.il/facebook-api/facebook-pages/delete-post), [All Comments](https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments) and [Create Comment](https://docs.99digital.co.il/facebook-api/facebook-pages/create-comment). Example: `119324881085321_122093459712345`. | | `posts[].message` | string | (one of: OK) The body of the post. Empty when the post has no text. Example: `Hello fans!`. | | `posts[].created_time` | integer | (one of: OK) Post create time. UNIX UTC timestamp (int seconds). Example: `1783596120`. | | `posts[].updated_time` | integer | (one of: OK) If the post was edited, this is the time. More exactly, it is the last time the post was updated: when it was created, edited or commented on. UNIX UTC timestamp (int seconds). Example: `1783596120`. | | `posts[].permalink_url` | string | (one of: OK) Link directly to the post. | | `posts[].full_picture` | string | (one of: OK) Image that you provided for the post, if any (empty otherwise). | | `posts[].is_published` | boolean | (one of: OK) `true` — the post is live in the page. `false` — this is a scheduled future post and not published yet. | | `posts[].scheduled_publish_time` | integer | (one of: OK) Will only appear if `is_published` is `false`. This will show the future UNIX timestamp for when the post will be published. Example: `1786000000`. | | `posts[].shares` | integer | (one of: OK) The total amount of shares this post has (int). Example: `3`. | | `posts[].total_comments` | integer | (one of: OK) The total amount of comments this post has (int). For getting the actual comments, use the [All Comments](https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments) (getComments) API endpoint. Example: `3`. | | `posts[].total_reactions` | integer | (one of: OK) The total reactions (like, and all other reactions) for the post. Example: `5`. | | `posts[].attachments` | object | (one of: OK) An array of objects that contains `media_type` and `url`, to provide all the media that was uploaded for the post (photos/videos), in `data`. Appears only when the post has media. | | `posts[].attachments.data` | array of object | (one of: OK) The media items, each with its `media_type` and `url`. | | `posts[].attachments.data[].media_type` | string | (one of: OK) The kind of media, for example `photo` or `video`. | | `posts[].attachments.data[].url` | string | (one of: OK) Link to the media. | | `paging` | object | (one of: OK) Key that contains two values: `after`, which represents the parameter to send if you wish to get the next batch, and `hasNext`, which is true if you have more data to load, or false if this is the last data. | | `paging.after` | string | (one of: OK) The parameter to send (as `after`) if you wish to get the next batch. Example: `QVFIUmRfZA2xYzRkNmJmWjNh`. | | `paging.hasNext` | boolean | (one of: OK) `true` if you have more data to load, or `false` if this is the last data. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint); `7` — Onboarding is still in progress (the connection is not active); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The postId is invalid or wrong: the Page or post was not found, or you have no access to it; `15` — The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Returned when Meta rejected the request (reason 10 and above). Example: `463745743546345`. | #### Example: OK A scheduled post (always listed first) and a published post with a photo. ```json { "status": "OK", "from": "463745743546345", "count": 2, "posts": [ { "id": "119324881085321_122093459799999", "message": "Our summer sale starts next week!", "created_time": 1783600000, "updated_time": 1783600000, "permalink_url": "https://www.facebook.com/119324881085321/posts/122093459799999", "full_picture": "", "is_published": false, "scheduled_publish_time": 1786000000, "shares": 0, "total_comments": 0, "total_reactions": 0 }, { "id": "119324881085321_122093459712345", "message": "Hello fans!", "created_time": 1783596120, "updated_time": 1783603417, "permalink_url": "https://www.facebook.com/119324881085321/posts/122093459712345", "full_picture": "https://scontent.xx.fbcdn.net/v/t39.30808-6/photo.jpg", "is_published": true, "shares": 3, "total_comments": 3, "total_reactions": 5, "attachments": { "data": [ { "media_type": "photo", "url": "https://www.facebook.com/photo.php?fbid=122093459712345" } ] } } ], "paging": { "after": "QVFIUmRfZA2xYzRkNmJmWjNh", "hasNext": true }, "reason": 1 } ``` #### Example: Reason 3 Wrong apiKey. ```json { "status": "FAIL", "reason": 3 } ``` #### Example: Reason 6 Wrong connection type — this is not a Facebook Pages connection. ```json { "status": "FAIL", "reason": 6 } ``` #### Example: Reason 10 The connection has expired — do the onboarding again. ```json { "status": "FAIL", "reason": 10, "from": "463745743546345" } ``` --- # Create Post Source: https://docs.99digital.co.il/facebook-api/facebook-pages/create-post Markdown: https://docs.99digital.co.il/markdown/facebook-api/facebook-pages/create-post.md Section: Facebook API › Facebook Pages `POST https://api.99digital.co.il/facebook/page/createPost` This endpoint allows you to create a post on your Facebook page. **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/facebook/page/createPost` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | type | Can be any of the following: **text** - for creating a post with only text. **video** - if you wish to have a video type post. **photo** - if you wish to have a photo type post. If you leave it out, it is set by "links": no links make a text post, a single link to a video file (.mp4, .mov, .webm, .avi, .3gp or .mkv) a video post, and any other links a photo post | no | text | | body | The body of the post, based on the 'type' value. It can have plain text only (no Markdown or HTML) and `\n` for a line break. If type is 'text', here you put all your post text. If type is 'video', here you put the video description. If type is 'photo', here you put the photo caption. Maximum 63,206 characters | only for 'text' | Welcome to my first Post! | | links | Array of public HTTPS links. Only use if "type" is video or photo. If type is 'video' you must provide 1 link only. If type is 'photo' you can choose if you wish 1 image in the post or an album of up to 10 images | only for 'video' / 'photo' | `["https://example.com/image.jpg","https://example.com/image2.jpg"]` | | title | If 'type' = video, you can provide the video title | no | Here is my video title | | scheduleTime | You can schedule the post to be in a future time. If omitted, the post will publish immediately. UNIX time in seconds. Must be between 11 minutes and 30 days from now | no | 1786000000 | **Response**: ```json { "status": "OK", "postId": "15234562345623_952362434423178", "body": "your message", "timestamp": 1600115719, "from": "463745743546345", "type": "text", "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | postId | The post ID that was created. You can use it for future webhooks / comments / post changes ([Edit Post](https://docs.99digital.co.il/facebook-api/facebook-pages/edit-post), [Delete Post](https://docs.99digital.co.il/facebook-api/facebook-pages/delete-post), [Create Comment](https://docs.99digital.co.il/facebook-api/facebook-pages/create-comment), [All Comments](https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments)) | | body | The text you sent | | timestamp | Time stamp of the message | | from | Your ID for the service | | type | The type of the post that was created: text, photo or video | | photos | Only relevant if photos were used. This will return the amount of photos you provided (int) | | scheduleTime | The future time that you provided, if provided | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 5 | Missing or invalid content: the 'body' (for a text post) or the 'links' (for a photo or video post), or a link that is not https:// | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint) | | 7 | Onboarding is still in progress (the connection is not active) | | 8 | Invalid "type" or "links": a wrong "type", more than 1 link for a video or more than 10 for photos. Also a "body" longer than 63,206 characters, or a "scheduleTime" that is not 11 minutes to 30 days from now | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 15 | The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content | | 18 | General error / wrong information / unknown error. Please check all the payload again and try again | **Remarks**: - If one photo of an album fails, the photos already uploaded are deleted: nothing is published, and you get the failure's reason. - A scheduled post returns its `postId` right away and goes live at `scheduleTime`. ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `type` | string | No | The kind of post. Can be any of the following: `text`, `video` or `photo`. If you leave it out, it is set by `links`: no links make a text post, a single link to a video file (`.mp4`, `.mov`, `.webm`, `.avi`, `.3gp` or `.mkv`) a video post, and any other links a photo post. One of: `text` — For creating a post with only text; `photo` — If you wish to have a photo type post — one photo, or an album of up to 10 photos; `video` — If you wish to have a video type post — one video. Example: `text`. | | `body` | string | No | The body of the post, based on the `type` value. It can have plain text only (no Markdown or HTML) and `\n` for a line break. If `type` is `text`, here you put all your post text (required). If `type` is `video`, here you put the video description; if `type` is `photo`, here you put the photo caption (optional for both). Maximum 63,206 characters. Max length: 63206. Example: `Welcome to my first Post!`. | | `links` | array of string (uri) | No | Array of public HTTPS links. Only use if `type` is `video` or `photo` (and required for them). If `type` is `video`, you must provide 1 link only. If `type` is `photo`, you can choose if you wish 1 image in the post or an album of up to 10 images. Max items: 10. | | `title` | string | No | If `type` is `video`, you can provide the video title. Example: `Here is my video title`. | | `scheduleTime` | integer | No | You can schedule the post to be in a future time. If omitted, the post will publish immediately. UNIX time in seconds. Must be between 11 minutes and 30 days from now. Example: `1786000000`. | ### Example: Text post A post with only text. ```json { "from": "463745743546345", "type": "text", "body": "Welcome to my first Post!" } ``` ### Example: Photo post A post with one photo; `body` is the caption. ```json { "from": "463745743546345", "type": "photo", "body": "Our new collection is here!", "links": [ "https://example.com/image.jpg" ] } ``` ### Example: Photo album A post with an album of up to 10 photos. ```json { "from": "463745743546345", "type": "photo", "body": "Photos from our launch event", "links": [ "https://example.com/image.jpg", "https://example.com/image2.jpg", "https://example.com/image3.jpg" ] } ``` ### Example: Video post A post with one video; `body` is the description, `title` the video title. ```json { "from": "463745743546345", "type": "video", "body": "A quick tour of our new store.", "title": "Here is my video title", "links": [ "https://example.com/video.mp4" ] } ``` ### Example: Scheduled post A text post that goes live at `scheduleTime` (11 minutes to 30 days from now). ```json { "from": "463745743546345", "type": "text", "body": "Our summer sale starts today!", "scheduleTime": 1786000000 } ``` ## 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 or FAIL. `OK` — the post was created on your Page (or scheduled). Always `OK`. | | `postId` | string | (one of: OK) The post ID that was created. You can use it for future webhooks / comments / post changes. Example: `15234562345623_952362434423178`. | | `type` | string | (one of: OK) The kind of post that was created. One of: `text` — A post with only text; `photo` — A post with one photo or an album; `video` — A post with one video. | | `body` | string | (one of: OK) The text you sent. Left out when you sent no `body`. Example: `Welcome to my first Post!`. | | `photos` | integer | (one of: OK) Only relevant if photos were used. This will return the amount of photos you provided (int). Example: `3`. | | `scheduleTime` | integer | (one of: OK) The future time that you provided, if provided. Example: `1786000000`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1785500000`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `5` — Missing or invalid content: the "body" (for a text post) or the "links" (for a photo or video post), or a link that is not https://; `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint); `7` — Onboarding is still in progress (the connection is not active); `8` — Invalid "type" or "links": a wrong "type", more than 1 link for a video or more than 10 for photos. Also a "body" longer than 63,206 characters, or a "scheduleTime" that is not 11 minutes to 30 days from now; `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `15` — The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content; `18` — General error / wrong information / unknown error. Please check all the payload again and try again. | | `from` | string | (one of: FAIL) Your ID for the service. Returned when Meta rejected the request (reason 10 and above). Example: `463745743546345`. | #### Example: OK A text post was created. ```json { "status": "OK", "postId": "15234562345623_952362434423178", "type": "text", "body": "Welcome to my first Post!", "timestamp": 1785500000, "from": "463745743546345", "reason": 1 } ``` #### Example: OK — photo album An album post with 3 photos; `photos` is the amount of photos. ```json { "status": "OK", "postId": "15234562345623_952362434423179", "type": "photo", "body": "Photos from our launch event", "photos": 3, "timestamp": 1785500000, "from": "463745743546345", "reason": 1 } ``` #### Example: OK — scheduled A scheduled post; `scheduleTime` is the time it goes live. ```json { "status": "OK", "postId": "15234562345623_952362434423180", "type": "text", "body": "Our summer sale starts today!", "scheduleTime": 1786000000, "timestamp": 1785500000, "from": "463745743546345", "reason": 1 } ``` #### Example: Reason 5 Missing content — no `body` for a text post, or no `links` for a photo or video post. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 8 Invalid value — for example, two links for a video post, or a `scheduleTime` less than 11 minutes from now. ```json { "status": "FAIL", "reason": 8 } ``` #### Example: Reason 6 Wrong connection type — this is not a Facebook Pages connection. ```json { "status": "FAIL", "reason": 6 } ``` #### Example: Reason 15 Meta rejected the content — bad media, format or size, or a policy violation. ```json { "status": "FAIL", "reason": 15, "from": "463745743546345" } ``` --- # Edit Post Source: https://docs.99digital.co.il/facebook-api/facebook-pages/edit-post Markdown: https://docs.99digital.co.il/markdown/facebook-api/facebook-pages/edit-post.md Section: Facebook API › Facebook Pages `POST https://api.99digital.co.il/facebook/page/editPost` This endpoint allows you to edit a post you previously created (using our API or directly on Facebook). You can't change the media after publish, this endpoint only allows changing the body text. To change the media, delete the post and create a new one. **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/facebook/page/editPost` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | postId | The post ID you wish to edit (from [Create Post](https://docs.99digital.co.il/facebook-api/facebook-pages/create-post) or [All Posts](https://docs.99digital.co.il/facebook-api/facebook-pages/all-posts)) | yes | 15625364215_56994166514 | | body | The new body of the post. It replaces the old body. It can have plain text only (no Markdown or HTML) and `\n` for a line break. Maximum 63,206 characters | yes | Welcome to my edited Post! | **Response**: ```json { "status": "OK", "postId": "15234562345623_952362434423178", "timestamp": 1600115719, "from": "463745743546345", "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | postId | The post ID that you changed | | timestamp | Time stamp of the message | | from | Your ID for the service | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 5 | Missing or invalid content: the 'body' is missing or empty | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint) | | 7 | Onboarding is still in progress (the connection is not active) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The postId is invalid or wrong: the post was not found (for example, it was deleted), or you have no access to it | | 15 | The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content | | 18 | General error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `postId` | string | Yes | The post ID you wish to edit (from [Create Post](https://docs.99digital.co.il/facebook-api/facebook-pages/create-post) or [All Posts](https://docs.99digital.co.il/facebook-api/facebook-pages/all-posts)). Example: `15625364215_56994166514`. | | `body` | string | Yes | The new body of the post. It replaces the old body. It can have plain text only (no Markdown or HTML) and `\n` for a line break. Maximum 63,206 characters. Max length: 63206. Example: `Welcome to my edited Post!`. | ### Example (generated from the schema) ```json { "from": "463745743546345", "postId": "15625364215_56994166514", "body": "Welcome to my edited Post!" } ``` ## 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 or FAIL. `OK` — the post was changed. Always `OK`. | | `postId` | string | (one of: OK) The post ID that you changed. Example: `15625364215_56994166514`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1785500000`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `5` — Missing or invalid content — the "body" is missing or empty; `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint); `7` — Onboarding is still in progress (the connection is not active); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The `postId` is invalid or wrong: the post was not found (for example, it was deleted), or you have no access to it; `15` — The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Returned when Meta rejected the request (reason 10 and above). Example: `463745743546345`. | #### Example: OK The post text was changed. ```json { "status": "OK", "postId": "15625364215_56994166514", "timestamp": 1785500000, "from": "463745743546345", "reason": 1 } ``` #### Example: Reason 5 The `body` is empty. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 13 The post was not found, or you have no access to it. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` --- # Delete Post Source: https://docs.99digital.co.il/facebook-api/facebook-pages/delete-post Markdown: https://docs.99digital.co.il/markdown/facebook-api/facebook-pages/delete-post.md Section: Facebook API › Facebook Pages `POST https://api.99digital.co.il/facebook/page/deletePost` This endpoint allows you to delete a post you previously created (using our API or directly on Facebook). :::warning This is a permanent action and can't be undone. ::: **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/facebook/page/deletePost` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | postId | The post ID you wish to delete (from [Create Post](https://docs.99digital.co.il/facebook-api/facebook-pages/create-post) or [All Posts](https://docs.99digital.co.il/facebook-api/facebook-pages/all-posts)) | yes | 15625364215_56994166514 | **Response**: ```json { "status": "OK", "postId": "15234562345623_952362434423178", "timestamp": 1600115719, "from": "463745743546345", "reason": 1, "deleted": true } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | postId | The post ID that you deleted | | timestamp | Time stamp of the message | | from | Your ID for the service | | deleted | true if the delete was successful. A delete that fails answers with status FAIL and a reason instead, so in an OK response it is always true | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint) | | 7 | Onboarding is still in progress (the connection is not active) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The postId you provided is invalid or wrong: the post was not found (for example, it was already deleted), or you have no access to it | | 18 | General error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `postId` | string | Yes | The post ID you wish to delete (from [Create Post](https://docs.99digital.co.il/facebook-api/facebook-pages/create-post) or [All Posts](https://docs.99digital.co.il/facebook-api/facebook-pages/all-posts)). Example: `15625364215_56994166514`. | ### Example (generated from the schema) ```json { "from": "463745743546345", "postId": "15625364215_56994166514" } ``` ## 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 or FAIL. `OK` — the post was deleted. Always `OK`. | | `postId` | string | (one of: OK) The post ID that you deleted. Example: `15625364215_56994166514`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1785500000`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `deleted` | boolean | (one of: OK) `true` if the delete was successful. A delete that fails answers with status FAIL and a reason instead, so in an OK response it is always `true`. Always `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: `2` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint); `7` — Onboarding is still in progress (the connection is not active); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The `postId` you provided is invalid or wrong: the post was not found (for example, it was already deleted), or you have no access to it; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Returned when Meta rejected the request (reason 10 and above). Example: `463745743546345`. | #### Example: OK The post was deleted. ```json { "status": "OK", "postId": "15625364215_56994166514", "timestamp": 1785500000, "from": "463745743546345", "reason": 1, "deleted": true } ``` #### Example: Reason 13 The post was not found, or you have no access to it. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` #### Example: Reason 3 Wrong apiKey. ```json { "status": "FAIL", "reason": 3 } ``` --- # All Comments Source: https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments Markdown: https://docs.99digital.co.il/markdown/facebook-api/facebook-pages/all-comments.md Section: Facebook API › Facebook Pages `POST https://api.99digital.co.il/facebook/page/getComments` This endpoint allows you to see all the comments of a post or a comment in your page (comments that were created by the API or directly on Facebook). **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/facebook/page/getComments` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | postId | The post ID you want to get the comments from | no\* | 15625364215_56994166514 | | commentId | The comment ID you wish to get all the comments inside it (its replies) | no\* | 634645636423_5675674565 | | filter | "toplevel" if you wish only top level comments. "stream" if you wish to get everything (the comments and their replies, in one list). Default is "toplevel" | no | toplevel | | order | Options: "chronological" (oldest first), "reverse_chronological" (newest first). Default is "chronological" | no | chronological | | limit | How many comments to get (limit pagination), between 1 and 100. Default if not provided: 25 | no | 25 | | after | If you are using limit paging, you can provide the "after" value from the previous response to load the next batch | no | U56WDF34FA4TER3DA..... | \* Either postId or commentId is required, not both. If you send both, the commentId is used. **Response**: ```json { "status": "OK", "from": "463745743546345", "target": "15625364215_56994166514", "count": 25, "comments": [{ "id": "119324881085321_122093459712345", "message": "Hello fans!", "from": { "id": "1234567890", "name": "Israel Israeli", "picture": { "data": { "url": "..." } } }, "created_time": 1783596120, "permalink_url": "https://www.facebook.com/...", "is_hidden": false, "like_count": 3, "comment_count": 3 }], "paging": { "after": "QVFIU...", "hasNext": true }, "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | count | Total comments in this batch | | target | The commentId or postId you provided | | from | Your ID for the service | **comments** and **paging**: | Value | Information | | --- | --- | | id | This is the commentId | | message | The body of the comment | | created_time | Comment create time. UNIX UTC timestamp (int seconds) | | from | id, name and profile picture of the comment creator | | permalink_url | Link directly to the comment | | like_count | The total likes this comment has | | is_hidden | true - the comment is hidden in the page. false - this comment is live on Facebook | | comment_count | The total comment replies this comment has | | paging | Key that contains two values: "after", which represents the parameter to send if you wish to get the next batch, and "hasNext", which is true if you have more data to load, or false if this is the last data | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint) | | 7 | Onboarding is still in progress (the connection is not active) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The postId or commentId is invalid or wrong: the post or comment was not found (for example, it was deleted), or you have no access to it | | 15 | The content you provided was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content | | 18 | General error, try again | **Remarks**: - Each comment's `id` is the `commentId` for [Create Comment](https://docs.99digital.co.il/facebook-api/facebook-pages/create-comment), [Hide Comment](https://docs.99digital.co.il/facebook-api/facebook-pages/hide-comment), [Delete Comment](https://docs.99digital.co.il/facebook-api/facebook-pages/delete-comment), [Like Comment](https://docs.99digital.co.il/facebook-api/facebook-pages/like-comment) and [Private Reply](https://docs.99digital.co.il/facebook-api/facebook-pages/private-reply). ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `postId` | string | No | The post ID you want to get the comments from. Either `postId` or `commentId` is required, not both. Example: `15625364215_56994166514`. | | `commentId` | string | No | The comment ID you wish to get all the comments inside it (its replies). Either `postId` or `commentId` is required, not both; if you send both, the `commentId` is used. Example: `634645636423_5675674565`. | | `filter` | string | No | Which comments to get. Default is `toplevel`. One of: `toplevel` — If you wish only top level comments; `stream` — If you wish to get everything — the comments and their replies, in one list. Default: `toplevel`. Example: `toplevel`. | | `order` | string | No | The order of the comments. Default is `chronological`. One of: `chronological` — Chronological order — oldest first; `reverse_chronological` — Reverse chronological order — newest first. Default: `chronological`. Example: `chronological`. | | `limit` | integer | No | How many comments to get (limit pagination), between 1 and 100. Default if not provided: 25. Default: `25`. Minimum: 1. Maximum: 100. Example: `25`. | | `after` | string | No | If you are using limit paging, you can provide the `after` value from the previous response (`paging.after`) to load the next batch. Example: `QVFIUmRfZA2xYzRkNmJmWjNh`. | ### Example: Comments of a post The top level comments of a post, oldest first. ```json { "from": "463745743546345", "postId": "15625364215_56994166514" } ``` ### Example: Replies to a comment The replies to one comment. ```json { "from": "463745743546345", "commentId": "634645636423_5675674565" } ``` ### Example: Everything, newest first All the comments of a post with their replies, newest first. ```json { "from": "463745743546345", "postId": "15625364215_56994166514", "filter": "stream", "order": "reverse_chronological" } ``` ### Example: Next batch The next 25 comments — `after` is `paging.after` from the previous response. ```json { "from": "463745743546345", "postId": "15625364215_56994166514", "limit": 25, "after": "QVFIUmRfZA2xYzRkNmJmWjNh" } ``` ## 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 or FAIL. `OK` — the request succeeded, and the comments of this batch are in `comments`. Always `OK`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `target` | string | (one of: OK) The `commentId` or `postId` you provided. Example: `15625364215_56994166514`. | | `count` | integer | (one of: OK) Total comments in this batch. Example: `25`. | | `comments` | array of object | (one of: OK) The comments of this batch. Empty when there are none. | | `comments[].id` | string | (one of: OK) This is the `commentId`. Example: `56994166514_122093459712345`. | | `comments[].message` | string | (one of: OK) The body (text) of the comment. Example: `Great post!`. | | `comments[].from` | object | (one of: OK) The id, name and profile picture of the comment creator. | | `comments[].from.id` | string | (one of: OK) The ID of the comment creator. | | `comments[].from.name` | string | (one of: OK) The name of the comment creator. | | `comments[].from.picture` | object | (one of: OK) The profile picture of the comment creator. | | `comments[].from.picture.data` | object | (one of: OK) The picture's details. | | `comments[].from.picture.data.url` | string | (one of: OK) Link to the profile picture. | | `comments[].created_time` | integer | (one of: OK) Comment create time. UNIX UTC timestamp (int seconds). Example: `1783596120`. | | `comments[].permalink_url` | string | (one of: OK) Link directly to the comment. | | `comments[].like_count` | integer | (one of: OK) The total likes this comment has. Example: `3`. | | `comments[].is_hidden` | boolean | (one of: OK) `true` — the comment is hidden in the page. `false` — this comment is live on Facebook. | | `comments[].comment_count` | integer | (one of: OK) The total comment replies this comment has. Example: `1`. | | `paging` | object | (one of: OK) Key that contains two values: `after`, which represents the parameter to send if you wish to get the next batch, and `hasNext`, which is true if you have more data to load, or false if this is the last data. | | `paging.after` | string | (one of: OK) The parameter to send (as `after`) if you wish to get the next batch. Example: `QVFIUmRfZA2xYzRkNmJmWjNh`. | | `paging.hasNext` | boolean | (one of: OK) `true` if you have more data to load, or `false` if this is the last data. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint); `7` — Onboarding is still in progress (the connection is not active); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The `postId` or `commentId` is invalid or wrong: the post or comment was not found (for example, it was deleted), or you have no access to it; `15` — The content you provided was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Returned when Meta rejected the request (reason 10 and above). Example: `463745743546345`. | #### Example: OK Two comments of a post, and more to load. ```json { "status": "OK", "from": "463745743546345", "target": "15625364215_56994166514", "count": 2, "comments": [ { "id": "56994166514_122093459712345", "message": "Great post!", "from": { "id": "1234567890", "name": "Israel Israeli", "picture": { "data": { "url": "https://platform-lookaside.fbsbx.com/platform/profilepic/?psid=1234567890" } } }, "created_time": 1783596120, "permalink_url": "https://www.facebook.com/15625364215/posts/56994166514?comment_id=122093459712345", "like_count": 3, "is_hidden": false, "comment_count": 1 }, { "id": "56994166514_122093459754321", "message": "When does the sale start?", "from": { "id": "9876543210", "name": "Dana Cohen", "picture": { "data": { "url": "https://platform-lookaside.fbsbx.com/platform/profilepic/?psid=9876543210" } } }, "created_time": 1783599720, "permalink_url": "https://www.facebook.com/15625364215/posts/56994166514?comment_id=122093459754321", "like_count": 0, "is_hidden": false, "comment_count": 0 } ], "paging": { "after": "QVFIUmRfZA2xYzRkNmJmWjNh", "hasNext": true }, "reason": 1 } ``` #### Example: No comments The post has no comments. ```json { "status": "OK", "from": "463745743546345", "target": "15625364215_56994166514", "count": 0, "comments": [], "paging": { "after": "", "hasNext": false }, "reason": 1 } ``` #### Example: Reason 13 The post or comment was not found, or you have no access to it. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` #### Example: Reason 3 Wrong apiKey. ```json { "status": "FAIL", "reason": 3 } ``` --- # Create Comment Source: https://docs.99digital.co.il/facebook-api/facebook-pages/create-comment Markdown: https://docs.99digital.co.il/markdown/facebook-api/facebook-pages/create-comment.md Section: Facebook API › Facebook Pages `POST https://api.99digital.co.il/facebook/page/createComment` This endpoint allows you to create a comment on an existing post. You can either comment on the post itself (it is called "top level comment") or comment on a comment (it is called "reply comment"). **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/facebook/page/createComment` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | postId | The post ID you wish to comment on (if top level comment), from [Create Post](https://docs.99digital.co.il/facebook-api/facebook-pages/create-post) or [All Posts](https://docs.99digital.co.il/facebook-api/facebook-pages/all-posts) | no\* | 15625364215_56994166514 | | commentId | The comment ID you wish to comment on (if reply comment), from [All Comments](https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments) | no\* | 652346734563_3463234623 | | body | The body of the comment. It can have plain text only (no Markdown or HTML) and `\n` for a line break. Maximum 8,000 characters | yes, unless you provide a "url" | Thank you for the comment! | | url | You can provide an image with the comment. Here you can provide the URL (HTTPS only, public) | no | https://example.com/image.jpg | \* You need to provide either the postId or the commentId, not both. If both are provided, the system will use the commentId (reply comment). **Response**: ```json { "status": "OK", "commentId": "15234562345623_952362434423178", "target": "15234562345623_425235245346", "body": "Thank you for the comment!", "timestamp": 1600115719, "from": "463745743546345", "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | target | The original postId or commentId provided in the request | | commentId | The new commentId created. You can use it to reply to the comment | | timestamp | Time stamp of the message | | from | Your ID for the service | | body | The comment you wrote (empty for an image-only comment) | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 4 | commentId or postId is missing (or is not a valid ID) | | 5 | Missing or invalid content: the 'body' or "url" is missing, invalid or wrong (no "body" and no "url", or a "url" that is not https://) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint) | | 7 | Onboarding is still in progress (the connection is not active) | | 8 | The "body" is more than 8,000 characters long | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The postId or commentId is invalid or wrong: the post or comment was not found (for example, it was deleted), or you have no access to it | | 15 | The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content | | 18 | General error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `postId` | string | No | The post ID you wish to comment on (if top level comment). You need to provide either the `postId` or the `commentId`, not both. Example: `15625364215_56994166514`. | | `commentId` | string | No | The comment ID you wish to comment on (if reply comment). You need to provide either the `postId` or the `commentId`, not both; if both are provided, the system uses the `commentId`. Example: `652346734563_3463234623`. | | `body` | string | No | The body of the comment. It can have plain text only (no Markdown or HTML) and `\n` for a line break. Maximum 8,000 characters. Required, unless you provide an image in `url`. Max length: 8000. Example: `Thank you for the comment!`. | | `url` | string (uri) | No | You can provide an image with the comment. Here you can provide the URL (HTTPS only, public). Example: `https://example.com/image.jpg`. | ### Example: Top level comment A comment on the post itself. ```json { "from": "463745743546345", "postId": "15625364215_56994166514", "body": "Thank you all for the great response!" } ``` ### Example: Reply comment A reply to a comment on your post. ```json { "from": "463745743546345", "commentId": "652346734563_3463234623", "body": "Thank you for the comment!" } ``` ### Example: Comment with image A comment with an image, from the link in `url`. ```json { "from": "463745743546345", "postId": "15625364215_56994166514", "body": "Here is the full menu.", "url": "https://example.com/image.jpg" } ``` ## 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 or FAIL. `OK` — the comment was created. Always `OK`. | | `commentId` | string | (one of: OK) The new commentId created. You can use it to reply to the comment. Example: `652346734563_952362434423178`. | | `target` | string | (one of: OK) The original `postId` or `commentId` provided in the request. Example: `652346734563_3463234623`. | | `body` | string | (one of: OK) The comment you wrote (empty for an image-only comment). Example: `Thank you for the comment!`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1785500000`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `4` — The "commentId" or "postId" is missing (or is not a valid ID); `5` — Missing or invalid content: the "body" or "url" is missing, invalid or wrong (no "body" and no "url", or a "url" that is not https://); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint); `7` — Onboarding is still in progress (the connection is not active); `8` — The "body" is more than 8,000 characters long; `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The `postId` or `commentId` is invalid or wrong: the post or comment was not found (for example, it was deleted), or you have no access to it; `15` — The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Returned when Meta rejected the request (reason 10 and above). Example: `463745743546345`. | #### Example: OK The reply comment was created. ```json { "status": "OK", "commentId": "652346734563_952362434423178", "target": "652346734563_3463234623", "body": "Thank you for the comment!", "timestamp": 1785500000, "from": "463745743546345", "reason": 1 } ``` #### Example: Reason 4 No `postId` and no `commentId`, or an ID that is not valid. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 5 No `body` and no `url`. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 13 The post or comment was not found, or you have no access to it. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` --- # Hide Comment Source: https://docs.99digital.co.il/facebook-api/facebook-pages/hide-comment Markdown: https://docs.99digital.co.il/markdown/facebook-api/facebook-pages/hide-comment.md Section: Facebook API › Facebook Pages `POST https://api.99digital.co.il/facebook/page/hideComment` Hide a comment allows you to make a comment hidden (or back to visible) from the public, so it stays visible only to the writer of the comment, their friends and the admin of the page. **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/facebook/page/hideComment` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | commentId | The comment ID you wish to do the action on (from [All Comments](https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments)) | yes | 652346734563_3463234623 | | hide | 1 - hide. 0 - unhide. If you leave it out, the comment is hidden. true / false work too, as a number or a string; any other value returns reason 8 | no (default 1) | 1 | **Response**: ```json { "status": "OK", "commentId": "15234562345623_952362434423178", "from": "463745743546345", "timestamp": 1600115719, "hidden": true, "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | commentId | The comment ID you did the action on | | from | Your ID for the service | | timestamp | Time stamp of the message | | hidden | true if the comment was hidden. false if the comment is not hidden | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 4 | commentId is invalid or wrong (missing, or not a valid comment ID) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint) | | 7 | Onboarding is still in progress (the connection is not active) | | 8 | 'hide' is not 1 or 0 (or true / false) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 18 | General error, try again | **Remarks**: - To remove a comment for good, use [Delete Comment](https://docs.99digital.co.il/facebook-api/facebook-pages/delete-comment) instead. ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `commentId` | string | Yes | The comment ID you wish to do the action on (from [All Comments](https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments)). Example: `652346734563_3463234623`. | | `hide` | integer | No | 1 - hide, 0 - unhide. If you leave it out, the comment is hidden. `true` / `false` work too, as a number or a string; any other value returns reason 8. One of: `1` — Hide — the comment stays visible only to its writer, their friends and the admin of the page; `0` — Unhide — the comment is visible to the public again. Default: `1`. Example: `1`. | ### Example: Hide Hide the comment from the public. ```json { "from": "463745743546345", "commentId": "652346734563_3463234623", "hide": 1 } ``` ### Example: Unhide Make a hidden comment visible again. ```json { "from": "463745743546345", "commentId": "652346734563_3463234623", "hide": 0 } ``` ## 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 or FAIL. `OK` — the action was done. Always `OK`. | | `commentId` | string | (one of: OK) The comment ID you did the action on. Example: `652346734563_3463234623`. | | `hidden` | boolean | (one of: OK) `true` if the comment was hidden. `false` if the comment is not hidden (you unhid it). | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1785500000`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `4` — The "commentId" is invalid or wrong (missing, or not a valid comment ID); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint); `7` — Onboarding is still in progress (the connection is not active); `8` — 'hide' is not 1 or 0 (or true / false); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Returned when Meta rejected the request (reason 10 and above). Example: `463745743546345`. | #### Example: OK The comment is hidden. ```json { "status": "OK", "commentId": "652346734563_3463234623", "hidden": true, "timestamp": 1785500000, "from": "463745743546345", "reason": 1 } ``` #### Example: OK — unhide The comment is visible again. ```json { "status": "OK", "commentId": "652346734563_3463234623", "hidden": false, "timestamp": 1785500000, "from": "463745743546345", "reason": 1 } ``` #### Example: Reason 4 The `commentId` is missing or not a valid ID. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 3 Wrong apiKey. ```json { "status": "FAIL", "reason": 3 } ``` --- # Delete Comment Source: https://docs.99digital.co.il/facebook-api/facebook-pages/delete-comment Markdown: https://docs.99digital.co.il/markdown/facebook-api/facebook-pages/delete-comment.md Section: Facebook API › Facebook Pages `POST https://api.99digital.co.il/facebook/page/deleteComment` This endpoint allows you to delete a comment, either written by you or by anyone else. :::warning This is a permanent action and can't be undone. To only hide a comment from the public, use [Hide Comment](https://docs.99digital.co.il/facebook-api/facebook-pages/hide-comment) instead. ::: **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/facebook/page/deleteComment` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | commentId | The comment ID you wish to delete (from [All Comments](https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments)) | yes | 15625364215_56994166514 | **Response**: ```json { "status": "OK", "commentId": "15234562345623_952362434423178", "timestamp": 1600115719, "from": "463745743546345", "reason": 1, "deleted": true } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | commentId | The comment ID that you deleted | | timestamp | Time stamp of the message | | from | Your ID for the service | | deleted | true if the delete was successful. A delete that fails answers with status FAIL and a reason instead, so in an OK response it is always true | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint) | | 7 | Onboarding is still in progress (the connection is not active) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The commentId you provided is invalid or wrong: the comment was not found (for example, it was already deleted), or you have no access to it | | 18 | General error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `commentId` | string | Yes | The comment ID you wish to delete (from [All Comments](https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments)). It can be a comment written by you or by anyone else. Example: `652346734563_3463234623`. | ### Example (generated from the schema) ```json { "from": "463745743546345", "commentId": "652346734563_3463234623" } ``` ## 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 or FAIL. `OK` — the comment was deleted. Always `OK`. | | `commentId` | string | (one of: OK) The comment ID that you deleted. Example: `652346734563_3463234623`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1785500000`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `deleted` | boolean | (one of: OK) `true` if the delete was successful. A delete that fails answers with status FAIL and a reason instead, so in an OK response it is always `true`. Always `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: `2` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint); `7` — Onboarding is still in progress (the connection is not active); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The `commentId` you provided is invalid or wrong: the comment was not found (for example, it was already deleted), or you have no access to it; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Returned when Meta rejected the request (reason 10 and above). Example: `463745743546345`. | #### Example: OK The comment was deleted. ```json { "status": "OK", "commentId": "652346734563_3463234623", "timestamp": 1785500000, "from": "463745743546345", "reason": 1, "deleted": true } ``` #### Example: Reason 13 The comment was not found, or you have no access to it. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` #### Example: Reason 3 Wrong apiKey. ```json { "status": "FAIL", "reason": 3 } ``` --- # Like Comment Source: https://docs.99digital.co.il/facebook-api/facebook-pages/like-comment Markdown: https://docs.99digital.co.il/markdown/facebook-api/facebook-pages/like-comment.md Section: Facebook API › Facebook Pages `POST https://api.99digital.co.il/facebook/page/likeComment` This endpoint allows you to like or unlike a comment in a post. **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/facebook/page/likeComment` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | commentId | The comment ID you wish to like (from [All Comments](https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments)) | yes | 15625364215_56994166514 | | like | 1 for like. 0 for unlike. If you leave it out, the comment is liked. true / false work too, as a number or a string; any other value returns reason 8 | no (default 1) | 1 | **Response**: ```json { "status": "OK", "commentId": "15234562345623_952362434423178", "timestamp": 1700115719, "from": "463745743546345", "reason": 1, "like": true } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | commentId | The comment ID that you liked or unliked | | timestamp | Time stamp of the message | | from | Your ID for the service | | like | true if you liked the comment. false if you unliked it. When the action fails, the response is FAIL with a reason instead | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint) | | 7 | Onboarding is still in progress (the connection is not active) | | 8 | 'like' is not 1 or 0 (or true / false) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The commentId you provided is invalid or wrong: the comment was not found (for example, it was deleted), or you have no access to it | | 18 | General error / wrong information or bad payload. Please check the payload again and try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `commentId` | string | Yes | The comment ID you wish to like or unlike (from [All Comments](https://docs.99digital.co.il/facebook-api/facebook-pages/all-comments)). Example: `652346734563_3463234623`. | | `like` | integer | No | 1 for like, 0 for unlike. If you leave it out, the comment is liked. `true` / `false` work too, as a number or a string; any other value returns reason 8. One of: `1` — Like the comment, as your Page; `0` — Unlike — remove your Page's like from the comment. Default: `1`. Example: `1`. | ### Example: Like Like the comment as your Page. ```json { "from": "463745743546345", "commentId": "652346734563_3463234623", "like": 1 } ``` ### Example: Unlike Remove your Page's like from the comment. ```json { "from": "463745743546345", "commentId": "652346734563_3463234623", "like": 0 } ``` ## 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 or FAIL. `OK` — the action was done. Always `OK`. | | `commentId` | string | (one of: OK) The comment ID that you liked or unliked. Example: `652346734563_3463234623`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1785500000`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `like` | boolean | (one of: OK) `true` if you liked the comment. `false` if you unliked it. When the action fails, the response is FAIL with a reason instead. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint); `7` — Onboarding is still in progress (the connection is not active); `8` — 'like' is not 1 or 0 (or true / false); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The `commentId` you provided is invalid or wrong: the comment was not found (for example, it was deleted), or you have no access to it; `18` — General error / wrong information or bad payload. Please check the payload again and try again. | | `from` | string | (one of: FAIL) Your ID for the service. Returned when Meta rejected the request (reason 10 and above). Example: `463745743546345`. | #### Example: OK The comment is liked. ```json { "status": "OK", "commentId": "652346734563_3463234623", "timestamp": 1785500000, "from": "463745743546345", "reason": 1, "like": true } ``` #### Example: OK — unlike The like was removed. ```json { "status": "OK", "commentId": "652346734563_3463234623", "timestamp": 1785500000, "from": "463745743546345", "reason": 1, "like": false } ``` #### Example: Reason 13 The comment was not found, or you have no access to it. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` #### Example: Reason 18 General or unknown error — check the request and try again. ```json { "status": "FAIL", "reason": 18, "from": "463745743546345" } ``` --- # Private Reply Source: https://docs.99digital.co.il/facebook-api/facebook-pages/private-reply Markdown: https://docs.99digital.co.il/markdown/facebook-api/facebook-pages/private-reply.md Section: Facebook API › Facebook Pages `POST https://api.99digital.co.il/facebook/page/privateReply` This endpoint allows you to send a Messenger private reply to a user that left a comment on your post. You are allowed to send a one-time private reply to a person who wrote a public comment: you can only send one private reply per comment, within 7 days of when it was written. If the user answers, you can keep chatting with them (if you connected the Facebook Messenger API too). This private reply does not need a Facebook Messenger connection to work. **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/facebook/page/privateReply` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | commentId | The comment ID that was posted on your post, of which you wish to send the private reply to the visitor | yes\* | 652346734563_3463234623 | | postId | If someone wrote a post on your page and you wish to private reply to them, you need to provide the postId instead of the commentId | no\* | 634634634_7447345 | | body | The private message (DM) you want to send to the visitor that wrote the comment (or the post). 2,000 characters maximum | yes | Thank you for the comment! Here are our special deals | \* Provide either the commentId or the postId. If you send both, the commentId is used. **Response**: ```json { "status": "OK", "target": "15234562345623_425235245346", "from": "463745743546345", "messageId": "m_Hk2aZ5q8RkWm1vYb3pXo7Q", "body": "Thank you for the comment! Here are our special deals", "timestamp": 1600115719, "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | target | The original postId or commentId provided in the request | | messageId | The DM message ID (the ID of the private message that was sent) | | timestamp | Time stamp of the message | | from | Your ID for the service | | body | The private message you wrote | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 4 | commentId or postId is missing (or is not a valid ID) | | 5 | Missing or invalid content: the 'body' is missing or empty | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint) | | 7 | Onboarding is still in progress (the connection is not active) | | 8 | The "body" is more than 2,000 characters long | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The postId or commentId is invalid or wrong: the post or comment was not found (for example, it was deleted), or you have no access to it | | 14 | You already sent a private reply to this comment or post, or it is more than 7 days old. Meta allows one private reply, within 7 days | | 15 | The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content | | 18 | General error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `commentId` | string | No | The comment ID that was posted on your post, of which you wish to send the private reply to the visitor. Either `commentId` or `postId` is required; if you send both, the `commentId` is used. Example: `652346734563_3463234623`. | | `postId` | string | No | If someone wrote a post on your page and you wish to private reply to them, you need to provide the `postId` (of their post) instead of the `commentId`. Example: `634634634_7447345`. | | `body` | string | Yes | The private message (DM) you want to send to the visitor that wrote the comment or the post. 2,000 characters maximum. Max length: 2000. Example: `Thank you for the comment! Here are our special deals.`. | ### Example: Reply to a comment A private message to the writer of a comment on your post. ```json { "from": "463745743546345", "commentId": "652346734563_3463234623", "body": "Thank you for the comment! Here are our special deals." } ``` ### Example: Reply to a visitor post A private message to a visitor who wrote a post on your page. ```json { "from": "463745743546345", "postId": "634634634_7447345", "body": "Thanks for your post! We sent you the details here." } ``` ## 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 or FAIL. `OK` — the private reply was sent. Always `OK`. | | `target` | string | (one of: OK) The original `postId` or `commentId` provided in the request. Example: `652346734563_3463234623`. | | `messageId` | string | (one of: OK) The DM message ID (the ID of the private message that was sent). Example: `m_Hk2aZ5q8RkWm1vYb3pXo7Q`. | | `body` | string | (one of: OK) The private message you wrote. Example: `Thank you for the comment! Here are our special deals.`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1785500000`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `4` — The "commentId" or "postId" is missing (or is not a valid ID); `5` — Missing or invalid content — the "body" is missing or empty; `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook posts endpoint); `7` — Onboarding is still in progress (the connection is not active); `8` — The "body" is more than 2,000 characters long; `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The `postId` or `commentId` is invalid or wrong: the post or comment was not found (for example, it was deleted), or you have no access to it; `14` — You already sent a private reply to this comment or post, or it is more than 7 days old — Meta allows one private reply, within 7 days; `15` — The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Returned when Meta rejected the request (reason 10 and above). Example: `463745743546345`. | #### Example: OK The private reply was sent. ```json { "status": "OK", "target": "652346734563_3463234623", "messageId": "m_Hk2aZ5q8RkWm1vYb3pXo7Q", "body": "Thank you for the comment! Here are our special deals.", "timestamp": 1785500000, "from": "463745743546345", "reason": 1 } ``` #### Example: Reason 4 No `commentId` and no `postId`, or an ID that is not valid. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 8 The `body` is more than 2,000 characters long. ```json { "status": "FAIL", "reason": 8 } ``` #### Example: Reason 13 The comment or post was not found, or you have no access to it. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` --- # All Posts Source: https://docs.99digital.co.il/facebook-api/instagram-pages/all-posts Markdown: https://docs.99digital.co.il/markdown/facebook-api/instagram-pages/all-posts.md Section: Facebook API › Instagram Pages `POST https://api.99digital.co.il/instagram/page/getPosts` This endpoint allows you to see all the posts in your Instagram page (posts that were created by the API or directly on Instagram). **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/instagram/page/getPosts` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | limit | How many posts to get (limit pagination), between 1 and 100. Default if not provided: 25 | no | 25 | | type | Two options: **media** - all posts, reels, videos, carousels. **stories** - live stories. Default if not provided: media | no | media | | mediaId | If you prefer to get information on one post and not all of them, here is where you put the mediaId. The response then holds that one post in "post" (not a "posts" list, and without "type", "count" and "paging"), and "type", "limit" and "after" are ignored | no | 5634634_634634563 | | after | If you are using limit paging, you can provide the "after" value from the previous response to load the next batch | no | U56WDF34FA4TER3DA..... | **Response**: ```json { "status": "OK", "from": "463745743546345", "type": "media", "count": 25, "posts": [{ "id": "119324881085321_122093459712345", "caption": "Hello fans!", "media_type": "CAROUSEL_ALBUM", "media_product_type": "FEED", "media_url": "https://www.scontent.com/...", "permalink": "https://instagram.com/p/...", "created_time": 1783596120, "children": { "data": [ { "id": "17998877665544332", "media_type": "IMAGE", "media_url": "https://www.scontent.com/..." }, { "id": "17998877665544333", "media_type": "VIDEO", "media_url": "https://www.scontent.com/...", "thumbnail_url": "https://www.scontent.com/..." } ] }, "like_count": 10, "comments_count": 3, "is_comment_enabled": true }], "paging": { "after": "QVFIU...", "hasNext": true }, "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | type | The type you asked for: media or stories | | count | Total posts in this batch | | from | Your ID for the service | **posts** and **paging**: | Value | Information | | --- | --- | | id | This is the postId (the mediaId of the post) | | caption | The body of the post | | media_type | IMAGE / VIDEO / CAROUSEL_ALBUM | | media_product_type | FEED / REELS / STORY | | media_url | Link to the media | | permalink | Link directly to the post | | thumbnail_url | Thumbnail image link (only for videos) | | created_time | The post create time. UNIX UTC timestamp (int seconds) | | like_count | The total likes of the post | | comments_count | The total amount of comments this post has (int). For getting the actual comments, use the [All Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/all-comments) (getComments) API endpoint | | is_comment_enabled | true or false: whether comments are enabled on the post | | children | List of media URLs for carousel items (media_type = CAROUSEL_ALBUM): each item in "data" has its id, media_type, media_url, and thumbnail_url for a video | | paging | Key that contains two values: "after", which represents the parameter to send if you wish to get the next batch, and "hasNext", which is true if you have more data to load, or false if this is the last data | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint) | | 7 | Onboarding is still in progress, or the connection was disabled (the connection is not active) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The postId (mediaId) is invalid or wrong: the post was not found, or it is not accessible | | 15 | The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content | | 18 | General error, try again | ## Stories For the "stories" type from the table above, only those will return in the response: `id`, `media_type`, `media_url`, `permalink` and `created_time`. **Remarks**: - A field without a value is left out of the post: for example `caption` on a post without a caption, `thumbnail_url` on anything but a video, and `children` on anything but a carousel. ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `type` | string | No | What to list. Two options: `media` or `stories`. Default if not provided: `media`. Ignored when you send `mediaId`. One of: `media` — All posts, reels, videos and carousels; `stories` — Live stories — the stories that are live right now. Default: `media`. | | `limit` | integer | No | How many posts to get (limit pagination), between 1 and 100. Default if not provided: 25. Default: `25`. Minimum: 1. Maximum: 100. Example: `25`. | | `after` | string | No | If you are using limit paging, you can provide the `after` value from the previous response (`paging.after`) to load the next batch. Example: `QVFIUmF4YWJjZGVmZ2hpams`. | | `mediaId` | string | No | If you prefer to get information on one post and not all of them, here is where you put the mediaId. The response then holds that one post in `post` (not a `posts` list, and without `type`, `count` and `paging`), and `type`, `limit` and `after` are ignored. Example: `17895695668004550`. | ### Example: All posts The last 25 posts — images, reels, videos and carousels. ```json { "from": "463745743546345", "type": "media", "limit": 25 } ``` ### Example: Next batch The next 25 posts, with the `paging.after` value of the previous response. ```json { "from": "463745743546345", "type": "media", "limit": 25, "after": "QVFIUmF4YWJjZGVmZ2hpams" } ``` ### Example: Stories The stories that are live right now. ```json { "from": "463745743546345", "type": "stories" } ``` ### Example: One post The details of one post, by its `mediaId`. ```json { "from": "463745743546345", "mediaId": "17895695668004550" } ``` ## 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 or FAIL. `OK` — the request succeeded, and the posts of this batch are in `posts`. One of: `OK`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `type` | string | (one of: OK) The type you asked for — `media` or `stories`. One of: `media` — All posts, reels, videos and carousels; `stories` — Live stories. | | `count` | integer | (one of: OK) Total posts in this batch. Example: `25`. | | `posts` | array of object | (one of: OK) The posts of this batch. Empty when there are none. | | `posts[].id` | string | (one of: OK) This is the postId (the mediaId of the post). Use it with [All Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/all-comments), [Create Comment](https://docs.99digital.co.il/facebook-api/instagram-pages/create-comment), [Toggle Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/toggle-comments) and [Delete Post](https://docs.99digital.co.il/facebook-api/instagram-pages/delete-post). Example: `17895695668004550`. | | `posts[].caption` | string | (one of: OK) The body of the post. | | `posts[].media_type` | string | (one of: OK) The kind of media — IMAGE / VIDEO / CAROUSEL_ALBUM. One of: `IMAGE` — An image; `VIDEO` — A video (a reel, or a video story); `CAROUSEL_ALBUM` — A carousel — its items are in `children`. | | `posts[].media_product_type` | string | (one of: OK) Where the post appears — FEED / REELS / STORY. One of: `FEED` — A regular post in the feed; `REELS` — A reel; `STORY` — A story. | | `posts[].media_url` | string | (one of: OK) Link to the media. | | `posts[].permalink` | string | (one of: OK) Link directly to the post. | | `posts[].thumbnail_url` | string | (one of: OK) Thumbnail image link (only for videos). | | `posts[].created_time` | integer | (one of: OK) The post create time. UNIX UTC timestamp (int seconds). Example: `1783596120`. | | `posts[].like_count` | integer | (one of: OK) The total likes of the post. | | `posts[].comments_count` | integer | (one of: OK) The total amount of comments this post has (int). For getting the actual comments, use the [All Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/all-comments) (getComments) API endpoint. | | `posts[].is_comment_enabled` | boolean | (one of: OK) `true` or `false`: whether comments are enabled on the post. | | `posts[].children` | object | (one of: OK) List of media URLs for carousel items (`media_type` = CAROUSEL_ALBUM): each item in `data` has its own `id`, `media_type`, `media_url`, and `thumbnail_url` for a video. | | `posts[].children.data` | array of object | (one of: OK) The carousel items, in their order in the carousel. | | `posts[].children.data[].id` | string | (one of: OK) The media ID of the carousel item. | | `posts[].children.data[].media_type` | string | (one of: OK) The kind of the carousel item. One of: `IMAGE` — The item is an image; `VIDEO` — The item is a video (with its `thumbnail_url`). | | `posts[].children.data[].media_url` | string | (one of: OK) Link to the media of the carousel item. | | `posts[].children.data[].thumbnail_url` | string | (one of: OK) Thumbnail image link (only for videos). | | `paging` | object | (one of: OK) Key that contains two values: `after`, which represents the parameter to send if you wish to get the next batch, and `hasNext`, which is true if you have more data to load, or false if this is the last data. | | `paging.after` | string | (one of: OK) The parameter to send (as `after`) if you wish to get the next batch. Empty when there is nothing after this batch. | | `paging.hasNext` | boolean | (one of: OK) `true` if you have more data to load, or `false` if this is the last data. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. One of: `1`. | | `status` | string | (one of: OK — one post) OK or FAIL. `OK` — the request succeeded, and the post is in `post`. One of: `OK`. | | `from` | string | (one of: OK — one post) Your ID for the service. Example: `463745743546345`. | | `post` | object | (one of: OK — one post) The post, with the same fields as an item of `posts`. | | `post.id` | string | (one of: OK — one post) This is the postId (the mediaId of the post). Example: `17895695668004550`. | | `post.caption` | string | (one of: OK — one post) The body of the post. | | `post.media_type` | string | (one of: OK — one post) The kind of media — IMAGE / VIDEO / CAROUSEL_ALBUM. One of: `IMAGE` — An image; `VIDEO` — A video (a reel, or a video story); `CAROUSEL_ALBUM` — A carousel — its items are in `children`. | | `post.media_product_type` | string | (one of: OK — one post) Where the post appears — FEED / REELS / STORY. One of: `FEED` — A regular post in the feed; `REELS` — A reel; `STORY` — A story. | | `post.media_url` | string | (one of: OK — one post) Link to the media. | | `post.permalink` | string | (one of: OK — one post) Link directly to the post. | | `post.thumbnail_url` | string | (one of: OK — one post) Thumbnail image link (only for videos). | | `post.created_time` | integer | (one of: OK — one post) The post create time. UNIX UTC timestamp (int seconds). Example: `1783596120`. | | `post.like_count` | integer | (one of: OK — one post) The total likes of the post. | | `post.comments_count` | integer | (one of: OK — one post) The total amount of comments this post has (int). | | `post.is_comment_enabled` | boolean | (one of: OK — one post) `true` or `false`: whether comments are enabled on the post. | | `post.children` | object | (one of: OK — one post) List of media URLs for carousel items (`media_type` = CAROUSEL_ALBUM): each item in `data` has its own `id`, `media_type`, `media_url`, and `thumbnail_url` for a video. | | `post.children.data` | array of object | (one of: OK — one post) The carousel items, in their order in the carousel. | | `post.children.data[].id` | string | (one of: OK — one post) The media ID of the carousel item. | | `post.children.data[].media_type` | string | (one of: OK — one post) The kind of the carousel item. One of: `IMAGE` — The item is an image; `VIDEO` — The item is a video (with its `thumbnail_url`). | | `post.children.data[].media_url` | string | (one of: OK — one post) Link to the media of the carousel item. | | `post.children.data[].thumbnail_url` | string | (one of: OK — one post) Thumbnail image link (only for videos). | | `reason` | integer | (one of: OK — one post) 1 — not FAIL, the status is OK. One of: `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint); `7` — Onboarding is still in progress, or the connection was disabled (the connection is not active); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The postId (`mediaId`) is invalid or wrong: the post was not found, or it is not accessible; `15` — The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Included only when Meta rejected the request (reasons 10 and up). Example: `463745743546345`. | #### Example: OK A batch of posts — an image and a carousel — with more to load. ```json { "status": "OK", "from": "463745743546345", "type": "media", "count": 2, "posts": [ { "id": "17895695668004550", "caption": "Hello fans!", "media_type": "IMAGE", "media_product_type": "FEED", "media_url": "https://scontent.cdninstagram.com/v/example-image.jpg", "permalink": "https://www.instagram.com/p/C8xYz12AbCd/", "like_count": 10, "comments_count": 3, "is_comment_enabled": true, "created_time": 1783596120 }, { "id": "17912345678904321", "caption": "Swipe to see both colors", "media_type": "CAROUSEL_ALBUM", "media_product_type": "FEED", "media_url": "https://scontent.cdninstagram.com/v/example-first-item.jpg", "permalink": "https://www.instagram.com/p/C8wXy34BcDe/", "like_count": 42, "comments_count": 7, "is_comment_enabled": true, "children": { "data": [ { "id": "17998877665544332", "media_type": "IMAGE", "media_url": "https://scontent.cdninstagram.com/v/example-first-item.jpg" }, { "id": "17998877665544333", "media_type": "VIDEO", "media_url": "https://scontent.cdninstagram.com/v/example-second-item.mp4", "thumbnail_url": "https://scontent.cdninstagram.com/v/example-second-item-thumb.jpg" } ] }, "created_time": 1783509720 } ], "paging": { "after": "QVFIUmF4YWJjZGVmZ2hpams", "hasNext": true }, "reason": 1 } ``` #### Example: Stories The stories that are live right now — a smaller set of fields. ```json { "status": "OK", "from": "463745743546345", "type": "stories", "count": 1, "posts": [ { "id": "17923456789012345", "media_type": "IMAGE", "media_url": "https://scontent.cdninstagram.com/v/example-story.jpg", "permalink": "https://www.instagram.com/stories/example_shop/3412345678901234567/", "created_time": 1783599720 } ], "paging": { "after": "QVFIUnN0b3JpZXNhYmNkZWY", "hasNext": false }, "reason": 1 } ``` #### Example: One post With `mediaId`, the post comes back in `post`. ```json { "status": "OK", "from": "463745743546345", "post": { "id": "17895695668004550", "caption": "Hello fans!", "media_type": "VIDEO", "media_product_type": "REELS", "media_url": "https://scontent.cdninstagram.com/v/example-reel.mp4", "permalink": "https://www.instagram.com/reel/C8xYz12AbCd/", "thumbnail_url": "https://scontent.cdninstagram.com/v/example-reel-thumb.jpg", "like_count": 10, "comments_count": 3, "is_comment_enabled": true, "created_time": 1783596120 }, "reason": 1 } ``` #### Example: Reason 3 Wrong apiKey. ```json { "status": "FAIL", "reason": 3 } ``` #### Example: Reason 13 The post was not found, or it is not accessible. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` --- # Create Post Source: https://docs.99digital.co.il/facebook-api/instagram-pages/create-post Markdown: https://docs.99digital.co.il/markdown/facebook-api/instagram-pages/create-post.md Section: Facebook API › Instagram Pages `POST https://api.99digital.co.il/instagram/page/createPost` This endpoint allows you to create a post on your Instagram page. - Here you have one endpoint for all media types. - All media must be public HTTPS URLs (Meta will try to download them), JPEG images only, maximum of 8 MB. **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/instagram/page/createPost` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | mediaType | Can be any of the following: **image** - for creating a post with only an image. **reel** - for creating a reel. **video** - for creating a video (Instagram publishes every single video as a reel, so it is the same as reel, and the response's mediaType is reel). **story** - for creating a story. **carousel** - for creating carousel images/videos. If you leave it out, it is taken from "links": two links or more make a carousel, one video link (mp4/mov/webm/avi) a reel, and any other link an image. A story is created only when you set mediaType to story | no | image | | links | Array of public HTTPS links, depending on the "mediaType" you provided. **image** - provide 1 link only (JPEG). **reel** - provide 1 video link only (mp4/mov/webm/avi), up to 90 seconds. **video** - provide 1 video link only (mp4/mov/webm/avi). **story** - 1 link of either an image or a video (a story lives 24 hours). **carousel** - minimum 2 links, maximum 10. An image and video combination is possible | yes | `["https://example.com/image.jpg","https://example.com/image2.jpg"]` | | caption | A string text that comes with the image/reel/video/carousel. Up to 2,200 characters, up to 30 #hashtags, up to 20 @mentions. No Markdown, no HTML. Does not work for the 'story' mediaType | no | Here is my video title | | shareToFeed | int. Relevant for reels only. 1 - show in the main feed grid. 0 - show in the Reels tab only | no | 1 | **Response**: ```json { "status": "OK", "mediaType": "image", "caption": "your message", "timestamp": 1600115719, "from": "463745743546345", "mediaId": "52342352345", "url": "https://example.com/image.jpg", "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | mediaType | The mediaType you chose (or the one taken from "links"; video comes back as reel) | | caption | The caption text you provided (left out when you sent none, and for a story) | | timestamp | Time stamp of the message | | from | Your ID for the service | | url | For a single URL mediaType, this will show the URL provided | | items | Total items provided (relevant for the carousel mediaType, instead of url) | | mediaId | The published media ID. This is relevant for [Toggle Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/toggle-comments) (toggleComments), [Delete Post](https://docs.99digital.co.il/facebook-api/instagram-pages/delete-post) (deletePost), [Create Comment](https://docs.99digital.co.il/facebook-api/instagram-pages/create-comment) (createComment), sendMediaShare and [All Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/all-comments) (getComments) | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 5 | Missing or invalid content: 'links' is missing or empty, or one of the links is not https:// | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint) | | 7 | Onboarding is still in progress, or the connection was disabled (the connection is not active) | | 8 | Wrong mediaType, the wrong number of links for the mediaType, or a caption longer than 2,200 characters | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 15 | The content you posted was rejected by Meta, or bad media / format / size (for example, an image that is not JPEG, or a video Meta could not process). It could also indicate a policy violation inside the content. Don't retry the same file | | 16 | You reached Instagram's daily publishing limit (100 posts in 24 hours). Try again later | | 17 | Meta is still processing the video. Nothing was published: send the same request again in a minute | | 18 | General error / wrong information / unknown error. Please check all the payload again and try again | **Remarks**: - In a story or a carousel, a link that ends with `.mp4`, `.mov`, `.webm` or `.avi` is published as a video, and any other link as an image. - The response comes once the post is published. A video is processed by Meta first, so a reel, a video story or a carousel with videos can take a minute or more: set your HTTP timeout accordingly. If Meta is still processing the video after about 90 seconds, you get reason 17: nothing was published, so send the same request again in a minute. ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `mediaType` | string | No | The kind of post. Can be any of the following: `image`, `reel`, `video`, `story` or `carousel`. If you leave it out, it is taken from `links`: two links or more make a carousel, one video link (mp4/mov/webm/avi) a reel, and any other link an image. A story is created only when you set `mediaType` to `story`. One of: `image` — For creating a post with only an image; `reel` — For creating a reel; `video` — For creating a video — Instagram publishes every single video as a reel, so it is the same as `reel`, and the response's `mediaType` is `reel`; `story` — For creating a story (a story lives 24 hours); `carousel` — For creating carousel images/videos (2 to 10 items). Example: `image`. | | `links` | array of string | Yes | Array of public HTTPS links (Meta will try to download them), depending on the `mediaType` you provided: - `image` — 1 link only (JPEG). - `reel` — 1 video link only (mp4/mov/webm/avi), up to 90 seconds. - `video` — 1 video link only (mp4/mov/webm/avi). - `story` — 1 link of either an image or a video (a story lives 24 hours). - `carousel` — minimum 2 links, maximum 10. An image and video combination is possible. Images must be JPEG, maximum of 8 MB. Min items: 1. Max items: 10. | | `caption` | string | No | A string text that comes with the image / reel / video / carousel. Up to 2,200 characters, up to 30 #hashtags and up to 20 @mentions. No Markdown, no HTML. Does not work for the `story` mediaType. Max length: 2200. Example: `Here is my video title`. | | `shareToFeed` | integer | No | Int. Relevant for reels only. One of: `0` — Show in the Reels tab only; `1` — Show in the main feed grid (as well as in the Reels tab). Example: `1`. | ### Example: Image A post with one JPEG image and a caption. ```json { "from": "463745743546345", "mediaType": "image", "links": [ "https://example.com/image.jpg" ], "caption": "Our new collection is here" } ``` ### Example: Reel A reel from one video link, shown in the main feed grid as well. ```json { "from": "463745743546345", "mediaType": "reel", "links": [ "https://example.com/video.mp4" ], "caption": "Here is my video title", "shareToFeed": 1 } ``` ### Example: Video A video — Instagram publishes it as a reel, exactly like `reel`. ```json { "from": "463745743546345", "mediaType": "video", "links": [ "https://example.com/video.mp4" ], "caption": "Here is my video title" } ``` ### Example: Story A story from one image or video link. It lives 24 hours, without a caption. ```json { "from": "463745743546345", "mediaType": "story", "links": [ "https://example.com/story.jpg" ] } ``` ### Example: Carousel A carousel of 2 to 10 links — here two images and a video. ```json { "from": "463745743546345", "mediaType": "carousel", "links": [ "https://example.com/image.jpg", "https://example.com/image2.jpg", "https://example.com/video.mp4" ], "caption": "Swipe to see the whole collection" } ``` ## 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 or FAIL. `OK` — the post was published. Always `OK`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `mediaType` | string | (one of: OK) The mediaType you chose, or the one taken from `links`. `video` comes back as `reel`. One of: `image` — A post with only an image; `reel` — A reel (also for `video`); `story` — A story; `carousel` — A carousel of images/videos. | | `url` | string | (one of: OK) For a single URL mediaType (`image`, `reel`, `video`, `story`), this will show the URL provided. Not in a carousel's response. Example: `https://example.com/image.jpg`. | | `items` | integer | (one of: OK) Total items provided (relevant for the `carousel` mediaType) — in a carousel's response only, instead of `url`. Example: `3`. | | `caption` | string | (one of: OK) The caption text you provided. Left out when you sent none, and for a story (stories publish no caption). | | `mediaId` | string | (one of: OK) The published media ID. This is relevant for toggleComments, deletePost, createComment, sendMediaShare and getComments. Example: `17895695668004550`. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `5` — Missing or invalid content: 'links' is missing or empty, or one of the links is not https://; `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint); `7` — Onboarding is still in progress, or the connection was disabled (the connection is not active); `8` — Wrong mediaType, the wrong number of links for the mediaType, or a caption longer than 2,200 characters; `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `15` — The content you posted was rejected by Meta, or bad media / format / size (for example, an image that is not JPEG, or a video Meta could not process). It could also indicate a policy violation inside the content. Don't retry the same file; `16` — You reached Instagram's daily publishing limit (100 posts in 24 hours). Try again later; `17` — Meta is still processing the video. Nothing was published — send the same request again in a minute; `18` — General error / wrong information / unknown error. Please check all the payload again and try again. | | `from` | string | (one of: FAIL) Your ID for the service. Included only when Meta rejected the request (reasons 10 and up). Example: `463745743546345`. | #### Example: OK The image was published. ```json { "status": "OK", "from": "463745743546345", "timestamp": 1600115719, "reason": 1, "mediaType": "image", "url": "https://example.com/image.jpg", "mediaId": "17895695668004550", "caption": "Our new collection is here" } ``` #### Example: OK — carousel A carousel's response has `items` (the number of links) instead of `url`. ```json { "status": "OK", "from": "463745743546345", "timestamp": 1600115719, "reason": 1, "mediaType": "carousel", "items": 3, "mediaId": "17895695668004551", "caption": "Swipe to see the whole collection" } ``` #### Example: Reason 5 'links' is missing or empty, or a link is not https://. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 8 Wrong mediaType, the wrong number of links, or a caption that is too long. ```json { "status": "FAIL", "reason": 8 } ``` #### Example: Reason 15 Meta rejected the media — for example, an image that is not JPEG. ```json { "status": "FAIL", "reason": 15, "from": "463745743546345" } ``` #### Example: Reason 16 The daily publishing limit (100 posts in 24 hours) is reached. ```json { "status": "FAIL", "reason": 16, "from": "463745743546345" } ``` #### Example: Reason 17 The video is still processing at Meta. Nothing was published; send the request again in a minute. ```json { "status": "FAIL", "reason": 17, "from": "463745743546345" } ``` --- # Delete Post Source: https://docs.99digital.co.il/facebook-api/instagram-pages/delete-post Markdown: https://docs.99digital.co.il/markdown/facebook-api/instagram-pages/delete-post.md Section: Facebook API › Instagram Pages `POST https://api.99digital.co.il/instagram/page/deletePost` This endpoint allows you to delete a post you previously created (using our API or directly on Instagram). :::warning This is a permanent action and can't be undone. ::: **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/instagram/page/deletePost` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | mediaId | The media ID you wish to delete: the mediaId you received from [Create Post](https://docs.99digital.co.il/facebook-api/instagram-pages/create-post), or the post's id in [All Posts](https://docs.99digital.co.il/facebook-api/instagram-pages/all-posts) | yes | 15625364215_56994166514 | **Response**: ```json { "status": "OK", "mediaId": "15234562345623_952362434423178", "timestamp": 1600115719, "from": "463745743546345", "reason": 1, "deleted": true } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | mediaId | The media ID of the post that you deleted | | timestamp | Time stamp of the message | | from | Your ID for the service | | deleted | true if the delete was successful. A delete that fails answers with status FAIL and a reason instead, so in an OK response it is always true | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint) | | 7 | Onboarding is still in progress, or the connection was disabled (the connection is not active) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The mediaId you provided is invalid or wrong: the post was not found, or it is not accessible | | 18 | General error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `mediaId` | string | Yes | The media ID you wish to delete: the `mediaId` you received from [Create Post](https://docs.99digital.co.il/facebook-api/instagram-pages/create-post), or the post's `id` in [All Posts](https://docs.99digital.co.il/facebook-api/instagram-pages/all-posts). Example: `17895695668004550`. | ### Example (generated from the schema) ```json { "from": "463745743546345", "mediaId": "17895695668004550" } ``` ## 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 or FAIL. `OK` — the post was deleted. Always `OK`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `mediaId` | string | (one of: OK) The media ID of the post that you deleted. Example: `17895695668004550`. | | `deleted` | boolean | (one of: OK) `true` if the delete was successful. A delete that fails answers with status FAIL and a reason instead, so in an OK response it is always `true`. Always `true`. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint); `7` — Onboarding is still in progress, or the connection was disabled (the connection is not active); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The `mediaId` you provided is invalid or wrong: the post was not found, or it is not accessible; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Included only when Meta rejected the request (reasons 10 and up). Example: `463745743546345`. | #### Example: OK The post was deleted. ```json { "status": "OK", "from": "463745743546345", "timestamp": 1600115719, "reason": 1, "mediaId": "17895695668004550", "deleted": true } ``` #### Example: Reason 3 Wrong apiKey. ```json { "status": "FAIL", "reason": 3 } ``` #### Example: Reason 13 The post was not found, or it is not accessible. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` --- # All Comments Source: https://docs.99digital.co.il/facebook-api/instagram-pages/all-comments Markdown: https://docs.99digital.co.il/markdown/facebook-api/instagram-pages/all-comments.md Section: Facebook API › Instagram Pages `POST https://api.99digital.co.il/instagram/page/getComments` This endpoint allows you to see all the comments of a post or a comment in your page (comments that were created by the API or directly on Instagram). **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/instagram/page/getComments` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | mediaId | The post ID (media ID) you want to get the comments from | no\* | 15625364215_56994166514 | | commentId | The comment ID you wish to get all the comments inside it (its replies) | no\* | 634645636423_5675674565 | | limit | How many comments to get (limit pagination), between 1 and 100. Default if not provided: 25 | no | 25 | | after | If you are using limit paging, you can provide the "after" value from the previous response to load the next batch | no | U56WDF34FA4TER3DA..... | \* Either mediaId or commentId is required, not both. If you send both, the commentId is used. **Response**: ```json { "status": "OK", "from": "463745743546345", "target": "15625364215_56994166514", "count": 25, "comments": [{ "id": "119324881085321_122093459712345", "text": "Hello fans!", "username": "some_user", "from": { "id": "1234567890", "username": "some_user" }, "created_time": 1783596120, "like_count": 3, "hidden": false, "parent_id": "634532636346" }], "paging": { "after": "QVFIU...", "hasNext": true }, "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | count | Total comments in this batch | | target | The mediaId or commentId you provided (the commentId, if you sent both) | | from | Your ID for the service | **comments** and **paging**: | Value | Information | | --- | --- | | id | This is the commentId | | text | The body of the comment | | username | The username of the person that wrote the comment | | from | id, username of the comment creator | | created_time | Comment create time. UNIX UTC timestamp (int seconds) | | like_count | The total likes this comment has | | hidden | true - the comment is hidden in the page. false - this comment is live on Instagram | | parent_id | The parent comment id (in case this is a comment to a comment). It is part of a reply only (when you send commentId) | | paging | Key that contains two values: "after", which represents the parameter to send if you wish to get the next batch, and "hasNext", which is true if you have more data to load, or false if this is the last data | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint) | | 7 | Onboarding is still in progress, or the connection was disabled (the connection is not active) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The mediaId or commentId is invalid or wrong: the post or comment was not found, or it is not accessible | | 18 | General error, try again | **Remarks**: - Each comment's `id` is the `commentId` for [Create Comment](https://docs.99digital.co.il/facebook-api/instagram-pages/create-comment), [Hide Comment](https://docs.99digital.co.il/facebook-api/instagram-pages/hide-comment), [Delete Comment](https://docs.99digital.co.il/facebook-api/instagram-pages/delete-comment) and [Private Reply](https://docs.99digital.co.il/facebook-api/instagram-pages/private-reply). ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `mediaId` | string | No | The post ID (media ID) you want to get the comments from. Either `mediaId` or `commentId` is required, not both. Example: `17895695668004550`. | | `commentId` | string | No | The comment ID you wish to get all the comments inside it (its replies). Either `mediaId` or `commentId` is required, not both; if you send both, `commentId` is used. Example: `17870913679156914`. | | `limit` | integer | No | How many comments to get (limit pagination), between 1 and 100. Default if not provided: 25. Default: `25`. Minimum: 1. Maximum: 100. Example: `25`. | | `after` | string | No | If you are using limit paging, you can provide the `after` value from the previous response (`paging.after`) to load the next batch. Example: `QVFIUmF4YWJjZGVmZ2hpams`. | ### Example: Comments of a post The comments of a post, by its `mediaId`. ```json { "from": "463745743546345", "mediaId": "17895695668004550" } ``` ### Example: Replies to a comment The comments inside a comment (its replies), by its `commentId`. ```json { "from": "463745743546345", "commentId": "17870913679156914" } ``` ### Example: Next batch The next 25 comments, with the `paging.after` value of the previous response. ```json { "from": "463745743546345", "mediaId": "17895695668004550", "limit": 25, "after": "QVFIUmF4YWJjZGVmZ2hpams" } ``` ## 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 or FAIL. `OK` — the request succeeded, and the comments of this batch are in `comments`. Always `OK`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `target` | string | (one of: OK) The mediaId or commentId you provided (the commentId, if you sent both). Example: `17895695668004550`. | | `count` | integer | (one of: OK) Total comments in this batch. Example: `25`. | | `comments` | array of object | (one of: OK) The comments of this batch. Empty when there are none. | | `comments[].id` | string | (one of: OK) This is the commentId. Use it with [Create Comment](https://docs.99digital.co.il/facebook-api/instagram-pages/create-comment), [Hide Comment](https://docs.99digital.co.il/facebook-api/instagram-pages/hide-comment), [Delete Comment](https://docs.99digital.co.il/facebook-api/instagram-pages/delete-comment) and [Private Reply](https://docs.99digital.co.il/facebook-api/instagram-pages/private-reply). Example: `17870913679156914`. | | `comments[].text` | string | (one of: OK) The body (text) of the comment. | | `comments[].username` | string | (one of: OK) The username of the person that wrote the comment. | | `comments[].from` | object | (one of: OK) The id and username of the comment creator. | | `comments[].from.id` | string | (one of: OK) The ID of the comment creator. | | `comments[].from.username` | string | (one of: OK) The username of the comment creator. | | `comments[].created_time` | integer | (one of: OK) Comment create time. UNIX UTC timestamp (int seconds). Example: `1783596120`. | | `comments[].like_count` | integer | (one of: OK) The total likes this comment has. | | `comments[].hidden` | boolean | (one of: OK) `true` — the comment is hidden in the page. `false` — this comment is live on Instagram. | | `comments[].parent_id` | string | (one of: OK) The parent comment id (in case this is a comment to a comment). It is part of a reply only (when you send `commentId`). | | `paging` | object | (one of: OK) Key that contains two values: `after`, which represents the parameter to send if you wish to get the next batch, and `hasNext`, which is true if you have more data to load, or false if this is the last data. | | `paging.after` | string | (one of: OK) The parameter to send (as `after`) if you wish to get the next batch. Empty when there is nothing after this batch. | | `paging.hasNext` | boolean | (one of: OK) `true` if you have more data to load, or `false` if this is the last data. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint); `7` — Onboarding is still in progress, or the connection was disabled (the connection is not active); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The `mediaId` or `commentId` is invalid or wrong: the post or comment was not found, or it is not accessible; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Included only when Meta rejected the request (reasons 10 and up). Example: `463745743546345`. | #### Example: OK The comments of a post, with more to load. ```json { "status": "OK", "from": "463745743546345", "target": "17895695668004550", "count": 2, "comments": [ { "id": "17870913679156914", "text": "Hello fans!", "username": "some_user", "from": { "id": "1234567890", "username": "some_user" }, "like_count": 3, "hidden": false, "created_time": 1783596120 }, { "id": "17870913679156999", "text": "Is this available in blue?", "username": "another_user", "from": { "id": "1234567891", "username": "another_user" }, "like_count": 0, "hidden": false, "created_time": 1783592520 } ], "paging": { "after": "QVFIUmF4YWJjZGVmZ2hpams", "hasNext": true }, "reason": 1 } ``` #### Example: Replies The replies to a comment — each with its `parent_id`. ```json { "status": "OK", "from": "463745743546345", "target": "17870913679156914", "count": 1, "comments": [ { "id": "17870913679157777", "text": "Thank you for the comment!", "username": "my_business", "from": { "id": "17841400000000000", "username": "my_business" }, "like_count": 1, "hidden": false, "parent_id": "17870913679156914", "created_time": 1783599720 } ], "paging": { "after": "QVFIUmVwbGllc2FiY2RlZg", "hasNext": false }, "reason": 1 } ``` #### Example: No comments Nothing to show. ```json { "status": "OK", "from": "463745743546345", "target": "17895695668004550", "count": 0, "comments": [], "paging": { "after": "", "hasNext": false }, "reason": 1 } ``` #### Example: Reason 13 The post or comment was not found, or it is not accessible. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` --- # Create Comment Source: https://docs.99digital.co.il/facebook-api/instagram-pages/create-comment Markdown: https://docs.99digital.co.il/markdown/facebook-api/instagram-pages/create-comment.md Section: Facebook API › Instagram Pages `POST https://api.99digital.co.il/instagram/page/createComment` This endpoint allows you to create a comment on an existing post. You can either comment on the post itself (it is called "top level comment") or comment on a comment (it is called "reply comment"). **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/instagram/page/createComment` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | mediaId | The media ID you wish to comment on (if top level comment) | no\* | 15625364215_56994166514 | | commentId | The comment ID you wish to comment on (if reply comment) | no\* | 652346734563_3463234623 | | body | The body of the comment. It can have plain text only and `\n` for a line break. Maximum 2,200 characters | yes | Thank you for the comment! | \* You need to provide either the mediaId or the commentId, not both. If both are provided, the system will use the commentId (reply comment). **Response**: ```json { "status": "OK", "commentId": "15234562345623_952362434423178", "target": "15234562345623_425235245346", "body": "Thank you for the comment!", "timestamp": 1600115719, "from": "463745743546345", "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | target | The original mediaId or commentId provided in the request (the commentId, if you sent both) | | commentId | The new commentId created. You can use it to reply to the comment | | timestamp | Time stamp of the message | | from | Your ID for the service | | body | The comment you wrote | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 4 | mediaId or commentId is missing (or is not a valid ID) | | 5 | Missing or invalid content: the 'body' is missing or empty | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint) | | 7 | Onboarding is still in progress, or the connection was disabled (the connection is not active) | | 8 | The "body" is more than 2,200 characters long | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The mediaId or commentId is invalid or wrong: the post or comment was not found, or it is not accessible | | 15 | The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content | | 18 | General error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `mediaId` | string | No | The media ID you wish to comment on (if top level comment). You need to provide either the `mediaId` or the `commentId`, not both. Example: `17895695668004550`. | | `commentId` | string | No | The comment ID you wish to comment on (if reply comment). You need to provide either the `mediaId` or the `commentId`, not both; if both are provided, the system uses the `commentId`. Example: `17870913679156914`. | | `body` | string | Yes | The body of the comment. It can have plain text only and `\n` for a line break. Maximum 2,200 characters. Max length: 2200. Example: `Thank you for the comment!`. | ### Example: Top level comment A comment on the post itself, by its `mediaId`. ```json { "from": "463745743546345", "mediaId": "17895695668004550", "body": "Thank you for the comment!" } ``` ### Example: Reply comment A comment on a comment, by its `commentId`. ```json { "from": "463745743546345", "commentId": "17870913679156914", "body": "Thank you for the comment!\nWe will send you the details soon." } ``` ## 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 or FAIL. `OK` — the comment was created. Always `OK`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `target` | string | (one of: OK) The original mediaId or commentId provided in the request (the commentId, if you sent both). Example: `17895695668004550`. | | `commentId` | string | (one of: OK) The new commentId created. You can use it to reply to the comment. Example: `17870913679157777`. | | `body` | string | (one of: OK) The comment you wrote. Example: `Thank you for the comment!`. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `4` — 'mediaId' or 'commentId' is missing (or is not a valid ID); `5` — Missing or invalid content — the 'body' is missing or empty; `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint); `7` — Onboarding is still in progress, or the connection was disabled (the connection is not active); `8` — The 'body' is more than 2,200 characters long; `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The `mediaId` or `commentId` is invalid or wrong: the post or comment was not found, or it is not accessible; `15` — The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Included only when Meta rejected the request (reasons 10 and up). Example: `463745743546345`. | #### Example: OK The top level comment was created. ```json { "status": "OK", "from": "463745743546345", "timestamp": 1600115719, "reason": 1, "target": "17895695668004550", "commentId": "17870913679157777", "body": "Thank you for the comment!" } ``` #### Example: OK — reply comment The reply was created; `target` is the comment you replied to. ```json { "status": "OK", "from": "463745743546345", "timestamp": 1600115719, "reason": 1, "target": "17870913679156914", "commentId": "17870913679158888", "body": "Thank you for the comment!\nWe will send you the details soon." } ``` #### Example: Reason 4 'mediaId' or 'commentId' is missing. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 5 'body' is missing or empty. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 8 'body' is more than 2,200 characters long. ```json { "status": "FAIL", "reason": 8 } ``` #### Example: Reason 13 The post or comment was not found, or it is not accessible. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` --- # Delete Comment Source: https://docs.99digital.co.il/facebook-api/instagram-pages/delete-comment Markdown: https://docs.99digital.co.il/markdown/facebook-api/instagram-pages/delete-comment.md Section: Facebook API › Instagram Pages `POST https://api.99digital.co.il/instagram/page/deleteComment` This endpoint allows you to delete a comment on your posts, either written by you or by anyone else. :::warning This is a permanent action and can't be undone. To take a comment out of public view without deleting it, use [Hide Comment](https://docs.99digital.co.il/facebook-api/instagram-pages/hide-comment). ::: **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/instagram/page/deleteComment` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | commentId | The comment ID you wish to delete (the id of the comment in [All Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/all-comments)) | yes | 15625364215_56994166514 | **Response**: ```json { "status": "OK", "commentId": "15234562345623_952362434423178", "timestamp": 1600115719, "from": "463745743546345", "reason": 1, "deleted": true } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | commentId | The comment ID that you deleted | | timestamp | Time stamp of the message | | from | Your ID for the service | | deleted | true if the delete was successful. A delete that fails answers with status FAIL and a reason instead, so in an OK response it is always true | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint) | | 7 | Onboarding is still in progress, or the connection was disabled (the connection is not active) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The commentId you provided is invalid or wrong: the comment was not found, or it is not accessible | | 18 | General error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `commentId` | string | Yes | The comment ID you wish to delete (the `id` of the comment in [All Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/all-comments)). It can be a comment written by you or by anyone else. Example: `17870913679156914`. | ### Example (generated from the schema) ```json { "from": "463745743546345", "commentId": "17870913679156914" } ``` ## 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 or FAIL. `OK` — the comment was deleted. Always `OK`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `commentId` | string | (one of: OK) The comment ID that you deleted. Example: `17870913679156914`. | | `deleted` | boolean | (one of: OK) `true` if the delete was successful. A delete that fails answers with status FAIL and a reason instead, so in an OK response it is always `true`. Always `true`. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint); `7` — Onboarding is still in progress, or the connection was disabled (the connection is not active); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The `commentId` you provided is invalid or wrong: the comment was not found, or it is not accessible; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Included only when Meta rejected the request (reasons 10 and up). Example: `463745743546345`. | #### Example: OK The comment was deleted. ```json { "status": "OK", "from": "463745743546345", "timestamp": 1600115719, "reason": 1, "commentId": "17870913679156914", "deleted": true } ``` #### Example: Reason 3 Wrong apiKey. ```json { "status": "FAIL", "reason": 3 } ``` #### Example: Reason 13 The comment was not found, or it is not accessible. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` --- # Toggle Comments Source: https://docs.99digital.co.il/facebook-api/instagram-pages/toggle-comments Markdown: https://docs.99digital.co.il/markdown/facebook-api/instagram-pages/toggle-comments.md Section: Facebook API › Instagram Pages `POST https://api.99digital.co.il/instagram/page/toggleComments` This endpoint allows you to enable or disable comments on an Instagram post. **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/instagram/page/toggleComments` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | mediaId | The media ID you wish to do the action on: the mediaId you received from [Create Post](https://docs.99digital.co.il/facebook-api/instagram-pages/create-post), or the post's id in [All Posts](https://docs.99digital.co.il/facebook-api/instagram-pages/all-posts) | yes | 15625364215_56994166514 | | enabled | 1 for allow comments. 0 for disable comments. If you leave it out, comments are allowed. true / false work too, as a number or a string; any other value returns reason 8 | no (default 1) | 1 | **Response**: ```json { "status": "OK", "mediaId": "15234562345623_952362434423178", "enabled": true, "timestamp": 1600115719, "from": "463745743546345", "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | mediaId | The media ID of the post you changed | | timestamp | Time stamp of the message | | from | Your ID for the service | | enabled | true if comments are now allowed on the post. false if they are disabled | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint) | | 7 | Onboarding is still in progress, or the connection was disabled (the connection is not active) | | 8 | 'enabled' is not 1 or 0 (or true / false) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The media ID you provided is invalid or wrong: the post was not found, or it is not accessible | | 18 | General error / wrong information or bad payload. Please check the payload again and try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `mediaId` | string | Yes | The media ID you wish to do the action on — the `mediaId` you received from [Create Post](https://docs.99digital.co.il/facebook-api/instagram-pages/create-post), or the post's `id` in [All Posts](https://docs.99digital.co.il/facebook-api/instagram-pages/all-posts). Example: `17895695668004550`. | | `enabled` | integer | No | Whether people can comment on the post: 1 for allow comments, 0 for disable comments. If you leave it out, comments are allowed. `true` / `false` work too, as a number or a string; any other value returns reason 8. One of: `0` — Disable comments — nobody can comment on the post; `1` — Allow comments — people can comment on the post. Default: `1`. | ### Example: Disable comments Nobody can comment on the post. ```json { "from": "463745743546345", "mediaId": "17895695668004550", "enabled": 0 } ``` ### Example: Enable comments People can comment on the post again. ```json { "from": "463745743546345", "mediaId": "17895695668004550", "enabled": 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) OK or FAIL. `OK` — the change was made. Always `OK`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `mediaId` | string | (one of: OK) The media ID of the post you changed. Example: `17895695668004550`. | | `enabled` | boolean | (one of: OK) `true` if comments are now allowed on the post. `false` if they are disabled. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint); `7` — Onboarding is still in progress, or the connection was disabled (the connection is not active); `8` — 'enabled' is not 1 or 0 (or true / false); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The media ID you provided is invalid or wrong: the post was not found, or it is not accessible; `18` — General error / wrong information or bad payload. Please check the payload again and try again. | | `from` | string | (one of: FAIL) Your ID for the service. Included only when Meta rejected the request (reasons 10 and up). Example: `463745743546345`. | #### Example: OK Comments are disabled on the post. ```json { "status": "OK", "from": "463745743546345", "timestamp": 1600115719, "reason": 1, "mediaId": "17895695668004550", "enabled": false } ``` #### Example: OK — enabled Comments are allowed on the post again. ```json { "status": "OK", "from": "463745743546345", "timestamp": 1600115719, "reason": 1, "mediaId": "17895695668004550", "enabled": true } ``` #### Example: Reason 3 Wrong apiKey. ```json { "status": "FAIL", "reason": 3 } ``` #### Example: Reason 13 The post was not found, or it is not accessible. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` --- # Hide Comment Source: https://docs.99digital.co.il/facebook-api/instagram-pages/hide-comment Markdown: https://docs.99digital.co.il/markdown/facebook-api/instagram-pages/hide-comment.md Section: Facebook API › Instagram Pages `POST https://api.99digital.co.il/instagram/page/hideComment` Hide a comment allows you to make a comment hidden (or back to visible) from the public, so it stays visible only to the writer of the comment, their friends and the admin of the page. **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/instagram/page/hideComment` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | commentId | The comment ID you wish to do the action on (the id of the comment in [All Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/all-comments)) | yes | 652346734563_3463234623 | | hide | 1 - hide. 0 - unhide. If you leave it out, the comment is hidden. true / false work too, as a number or a string; any other value returns reason 8 | no (default 1) | 1 | **Response**: ```json { "status": "OK", "commentId": "15234562345623_952362434423178", "from": "463745743546345", "timestamp": 1600115719, "hidden": true, "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | commentId | The comment ID you did the action on (hid or unhid) | | from | Your ID for the service | | timestamp | Time stamp of the message | | hidden | true if the comment was hidden. false if the comment is not hidden | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 4 | commentId is invalid or wrong (missing, or not a valid comment ID) | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint) | | 7 | Onboarding is still in progress, or the connection was disabled (the connection is not active) | | 8 | 'hide' is not 1 or 0 (or true / false) | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 18 | General error, try again | **Remarks**: - Hiding is reversible: send `hide` 0 to make the comment visible again. To remove a comment for good, use [Delete Comment](https://docs.99digital.co.il/facebook-api/instagram-pages/delete-comment). ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `commentId` | string | Yes | The comment ID you wish to do the action on — the `id` of the comment in [All Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/all-comments). Example: `17870913679156914`. | | `hide` | integer | No | 1 - hide, 0 - unhide. If you leave it out, the comment is hidden. `true` / `false` work too, as a number or a string; any other value returns reason 8. One of: `0` — Unhide — the comment is visible to the public again; `1` — Hide — the comment stays visible only to its writer, their friends and the admin of the page. Default: `1`. | ### Example: Hide Hide the comment from the public. ```json { "from": "463745743546345", "commentId": "17870913679156914", "hide": 1 } ``` ### Example: Unhide Make the comment visible to the public again. ```json { "from": "463745743546345", "commentId": "17870913679156914", "hide": 0 } ``` ## 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 or FAIL. `OK` — the change was made. Always `OK`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `commentId` | string | (one of: OK) The comment ID you did the action on (hid or unhid). Example: `17870913679156914`. | | `hidden` | boolean | (one of: OK) `true` if the comment was hidden. `false` if the comment is not hidden. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `4` — The 'commentId' is invalid or wrong (missing, or not a valid comment ID); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint); `7` — Onboarding is still in progress, or the connection was disabled (the connection is not active); `8` — 'hide' is not 1 or 0 (or true / false); `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Included only when Meta rejected the request (reasons 10 and up). Example: `463745743546345`. | #### Example: OK The comment is hidden. ```json { "status": "OK", "from": "463745743546345", "timestamp": 1600115719, "reason": 1, "commentId": "17870913679156914", "hidden": true } ``` #### Example: OK — unhidden The comment is visible to the public again. ```json { "status": "OK", "from": "463745743546345", "timestamp": 1600115719, "reason": 1, "commentId": "17870913679156914", "hidden": false } ``` #### Example: Reason 4 'commentId' is missing or is not a valid comment ID. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 10 The connection has expired — do onboarding again. ```json { "status": "FAIL", "reason": 10, "from": "463745743546345" } ``` --- # Private Reply Source: https://docs.99digital.co.il/facebook-api/instagram-pages/private-reply Markdown: https://docs.99digital.co.il/markdown/facebook-api/instagram-pages/private-reply.md Section: Facebook API › Instagram Pages `POST https://api.99digital.co.il/instagram/page/privateReply` This endpoint allows you to send a direct message private reply (DM) to a user that left a comment on your post. You are allowed to send a one-time private reply to a person who wrote a public comment on your media post: you can only send one private reply per comment, within 7 days of when it was written. If the user replies, you can keep chatting with them during a 24-hour open session. You can reply to them directly in Instagram DM, or using the Instagram Messenger API if you connected it. **Settings**: | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/instagram/page/privateReply` | | Method | JSON via POST | | Header | Your API key for the service (the `apiKey` header) | **Body**: | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | from | The ID you received for the connection | yes | 463745743546345 | | commentId | The comment ID that was posted on your media post, of which you wish to send the private reply to the visitor (the id of the comment in [All Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/all-comments)) | yes | 652346734563_3463234623 | | body | The private message (DM) you want to send to the visitor that wrote the comment. 1,000 bytes maximum (UTF-8): an English letter, a digit or a space is 1 byte, a Hebrew letter 2 bytes, and an emoji usually 4 bytes | yes | Thank you for the comment! Here are our special deals | **Response**: ```json { "status": "OK", "commentId": "15234562345623_425235245346", "from": "463745743546345", "messageId": "aWdfZG06MTpnaDoxMjM0NTY3ODkwOjM0", "body": "Thank you for the comment! Here are our special deals", "timestamp": 1600115719, "reason": 1 } ``` **Response-Explain**: | Parameter | Description | | --- | --- | | status | OK or FAIL | | commentId | The original commentId provided in the request (the comment you replied to) | | messageId | The DM message ID (the ID of the private message that was sent) | | timestamp | Time stamp of the message | | from | Your ID for the service | | body | The message you wrote | **reason**: | Value | Information | | --- | --- | | 1 | Not FAIL. The status is OK | | 2 | Your "from" account does not exist (or is missing), or JSON syntax error | | 3 | Wrong apiKey (the apiKey header is missing or wrong) | | 4 | commentId is missing (or is not a valid comment ID) | | 5 | Missing or invalid content: the 'body' is missing or empty | | 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint) | | 7 | Onboarding is still in progress, or the connection was disabled (the connection is not active) | | 8 | The "body" is more than 1,000 bytes long | | 10 | You must do the onboarding again, the connection has expired | | 12 | Rate limit error. Too many requests. Please wait a few minutes and try again | | 13 | The commentId is invalid or wrong: the comment was not found, or it is not accessible | | 14 | You already sent a private reply to this comment, or it is more than 7 days old. Meta allows one private reply, within 7 days | | 15 | The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content | | 18 | General error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | The ID you received for the connection. Example: `463745743546345`. | | `commentId` | string | Yes | The comment ID that was posted on your media post, of which you wish to send the private reply to the visitor (the `id` of the comment in [All Comments](https://docs.99digital.co.il/facebook-api/instagram-pages/all-comments)). Example: `17870913679156914`. | | `body` | string | Yes | The private message (DM) you want to send to the visitor that wrote the comment. 1,000 bytes maximum (UTF-8): an English letter, a digit or a space is 1 byte, a Hebrew letter 2 bytes, and an emoji usually 4 bytes. Example: `Thank you for the comment! Here are our special deals.`. | ### Example (generated from the schema) ```json { "from": "463745743546345", "commentId": "17870913679156914", "body": "Thank you for the comment! Here are our special deals." } ``` ## 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 or FAIL. `OK` — the private reply was sent. Always `OK`. | | `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `commentId` | string | (one of: OK) The original commentId provided in the request (the comment you replied to). Example: `17870913679156914`. | | `messageId` | string | (one of: OK) The DM message ID (the ID of the private message that was sent). Example: `aWdfZG06MTpnaDoxMjM0NTY3ODkwOjM0`. | | `body` | string | (one of: OK) The message you wrote. Example: `Thank you for the comment! Here are our special deals.`. | | `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` — Your "from" account does not exist (or is missing), or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `4` — The 'commentId' is missing (or is not a valid comment ID); `5` — Missing or invalid content — the 'body' is missing or empty; `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint); `7` — Onboarding is still in progress, or the connection was disabled (the connection is not active); `8` — The 'body' is more than 1,000 bytes long; `10` — You must do the onboarding again, the connection has expired; `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The `commentId` is invalid or wrong: the comment was not found, or it is not accessible; `14` — You already sent a private reply to this comment, or it is more than 7 days old — Meta allows one private reply, within 7 days; `15` — The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content; `18` — General error, try again. | | `from` | string | (one of: FAIL) Your ID for the service. Included only when Meta rejected the request (reasons 10 and up). Example: `463745743546345`. | #### Example: OK The private reply was sent to the person who wrote the comment. ```json { "status": "OK", "from": "463745743546345", "timestamp": 1600115719, "reason": 1, "commentId": "17870913679156914", "messageId": "aWdfZG06MTpnaDoxMjM0NTY3ODkwOjM0", "body": "Thank you for the comment! Here are our special deals." } ``` #### Example: Reason 4 'commentId' is missing or is not a valid comment ID. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 5 'body' is missing or empty. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 8 'body' is more than 1,000 bytes long. ```json { "status": "FAIL", "reason": 8 } ``` #### Example: Reason 13 The comment was not found, or it is not accessible. ```json { "status": "FAIL", "reason": 13, "from": "463745743546345" } ``` --- # Change Log Source: https://docs.99digital.co.il/changelog Markdown: https://docs.99digital.co.il/markdown/changelog.md Section: Change Log Every change to the 99 Digital API and its documentation, newest first. :::tip Get an email whenever this page changes [Register for documentation updates](https://marketing99.minisite.ms/21/6) and we'll let you know about every new entry. ::: ## 2026 ### 12/11/2026 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) You can now get a webhook when a display name is approved or rejected. In [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) system notifications there is a new `type`, **name**, with two more parameters: `name` and `rejectReason`. ### 30/09/2026 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Set Profile](https://docs.99digital.co.il/whatsapp-api/profile/set-profile) can now change the display name of a WhatsApp number. ### 29/09/2026 — WhatsApp Calls - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) New feature: [WhatsApp Calls](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/explanation-start-here)! You can now accept incoming calls into your SIP trunk address (call center). See the new [Set Call Configuration](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/set-call-configuration) and [Get Call Settings](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/get-call-settings) endpoints. ### 17/09/2026 — Carousel templates - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) You can now create a carousel template: in [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template), use `header` = 5. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) You can now send a carousel template with [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) has new error codes 29, 30, 31, 32, 33 and 34 (for carousel templates). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send Multi Template](https://docs.99digital.co.il/whatsapp-api/templates/send-multi-template) now supports carousel templates. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send Multi Template](https://docs.99digital.co.il/whatsapp-api/templates/send-multi-template) has new error codes 29, 30, 31, 32 and 33 (for carousel templates). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added the [WhatsApp API Postman Collection](https://docs.99digital.co.il/whatsapp-api/postman-collection). ### 09/09/2026 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send Multi Template](https://docs.99digital.co.il/whatsapp-api/templates/send-multi-template) has a new `showBody` parameter, and the response now includes `accepted`, `rejected` and `failed`. ### 27/08/2026 — apiKey in the header - [SMS API](https://docs.99digital.co.il/sms-api) Updated the [webhook](https://docs.99digital.co.il/sms-api/webhook) for incoming SMS (`event` = `incoming`). - [SMS API](https://docs.99digital.co.il/sms-api) Added a status update event for outgoing SMS messages on the [webhook](https://docs.99digital.co.il/sms-api/webhook). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) All WhatsApp endpoints (sendTemplate, sendMessage, sendList — everything) now take the `apiKey` in the header instead of the body. To give you time to adjust, `apiKey` is still accepted in the body as before, for backward compatibility. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) New endpoint: [Request Phone](https://docs.99digital.co.il/whatsapp-api/request-phone), to ask a client who hides their phone number to share it with you. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) New type of [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) message: `phone`, sent after the client shared their phone number in reply to Request Phone. ### 23/07/2026 - [Partners API](https://docs.99digital.co.il/partners-api) For Online, you can now [get all notifications](https://docs.99digital.co.il/partners-api/online/get-notifications-for-agent) of an agent, [mark one notification as read](https://docs.99digital.co.il/partners-api/online/mark-notification), or [mark all of them as read](https://docs.99digital.co.il/partners-api/online/mark-all-notifications). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) In [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) and [Send Multi Template](https://docs.99digital.co.il/whatsapp-api/templates/send-multi-template), you can now set an ID for each quick reply button, returned on the webhook when the button is tapped. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) The [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) returns that ID in `caption` for template quick reply taps, when you set one while sending the template. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) The [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) has a new parameter, `template`, with the name of the template whose quick reply button was tapped. ### 03/07/2026 - [Partners API](https://docs.99digital.co.il/partners-api) You can now onboard Facebook connections (Facebook Messenger, Facebook Page, Instagram Messenger, Instagram Page) with the new [onboarding links](https://docs.99digital.co.il/partners-api/facebook/create-onboarding-link). - [Partners API](https://docs.99digital.co.il/partners-api) The [webhook](https://docs.99digital.co.il/partners-api/settings/webhook) now sends the event type `facebook` for Facebook connections. ### 15/06/2026 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) New `fileName` parameter in [Send File](https://docs.99digital.co.il/whatsapp-api/send-file). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) New `fileName` parameter in [Send Buttons](https://docs.99digital.co.il/whatsapp-api/send-buttons). ### 28/05/2026 — Username :::warning Major change Please read the following changes carefully. ::: - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added the [Username](https://docs.99digital.co.il/whatsapp-api/information/username) page to the Information folder. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook), incoming messages: added `from_id`, `username`, `country` and `phone`, and updated the description of `from`. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook), acknowledge messages: added `from_id` and `country`, and updated the description of `from`. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) In sending a message, file, location, location request, buttons, list, contact, reaction, carousel and template, and in Type Effect, Get History, Get Contacts and Mark as Read, `to` now takes either the international phone number (as before) or the user ID. ### 13/05/2026 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added error code 5 to [Send Location](https://docs.99digital.co.il/whatsapp-api/send-location). - [Partners API](https://docs.99digital.co.il/partners-api) New endpoint: [Login to a Conversation](https://docs.99digital.co.il/partners-api/online/login-to-a-conversation), under Online. ### 08/05/2026 — Send Carousel - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added error code 24 to [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send File](https://docs.99digital.co.il/whatsapp-api/send-file) now shows the maximum file size of each type. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) New endpoint: [Send Carousel](https://docs.99digital.co.il/whatsapp-api/send-carousel)! Check it out. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) The [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) now returns the ID of the list option, button or carousel button that was chosen, in `caption`. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) In [Send Buttons](https://docs.99digital.co.il/whatsapp-api/send-buttons) and [Send List](https://docs.99digital.co.il/whatsapp-api/send-list) you can now give each button an `id`, returned on the webhook (see the previous item). ### 13/02/2026 — Coexistence - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook), system notifications: added issue number 8. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook), acknowledge: updated `isBilledTemplate` — `newTemplateType` now includes authentication templates. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook): added the `order` type and the `order` parameter, with the list of products ordered from a WhatsApp store. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) We now support coexistence: your clients can onboard a number that is in use in their WhatsApp Business app, and use it with the API too. The changes for this feature: - Information folder → [Coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence): how the feature works and how to use it. - Partners API → [Step 2: Onboarding](https://docs.99digital.co.il/partners-api/whatsapp/step-2-onboarding): the `whatsapp` parameter takes the value 1 to create a coexistence onboarding link. - Partners API → [Get Onboarding List](https://docs.99digital.co.il/partners-api/whatsapp/get-onboarding-list) shows when an onboarding number came from coexistence: `whatsapp` was updated and `coexistence` was added. - Partners API → [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers): added `coexistence` to the list. - [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) has two more event types: contacts and outgoing messages. - Partners API → Online → [Create a New WhatsApp Inbox](https://docs.99digital.co.il/partners-api/online/create-a-new-whatsapp-inbox): added the `import_history` parameter. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template): added error code 34. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) New page: [Get Contacts](https://docs.99digital.co.il/whatsapp-api/get-contacts). ### 15/01/2026 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook), system notifications: added issue number 5. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) `bodyVariableSampleX` is back in [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook), system messages: added `templateUpdate` code 8. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook), system messages: added the `templateCategory` parameter. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook), system messages: added `issues` code 7. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook), system messages: added `templateUpdate` code 9. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook), system messages: added `templateUpdate` codes 10 and 11. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template), [Send Multi Template](https://docs.99digital.co.il/whatsapp-api/templates/send-multi-template), [Send Buttons](https://docs.99digital.co.il/whatsapp-api/send-buttons) and [Send File](https://docs.99digital.co.il/whatsapp-api/send-file) take a new body variable: `localStorage`. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Updated the remarks of [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template). - [Partners API](https://docs.99digital.co.il/partners-api) Updated the [webhook](https://docs.99digital.co.il/partners-api/settings/webhook) IP address. ## 2025 ### 08/12/2025 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) The [Template, Conversation and Message](https://docs.99digital.co.il/whatsapp-api/information/template-conversation-and-message) page has simpler explanations, and moved to the Information folder. - [Partners API](https://docs.99digital.co.il/partners-api) [Get Conversations Statistics](https://docs.99digital.co.il/partners-api/whatsapp/get-conversations-statistics) can now filter by a specific WhatsApp number. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template): added error code 32. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook), acknowledge: more explanation of `isNewConversation`. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) The [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) for incoming messages has a new value: `isNewConversation`. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Get Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/get-webhook) now returns `retry` and `readStatus` too. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile): added `displayName`, the WhatsApp display name. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile): added `isVerifiedBusiness`, which tells you whether the business manager of the WhatsApp account is verified. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Set Profile](https://docs.99digital.co.il/whatsapp-api/profile/set-profile): added error code 12. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) New endpoint: [Type Effect](https://docs.99digital.co.il/whatsapp-api/type-effect)! Check it out. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Mark as Read](https://docs.99digital.co.il/whatsapp-api/mark-as-read) no longer needs the `unique` ID in the request, and `unique` in the response is deprecated. `to` is required instead. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) New endpoint: [Black List](https://docs.99digital.co.il/whatsapp-api/black-list-block), to block end users. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send Reaction](https://docs.99digital.co.il/whatsapp-api/send-reaction) requires `to`, and has a new error code 7. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send Message](https://docs.99digital.co.il/whatsapp-api/send-message) now shows link previews: an `https` URL in the body gets a preview for the end user. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Fixed a bug that kept some WhatsApp numbers from sending `%` in `bodyVariable`. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) New endpoint: [Send Multi Template](https://docs.99digital.co.il/whatsapp-api/templates/send-multi-template) (in the Templates folder), to send many templates in a single API call. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) no longer requires `language` in the body. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) You can now create authentication templates with [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) has `otp` parameters for authentication templates. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template) has a new remark on protecting a template from being deleted in the future. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Get Templates](https://docs.99digital.co.il/whatsapp-api/templates/get-templates) shows `category` 3: authentication template. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) The [Rate Limit](https://docs.99digital.co.il/whatsapp-api/information/rate-limit) page was updated, and moved to the Information folder. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template): new error code 33. - [Partners API](https://docs.99digital.co.il/partners-api) [Webhook](https://docs.99digital.co.il/partners-api/settings/webhook), WhatsApp events: added `daily_limit`, the daily limit the new account was given. ### 20/07/2025 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added a new IP address for webhooks and removed an old one. See the list on [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Delete a Template](https://docs.99digital.co.il/whatsapp-api/templates/delete-a-template): added error code 7. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) WhatsApp API V1 was deprecated and removed from the documentation. - [Partners API](https://docs.99digital.co.il/partners-api) The [webhook](https://docs.99digital.co.il/partners-api/settings/webhook) now includes Online events. - [Partners API](https://docs.99digital.co.il/partners-api) [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers) shows the server subdomain in `onlineServer`. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template): added error code 31. - [Partners API](https://docs.99digital.co.il/partners-api) New: [Online](https://docs.99digital.co.il/partners-api/online). You can now create Online accounts and WhatsApp inboxes, delete accounts, and more. ### 08/04/2025 — Builder - [Partners API](https://docs.99digital.co.il/partners-api) New: the [Builder](https://docs.99digital.co.il/partners-api/builder) system. You can now create builders, get the builders list, log in to a builder, reset user access and delete a builder — all from the API. - [Partners API](https://docs.99digital.co.il/partners-api) The [webhook](https://docs.99digital.co.il/partners-api/settings/webhook) now includes Builder events. ### 23/03/2025 - [Partners API](https://docs.99digital.co.il/partners-api) Fixed a mistake on [Delete WhatsApp Account](https://docs.99digital.co.il/partners-api/whatsapp/delete-whatsapp-account): error 3 is about the token and error 4 about a wrong WhatsApp number. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) has new features, and its response and response explanation were updated: - added `readStatus`; - added a retry mechanism. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) The system messages of the [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) have a few more error codes. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) **Important:** `conversationTimeLeft` in the responses of sendMessage, sendTemplate, sendFile, sendLocation, requestLocation, sendButtons, sendList, sendReaction and getTimers is deprecated and no longer in use. The data is on the webhook instead. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) read status: added three new values — `conversationTimeLeft`, `isNewConversation` and `newConversationType`. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added `timestamp` to the system messages of the [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template): the explanations of response codes 12 and 14 now reflect what actually happens. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) now takes a file name for a PDF header — the name the client sees. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) sendTemplate, sendMessage, sendFile, sendLocation, requestLocation, sendButtons, sendList, sendReaction and sendContact have an optional `showRequest` body parameter, to get the original request back in the response. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Set Profile](https://docs.99digital.co.il/whatsapp-api/profile/set-profile) returns the data in the response, under `returnedData`. ### 09/02/2025 - [Partners API](https://docs.99digital.co.il/partners-api) Added a free-text comment to [Register Number](https://docs.99digital.co.il/partners-api/whatsapp/step-1-register-a-number/register-number) (step 1). The comment also appears in [Get Registered Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-registered-numbers). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template): updated error code 15. - [Partners API](https://docs.99digital.co.il/partners-api) You can now [delete a WhatsApp account](https://docs.99digital.co.il/partners-api/whatsapp/delete-whatsapp-account). - [Partners API](https://docs.99digital.co.il/partners-api) You can now [get conversation statistics](https://docs.99digital.co.il/partners-api/whatsapp/get-conversations-statistics) for WhatsApp numbers. ### 15/01/2025 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template): added the size limits of image, video and document files in `headerLink`. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Rate Limit](https://docs.99digital.co.il/whatsapp-api/information/rate-limit): added a link to the business verification page, in case you want to verify your business. - [Partners API](https://docs.99digital.co.il/partners-api) New: [Get Onboarding List](https://docs.99digital.co.il/partners-api/whatsapp/get-onboarding-list), to see all your onboarding links. - [Partners API](https://docs.99digital.co.il/partners-api) New: [Delete Onboarding Account](https://docs.99digital.co.il/partners-api/whatsapp/delete-onboarding-account), to remove links you don't need. - [Partners API](https://docs.99digital.co.il/partners-api) [Get Registered Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-registered-numbers) now returns `onboarding_link`. - [Partners API](https://docs.99digital.co.il/partners-api) New: [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers), to see all the WhatsApp numbers you onboarded. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Updated the list of IP addresses that may send you [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) messages, for your allowlist. - [Partners API](https://docs.99digital.co.il/partners-api) You can now get and set your business parameters with [Business Settings](https://docs.99digital.co.il/partners-api/settings/business-settings). ## 2024 ### 03/12/2024 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Get Templates](https://docs.99digital.co.il/whatsapp-api/templates/get-templates) has two new template statuses: paused and deactivated. - [Partners API](https://docs.99digital.co.il/partners-api) [Get Registered Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-registered-numbers): fixed the response example. ### 01/12/2024 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added a rate-limit error to every sending endpoint. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added the [Rate Limit](https://docs.99digital.co.il/whatsapp-api/information/rate-limit) page. ### 27/11/2024 - [Partners API](https://docs.99digital.co.il/partners-api) The Partners API is now ready. ### 14/11/2024 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile): added `from`, the WhatsApp number. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template): added error code 21. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Get History](https://docs.99digital.co.il/whatsapp-api/get-history): `state` = 0 now means a failed message. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template): the template name must be lower case only. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) checkWhatsApp is deprecated and no longer supported. To check that a number has WhatsApp, send it a template first: if it doesn't, you get a webhook with `messageUpdate` error code 7. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send Location](https://docs.99digital.co.il/whatsapp-api/send-location): removed error codes 5 and 9, which were irrelevant to sending a location. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template): error code 7 now covers more cases. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template) no longer requires samples: `bodyVariableSample1`–`10`, the `headerSample` URL and the dynamic-website `callToActionWebsiteSample` and `callToActionWebsiteSample2` are all optional when you submit a template. ### 21/07/2024 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send Buttons](https://docs.99digital.co.il/whatsapp-api/send-buttons) can now send `buttonURL`. ### 28/06/2024 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) `caption` is now optional in [Send File](https://docs.99digital.co.il/whatsapp-api/send-file). ### 18/06/2024 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added the template category — in the response of [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template), when creating a template, and in [Get Templates](https://docs.99digital.co.il/whatsapp-api/templates/get-templates). ### 06/06/2024 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added `ref_image` to the referral of the [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook). ### 21/03/2024 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template) now supports a coupon code with a limited-time offer. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) supports a coupon code with a limited-time offer. ### 04/03/2024 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template) now supports up to 10 buttons: website, call, quick reply, and combinations of them. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template) now supports up to 10 variables (previously 5): `{{1}}` to `{{10}}`. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) supports 10 variables. ### 14/01/2024 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) The [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) system messages support message type codes 12 and 13. - [Online API](https://docs.99digital.co.il/online-api) We now have a brand new API for our Online system: the Online API. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added [Request Location](https://docs.99digital.co.il/whatsapp-api/request-location). ## 2023 ### 27/11/2023 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added `timestampMS` to the [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) `messageUnique` and `unique` changed in [Send Reaction](https://docs.99digital.co.il/whatsapp-api/send-reaction). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) The [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) acknowledge now supports the "failed" ack. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) The [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) acknowledge supports `timestamp`. - [Online API](https://docs.99digital.co.il/online-api) New: the Online API documentation is now available. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) The [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) now supports `referral`. ### 30/06/2023 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added codes 10 and 11 to the `messageUpdate` system messages of the [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added `timestamp` to the acks of the [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added `timestamp` to the system alerts of the [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook). ### 11/05/2023 - [Partners API](https://docs.99digital.co.il/partners-api) The Partners API is updated with all the recent changes — adding an account is completely different now. - [Partners API](https://docs.99digital.co.il/partners-api) [Get WhatsApp Numbers](https://docs.99digital.co.il/partners-api/whatsapp/get-whatsapp-numbers) can now show the API key when the number is connected. ### 08/03/2023 — System messages - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) System messages on the [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) are here! You can now get system messages. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) was updated: you can turn system messages on and off, turn phone alerts on and off, and reset the webhook URL. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Get Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/get-webhook) now shows whether system messages are on, and the phone alert numbers. ## 2022 ### 27/10/2022 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) You can now have up to 6000 templates. ### 16/10/2022 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Reversing item 5 of 19/07/2022: `about` is supported again in the profile settings. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) New endpoint: [Mark as Read](https://docs.99digital.co.il/whatsapp-api/mark-as-read). You can now mark incoming messages as read. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) New endpoint: [Send Reaction](https://docs.99digital.co.il/whatsapp-api/send-reaction). You can now react with an emoji to incoming messages. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added the `reaction` type to incoming [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) messages. ### 21/09/2022 - [Partners API](https://docs.99digital.co.il/partners-api) Added the new Partners API, for creating WhatsApp accounts. ### 23/08/2022 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template) has a new error code (22), following new Facebook guidelines. See the remarks on that page. ### 02/08/2022 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile): `type` is now returned as an integer instead of text. ### 24/07/2022 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) `replyTo` now works in [Send Message](https://docs.99digital.co.il/whatsapp-api/send-message), [Send File](https://docs.99digital.co.il/whatsapp-api/send-file), [Send Location](https://docs.99digital.co.il/whatsapp-api/send-location), [Send Buttons](https://docs.99digital.co.il/whatsapp-api/send-buttons), [Send List](https://docs.99digital.co.il/whatsapp-api/send-list) and [Send Contact](https://docs.99digital.co.il/whatsapp-api/send-contact). It doesn't work yet when sending a template. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added error code 19 to sending a template, for a text that is too long. ### 19/07/2022 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) You no longer need to wait 15 minutes before using a new template you created. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Get Templates](https://docs.99digital.co.il/whatsapp-api/templates/get-templates) returns `status` in lower case only (`approved`, `rejected`, `submitted`). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Creating a template no longer needs a category. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile) now shows the daily limit for new conversations. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Get and Set Profile don't support the `about` setting for now; it will return in the future. ### 11/05/2022 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added [Send List](https://docs.99digital.co.il/whatsapp-api/send-list). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added `list` as a [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) type. ### 17/04/2022 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added `quoteUnique` to every incoming message on the [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added `replyTo` to [Send Message](https://docs.99digital.co.il/whatsapp-api/send-message). ### 14/04/2022 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Updated reason code 4 of sending a template: it also means a wrong WhatsApp number. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile), with all the WhatsApp account's information. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added [Set Profile](https://docs.99digital.co.il/whatsapp-api/profile/set-profile), to configure the WhatsApp account's information. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added [Send Contact](https://docs.99digital.co.il/whatsapp-api/send-contact). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added Check WhatsApp. - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added [Get Timers](https://docs.99digital.co.il/whatsapp-api/get-timers). ### 24/03/2022 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added Arabic, Russian, Spanish, Chinese, Hindi, Thai and French to the template languages (creating and sending a template). ### 09/02/2022 - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added [Send Buttons](https://docs.99digital.co.il/whatsapp-api/send-buttons). - [WhatsApp API](https://docs.99digital.co.il/whatsapp-api) Added [Delete a Template](https://docs.99digital.co.il/whatsapp-api/templates/delete-a-template).