> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snorbe.deskrex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Turns

> Retrieve turn history with cursor-based pagination

# List Turns

Returns turns for the workspace associated with your API key, ordered newest first. Each turn includes the linked AgentRun information.

## Request

```
GET /api/v1/turn/list
```

### Headers

| Header          | Required | Description                           |
| --------------- | -------- | ------------------------------------- |
| `Authorization` | Yes      | API key in `Bearer snorbe_...` format |

### Query Parameters

| Parameter | Type      | Required | Default | Description                     |
| --------- | --------- | -------- | ------- | ------------------------------- |
| `limit`   | `integer` | No       | `10`    | Items per page (1–50)           |
| `cursor`  | `string`  | No       | -       | `nextCursor` from previous page |

<Note>
  The workspace is automatically resolved from your API key. No parameters required.
</Note>

## Response

```json theme={null}
{
  "turns": [
    {
      "id": "clxxx001",
      "kind": "user",
      "content": "Research the latest AI trends",
      "agentRunId": null,
      "createdAt": "2026-04-16T10:30:00.000Z",
      "agentRun": null
    },
    {
      "id": "clxxx002",
      "kind": "assistant",
      "content": "Here are the research findings...",
      "agentRunId": "clyyy001",
      "createdAt": "2026-04-16T10:30:05.000Z",
      "agentRun": {
        "id": "clyyy001",
        "status": "completed",
        "process": [],
        "agent": { "id": "clzzz001", "name": "agent" },
        "images": [
          {
            "imageUrl": "https://example.com/photo-1.jpg",
            "thumbnailUrl": "https://example.com/thumb-1.jpg",
            "title": "Lithium-ion battery diagram",
            "link": "https://example.com/article-1"
          }
        ]
      }
    }
  ],
  "nextCursor": "clxxx003"
}
```

### Response Fields

| Field                                    | Type                  | Description                                                                                                                                        |
| ---------------------------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `turns`                                  | `object[]`            | Turn array (newest first)                                                                                                                          |
| `turns[].id`                             | `string`              | Turn ID                                                                                                                                            |
| `turns[].kind`                           | `string`              | `user`, `assistant`, `error`                                                                                                                       |
| `turns[].content`                        | `string`              | Turn content                                                                                                                                       |
| `turns[].agentRunId`                     | `string \| null`      | Linked AgentRun ID                                                                                                                                 |
| `turns[].agentRun`                       | `object \| null`      | AgentRun details                                                                                                                                   |
| `turns[].agentRun.status`                | `string`              | `running`, `completed`, `failed`, etc.                                                                                                             |
| `turns[].agentRun.agent`                 | `object`              | Agent info                                                                                                                                         |
| `turns[].agentRun.images`                | `object[]`            | Images extracted from the process. Aggregated from search image SERPs, skill output files, and bodyLinks images in source summaries (deduplicated) |
| `turns[].agentRun.images[].imageUrl`     | `string`              | Image URL                                                                                                                                          |
| `turns[].agentRun.images[].thumbnailUrl` | `string \| undefined` | Thumbnail URL (present only when sourced via Serper)                                                                                               |
| `turns[].agentRun.images[].title`        | `string \| undefined` | Image title / alt text                                                                                                                             |
| `turns[].agentRun.images[].link`         | `string \| undefined` | URL of the originating page                                                                                                                        |
| `nextCursor`                             | `string \| null`      | Cursor for next page (`null` = last page)                                                                                                          |

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  # First page
  curl "https://app.snorbe.deskrex.ai/api/v1/turn/list?limit=10" \
    -H "Authorization: Bearer snorbe_your_api_key_here"

  # Next page
  curl "https://app.snorbe.deskrex.ai/api/v1/turn/list?limit=10&cursor=clxxx003" \
    -H "Authorization: Bearer snorbe_your_api_key_here"
  ```

  ```python Python theme={null}
  import requests

  base_url = "https://app.snorbe.deskrex.ai/api/v1/turn/list"
  headers = {"Authorization": "Bearer snorbe_your_api_key_here"}
  cursor = None

  while True:
      params = {"limit": 10}
      if cursor:
          params["cursor"] = cursor
      resp = requests.get(base_url, params=params, headers=headers)
      data = resp.json()
      for turn in data["turns"]:
          print(f"[{turn['kind']}] {turn['content'][:50]}")
      cursor = data.get("nextCursor")
      if not cursor:
          break
  ```

  ```typescript TypeScript theme={null}
  const baseUrl = "https://app.snorbe.deskrex.ai/api/v1/turn/list";
  const headers = { Authorization: "Bearer snorbe_your_api_key_here" };

  let cursor: string | undefined;
  do {
    const url = cursor
      ? `${baseUrl}?limit=10&cursor=${cursor}`
      : `${baseUrl}?limit=10`;
    const resp = await fetch(url, { headers });
    const data = await resp.json();
    for (const turn of data.turns) {
      console.log(`[${turn.kind}] ${turn.content.slice(0, 50)}`);
    }
    cursor = data.nextCursor ?? undefined;
  } while (cursor);
  ```
</CodeGroup>

## Error Responses

| HTTP Status | Code                | Description                          |
| ----------- | ------------------- | ------------------------------------ |
| 401         | `UNAUTHORIZED`      | Invalid, expired, or missing API key |
| 429         | `TOO_MANY_REQUESTS` | Rate limit exceeded                  |
