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

# API

> Request format, pagination and retries.

| | |
| - | - |
| MCP server | `https://api.whirl.sh/mcp` |
| API | `https://api.whirl.sh/api/v1` |

## Requests

Send `Authorization: Bearer <access token>` with every request. The token must be issued for the API origin plus `/api/v1`. See [authentication](/authentication) for how to get one.

## Calling operations by name

`POST /api/v1/operations/{name}` takes all of an operation's inputs as one JSON object, including the ones that would normally go in the path. It works for every operation, including reads.

```typescript theme={null}
curl --fail-with-body \
  -H "Authorization: Bearer $WHIRL_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"taskId":"<task ID>","field":"description","offset":0}' \
  "https://api.whirl.sh/api/v1/operations/get_task"
```

## OpenAPI and discovery

The schema is OpenAPI 3.1, and works with most API clients and code generators.

## Pagination

List operations return a limited number of items. Respect each operation's `limit` range, and pass back the `nextCursor` it returns as `cursor`. Treat these values as opaque, and only reuse them with the same operation and filters.

Long fields, such as task descriptions, handbook entries and run output, can also be paged with `field` and a character `offset`. If the response includes `nextOffset`, there's more to read.

## Retries

Read [errors and retries](/api/errors) before you add automatic retries. A request that timed out may still have created a task or reminder, or queued an action, so check before you send it again.

Test with your own client, in a workspace you don't mind changing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.