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

# Chat

> Start and continue Strix chat sessions programmatically

export const ScarfPixel = () => <img referrerPolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=831669b6-b4bd-42cb-8832-2122c03e1d5f" alt="" width="1" height="1" style={{
  position: "absolute",
  width: 0,
  height: 0,
  opacity: 0,
  pointerEvents: "none"
}} />;

<ScarfPixel />

Chat lets you converse with a Strix agent, optionally grounded in repositories and attached files. Chat requires an enterprise plan.

## List chats

```bash theme={null}
curl -X GET "https://app.strix.ai/api/v1/chat?limit=20" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>"
```

**Required scope:** `chat:read`

## Start a chat

```bash theme={null}
curl -X POST "https://app.strix.ai/api/v1/chat" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Review the auth flow in my-org/my-repo for IDOR risks",
    "repos": [{"repoId": "<REPO_ID>", "branch": "main"}]
  }'
```

To attach files, send `multipart/form-data` instead of JSON, with the same fields plus file parts.

**Required scope:** `chat:write`

## Get a chat

```bash theme={null}
curl -X GET "https://app.strix.ai/api/v1/chat/<CHAT_ID>" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>"
```

**Required scope:** `chat:read`

## Send a message

```bash theme={null}
curl -X POST "https://app.strix.ai/api/v1/chat/<CHAT_ID>/message" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"message": "Now check the password reset endpoint"}'
```

Set `"cancel_current": true` to interrupt an in-flight agent turn before sending.

**Required scope:** `chat:write`

## Create a share link

```bash theme={null}
curl -X POST "https://app.strix.ai/api/v1/chat/<CHAT_ID>/share" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>"
```

**Required scope:** `chat:write`
