Skip to main content
GET
https://api.agent-mind.com
/
api
/
v1
/
agent
/
conversations
List Conversations
curl --request GET \
  --url https://api.agent-mind.com/api/v1/agent/conversations \
  --header 'Authorization: Bearer <token>'

Overview

Retrieve a list of recent conversations created through the Agent API. Optionally filter by session_id if you’ve tagged conversations for grouping.

Query Parameters

limit
integer
default:"20"
Maximum number of conversations to return. Default is 20.
session_id
string
Filter conversations by session ID. Only returns conversations tagged with this session_id.

Response

{
  "conversations": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "title": "Python web scraping discussion",
      "created_at": "2024-03-20T10:30:00Z",
      "updated_at": "2024-03-20T11:45:00Z",
      "message_count": 8,
      "session_id": "support_session_123"
    },
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "title": "API integration help",
      "created_at": "2024-03-19T15:00:00Z",
      "updated_at": "2024-03-19T16:30:00Z",
      "message_count": 12,
      "session_id": null
    }
  ],
  "count": 2
}

Examples

List Recent Conversations

import requests

url = "https://api.leedab.com/api/v1/agent/conversations"
headers = {
    "Authorization": "Bearer am_live_your_api_key"
}
params = {
    "limit": 10
}

response = requests.get(url, headers=headers, params=params)
data = response.json()

for conv in data["conversations"]:
    print(f"{conv['title']} - {conv['message_count']} messages")

Filter by Session

params = {
    "session_id": "support_session_123",
    "limit": 20
}

response = requests.get(url, headers=headers, params=params)

Error Responses

401 Unauthorized

{
  "detail": "Invalid or missing API key"
}