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

# API Conventions: Paths, Paging, Writes, Errors, and Limits

> Conventions every Trellis API operation follows: workspace paths, Bearer key authentication, cursor paging, Idempotency-Key and If-Match on writes, RFC 9457 errors, and per-key rate limits.

Every Trellis API operation follows the conventions on this page. For how a partner app gets a key and what it can reach, see the [Partner API](https://docs.trellistech.com/api-reference/partner-api.md) guide.

## Base URL and paths

```text theme={null}
https://app.trellistech.com/api/v2/workspaces/{workspaceId}
```

Every path starts with the workspace. The workspace comes from the path, never from the request body. Operations have dotted names such as `tasks.list` or `apiKeys.create`, which error messages and this documentation use.

## Authentication

Send a workspace API key as a Bearer token:

```bash theme={null}
curl -H "Authorization: Bearer $TRELLIS_API_KEY" \
  "https://app.trellistech.com/api/v2/workspaces/acme-vacations/tasks?pageSize=50"
```

A key works only for the workspace that issued it.

## Operation reference

Trellis shares the operations an approved partner app can call when it approves the app, scoped to the areas that app reaches. Ask support for the full reference of your integration.

## Reading lists

Lists are cursor-paged:

```json theme={null}
{
  "data": [{ "id": "…" }],
  "page": { "nextCursor": "eyJ…", "hasMore": true }
}
```

* `pageSize` defaults to 50 and allows at most 200.
* Pass `nextCursor` as `cursor` for the next page. A cursor is bound to the filters and caller that produced it; reused elsewhere it answers `422 invalidCursor`.
* Different filters combine with AND. Values in one list filter are comma-separated and combine with OR (`propertyIds=a,b`). Unknown filters and repeated query parameters answer `422`.
* A record you cannot see answers `404 notFound`, as if it did not exist.

Clients must ignore response fields they do not recognize. Trellis adds operations, optional inputs, and response fields without a version change. Removing or renaming one goes through deprecation: the operation answers with a `Deprecation` header, and a `Sunset` header once a removal date is set.

## Writes

### Idempotency-Key

Every write needs an `Idempotency-Key` header of 8 to 300 printable ASCII characters. Generate one per logical change and reuse it when you retry that change.

```bash theme={null}
curl -X POST \
  -H "Authorization: Bearer $TRELLIS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-task-8f2c1d" \
  -d '{"title": "Replace hallway light bulb"}' \
  "https://app.trellistech.com/api/v2/workspaces/acme-vacations/tasks"
```

| Situation | Answer |
| - | - |
| Header missing | `400 idempotencyKeyRequired` |
| Header malformed | `400 idempotencyKeyInvalid` |
| Same key, same request | The first status and body again, with `Idempotent-Replayed: true`. Nothing runs twice. |
| Same key, different request | `422 idempotencyKeyReused` |
| Same key while the first request still runs | `409 requestInProgress` |

Trellis keeps keys for at least 24 hours.

### If-Match

A write that could overwrite someone else's change requires `If-Match` with the `ETag` from your latest read of the record. Without it the write answers `428 preconditionRequired`; with an outdated value, `412 preconditionFailed`. Read the record again, then reapply your change. Treat ETags as opaque.

### Results

A completed write answers `200`, or `201` for a create, with `data` and a `receipt`. A `202` means the work was accepted but not finished. The body is an Execution, `Location` points to it, and `Retry-After` says how many seconds to wait before polling.

## Errors

Errors are [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem details, served as `application/problem+json`:

```json theme={null}
{
  "type": "tag:trellistech.com,2026:problem:missingApiScope",
  "title": "Missing api scope",
  "status": 403,
  "code": "missingApiScope",
  "detail": "…",
  "requestId": "…"
}
```

Branch on `code`. Validation errors add `fieldErrors` (`[{ "path", "message" }]`). Every response carries `X-Request-Id`; include it when you contact Trellis about a call. New codes may appear, so handle unknown codes by their HTTP status.

| Code | Status | Meaning |
| - | - | - |
| `unauthenticated`, `credentialRefused` | 401 | No valid key for this workspace. |
| `missingApiScope` | 403 | The key does not reach the area or scope the operation needs. |
| `notFound` | 404 | The record does not exist or the key cannot see it. |
| `businessConflict`, `invalidTransition` | 409 | The record's state does not allow the change. |
| `requestInProgress` | 409 | The same Idempotency-Key is still running. |
| `preconditionFailed` | 412 | The `If-Match` value is out of date. |
| `invalidRequest`, `unknownField` | 422 | The input is invalid; see `fieldErrors`. |
| `idempotencyKeyReused` | 422 | The Idempotency-Key was used for a different request. |
| `preconditionRequired` | 428 | The write needs `If-Match`. |
| `rateLimited` | 429 | A request budget is spent; retry after `Retry-After`. |
| `internalError` | 500 | Unexpected failure; report the `requestId`. |

## Rate limits

Trellis counts reads and writes separately, in fixed 10-second windows:

| Budget | Reads | Writes |
| - | - | - |
| Per API key | 100 | 20 |
| Per workspace, all keys together | 500 | 100 |

Responses carry `RateLimit-Policy` and `RateLimit` headers for the budgets that apply. A spent budget answers `429 rateLimited` with `Retry-After` in seconds; the refused request does nothing and does not count.

## Related articles

* [Partner API](https://docs.trellistech.com/api-reference/partner-api.md)
* [API Reference](https://docs.trellistech.com/api-reference/introduction.md)
* [Authentication](https://docs.trellistech.com/api-reference/authentication.md)
* [Trellis MCP Server](https://docs.trellistech.com/api-reference/mcp-server.md)


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