---
title: "Get chat context"
method: GET
path: "/v1/chats/{chatId}"
tags: ["Chats"]
---

# Get chat context

`GET /v1/chats/{chatId}`

Read a brand-scoped digest of a Brew chat for resuming the conversation in an external agent: the emails + automations it created/referenced (latest version, with preview), the trigger events it touched, and a trimmed tail of the transcript. Read-only and free. `404 CHAT_NOT_FOUND` for an unknown id OR a chat owned by a different brand (the two are indistinguishable).

## Path parameters

- `chatId` string, required — The Brew chat id (from the chat URL / the app).

## Response `200`

The chat context digest.

- object
  - `chatId` string, required
  - `title` string, nullable, required
  - `modelId` string, nullable, required
  - `updatedAt` string, nullable, required
  - `messageCount` number, required
  - `artifacts` object[], required
    - `type` 'email' | 'automation', required
    - `id` string, required
    - `title` string, required
    - `imageUrl` string
  - `triggerEventIds` string[], required
  - `recentMessages` object[], required
    - `role` 'user' | 'assistant' | 'system', required
    - `text` string, required

## Other responses

- `401` — The API key was missing, invalid, or revoked.
- `403` — The caller does not have the required `emails` permission.
- `404` — Chat not found in the API-key brand. Cross-brand ids intentionally surface as 404 (never 403) so the API does not leak cross-brand existence.
- `429` — The request hit the rolling rate limit window.
- `500` — Unexpected internal error.

---

[API](https://skmtc.net/brew/apis/brew-public-api-v1.md) · [All operations](https://skmtc.net/brew/apis/brew-public-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/brew/brew-public-api-v1/versions/db96cfedc6c5/schema)
