Get a single chat

Retrieves a specific chat by its ID, including its full transcript and any pending confirmations.

GET https://chat.betterstack.com/api/v2/chats/{id}

URL parameters

id
required string

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": 2,
      "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",
      "messages": [
        {
          "id": 9001,
          "message_type": "user",
          "text": "Why did checkout start returning 5xx at 10:15?",
          "artifacts": [],
          "created_at": "2026-09-07T10:30:00.000Z",
          "user": null
        },
        {
          "id": 9002,
          "message_type": "ai",
          "text": "The 5xx responses come from checkout-api pods restarting after the 10:12 deploy of v2.4.0. The new version fails its readiness probe because PAYMENTS_URL is unset. Set it in the deployment manifest and roll out again.",
          "artifacts": [
            {
              "type": "report",
              "title": "Checkout 5xx investigation",
              "content": "Summary: the deploy of v2.4.0 at 10:12 dropped the PAYMENTS_URL variable from the checkout-api deployment. Pods fail their readiness probe and restart in a loop. Setting the variable and rolling out again restores checkout."
            }
          ],
          "created_at": "2026-09-07T10:32:18.000Z",
          "user": null
        }
      ],
      "pending_confirmations": []
    }
  }
}
401

Response body

{
  "errors": "Invalid authentication"
}
404

Response body

{
  "errors": "Resource with the provided ID was not found"
}

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
attributes.messages
array
attributes.messages[].id
integer
attributes.messages[].message_type
string
attributes.messages[].text
string or null
attributes.messages[].artifacts
array
attributes.messages[].artifacts[].type
string
attributes.messages[].artifacts[].title
string
attributes.messages[].artifacts[].content
string
attributes.messages[].artifacts[].name
string
attributes.messages[].artifacts[].url
string
attributes.messages[].artifacts[].size
integer
attributes.messages[].artifacts[].content_type
string
attributes.messages[].artifacts[].id
integer
attributes.messages[].artifacts[].error_type
string
attributes.messages[].artifacts[].error_message
string
attributes.messages[].artifacts[].source_id
integer
attributes.messages[].artifacts[].pattern
string
attributes.messages[].artifacts[].resource_type
string
attributes.messages[].artifacts[].dt
string
attributes.messages[].artifacts[].trace_id
string
attributes.messages[].artifacts[].span_id
string
attributes.messages[].artifacts[].configuration_name
string
attributes.messages[].artifacts[].source_ids
string
attributes.messages[].artifacts[].query
string
attributes.messages[].artifacts[].from
string
attributes.messages[].artifacts[].to
string
attributes.messages[].artifacts[].range
string
attributes.messages[].created_at
string
attributes.messages[].user
object or null
attributes.messages[].user.better_stack_id
integer
attributes.messages[].user.name
string
attributes.pending_confirmations
array
attributes.pending_confirmations[].id
integer
attributes.pending_confirmations[].tool_name
string
attributes.pending_confirmations[].tool_input
object
attributes.pending_confirmations[].status
string
attributes.pending_confirmations[].resolution_note
string or null
attributes.pending_confirmations[].expires_at
string
attributes.pending_confirmations[].confirmed_at
string or null
attributes.pending_confirmations[].created_at
string

Example cURL

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