---
title: "Chats"
description: "The chats endpoints of the HTTP API."
---

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

# Chats

## GET /chats

List your chats, pinned ones first and then the one most recently asked in, or everyone's for an Admin.

A chat is the run of requests one person sent about one thing, started by `POST /observe`; its owner and Admins read it, and nobody else sees it. With `scope=mine`, the default, only the caller's chats are listed; `scope=all` lists every person's chats and needs the Admin role, anyone else gets 403. `owner` names who started each chat, and `read_only` is true on a chat the caller reads only as an Admin. Your own chats come pinned first, each group ordered by its last turn, newest first, and `next_cursor` keeps that order across pages; everyone's chats are ordered by their last turn only. Every list is recorded in the audit trail as one `chat.list` with `scope` (`mine` or `all`) in its data, never one event per chat, once per caller and scope in 10 minutes. `dashboard_id` and `observation_id` keep the chats about that dashboard or observation, `pinned` keeps only pinned or only unpinned chats, and `q` matches the title and every prompt case-insensitively. Archived chats are left out. `title` is the one you gave the first request, else the first line of its prompt cut at a word to 60 characters.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `scope` | query | `"mine"`, `"all"` | Default `"mine"`. |
| `q` | query | `string` |   |
| `pinned` | query | `boolean` |   |
| `dashboard_id` | query | `string` (uuid) |   |
| `observation_id` | query | `string` (uuid) |   |
| `limit` | query | `integer` | Between 1 and 50. Default `20`. |
| `cursor` | query | `string` |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | One page of your chats. | [`ChatList`](/docs/reference/api/schemas/#chatlist) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## GET /chats/{id}

Read one of your chats, or as an Admin anyone's, with every turn, oldest first.

Each turn is the agent request it started, as `GET /observe/{id}` returns it without progress steps. An Admin reads another person's chat in full and read only: `read_only` is true and no turn has `allowed_actions`. A chat of someone else's for anyone but an Admin, an archived chat or an unknown id answers 404. Every read of a chat, its owner's included, is recorded in the audit trail as one `chat.view` with the chat as its target and the owner's id as `owner_id`, never one event per turn, once per reader and chat in 10 minutes; a refused read is recorded every time.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | The chat and its turns. | [`ChatDetail`](/docs/reference/api/schemas/#chatdetail) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## DELETE /chats/{id}

Archive one of your chats and every turn in it, so they leave your lists.

Only the chat's owner may archive it; an Admin who can read the chat gets 403 `chat_read_only`, anyone else gets 404, and nothing changes. The web app calls this action Delete; the rows are kept and marked archived, so `observe chats archive` and the audit trail's `chat.archive` event both name this archive. Its turns stay readable through `GET /observe/{id}`, and dashboards, versions and observations they made are kept. A new request with this `chat_id` answers 404 afterwards.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `204` | The chat is archived; nothing is returned. |   |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new).
