---
title: "Open Chat"
method: POST
path: "/api/apps/{slug}/chat/open"
tags: ["app-agent-bindings"]
---

# Open Chat

`POST /api/apps/{slug}/chat/open`

## Request

- Base URL: `https://api.tintin-x.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tintin-x.com/api/apps/{slug}/chat/open`
- Auth: HTTP bearer

Mint a fresh `ChatConversation` against the bound agent.

Per-use semantics: every call creates a new row. The App's frontend
opens one of these on dialog-open and discards the id on close;
rolling-summary in Redis keeps token cost bounded if a single
conversation grows long.

Returns the conversation id + the bound agent id + the WS path the
iframe should connect to. The iframe presents its slug-scoped App
JWT in `?token=` — `chat_ws.py` resolves the binding and proceeds.

## Path parameters

- `slug` string, required

## Request body

- ChatOpenRequest: Body for `POST /api/apps/{slug}/chat/open`. `title` is optional; if omitted, the API stamps `"App · {slug}"`. A future revision will accept a `context_snapshot` field that gets persisted as a system-flavored message — for now the App's frontend sends it as the first user turn (the agent treats it as context).
  - `title` string, nullable

## Response `200`

Successful Response

- ChatOpenResponse: Returned to the iframe so it can connect to the chat WS. The WS endpoint is the existing `/ws/chat/{agent_id}` — the iframe JWT is accepted in `?token=` alongside user JWTs as of PR 1b.
  - `conversation_id` string, uuid, required
  - `agent_id` string, uuid, required
  - `chat_ws_path` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/tintin-x/apis/tintin-api.md) · [All operations](https://skmtc.dev/tintin-x/apis/tintin-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tintin-x/apis/tintin-api/revisions/8839a8d0a66c?raw)
