List all chats

Returns a paginated list of your team's chats.

GET https://chat.betterstack.com/api/v2/chats

Query parameters

team_name
string
page
integer
per_page
integer

Headers

Authorization
required string
200

Response body

{
  "data": [
    {
      "id": "12345",
      "type": "chat",
      "attributes": {
        "team_id": 123456,
        "team_name": "example-team",
        "name": "Checkout 5xx spike",
        "status": "idle",
        "message_count": 4,
        "last_message_at": "2026-09-07T10:32:18.000Z",
        "total_tokens": 15420,
        "model": "anthropic/claude-opus-5.5",
        "total_cost_usd": 0.0928,
        "created_at": "2026-09-07T10:30:00.000Z",
        "updated_at": "2026-09-07T10:32:18.000Z"
      }
    }
  ],
  "pagination": {
    "first": "https://chat.betterstack.com/api/v2/chats?page=1",
    "last": "https://chat.betterstack.com/api/v2/chats?page=3",
    "prev": null,
    "next": "https://chat.betterstack.com/api/v2/chats?page=2"
  }
}
401

Response body

{
  "errors": "Invalid authentication"
}

Response attributes

id
string
type
string
attributes.team_id
integer
attributes.team_name
string
attributes.name
string
attributes.status
string
attributes.message_count
integer
attributes.last_message_at
string or null
attributes.total_tokens
integer
attributes.model
string or null
attributes.total_cost_usd
number
attributes.created_at
string
attributes.updated_at
string
pagination.first
string
pagination.last
string
pagination.prev
string or null
pagination.next
string or null

Example cURL

Example
curl --request GET \
  --url https://chat.betterstack.com/api/v2/chats \
  --header "Authorization: Bearer $TOKEN"