# API documentation

Interactive API documentation for more.md. Explore endpoints, test requests with your API key, and generate code examples.

> **Fetch the spec, not this page**
>
> The page at more.md/docs is an interactive explorer built for a person with a mouse. Everything it renders comes from one OpenAPI document, and you can read that document directly at https://more.md/docs/openapi.json.

## The OpenAPI document

It is served same-origin from the marketing host, so no cross-origin setup is involved, and it is fetched from the live API on every request rather than checked into a file. Whatever the API supports today is what you get.

_GET /docs/openapi.json_

```bash
curl https://more.md/docs/openapi.json

# {
#   "openapi": "3.0.3",
#   "info": { "title": "more.md API", ... },
#   "servers": [ { "url": "https://api.more.md", "description": "Production" } ],
#   "paths": { "/u/{username}": { "get": { ... } }, ... }
# }
```

## Calling the API

Every path in the spec is relative to https://api.more.md. Public reads need no credentials at all. For anything scoped to an account, send an API key in the X-API-Key header. A signed-in session uses the Authorization header instead, and the spec documents both.

_A public read, then the same read as an account_

```bash
# Public: no credentials needed.
curl https://api.more.md/u/ada

# With an API key.
curl https://api.more.md/u/ada \
  -H "X-API-Key: mmd_your_api_key_here"
```

Prefer to try a request before you write any code? The playground runs the same endpoints in the browser.

[Open the playground](/playground) · [Start with an agent](/agents)
