Skip to main content
Returns a paginated list of chat conversations, sorted by most recent activity. Results are returned 20 per page.
Authorization
string
required
Bearer token obtained from the authenticate endpoint.
page
integer
default:"1"
Page number (1-based). Values less than 1 are treated as 1.

Response

chats
array
required
List of chat conversations for the requested page.
total
integer
required
Total number of chats across all pages.
page
integer
required
Current page number.
page_size
integer
required
Number of chats per page (currently 20).
has_more
boolean
required
Whether additional pages exist beyond the current page.
curl -X GET "https://api.trellis.sh/v1/chats?page=1" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "chats": [
    {
      "id": "chat_abc123",
      "title": "Revenue Analysis",
      "preview": "Show me the monthly revenue trends...",
      "timestamp": "2025-01-11T14:30:00Z",
      "metadata": {
        "source_type": "database"
      }
    },
    {
      "id": "chat_def456",
      "title": "Customer Insights",
      "preview": "Which customers have the highest...",
      "timestamp": "2025-01-10T10:15:00Z",
      "metadata": {
        "source_type": "database"
      }
    }
  ],
  "total": 25,
  "page": 1,
  "page_size": 20,
  "has_more": true
}