# History

> Chats imported from other assistants (private to the person): 3 endpoints of the Teemli API.

Source: https://docs.teemli.com/developers/reference/history/

Generated from [`api/openapi.yaml`](/developers/api/) (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.

Chats imported from other assistants (private to the person)

## My imported chats (newest first; search with `q`)

```http
GET /v1/orgs/{org}/history
```

**API keys:** needs the `history:read` scope.

| Parameter | In | Type | Description |
|---|---|---|---|
| `org` (required) | path | string (uuid) | The caller's organisation id. |
| `q` | query | string | Words in the title or any message (prefix match) |
| `source` | query | `chatgpt`, `claude`, `grok`, `other` |  |
| `limit` | query | integer | Page size. |
| `cursor` | query | string | Opaque cursor from a previous page's `next_cursor`. |

**Responses**

- `200` A page — object
- `401` Missing, invalid or expired token — Problem

## One imported chat with its messages

```http
GET /v1/orgs/{org}/history/{id}
```

**API keys:** needs the `history:read` scope.

| Parameter | In | Type | Description |
|---|---|---|---|
| `org` (required) | path | string (uuid) | The caller's organisation id. |
| `id` (required) | path | string (uuid) |  |

**Responses**

- `200` The chat — HistoryConversation & object
- `404` Not found (also returned for rows the caller may not see, and for disabled features) — Problem

## Delete an imported chat

```http
DELETE /v1/orgs/{org}/history/{id}
```

**API keys:** needs the `history:write` scope.

| Parameter | In | Type | Description |
|---|---|---|---|
| `org` (required) | path | string (uuid) | The caller's organisation id. |
| `id` (required) | path | string (uuid) |  |

**Responses**

- `204` Deleted
- `404` Not found (also returned for rows the caller may not see, and for disabled features) — Problem
