Skip to main content
GET
/
v1
/
chats
/
{chatId}
Get chat context
curl --request GET \
  --url https://brew.new/api/v1/chats/{chatId} \
  --header 'Authorization: Bearer <token>'
{
  "chatId": "Hk2mZ8t9QbY3sW1vR0pLd",
  "title": "Spring launch campaign",
  "modelId": "claude-opus-4-1",
  "updatedAt": "2026-06-30T12:34:56.789Z",
  "messageCount": 18,
  "artifacts": [
    {
      "type": "email",
      "id": "tCYL9yyvZZ5XmR6saDR-M",
      "title": "Spring Launch — Hero",
      "imageUrl": "https://cdn.brew.new/email-preview-tCYL9yyvZZ5XmR6saDR-M.png"
    },
    {
      "type": "automation",
      "id": "au_7t2",
      "title": "Welcome series"
    }
  ],
  "triggerEventIds": [
    "te_signup"
  ],
  "recentMessages": [
    {
      "role": "user",
      "text": "Make the hero bolder and add a CTA."
    },
    {
      "role": "assistant",
      "text": "Updated the hero and added a \"Shop now\" button."
    }
  ]
}

Authorizations

Authorization
string
header
default:Bearer brew_your_api_key
required

Send your Brew API key as Authorization: Bearer brew_xxx.

Path Parameters

chatId
string
required

The Brew chat id (from the chat URL / the app).

Required string length: 1 - 64
Example:

"Hk2mZ8t9QbY3sW1vR0pLd"

Response

The chat context digest.

chatId
string
required
title
string | null
required
modelId
string | null
required
updatedAt
string | null
required
messageCount
number
required
artifacts
object[]
required
triggerEventIds
string[]
required
recentMessages
object[]
required