---
docId: doc_1c17f6ec11fa4240ba5f4964e49b96c5
title: Get a chat
description: "Read an API chat state and full history."
api:
  group: agentes/chat
  auth: bearer
  operations:
    - operationId: getChat
      method: GET
      path: '/v1/chat/{id}'
      postmanName: Get a chat
---

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

# Get a chat

Read a chat's current state and full history. The response uses the detail format from [Get a conversation (V1)](/api-reference/conversations/v1/get).

## Example

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

```bash
curl "https://api.platic.ai/v1/chat/$CHAT_ID" \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

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

```ts
await platic.chat.get("chat_123");
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `id` | string | Unique chat ID, returned when you create or list chats. | ✓ |

## Query parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `workspace` | string | Only if the credential covers several workspaces: the chat's workspace. Required in that case | — |

## 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": 2,
    "owners": ["sales@acme.com"],
    "tags": ["prospect"],
    "creationDate": "2026-07-20T18:00:00.000Z",
    "lastUpdate": "2026-07-20T18:30:00.000Z",
    "messages": [
      {
        "id": "msg_user_01JCHAT98765432",
        "role": "user",
        "content": "Help me choose the right plan for my team.",
        "contentType": "text",
        "direction": "incoming",
        "status": "received",
        "creationDate": "2026-07-20T18:29:40.000Z"
      },
      {
        "id": "msg_assistant_01JCHAT98765433",
        "role": "assistant",
        "content": "For a team of 25 people using WhatsApp, these are the best options...",
        "contentType": "text",
        "direction": "outgoing",
        "status": "delivered",
        "creationDate": "2026-07-20T18:30:00.000Z"
      }
    ]
  }
}
```

<Collapsible summary="Response fields">

| Field | Description |
|-------|-------------|
| `id` | Unique, canonical ID of the document |
| `conversationId` | Thread ID (`chat_*`). It does not identify the contact |
| `clientId` | Contact the chat is attributed to |
| `agentId` | Main agent; a temporary delegation to a subagent does not change it |
| `canSendDirectMessage` | Always `true` in Platica internal chats |
| `workspaceId` | ID of the chat's workspace |
| `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 |
| `messageCount` | Number of messages in `messages` |
| `owners` | List of emails of the responsible users |
| `tags` | Associated tags |
| `creationDate` | Creation date, ISO 8601 |
| `lastUpdate` | Last update date, ISO 8601 |
| `messages` | Full message history of the chat, in chronological order |

</Collapsible>

<Collapsible summary="Fields of the message object">

| Field | Description |
|-------|-------------|
| `id` | Unique ID of the message |
| `role` | Sender role: `user` (the contact), `assistant` (agent/AI), `tool` (tool calls and their results) or `event` (system events, such as the start of the conversation). To display the conversation, use only `user` and `assistant` |
| `content` | Content of the message |
| `contentType` | Content type: `text`, `image`, `audio`, etc. |
| `direction` | Message direction: `incoming`, `outgoing`, or `null` when it does not apply |
| `status` | Message status: `received`, `delivered`, `read`, `failed` |
| `creationDate` | Date and time the message was created |

</Collapsible>

<Note type="tip">

Access requires the chat to belong to the workspace and the document to have `source: "api_chat"`.

</Note>

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | The `id` is not valid, or the credential covers several workspaces and `workspace` is missing or is not one of them |
| `401` | `UNAUTHENTICATED` | The credential is missing or not valid |
| `404` | `NOT_FOUND` | There is no API chat with that `id` in the workspace. A scheduled turn answers `404` until it runs |

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