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

# Introduction

> How the API is shaped

The API lives at `https://api.anpord.com`. Every endpoint is a `POST` taking a
JSON body, named after the operation rather than a resource path:

```
POST /v1/prompts.get
POST /v1/prompts.promote
```

There are no path or query parameters. Everything travels in the body, so a call
looks the same whatever it does.

## Authentication

Pass an API key as a bearer token:

```bash theme={null}
curl https://api.anpord.com/v1/prompts.get \
  -H "authorization: Bearer $ANPORD_API_KEY" \
  -H "content-type: application/json" \
  -d '{"id":"support-reply"}'
```

Keys are scoped to one organization. A request without a usable key is answered
with `401` and a `WWW-Authenticate` header naming where to authenticate.

## Errors

Failures carry a JSON body with a `message` explaining what went wrong.

| Status | Meaning                                           |
| ------ | ------------------------------------------------- |
| `400`  | The body did not match what the endpoint accepts  |
| `401`  | The key was missing, unknown, or no longer active |
| `404`  | The prompt, version, or channel does not exist    |
| `409`  | The change conflicts with one already made        |

## Clients

The [TypeScript SDK](/quickstart) wraps these endpoints and turns failures into
an `AnpordError` carrying the status. The [CLI](/tools/cli) covers the same
operations from a terminal.

The OpenAPI description is generated from the same definitions that serve the
requests, so it cannot drift from the running API.
