---
title: "List chats in the caller's inbox"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# List chats in the caller's inbox

Path: Nicer API › Chat

`GET /chat`

URL: `https://api.nicer.travel/chat`

Lists chats ordered by last activity with participant summaries, unread counts, archive state and whether the trip has an open order. `fields` names the parts of a row to return (dotted for nested, `-` to remove one); omitted, a row carries everything but the trip's destination photo galleries, which are three quarters of the body and which no screen reads. The default scope is the caller's own chats; company scope requires a company admin and all-chats scope requires a superadmin, returning 403 otherwise.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Query parameters

- `fields` (`chat.list.query.fields`; string, optional) — The parts of a row to return, comma-separated, dotted for nested ones and applied to every row: title,chat.chatId,travelersTrip.travelersTripId. A leading - removes one. Omitted, a row carries everything but the trip's destination photo galleries.
- `includeChat` (`chat.list.query.includeChat`; string, optional) — Which of the caller's own chats to include: active (the default) leaves out the ones they archived, archived lists only those, all lists both. Only applies to scope=mine.
  - one of `"all"`, `"active"`, `"archived"`
- `scope` (`chat.list.query.scope`; string, optional) — Whose chats to list: mine (the default), the caller's own chats, for every role; company, the whole agency's trip chats, for its admins; all, every trip chat on the platform, for Nicer staff. A broader scope than the caller may read answers 403.
  - one of `"mine"`, `"company"`, `"all"`

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.chat.list();
```

### Nicer CLI

```bash
nicer chat list
```

### cURL

```bash
curl --request GET \
  --url https://api.nicer.travel/chat \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/chat';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/chat"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
[
  {
    "chat": {
      "chatId": "string",
      "chatTitle": "string",
      "companyName": "string",
      "createdAt": "string",
      "kind": "trip",
      "lastMessageTimestamp": "string",
      "participantUserIds": [
        "string"
      ],
      "suggestionsEnabled": true,
      "travelersTripId": "string",
      "type": "Chat",
      "updatedAt": "string"
    },
    "chatUpdatedAt": "string",
    "hasOpenOrder": true,
    "isArchived": true,
    "seen": true,
    "title": "string",
    "travelersTrip": {
      "associatedChatId": "string",
      "associatedTripItineraryId": "string",
      "associatedUserIds": [
        "string"
      ],
      "companyName": "string",
      "createdAt": "string",
      "destinations": [
        {
          "address": "string",
          "amenities": [
            "string"
          ],
          "city": "string",
          "country": "string",
          "countryCode": "string",
          "description": "string",
          "distanceFromSearch": {
            "unit": "km",
            "value": 0
          },
          "features": [
            "string"
          ],
          "fullAddress": "string",
          "gate": "string",
          "iataCode": "string",
          "internovaId": "string",
          "latitude": 0,
          "longitude": 0,
          "name": "string",
          "photos": [
            {
              "key": "string",
              "name": "string",
              "url": "string"
            }
          ],
          "placeId": "string",
          "region": "string",
          "source": "string",
          "state": "string",
          "terminal": "string",
          "timeZone": "string",
          "zipCode": "string",
          "endDateTime": "string",
          "headerImageUrl": "string",
          "startDateTime": "string"
        }
      ],
      "lastMessageTimestamp": "string",
      "primaryTravelerUserId": "string",
      "suggestionsEnabled": true,
      "travelersTripId": "string",
      "tripEndDate": "string",
      "tripStartDate": "string",
      "tripTitle": "string",
      "type": "TravelersTrip",
      "updatedAt": "string"
    },
    "unreadCount": 0,
    "users": [
      {
        "avatar": "string",
        "deleted": true,
        "familyName": "string",
        "fullName": "string",
        "givenName": "string",
        "type": "User",
        "userId": "string"
      }
    ]
  }
]
```

- `chat` (`chat.list.response.200.chat`; object, required)
  - `chatId` (`chat.list.response.200.chat.chatId`; string, required)
  - `chatTitle` (`chat.list.response.200.chat.chatTitle`; any of, required)
    - any of the following: `string`, `null`
  - `companyName` (`chat.list.response.200.chat.companyName`; string, required)
  - `kind` (`chat.list.response.200.chat.kind`; string, required)
    - one of `"trip"`, `"direct"`
  - `lastMessageTimestamp` (`chat.list.response.200.chat.lastMessageTimestamp`; any of, required)
    - any of the following: `string`, `null`
  - `participantUserIds` (`chat.list.response.200.chat.participantUserIds`; array of string, required)
  - `suggestionsEnabled` (`chat.list.response.200.chat.suggestionsEnabled`; boolean, required)
  - `travelersTripId` (`chat.list.response.200.chat.travelersTripId`; any of, required) — The trip this chat belongs to, when it is a trip chat.
    - any of the following: `string`, `null`
  - `type` (`chat.list.response.200.chat.type`; string, required)
  - `createdAt` (`chat.list.response.200.chat.createdAt`; string, optional)
  - `updatedAt` (`chat.list.response.200.chat.updatedAt`; string, optional) — The time of the last message; absent before the first one.
- `chatUpdatedAt` (`chat.list.response.200.chatUpdatedAt`; string, required) — The time of the last message, or of the last write to the chat.
- `hasOpenOrder` (`chat.list.response.200.hasOpenOrder`; boolean, required)
- `isArchived` (`chat.list.response.200.isArchived`; boolean, required)
- `seen` (`chat.list.response.200.seen`; boolean, required) — Nothing has arrived since the caller last opened the chat.
- `title` (`chat.list.response.200.title`; any of, required) — The trip's title, or the direct chat's.
  - any of the following: `string`, `null`
- `travelersTrip` (`chat.list.response.200.travelersTrip`; any of, required) — The trip, null for a direct chat. Its destinations carry no photos unless `fields` asks for `travelersTrip.destinations.photos`.
  - any of the following:
    - `object`
      - `associatedUserIds` (`chat.list.response.200.travelersTrip.1.associatedUserIds`; array of string, required)
      - `companyName` (`chat.list.response.200.travelersTrip.1.companyName`; string, required)
      - `createdAt` (`chat.list.response.200.travelersTrip.1.createdAt`; string, required)
      - `destinations` (`chat.list.response.200.travelersTrip.1.destinations`; array of object, required)
        - `endDateTime` (`chat.list.response.200.travelersTrip.1.destinations.endDateTime`; string, required)
          - pattern: `^\d{4}-\d{2}-\d{2}$`
        - `startDateTime` (`chat.list.response.200.travelersTrip.1.destinations.startDateTime`; string, required)
          - pattern: `^\d{4}-\d{2}-\d{2}$`
        - `address` (`chat.list.response.200.travelersTrip.1.destinations.address`; any of, optional)
          - any of the following: `string`, `null`
        - `amenities` (`chat.list.response.200.travelersTrip.1.destinations.amenities`; array of string, optional)
        - `city` (`chat.list.response.200.travelersTrip.1.destinations.city`; any of, optional)
          - any of the following: `string`, `null`
        - `country` (`chat.list.response.200.travelersTrip.1.destinations.country`; string, optional)
        - `countryCode` (`chat.list.response.200.travelersTrip.1.destinations.countryCode`; string, optional)
        - `description` (`chat.list.response.200.travelersTrip.1.destinations.description`; string, optional)
        - `distanceFromSearch` (`chat.list.response.200.travelersTrip.1.destinations.distanceFromSearch`; object, optional)
          - `unit` (`chat.list.response.200.travelersTrip.1.destinations.distanceFromSearch.unit`; string, required)
            - one of `"km"`, `"mi"`
          - `value` (`chat.list.response.200.travelersTrip.1.destinations.distanceFromSearch.value`; number, required)
        - `features` (`chat.list.response.200.travelersTrip.1.destinations.features`; array of string, optional)
        - `fullAddress` (`chat.list.response.200.travelersTrip.1.destinations.fullAddress`; string, optional)
        - `gate` (`chat.list.response.200.travelersTrip.1.destinations.gate`; any of, optional)
          - any of the following: `string`, `null`
        - `iataCode` (`chat.list.response.200.travelersTrip.1.destinations.iataCode`; any of, optional)
          - any of the following: `string`, `null`
        - `internovaId` (`chat.list.response.200.travelersTrip.1.destinations.internovaId`; string, optional)
        - `latitude` (`chat.list.response.200.travelersTrip.1.destinations.latitude`; number, optional)
        - `longitude` (`chat.list.response.200.travelersTrip.1.destinations.longitude`; number, optional)
        - `name` (`chat.list.response.200.travelersTrip.1.destinations.name`; string, optional)
        - `photos` (`chat.list.response.200.travelersTrip.1.destinations.photos`; array of object, optional)
          - `name` (`chat.list.response.200.travelersTrip.1.destinations.photos.name`; string, required)
          - `key` (`chat.list.response.200.travelersTrip.1.destinations.photos.key`; string, optional)
          - `url` (`chat.list.response.200.travelersTrip.1.destinations.photos.url`; string, optional)
        - `placeId` (`chat.list.response.200.travelersTrip.1.destinations.placeId`; string, optional)
        - `region` (`chat.list.response.200.travelersTrip.1.destinations.region`; string, optional)
        - `source` (`chat.list.response.200.travelersTrip.1.destinations.source`; string, optional)
        - `state` (`chat.list.response.200.travelersTrip.1.destinations.state`; any of, optional)
          - any of the following: `string`, `null`
        - `terminal` (`chat.list.response.200.travelersTrip.1.destinations.terminal`; any of, optional)
          - any of the following: `string`, `null`
        - `timeZone` (`chat.list.response.200.travelersTrip.1.destinations.timeZone`; string, optional)
        - `zipCode` (`chat.list.response.200.travelersTrip.1.destinations.zipCode`; any of, optional)
          - any of the following: `string`, `null`
        - `headerImageUrl` (`chat.list.response.200.travelersTrip.1.destinations.headerImageUrl`; string, optional)
      - `primaryTravelerUserId` (`chat.list.response.200.travelersTrip.1.primaryTravelerUserId`; string, required)
      - `travelersTripId` (`chat.list.response.200.travelersTrip.1.travelersTripId`; string, required)
      - `tripEndDate` (`chat.list.response.200.travelersTrip.1.tripEndDate`; string, required)
      - `tripStartDate` (`chat.list.response.200.travelersTrip.1.tripStartDate`; string, required)
      - `tripTitle` (`chat.list.response.200.travelersTrip.1.tripTitle`; string, required)
      - `type` (`chat.list.response.200.travelersTrip.1.type`; string, required)
      - `updatedAt` (`chat.list.response.200.travelersTrip.1.updatedAt`; string, required)
      - `associatedChatId` (`chat.list.response.200.travelersTrip.1.associatedChatId`; any of, optional)
        - any of the following: `string`, `null`
      - `associatedTripItineraryId` (`chat.list.response.200.travelersTrip.1.associatedTripItineraryId`; any of, optional)
        - any of the following: `string`, `null`
      - `lastMessageTimestamp` (`chat.list.response.200.travelersTrip.1.lastMessageTimestamp`; any of, optional)
        - any of the following: `string`, `null`
      - `suggestionsEnabled` (`chat.list.response.200.travelersTrip.1.suggestionsEnabled`; boolean, optional)
    - `null`
- `unreadCount` (`chat.list.response.200.unreadCount`; number, required)
- `users` (`chat.list.response.200.users`; array of object, required) — The chat's participants.
  - `familyName` (`chat.list.response.200.users.familyName`; string, required)
  - `fullName` (`chat.list.response.200.users.fullName`; any of, required)
    - any of the following: `string`, `null`
  - `givenName` (`chat.list.response.200.users.givenName`; string, required)
  - `type` (`chat.list.response.200.users.type`; string, required)
  - `userId` (`chat.list.response.200.users.userId`; string, required)
  - `avatar` (`chat.list.response.200.users.avatar`; string, optional)
  - `deleted` (`chat.list.response.200.users.deleted`; boolean, optional)

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`chat.list.response.400.errorCode`; string, required)
- `errorMessage` (`chat.list.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`chat.list.response.401.errorCode`; string, required)
- `errorMessage` (`chat.list.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`chat.list.response.403.errorCode`; string, required)
- `errorMessage` (`chat.list.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Chat/chat.list/index.md
