# Get Team Members (Custom Users)

## **Description**

This endpoint retrieves custom user (Team member) data with optional pagination and search functionality for any particular customer's account.

**Request URL**

```
https://api.v7.botpenguin.com/custom-user
```

**Request Method**

```
GET
```

**Request Headers**

| Header        | Value                       |
| ------------- | --------------------------- |
| Authorization | Bearer \[Your Access Token] |
| authtype      | Key                         |

**Request Parameters**

| Parameter    | Description                                  | Type    | Required |
| ------------ | -------------------------------------------- | ------- | -------- |
| page         | Page number for pagination                   | integer | No       |
| ispagination | Flag to indicate pagination                  | boolean | No       |
| searchText   | Text to search users by name or contact info | string  | No       |

**Sample Request**

{% code overflow="wrap" %}

```bash
curl --location 'https://api.v7.botpenguin.com/custom-user?page=1&ispagination=true&searchText=' \
--header 'Authorization: Bearer [Your Access Token]' \
--header 'authtype: Key'
```

{% endcode %}

**Sample Response**

```json
{
  "success": true,
  "message": "",
  "data": [
    {
      "_id": "xxxxxxxxxxxxxxxxxxxx001",
      "whitelabel": false,
      "name": "Agent One",
      "contact": {
        "phone": {
          "number": "XXXXXXXXXX",
          "prefix": "XX"
        },
        "_id": "xxxxxxxxxxxxxxxxxxxx002",
        "email": "agent.one@example.com"
      },
      "picture": "https://cdn.botpenguin.com/assets/avatars/default-avatar.svg",
      "liveAvailability": "OFFLINE",
      "leadsVisibility": "ALL",
      "assignedBots": [],
      "assignedAiAgents": [
        "xxxxxxxxxxxxxxxxxxxxA1",
        "xxxxxxxxxxxxxxxxxxxxA2"
      ],
      "chatTransferPermission": "ASSIGNED",
      "status": "ACTIVE",
      "description": "",
      "type": "CUSTOMER",
      "unreadMessages": 120,
      "maskedAttributes": [],
      "_department": [
        "xxxxxxxxxxxxxxxxxxxxD1"
      ],
      "_role": "xxxxxxxxxxxxxxxxxxxxR1",
      "_businessHours": "xxxxxxxxxxxxxxxxxxxxB1",
      "_parent": "xxxxxxxxxxxxxxxxxxxxP1",
      "createdAt": "2025-01-01T10:00:00.000Z",
      "updatedAt": "2025-01-01T10:00:00.000Z",
      "__v": 0
    },
    {
      "_id": "xxxxxxxxxxxxxxxxxxxx003",
      "whitelabel": false,
      "name": "Agent Two",
      "contact": {
        "phone": {
          "number": "XXXXXXXXXX",
          "prefix": "XX"
        },
        "_id": "xxxxxxxxxxxxxxxxxxxx004",
        "email": "agent.two@example.com"
      },
      "picture": "https://cdn.botpenguin.com/assets/avatars/default-avatar.svg",
      "liveAvailability": "ONLINE",
      "leadsVisibility": "ASSIGNED",
      "assignedBots": [
        "xxxxxxxxxxxxxxxxxxxxB2"
      ],
      "assignedAiAgents": [
        "xxxxxxxxxxxxxxxxxxxxA1"
      ],
      "chatTransferPermission": "ASSIGNED",
      "status": "ACTIVE",
      "description": "",
      "type": "CUSTOMER",
      "unreadMessages": 85,
      "maskedAttributes": [],
      "_department": [],
      "_role": "xxxxxxxxxxxxxxxxxxxxR2",
      "_parent": "xxxxxxxxxxxxxxxxxxxxP1",
      "createdAt": "2025-01-01T11:00:00.000Z",
      "updatedAt": "2025-01-01T11:05:00.000Z",
      "__v": 0
    }
  ],
  "code": 200,
  "meta": ""
}

```

### Response Attributes

#### Root Object

| Attribute | Type    | Description                                              |
| --------- | ------- | -------------------------------------------------------- |
| `success` | Boolean | Indicates whether the API request was successful.        |
| `message` | String  | Informational or error message. Empty if not applicable. |
| `data`    | Array   | List of agents/team members.                             |
| `code`    | Number  | HTTP status code of the response.                        |
| `meta`    | String  | Additional metadata related to the response (if any).    |

***

#### `data[]` – Agent Object

| Attribute                | Type              | Description                                                   |
| ------------------------ | ----------------- | ------------------------------------------------------------- |
| `_id`                    | String            | Unique identifier of the agent.                               |
| `whitelabel`             | Boolean           | Indicates whether the agent belongs to a whitelabel account.  |
| `name`                   | String            | Display name of the agent.                                    |
| `contact`                | Object            | Contact details of the agent.                                 |
| `picture`                | String            | Profile image URL of the agent.                               |
| `liveAvailability`       | String            | Agent’s availability status (`ONLINE`, `OFFLINE`).            |
| `leadsVisibility`        | String            | Defines which leads the agent can see (`ALL`, `ASSIGNED`).    |
| `assignedBots`           | Array             | List of bot IDs assigned to the agent.                        |
| `assignedAiAgents`       | Array             | List of AI agent IDs assigned to the agent.                   |
| `chatTransferPermission` | String            | Chat transfer access level for the agent (`ASSIGNED`, `ALL`). |
| `status`                 | String            | Current status of the agent (`ACTIVE`, `INACTIVE`).           |
| `description`            | String            | Optional description of the agent.                            |
| `type`                   | String            | Entity type (e.g., `CUSTOMER`).                               |
| `unreadMessages`         | Number            | Count of unread messages assigned to the agent.               |
| `maskedAttributes`       | Array             | List of attributes masked for privacy/security.               |
| `_department`            | Array             | Department IDs associated with the agent.                     |
| `_role`                  | String            | Role ID assigned to the agent.                                |
| `_businessHours`         | String            | Business hours configuration ID (if assigned).                |
| `_parent`                | String            | Parent customer/account ID.                                   |
| `createdAt`              | String (ISO Date) | Timestamp when the agent was created.                         |
| `updatedAt`              | String (ISO Date) | Timestamp when the agent was last updated.                    |
| `__v`                    | Number            | Internal versioning field.                                    |

***

#### `contact` Object

| Attribute | Type   | Description                 |
| --------- | ------ | --------------------------- |
| `email`   | String | Email address of the agent. |
| `phone`   | Object | Phone details of the agent. |
| `_id`     | String | Contact record ID.          |

***

#### `phone` Object

| Attribute | Type   | Description                |
| --------- | ------ | -------------------------- |
| `number`  | String | Phone number of the agent. |
| `prefix`  | String | Country code prefix.       |

***

#### Summary

This response returns a list of **agents/team members** along with their availability, permissions, assignments, and contact information, enabling chat routing, monitoring, and transfer management within the platform.

#### Note:

* Make sure to replace `[Your Access Token]` with your actual access token.
* Mask confidential details such as access tokens before sharing or storing this documentation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://partners.botpenguin.com/api-documentation/partner-api-documentation/get-team-members-custom-users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
