---
docId: doc_e102c59a6b904cc181ac49e912cca0d4
version: v1
versionGroup: conversations-get
title: Get a conversation
description: Get the current state and message history of one conversation.
api:
  group: conversaciones
  auth: bearer
  operations:
    - operationId: getConversation
      method: GET
      path: '/v1/conversations/{id}'
      sdk: false
      postmanName: Get a Conversation
---

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

# Get a conversation

Get a conversation's current state and messages using its unique `id`.

## Example

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

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

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `id` | string | **Unique** identifier of the conversation: the `id` field the listings return. See [How IDs work](/api-reference/conversations#how-ids-work) | ✓ |

## Query parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `workspace` | string | Look only in that workspace. Without it, every workspace of the credential is searched. A workspace the credential does not cover answers `400` | — |

## Legacy lookup (deprecated)

<Note type="warning">

Use the unique `id` to look up one thread. Lookup by phone number or `conversationId` is **deprecated** and can return several threads. If they share a `conversationId`, add `channelId` to select the channel. To get every thread for a contact, use [`GET /v1/clients/{clientId}/conversations`](/api-reference/contacts/conversations).

</Note>

| Query parameter | Type | Description | Required |
|-----------------|------|-------------|----------|
| `channelId` | string | Only for the legacy lookup: filters by channel when several conversations share the same `conversationId` | — |

## Response

```json
{
  "workspaces": [
    {
      "id": "ws_001",
      "name": "General Support",
      "conversationsCount": 1,
      "conversations": [
        {
          "id": "conv_001",
          "conversationId": "987654321098",
          "clientId": "client_123",
          "agentId": "agent_001",
          "source": null,
          "canSendDirectMessage": true,
          "workspaceId": "ws_001",
          "channelId": "channel_001",
          "contactName": "Ana",
          "phoneNumber": "1234567890",
          "topic": "General inquiry",
          "platform": "whatsapp",
          "email": null,
          "owners": [
            "support@acme.com"
          ],
          "tags": [
            "high-priority"
          ],
          "cases": {
            "open": true,
            "openCount": 1,
            "openIds": ["Es4kP9wLx2QmZ7bN1cVd"],
            "topPriority": "high",
            "oldestOpenAt": "2025-03-15T10:12:00.000Z",
            "releasedAt": null,
            "untakenCount": 1,
            "attention": true
          },
          "creationDate": "2025-03-15T10:00:00Z",
          "lastUpdate": "2025-03-15T10:15:00Z",
          "status": "active",
          "operation": "assistance",
          "messageCount": 4,
          "messages": [
            {
              "content": "Hi, I need information about your services.",
              "contentType": "text",
              "creationDate": "2025-03-15T09:58:00Z",
              "direction": "incoming",
              "files": [],
              "id": "msg_001",
              "images": [],
              "owner": {
                "id": "user_001"
              },
              "lastUpdate": "2025-03-15T09:58:00Z",
              "role": "user",
              "status": "received"
            },
            {
              "content": "Hi, how can I help you today?",
              "contentType": "text",
              "creationDate": "2025-03-15T10:00:00Z",
              "direction": "outgoing",
              "files": [],
              "id": "msg_002",
              "images": [],
              "owner": {
                "id": "agent_001"
              },
              "lastUpdate": "2025-03-15T10:00:00Z",
              "role": "assistant",
              "status": "delivered"
            },
            {
              "content": "I have a question about the product I bought.",
              "contentType": "text",
              "creationDate": "2025-03-15T10:05:00Z",
              "direction": "incoming",
              "files": [],
              "id": "msg_003",
              "images": [],
              "owner": {
                "id": "user_001"
              },
              "lastUpdate": "2025-03-15T10:05:00Z",
              "role": "user",
              "status": "received"
            },
            {
              "content": "Thanks for asking. I'll help you with that.",
              "contentType": "text",
              "creationDate": "2025-03-15T10:10:00Z",
              "direction": "outgoing",
              "files": [],
              "id": "msg_004",
              "images": [],
              "owner": {
                "id": "agent_001"
              },
              "lastUpdate": "2025-03-15T10:10:00Z",
              "role": "assistant",
              "status": "delivered"
            }
          ]
        }
      ]
    }
  ]
}
```

<Collapsible summary="Response fields">

| Field | Description |
|-------|-------------|
| `id` | Unique ID of the conversation. Use it in `GET` and `PATCH /v1/conversations/{id}` |
| `conversationId` | Chat thread ID. In the Chat API it has the format `chat_*`; it does not identify the contact |
| `clientId` | ID of the contact attributed to the conversation |
| `agentId` | ID of the main agent; a temporary delegation to a subagent does not change it |
| `source` | Internal origin when available (for example `api_chat`); can be `null` on legacy conversations |
| `canSendDirectMessage` | Can only be `false` on WhatsApp, Instagram and Messenger/Facebook; computed from the user's last message. On Platica's internal chats it is always `true` |
| `workspaceId` | ID of the workspace the conversation belongs to |
| `channelId` | ID of the communication channel |
| `contactName` | Name of the contact |
| `phoneNumber` | Contact's phone number |
| `topic` | Topic or subject of the conversation |
| `platform` | Messaging platform (`whatsapp`, `instagram`, `facebook`, `email`, `platica`, etc.) |
| `email` | On an email thread, the subject, the mailbox and the contact's email; `null` on other platforms. See [the `email` block](#the-email-block) |
| `owners` | List of the responsible users' emails |
| `tags` | Tags on the conversation |
| `cases` | Summary of its cases: how many are open, how many untaken, the highest priority, whether it needs attention and when the last one closed. See [the `cases` summary](/api-reference/cases#the-cases-summary) |
| `status` | Operating stage: `initiated`, `active`, `finished`, `spam` or `expired` |
| `operation` | Operation mode: `automatic` (the agent replies), `supervised` (a person handles it) or `assistance` (waiting for a person). See [Pause the agent](/api-reference/conversations/v1/pause) |
| `messageCount` | Number of messages in `messages` |
| `messages` | Message history available to your integration |
| `creationDate` | Creation date in ISO 8601 |
| `lastUpdate` | Last update date in ISO 8601 |

</Collapsible>

<Collapsible summary="Message object fields">

| Field | Description |
|-------|-------------|
| `id` | Unique identifier of the message |
| `content` | Message content |
| `contentType` | Content type: `text`, `image`, `audio`, etc. |
| `creationDate` | Date and time the message was created |
| `direction` | `incoming`, `outgoing` or `null` when it does not apply |
| `files` | List of files attached to the message |
| `images` | List of images attached to the message |
| `lastUpdate` | Date of the message's last update |
| `owner` | Object with minimal information about the sender. Currently includes `id` when it exists |
| `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` |
| `status` | Message status: `received`, `delivered`, `read`, `failed` |
| `email` | On email, the block with subject, sender, HTML and attachments; `null` on other platforms. See [the `email` block](#the-email-block) |

</Collapsible>

## Errors

| Status | `details.code` | When it happens |
|--------|----------------|-----------------|
| `400` | `INVALID_REQUEST` | The `channelId` query parameter is not valid. `details.issues` says which one |
| `400` | `INVALID_REQUEST` | The workspace in `?workspace=` is not authorized for your credential. `details.available` lists the allowed workspaces and `details.requested` identifies the one you sent |
| `401` | `UNAUTHENTICATED` | The credential is missing or invalid |
| `403` | `FORBIDDEN` | The credential does not have permission for conversations (`Missing <module> permission`) |
| `404` | `WORKSPACE_NOT_FOUND` | The credential does not carry any workspace |

The general error format is in [Errors](/api-reference/errors).

If no conversation matches the `id`, it returns `200` with `"workspaces": []`.

## Notes

<Note type="tip">

To change `owners` or `status`, use [Update a conversation](/api-reference/conversations/v1/update).

</Note>

### The `email` block

On an email thread (`platform: "email"`), the conversation and each message carry an `email` block. On messages, `content` is the plain text of the email.

```json
{
  "id": "Hk3pQ9wLx2QmZ7bN1cVd",
  "platform": "email",
  "email": {
    "subject": "Your quote",
    "mailbox": "sales@acme.com",
    "provider": "gmail",
    "contactEmail": "ana@example.com"
  },
  "messages": [
    {
      "id": "msg_005",
      "content": "Thanks, can you send it as a PDF?",
      "direction": "incoming",
      "role": "user",
      "email": {
        "subject": "Re: Your quote",
        "from": { "address": "ana@example.com", "name": "Ana" },
        "to": ["sales@acme.com"],
        "cc": [],
        "messageId": "<CAF1x2@mail.gmail.com>",
        "inReplyTo": "<a9b8c7@acme.com>",
        "threadId": "18c4f2a9e1b",
        "text": "Thanks, can you send it as a PDF?",
        "html": "<p>Thanks, can you send it as a PDF?</p>",
        "attachments": []
      }
    }
  ]
}
```

On the conversation:

| Field | Description |
|-------|-------------|
| `subject` | Subject of the thread, without "Re:" or "Fwd:" |
| `mailbox` | The channel's mailbox |
| `provider` | `gmail`, `outlook` or `domain` (a mailbox on your domain) |
| `contactEmail` | The contact's email |

On each message:

| Field | Description |
|-------|-------------|
| `subject` | Subject of that email |
| `from` | `{ address, name }` of the sender. `name` can be `null` |
| `to` | Recipients |
| `cc` | Copies. `[]` if none |
| `messageId`, `inReplyTo` | Email headers that link it to the previous one |
| `threadId` | Thread ID in Gmail or Outlook, or `null` |
| `text`, `html` | The email as plain text and as HTML |
| `attachments` | `{ name, type, size, url }` per attachment. `name`, `size` and `url` can be `null` |

Every field is always present; if a value is unknown it is `null`. On other platforms, `email` is `null`. To write or reply, see [Email through the API](/api-reference/channels/email).
