# 99 Digital Online API — complete documentation Generated: 2026-11-29T20:03:58.741Z Canonical documentation: https://docs.99digital.co.il/online-api Documentation index: https://docs.99digital.co.il/online-api/llms.txt > This file is generated from every public page of the Online API documentation during the production build. Do not edit it manually. --- # 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.