<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/online-api/conversations/search-conversations

# Search 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: <YOUR_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).
