# Get All Contacts

## Get User Inbox

This API endpoint allows you to retrieve user data from the inbox. It provides various filtering options to customize the query.

**Endpoint URL:** `https://api-v7.express-chat.com/inbox/users`

**HTTP Method:** POST

#### Request Headers

* `Authorization`: A bearer token is required for authentication. Replace `[MASKED_TOKEN]` with your valid API token. This token is used to authenticate and authorize the request.

#### Request Body

The request body should be a JSON object containing various filtering criteria to customize the query. Here's a breakdown of the request body fields:

* `searchText` (string): Search text to filter users.
* `tags` (array): An array of tags to filter users.
* `status` (array): An array of status values to filter users.
* `isOnline` (boolean): Indicates whether users are online.
* `_botWebsite` (array): Filter users based on interactions on the website.
* `_botWhatsapp` (array): Filter users based on interactions on WhatsApp.
* `_botTelegram` (array): Filter users based on interactions on Telegram.
* `_botFacebook` (array): Filter users based on interactions on Facebook.
* `_agentAssigned` (array): Filter users assigned to specific agents.
* `segments` (array): An array of segments to filter users.
* `applicableFilters` (array): An array of applicable filters.
* `lastSeenAt` (object): Date range filter for the last seen timestamp.
* `createdAt` (object): Date range filter for the creation timestamp.
* `userInteracted` (boolean): Indicates whether users have interacted.
* `lastMessageBy` (array): Filter users based on the last message sender.
* `isLiveChatActive` (boolean): Indicates whether live chat is active for users.
* `hasOrdered` (object): Filter users based on their order history.

#### Sample Request

```bash
curl 'https://api-v7.express.com/inbox/users' \
  -X 'POST' \
  -H 'Authorization: Bearer [MASKED_TOKEN]' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchText": "",
    "tags": [],
    "status": [],
    "isOnline": false,
    "_botWebsite": [],
    "_botWhatsapp": [],
    "_botTelegram": [],
    "_botFacebook": [],
    "_agentAssigned": [],
    "segments": [],
    "applicableFilters": ["userInteracted"],
    "lastSeenAt": {
      "startAt": "",
      "endsAt": ""
    },
    "createdAt": {
      "startAt": "",
      "endsAt": ""
    },
    "userInteracted": true,
    "lastMessageBy": [],
    "isLiveChatActive": false,
    "hasOrdered": {
      "status": false,
      "lastAt": ""
    },
    "page": 1,
    "isExport": "none",
    "isContact": true
  }' \
  --compressed
```

Replace `[MASKED_TOKEN]` in the request with your actual API token and customize the request body filters as needed for your use case.

#### Response

The API will respond with a JSON object containing the user data based on the applied filters. The response format may vary depending on the data available and the applied filters.

Please replace `[MASKED_TOKEN]` in the request with your actual API token for actual usage.

### :question: Got any questions?

If you have any questions, you can look into our repository of FAQs, most likely, you will find your answer here, If not, write us at <production@Reekolect.co.za>.


---

# 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://help.reekolect.ai/api-references/contacts-and-chats-apis/get-all-contacts.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.
