Create a chat

Creates a new chat and starts the first agent turn on your message. The request returns as soon as the message is saved. Poll the chat status until it leaves processing, then get the chat to read the answer.

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

Headers

Authorization
required string
Content-Type
required string

Body parameters

team_name
string
message
required string
name
string
201

Response body

{
  "data": {
    "id": "12345",
    "type": "chat",
    "attributes": {
      "team_id": 123456,
      "team_name": "example-team",
      "name": "Checkout 5xx spike",
      "status": "processing",
      "message_count": 2,
      "last_message_at": "2026-09-07T10:30:00.000Z",
      "total_tokens": 0,
      "created_at": "2026-09-07T10:30:00.000Z",
      "updated_at": "2026-09-07T10:30:00.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": null,
          "artifacts": [],
          "created_at": "2026-09-07T10:30:00.000Z",
          "user": null
        }
      ],
      "pending_confirmations": []
    }
  }
}
401

Response body

{
  "errors": "Invalid authentication"
}
403

Response body

{
  "errors": "AI SRE is not available on this plan."
}
422

Response body

{
  "errors": "Sorry, you are missing some required attributes",
  "required_attributes": [
    "message"
  ]
}
422

Response body

{
  "errors": "Sorry, some values are incorrect",
  "invalid_values": {
    "message": "can't be blank"
  }
}

Example cURL

Example
curl --request POST \
  --url https://chat.betterstack.com/api/v2/chats \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "message": "Why did checkout start returning 5xx at 10:15?",
    "name": "Checkout 5xx spike"
  }'