Trillet AI logo

Get All Conversations

Fetch all conversations associated with the authenticated user.

GEThttps://api.trillet.ai/v1/api/conversations

Headers

x-api-keystringrequired

API key used for authenticating requests to the API.

x-workspace-idstringrequired

Workspace identifier for the API.

Response Body

The response body will contain an array of the following fields:

_idstring

The unique identifier for the conversation.

userIdstring

The unique identifier for the user associated with the conversation.

pathwayIdstring

The unique identifier for the flows associated with the conversation.

agentIdstring

The unique identifier for the agent handling the conversation.

customerobject

Customer details associated with the conversation.

messagesarray

A list of messages within the conversation.

createdAtstring

The timestamp when the conversation was created.

updatedAtstring

The timestamp when the conversation was last updated.

[
  {
    "_id": "675c8e368824aa5f130b94d6",
    "userId": "674e29976b6acbac106d2651",
    "pathwayId": "674e75bbe1456b11a194f091",
    "agentId": "674e7579e1456b11a194f08b",
    "customer": {
      "name": "Test Customer Name",
      "email": "customer@example.com",
      "phone": "+123456789"
    },
    "messages": [
      {
        "direction": "outbound",
        "sent": true,
        "message": "Thank you for your feedback!",
        "status": "approved",
        "_id": "675c8e368824aa5f130b94d3",
        "createdAt": "2024-12-01T08:45:00Z",
        "updatedAt": "2024-12-01T09:00:00Z"
      }
    ],
    "createdAt": "2024-12-01T08:45:00Z",
    "updatedAt": "2024-12-01T09:00:00Z"
  }
]