GET
/
v1
/
api
/
conversations
curl --request GET \
  --url https://api.trillet.ai/v1/api/conversations \
  --header 'x-api-key: <api-key>' \
  --header 'x-workspace-id: <x-workspace-id>'
[
  {
    "_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"
  }
]

Headers

x-api-key
string
required

API key used for authenticating requests to the API.

x-workspace-id
string
required

Workspace identifier for the API.

Response Body

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

_id
string

The unique identifier for the conversation.

userId
string

The unique identifier for the user associated with the conversation.

pathwayId
string

The unique identifier for the pathway associated with the conversation.

agentId
string

The unique identifier for the agent handling the conversation.

customer
object

Customer details associated with the conversation.

messages
array

A list of messages within the conversation.

createdAt
string

The timestamp when the conversation was created.

updatedAt
string

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"
  }
]