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

# REST API overview

> Authentication, conventions, and errors for the Automate It REST API

Base URL:

```
https://api.automate.it.com/api
```

Workspace resources live under `/api/workspaces/{workspaceId}/…`. Find your workspace id with `ait workspaces` or the `list_workspaces` MCP tool.

## Authentication

Send an [API key](/api-keys) as a bearer token on every request:

```bash theme={null}
curl https://api.automate.it.com/api/workspaces/$WS/tasks \
  -H "Authorization: Bearer ak_your_key"
```

Three layers bound what a request can do:

1. **Scopes** — the key must hold a scope covering the endpoint (`tasks:read`, `tasks:write`, …). A `*` key holds them all. Missing scope → `403`.
2. **Workspace role** — the key acts as its owner, so the owner's role applies: approve/reject/publish need Reviewer, task deletion and automation management need Admin. See [Team & roles](/workspace/team).
3. **Workspace binding** — a key created for one workspace is rejected with `403` on any other.

## Responses and errors

Success responses return the resource directly — object endpoints return a bare JSON object, list endpoints return either a bare array (tasks) or a cursor envelope (automations); each endpoint page notes which. Errors are:

```json theme={null}
{ "error": "Task is not in review or approved status" }
```

Validation failures add a `details` array of field-level issues. Every response carries an `x-request-id` header — include it when reporting a problem.

| Code  | Meaning                                                                 |
| ----- | ----------------------------------------------------------------------- |
| `400` | Validation failed or the resource is in the wrong state for the action  |
| `401` | Key missing, invalid, or revoked                                        |
| `403` | Missing scope, insufficient role, or key bound to a different workspace |
| `404` | Not found                                                               |
| `409` | Conflict — e.g. a feed slug already in use                              |
| `500` | Unhandled error; the body includes a `requestId`                        |

## Endpoints

<CardGroup cols={2}>
  <Card title="Tasks" icon="list-check" href="/api-reference/tasks">
    Create, list, approve, reject, publish.
  </Card>

  <Card title="Automations" icon="clock-rotate-left" href="/api-reference/automations">
    Scheduled standing briefs.
  </Card>

  <Card title="RSS & podcast feeds" icon="rss" href="/api-reference/rss-feeds">
    Hosted feeds and their public URLs.
  </Card>

  <Card title="MCP tools" icon="plug" href="/api-reference/mcp-tools">
    The full 38-tool MCP catalog.
  </Card>
</CardGroup>
