Conversations
Generated from api/openapi.yaml (OpenAPI 3.1). Base URL: https://api.teemli.com. Auth: Authorization: Bearer <token or tml_ API key>. Errors are application/problem+json; writes accept an Idempotency-Key header.
Conversations, messages, turns and steps
My conversations
Section titled “My conversations”GET /v1/orgs/{org}/conversationsThe caller’s conversations, most recently active first.
API keys: needs the agents:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
agent_id |
query | string (uuid) | |
kind |
query | ConversationKind | |
state |
query | active, needs_you, done, failed, stopped, all |
Task segment: active (working or waiting), needs_you (an open card for me), done, failed (couldn’t finish), stopped, all |
limit |
query | integer | Page size. |
cursor |
query | string | Opaque cursor from a previous page’s next_cursor. |
Responses
200A page of conversations — ConversationPage400Malformed request (e.g. invalid cursor or filter) — Problem401Missing, invalid or expired token — Problem
Open the main thread with an agent, or start a task
Section titled “Open the main thread with an agent, or start a task”POST /v1/orgs/{org}/conversationskind: person_agent returns the caller’s main thread with the agent (created if
missing; 200, or 202 when text is posted). kind: task creates a task conversation
(201) and requires text. When text is given, it is posted as the first message and
a turn starts (stream over /v1/ws).
API keys: needs the agents:run scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
agent_id (required) |
string (uuid) | |
kind |
person_agent, task |
|
title |
string | |
text |
string |
Responses
200Existing or new main thread (no message posted) — ConversationCreated201Task created (first message posted) — ConversationCreated202Main thread with a message posted — ConversationCreated401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem422Invalid input — Problem
One conversation
Section titled “One conversation”GET /v1/orgs/{org}/conversations/{conversation}API keys: needs the agents:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
conversation (required) |
path | string (uuid) |
Responses
200The conversation, with its current turn — Conversation401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Rename a conversation or task
Section titled “Rename a conversation or task”PATCH /v1/orgs/{org}/conversations/{conversation}API keys: needs the agents:write scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
conversation (required) |
path | string (uuid) |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
title |
string |
Responses
200Updated — Conversation401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Messages
Section titled “Messages”GET /v1/orgs/{org}/conversations/{conversation}/messagesPerson, agent and system messages. Agent messages carry turn_id and meta
(model, interim: true for text written alongside tool calls, interrupted: true for
partial text cut off by a new message, greeting: true). System messages explain
failures and setup changes (meta.error, meta.card_id).
API keys: needs the agents:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
conversation (required) |
path | string (uuid) | |
order |
query | desc, asc |
desc = newest first (load the latest page and scroll back) |
limit |
query | integer | Page size. |
cursor |
query | string | Opaque cursor from a previous page’s next_cursor. |
Responses
200A page of messages — MessagePage401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Send a message
Section titled “Send a message”POST /v1/orgs/{org}/conversations/{conversation}/messagesSaved, then published to Kafka (message.created). The worker starts a turn,
interrupting one that is running (it keeps the partial text) or waiting (its open
cards become superseded). Returns 202; the reply streams over /v1/ws.
A message starting with /skill-name invokes that skill. Max 32,000 characters.
Files (G1): upload first (POST …/files), then send file_ids (up to 10; text may be empty). Images and
PDFs are given to the model (the latest three messages with attachments); every file is also put on the
agent’s computer at ~/Uploads/<name>. The message’s files lists them.
API keys: needs the agents:run scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
conversation (required) |
path | string (uuid) |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
text |
string | Required (non-empty) unless file_ids are given |
file_ids |
array of string (uuid) |
Responses
202Accepted — object401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem409Conflicting state (card already answered, duplicate in flight, name taken) — Problem422Invalid input — Problem
Turns (newest first)
Section titled “Turns (newest first)”GET /v1/orgs/{org}/conversations/{conversation}/turnsFor turn footers (“Worked for 1m 12s · $0.04 · Sonnet 5.5”) and status chips.
API keys: needs the agents:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
conversation (required) |
path | string (uuid) | |
limit |
query | integer | Page size. |
cursor |
query | string | Opaque cursor from a previous page’s next_cursor. |
Responses
200A page of turns — TurnPage401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Attach a file (G1)
Section titled “Attach a file (G1)”POST /v1/orgs/{org}/conversations/{conversation}/filesRaw body (≤ 25 MB), Content-Type = the file’s type. Only the person in the conversation. kind: image
(png/jpeg/gif/webp ≤ 5 MB) and pdf (≤ 20 MB) are read by the model; file goes to the computer only. Send it
with POST …/messages {file_ids}.
API keys: needs the agents:run scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
conversation (required) |
path | string (uuid) | |
name (required) |
query | string |
Request body: application/octet-stream.
Responses
201Uploaded — ConversationFile401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem422Invalid input — Problem
Download an attached file (images and PDFs inline, others as attachments)
Section titled “Download an attached file (images and PDFs inline, others as attachments)”GET /v1/orgs/{org}/conversations/{conversation}/files/{file}/contentAPI keys: needs the agents:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
conversation (required) |
path | string (uuid) | |
file (required) |
path | string (uuid) |
Responses
200The bytes401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Stop the running or waiting turn
Section titled “Stop the running or waiting turn”POST /v1/orgs/{org}/conversations/{conversation}/stopThe turn ends as stopped (what already ran is kept); open cards become superseded.
API keys: needs the agents:run scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
conversation (required) |
path | string (uuid) |
Responses
202Accepted; the worker acts on it (watch/v1/ws) — object401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Retry (run a new turn over the conversation as it is)
Section titled “Retry (run a new turn over the conversation as it is)”POST /v1/orgs/{org}/conversations/{conversation}/retryAPI keys: needs the agents:run scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
conversation (required) |
path | string (uuid) |
Responses
202Accepted; the worker acts on it (watch/v1/ws) — object401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
One turn
Section titled “One turn”GET /v1/orgs/{org}/turns/{turn}API keys: needs the agents:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
turn (required) |
path | string (uuid) |
Responses
200The turn — Turn401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Steps of a turn (in order)
Section titled “Steps of a turn (in order)”GET /v1/orgs/{org}/turns/{turn}/stepsThe step timeline (“Worked for 2m · 14 steps ›”) and the work panel’s Steps tab.
API keys: needs the agents:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
turn (required) |
path | string (uuid) | |
limit |
query | integer | Page size. |
cursor |
query | string | Opaque cursor from a previous page’s next_cursor. |
Responses
200A page of steps — StepPage401Missing, invalid or expired token — Problem