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

Canonical page: https://docs.99digital.co.il/online-api/agents/list-assignable-agents

# List Assignable 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: <YOUR_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"
}
```
