Get a conversation

You are reading the previous version (V1) of this endpoint. Go to V2
GET /v1/conversations/{id}

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

Example

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

Path parameters

ParameterTypeDescriptionRequired
idstringUnique identifier of the conversation: the id field the listings return. See How IDs work✓

Query parameters

ParameterTypeDescriptionRequired
workspacestringLook 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)

Query parameterTypeDescriptionRequired
channelIdstringOnly for the legacy lookup: filters by channel when several conversations share the same conversationId—

Response

{
  "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"
            }
          ]
        }
      ]
    }
  ]
}
FieldDescription
idUnique ID of the conversation. Use it in GET and PATCH /v1/conversations/{id}
conversationIdChat thread ID. In the Chat API it has the format chat_*; it does not identify the contact
clientIdID of the contact attributed to the conversation
agentIdID of the main agent; a temporary delegation to a subagent does not change it
sourceInternal origin when available (for example api_chat); can be null on legacy conversations
canSendDirectMessageCan 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
workspaceIdID of the workspace the conversation belongs to
channelIdID of the communication channel
contactNameName of the contact
phoneNumberContact's phone number
topicTopic or subject of the conversation
platformMessaging platform (whatsapp, instagram, facebook, email, platica, etc.)
emailOn an email thread, the subject, the mailbox and the contact's email; null on other platforms. See the email block
ownersList of the responsible users' emails
tagsTags on the conversation
casesSummary 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
statusOperating stage: initiated, active, finished, spam or expired
operationOperation mode: automatic (the agent replies), supervised (a person handles it) or assistance (waiting for a person). See Pause the agent
messageCountNumber of messages in messages
messagesMessage history available to your integration
creationDateCreation date in ISO 8601
lastUpdateLast update date in ISO 8601
FieldDescription
idUnique identifier of the message
contentMessage content
contentTypeContent type: text, image, audio, etc.
creationDateDate and time the message was created
directionincoming, outgoing or null when it does not apply
filesList of files attached to the message
imagesList of images attached to the message
lastUpdateDate of the message's last update
ownerObject with minimal information about the sender. Currently includes id when it exists
roleSender 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
statusMessage status: received, delivered, read, failed
emailOn email, the block with subject, sender, HTML and attachments; null on other platforms. See the email block

Errors

Statusdetails.codeWhen it happens
400INVALID_REQUESTThe channelId query parameter is not valid. details.issues says which one
400INVALID_REQUESTThe workspace in ?workspace= is not authorized for your credential. details.available lists the allowed workspaces and details.requested identifies the one you sent
401UNAUTHENTICATEDThe credential is missing or invalid
403FORBIDDENThe credential does not have permission for conversations (Missing <module> permission)
404WORKSPACE_NOT_FOUNDThe credential does not carry any workspace

The general error format is in Errors.

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

Notes

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.

{
  "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:

FieldDescription
subjectSubject of the thread, without "Re:" or "Fwd:"
mailboxThe channel's mailbox
providergmail, outlook or domain (a mailbox on your domain)
contactEmailThe contact's email

On each message:

FieldDescription
subjectSubject of that email
from{ address, name } of the sender. name can be null
toRecipients
ccCopies. [] if none
messageId, inReplyToEmail headers that link it to the previous one
threadIdThread ID in Gmail or Outlook, or null
text, htmlThe 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.