> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squasher.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat

> Persist shared investigation threads across the dashboard, CLI, Slack, API, and MCP Code Mode.

Project chat threads are team-visible by default. Use them to carry an investigation between the web chat page, `squasher ask`, Slack bot responses, API clients, and MCP Code Mode.

## Threads

```bash theme={null}
GET /v1/projects/{project_id}/threads
GET /v1/projects/{project_id}/threads?incident_id=INC-123
POST /v1/projects/{project_id}/threads
GET /v1/projects/{project_id}/threads/search?q=checkout
GET /v1/projects/{project_id}/threads/{thread_id}
POST /v1/projects/{project_id}/threads/{thread_id}/archive
POST /v1/projects/{project_id}/threads/{thread_id}/unarchive
DELETE /v1/projects/{project_id}/threads/{thread_id}
```

Thread records include `source`, `created_by`, `external_thread_id`, `archived_at`, `last_message_at`, `model_id`, and the canonical incident UUID in `incident_id` when the conversation belongs to an incident. The list filter accepts either that UUID or the incident's user-facing display ID.

Incident triage and fix runs share this durable thread. Messages posted in an incident's Slack war room are written to the same record, so the dashboard, API, CLI, and MCP Code Mode can continue with the full context.

## Messages

```bash theme={null}
GET /v1/projects/{project_id}/threads/{thread_id}/messages
POST /v1/projects/{project_id}/threads/{thread_id}/messages
```

Message records include a stable message id, append-only `sequence`, role, source, text, external message id, and author metadata. Human messages can carry `author_name`, `author_image`, and an authenticated user id. Assistant and system messages are attributed to Squasher.

Responses are ordered by `sequence`, not client timestamps. Replaying the same
message id, or the same source plus external message id, is idempotent. This
lets web, Slack, API, CLI, and MCP append concurrently without one surface
overwriting another surface's messages.

## Ask

```bash theme={null}
POST /v1/projects/{project_id}/ask
POST /v1/projects/{project_id}/ask/stream
```

`ask` creates or continues a shared thread and stores the question as a user message. Pass `thread_id` to continue an existing investigation.

Use `/ask/stream` for terminal-style interactive answers. It returns `text/plain` chunks as the assistant responds, then persists the assistant message back to the same thread.
