---
title: "Open a new chat session with an agent"
method: POST
path: "/agents/{agentId}/conversations"
tags: ["Messages"]
---

# Open a new chat session with an agent

`POST /agents/{agentId}/conversations`

## Request

- Base URL: `https://api.atako.ai`
- URL: `https://api.atako.ai/agents/{agentId}/conversations`
- Auth: HTTP bearer

The session gets its own engine-side key (`chat:<id>`), so its context is isolated from every other session of the same agent.

## Path parameters

- `agentId` string, required

## Request body

- object
  - `title` string, nullable
  - `meta` object, nullable

## Response `201`

- Conversation: One chat session between the caller and an agent. A user may hold several; see docs/specs/agent-sessions.md.
  - `id` string, uuid, required
  - `agentId` string, uuid, required
  - `key` string, required: Opaque engine-side key of this thread — the bare user id for the historical thread, `chat:<conversationId>` for every session created since. Read-only.
  - `title` string, nullable, required: Derived from the first user message when not set explicitly.
  - `meta` object: Free-form per-session payload.
  - `archived` boolean, required
  - `unreadCount` integer, required: Agent messages newer than this session's read cursor.
  - `lastReadAt` string, date-time, nullable
  - `lastMessageAt` string, date-time, nullable
  - `createdAt` string, date-time, required

## Other responses

- `400`: Validation failed
- `401`: Missing, malformed, or invalid bearer token / API key, or revoked session (SESSION_REVOKED).
- `404`: Not found, or the caller is not authorized to access this resource.

---

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