---
docId: doc_9402272417b9452b82dea535bc3850cb
title: List chats
description: "List API-created workspace chats with filters and pagination."
api:
  group: agentes/chat
  auth: bearer
  operations:
    - operationId: listChats
      method: GET
      path: /v1/chat
      postmanName: List chats
---

<script>
  import { Ways, Note, Collapsible } from '$lib/components';
</script>

# List chats

Read workspace chats with `source: "api_chat"`, regardless of who created them. Each includes the summary from [List conversations (V1)](/api-reference/conversations/v1/list), without `messages`.

Chats come in a single list, newest first by `lastUpdate`, in pages: to get the next one, send the response's `nextPageToken` as `pageToken`.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl "https://api.platic.ai/v1/chat?clientId=$CLIENT_ID&limit=20" \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.chat.list({ clientId: "client_123" });
```

</Ways.Way>
</Ways>

The next page, with the same filters:

```bash
curl "https://api.platic.ai/v1/chat?clientId=$CLIENT_ID&limit=20&pageToken=$NEXT_PAGE_TOKEN" \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

## Query parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `clientId` | string | Filters the chats attributed to a specific contact | — |
| `agentId` | string | Filters by the chat's main agent | — |
| `limit` | integer | Chats per page. Maximum: `200`. Default: `50` | — |
| `pageToken` | string | The previous page's `nextPageToken`. It stops working if you change `clientId`, `agentId`, `limit` or `workspace` | — |
| `workspace` | string | Only if the credential covers several workspaces: the workspace you read. Required in that case | — |

<Note type="note">

With `agentId`, a page can have fewer chats than `limit`, or none, and still have a `nextPageToken`. Keep requesting pages until `nextPageToken` is `null`.

</Note>

## Response

```json
{
  "status": "success",
  "data": [
    {
      "id": "conversation_doc_01JCHAT",
      "conversationId": "chat_01JCHAT23456789",
      "clientId": "client_123",
      "agentId": "agent_01JABCDEF23456789",
      "canSendDirectMessage": true,
      "workspaceId": "ws_001",
      "channelId": "workspace-ws_001-agent-agent_01JABCDEF23456789",
      "contactName": "Ana López",
      "phoneNumber": "5215512345678",
      "topic": "Plan selection",
      "platform": "platica",
      "source": "api_chat",
      "status": "active",
      "operation": "automatic",
      "messageCount": 4,
      "owners": ["sales@acme.com"],
      "tags": ["prospect"],
      "creationDate": "2026-07-20T18:00:00.000Z",
      "lastUpdate": "2026-07-20T18:30:00.000Z"
    }
  ],
  "nextPageToken": "eyJ2IjoxLCJxIjoiYTFi..."
}
```

`data` has the chats of this page and `nextPageToken` the token for the next one (`null` on the last page).

<Collapsible summary="Fields of each chat">

| Field | Description |
|-------|-------------|
| `id` | Unique, canonical ID of the document. Use it in [`GET /v1/chat/{id}`](/api-reference/chat/get) and in the Conversations endpoints |
| `conversationId` | Thread ID (`chat_*`). Every new Chat API request generates a different one; use it to continue with `POST /v1/chat`. It is not a contact ID |
| `clientId` | Contact the chat is attributed to |
| `agentId` | Main agent of the chat; it does not change when it temporarily delegates to a subagent |
| `canSendDirectMessage` | Always `true` in Platica internal chats |
| `workspaceId` | ID of the workspace the chat belongs to |
| `channelId` | ID of the internal channel |
| `contactName` | Name of the contact |
| `phoneNumber` | The contact's phone number, when there is one |
| `topic` | Topic or subject of the chat |
| `platform` | Platform; for these chats it is `platica` |
| `source` | Always `api_chat` |
| `status` | Chat state: `active`, `finished` or `expired` |
| `operation` | Operation mode of the chat |
| `messageCount` | Messages stored in the chat; the list does not include `messages`. It can be higher than the count in [Get a chat](/api-reference/chat/get), which does not count empty messages |
| `owners` | List of emails of the responsible users |
| `tags` | Associated tags |
| `creationDate` | Creation date, ISO 8601 |
| `lastUpdate` | Last update date, ISO 8601 |

</Collapsible>

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | A parameter is not valid, the `pageToken` is not from this query, or the credential covers several workspaces and `workspace` is missing or is not one of them (`details.available` lists the valid ones) |
| `401` | `UNAUTHENTICATED` | The credential is missing or not valid |

See [Errors](/api-reference/errors) for the full shape of an error.

<Note type="tip">

To read threads from all channels, use [List conversations](/api-reference/conversations/list).

</Note>
