Trillet AI logo

Get Conversations By Flow ID

List the conversations for one message flow.

GEThttps://api.trillet.ai/v1/api/conversations/flow/{flowId}

Headers

x-workspace-idstringrequired

Workspace identifier for the API.

Path Parameters

flowIdstringrequired

The message flow's _id. The flow must be in this workspace.

Response

An array of conversations (empty if the flow has none). Each conversation has these fields:

_idstring

The conversation's unique identifier.

workspaceIdstring

The workspace the conversation belongs to.

pathwayIdstring

The message flow the conversation belongs to. Absent for an inbound SMS that arrived on a number with no message flow.

agentIdstring

The message flow agent handling the conversation. Absent in the same case as pathwayId.

sessionIdstring

Internal session identifier for the conversation.

senderstring

The sender identifier for the conversation, when set.

customerobject

The customer in the conversation.

messagesarray

The messages in the conversation, oldest first.

statusstring

open or completed.

completedAtstring

When the conversation was completed, if it has been.

lastActivitystring

When the conversation last had activity, when tracked.

createdAtstring

When the conversation was created.

updatedAtstring

When the conversation was last updated.

Errors

StatusBodyWhen
400{"error": "Workspace ID is required"}No x-workspace-id
500{"error": "..."}Unexpected server error
[
  {
    "_id": "b9b9b9b9b9b9b9b9b9b9b9b9",
    "workspaceId": "b4b4b4b4b4b4b4b4b4b4b4b4",
    "pathwayId": "b7b7b7b7b7b7b7b7b7b7b7b7",
    "agentId": "b6b6b6b6b6b6b6b6b6b6b6b6",
    "sessionId": "b6b6b6b6b6b6b6b6b6b6b6b6:+14155550123",
    "customer": {
      "name": "Sam",
      "email": "Unknown",
      "phone": "+14155550123"
    },
    "messages": [
      {
        "_id": "b8b8b8b8b8b8b8b8b8b8b8b8",
        "direction": "outbound",
        "sent": true,
        "message": "Hi Sam, your appointment is confirmed for tomorrow at 3 PM.",
        "status": "auto-approved",
        "additional_kwargs": {},
        "createdAt": "2026-10-01T08:45:00.000Z",
        "updatedAt": "2026-10-01T08:45:00.000Z"
      },
      {
        "_id": "c0c0c0c0c0c0c0c0c0c0c0c0",
        "direction": "inbound",
        "sent": true,
        "message": "Thanks, see you then!",
        "status": "received",
        "additional_kwargs": {},
        "createdAt": "2026-10-01T08:55:00.000Z",
        "updatedAt": "2026-10-01T08:55:00.000Z"
      }
    ],
    "status": "open",
    "createdAt": "2026-10-01T08:45:00.000Z",
    "updatedAt": "2026-10-01T08:55:00.000Z"
  }
]

Last updated on