---
title: "List agent tasks"
method: GET
path: "/api/v1/public/brands/{brandSlug}/tasks/"
tags: ["Public: Tasks"]
---

# List agent tasks

`GET /api/v1/public/brands/{brandSlug}/tasks/`

## Request

- Base URL: `https://api.iterant.ai`
- URL: `https://api.iterant.ai/api/v1/public/brands/{brandSlug}/tasks/`
- Auth: HTTP bearer

Tasks this brand has run, newest first.

A `build_page` task reports the state of the page build it wraps, so its `status` is always what the opportunity itself says. A task that has been running for more than two hours with no word from the agent is reported as `failed`.

## Path parameters

- `brandSlug` string, required

## Query parameters

- `limit` string
- `offset` string
- `status` 'failed' | 'running' | 'succeeded'

## Response `200`

- PublicAgentTaskList: The schema for what ``paginated`` builds. Kept beside it deliberately. A list operation whose ``responses`` named the *item* serializer with ``many=True`` published a bare array while the runtime returned this object, so a generated client broke on its first call. Subclasses add ``items``: each operation needs its own named component or the item type is erased.
  - `total` integer, required: Rows matching the query, before `limit` and `offset`.
  - `offset` integer, required: Rows skipped. Echoed back so a caller can page without bookkeeping.
  - `limit` integer, required: Cap actually applied, which may be lower than the one requested.
  - `note` string, required: How to narrow, when the cap hid rows. Empty when the response is the whole answer.
  - `items` PublicAgentTask[], required
    - `taskId` string, uuid, required
    - `command` 'prompt' | 'build_page', required: * `prompt` - Prompt * `build_page` - Build page
    - `status` 'running' | 'succeeded' | 'failed', required: * `running` - Running * `succeeded` - Succeeded * `failed` - Failed
    - `createdAt` string, date-time, required
    - `finishedAt` string, date-time, nullable, required: Null while the task is running.
    - `resultingRoute` string, required: The route the build produced. Always empty for a "prompt" task: a free-form turn has no single route, so its result is the chat thread.
    - `chatUrl` string, required
    - `error` string: Present only when `status` is `failed`.

## Other responses

- `400`
- `401`
- `404`
- `405`
- `406`
- `415`
- `429`
- `500`

---

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