# Velora CMS for developers

Velora CMS hosts a publication's content: articles, pages, sections, writers and entities (the riders, teams, products or places a site covers). Velora writes and publishes the content. Your front end reads what is published from the **delivery API** and renders it.

These docs cover everything a front end needs. Each rule is stated in full here, so you can build from these pages alone.

## How a front end works with Velora

1. **Velora decides every address.** Your front end never builds a URL for content. It asks [`/resolve`](https://developers.velora.build/routing.md) what lives at the requested path and renders that, redirects, or answers 404. Links use the `path` that every answer carries.
2. **Every read is cached until Velora says it changed.** When content changes, Velora sends a signed webhook naming exactly the requests whose answers changed. Your front end drops those and keeps everything else. See [Caching and the revalidate webhook](https://developers.velora.build/caching.md).
3. **Drafts open through signed preview links**, which your front end checks before it shows anything. See [Previews](https://developers.velora.build/previews.md).
4. **Article bodies are structured.** They arrive as Portable Text, with HTML and markdown as alternatives, and with typed blocks you can extend with your own. See [Article bodies and blocks](https://developers.velora.build/bodies.md).

## Start here

| Page | What it covers |
| --- | --- |
| [Connect](https://developers.velora.build/connect.md) | The delivery URL, read key and webhook secret, and how to call the API |
| [Routing](https://developers.velora.build/routing.md) | `/resolve`, redirects, 404s, listing pages, and addresses kept for your front end |
| [Caching](https://developers.velora.build/caching.md) | Naming each read, the revalidate webhook and its signature |
| [Previews](https://developers.velora.build/previews.md) | Signed preview links and the preview read |
| [Content](https://developers.velora.build/content.md) | The site, front page, listings, paging, articles, details and entities |
| [Article bodies and blocks](https://developers.velora.build/bodies.md) | Portable Text, preset and site blocks, `/velora/blocks.json`, images |
| [Sitemaps, feeds and llms.txt](https://developers.velora.build/feeds.md) | What to serve for search engines, feed readers and AI agents |
| [Deploy order](https://developers.velora.build/deploy.md) | What to do in Velora and what to deploy, in which order |
| [API reference](https://developers.velora.build/reference.md) | Every route and type, generated from the API |

## A first request

```bash
curl -H "Authorization: Bearer $VELORA_READ_KEY" \
  "https://delivery.velora.build/$SITE_ID/resolve?path=/"
```

## For AI agents

- Every page here is markdown at its address plus `.md`, for example [`/routing.md`](https://developers.velora.build/routing.md). The overview is `/index.md`.
- [`/llms.txt`](https://developers.velora.build/llms.txt) lists every page with what it covers. [`/llms-full.txt`](https://developers.velora.build/llms-full.txt) is every page in one file.
- [`/openapi.json`](https://developers.velora.build/openapi.json) is the delivery API alone, with `https://delivery.velora.build` as its server. It is generated from the API's routes on every publish. Generate your client's types from it.


# Connect a front end

## Get the three values

In Velora, open **Publication**, then **Overview**. The card **Connect your front end** shows:

| Value | What it is | Keep it |
| --- | --- | --- |
| **Delivery URL** | `https://delivery.velora.build/{site_id}`. Every read starts here. | In your front end's environment, for example `VELORA_DELIVERY_URL` |
| **Read key** | Reads the publication's published content. Nothing else. | On your server, for example `VELORA_READ_KEY` |
| **Webhook secret** | Signs the [revalidate webhook](https://developers.velora.build/caching.md#the-revalidate-webhook) and [preview links](https://developers.velora.build/previews.md). | On your server only, for example `VELORA_WEBHOOK_SECRET` |

The same card has **Replace read key** and a replace action for the webhook secret. Replacing either stops the old one working, so update your front end's environment when you do.

Two more settings tell Velora where your front end is. Set them once your front end is deployed ([Deploy order](https://developers.velora.build/deploy.md)). They are under **Edit in CMS settings** on the same card:

- **Revalidate URL**, for example `https://your-site.com/api/revalidate`: where Velora sends the [revalidate webhook](https://developers.velora.build/caching.md#the-revalidate-webhook). Velora also reads your [block list](https://developers.velora.build/bodies.md#your-own-blocks) from this URL's origin.
- **Preview URL**, for example `https://your-site.com/api/preview`: where the editor's Preview button sends a [signed preview link](https://developers.velora.build/previews.md).

## Call the API

Every read is a `GET` to the delivery URL plus the route:

```bash
curl -H "Authorization: Bearer $VELORA_READ_KEY" \
  "https://delivery.velora.build/$SITE_ID/articles?limit=3"
```

- Send the read key as `Authorization: Bearer <key>`, or as `?key=<key>`. If you send both, `?key=` wins. Both forms share cache entries at the edge.
- Always call `https://delivery.velora.build`. It is Velora's edge: it keeps answers close to your servers, serves the last good answer if Velora's API is down, and resizes [images](https://developers.velora.build/bodies.md#images). The API behind it does not answer requests that do not come through the edge.
- Only the query parameters a route reads reach the API. Anything else is dropped before the cache, so extra parameters cannot bypass it.
- Answers are JSON, except `/llms.txt`, which is markdown.
- Every answer allows any origin (`Access-Control-Allow-Origin: *`), so a browser can call the API. Read on the server anyway: the key stays private, and your own cache does the work described in [Caching](https://developers.velora.build/caching.md).

## Answers and errors

| Status | Meaning |
| --- | --- |
| `200` | The answer. |
| `404` | Nothing here. A wrong Site id, a wrong read key and a missing article all answer 404, so the three cannot be told apart. Check the key first when everything is 404. |
| `405` | A method other than `GET`, `HEAD` or `OPTIONS`. |
| `422` | A parameter is out of range, for example `limit=500` on a listing. |
| `503` | Velora's API is unreachable and the edge holds no earlier copy of this answer. |

Errors have one shape:

```json
{"error": "NOT_FOUND", "detail": "Not found"}
```

Every answer from the edge says how it was served in `X-Velora-Cache`: `HIT`, `MISS`, `STALE` (Velora's API is down and this is the last good copy) or `BYPASS` (never cached, such as a preview).

## Types

[`/openapi.json`](https://developers.velora.build/openapi.json) describes every route and answer. Generate your types from it rather than writing them by hand, for example with `openapi-typescript`:

```bash
bunx openapi-typescript https://developers.velora.build/openapi.json -o velora-api.d.ts
```

The [API reference](https://developers.velora.build/reference.md) is the same document as a page.


# Routing

Velora decides every content address. Editors set the patterns in Velora (an article can live at `/{slug}`, `/{category}/{slug}`, or a category's own pattern), rename things, and move them. Velora records a redirect from each old address. Your front end follows Velora, so links in article bodies, the sitemap and redirects always agree.

Two rules cover it:

1. **Serve every content path through `/resolve`.** One catch-all route in your front end asks Velora what lives at the path.
2. **Never build a URL.** Every answer carries a `path` (an article, a section, a writer, an entity, a nav item's `url`). Use it as the link, as it is.

## Resolve a path

```bash
curl -H "Authorization: Bearer $VELORA_READ_KEY" \
  "https://delivery.velora.build/$SITE_ID/resolve?path=/racing/tour-stage-one"
```

The answer's `kind` says what to do:

| `kind` | Do this |
| --- | --- |
| `article` | Render the article. It is in `article`, and `slug` is what `/articles/{slug}` takes. |
| `page` | Render the static page in `page` (`/pages/{slug}`). |
| `category` | Render the section listing in `category` (`/categories/{slug}`). |
| `entity_type` | Render the index of an entity type, such as `/riders`, from `entity_type` (`/entities/{slug}`). |
| `entity` | Render one entity, such as `/riders/tom-pidcock`, from `entity`. `type_slug` and `slug` are what `/entities/{type_slug}/{slug}` takes. |
| `redirect` | Answer a permanent redirect (308) to `to`. Velora has already collapsed a chain of moves into one hop. `to` can be another site entirely. |
| `not_found` | Answer 404. |

`/resolve` returns the content with the answer, so one call renders the page. A listing's content is its first page; pass `page` and `limit` for others. The `slug` fields let you call the content's own route instead if you prefer.

When a path holds content and a redirect, the content wins.

Paths are matched as your front end received them. Encode each segment (`encodeURIComponent` per segment) and pass the whole path, with its leading `/`, as `path`.

## Later pages of a listing

Sections, entity types, entities and writers list articles in pages. Give later pages a path, not a query string, so every page can be cached whole and nothing depends on `?page=`:

- Use `{listing}/page/{n}`, for example `/racing/page/2`.
- When a path resolves to `not_found` and ends in `/page/{n}`, resolve the part before it with `page=n`. Resolve the full path first, so content whose address happens to end that way still renders.
- Redirect an old `?page=2` link to the path form with a 308 if your site ever used one.

Each listing answer carries `page`, `pages` and `total`. Page numbers run to 500. To walk further back, use the [cursor](https://developers.velora.build/content.md#paging).

## Writers

Writers have pages at `/author/{slug}`, with the index at `/authors`. `/resolve` does not return writers: read `/authors/{slug}` for one writer's page and `/authors` for the index. When `/authors/{slug}` answers 404, resolve the path anyway: a renamed writer's old address answers `redirect`. Writers still come with a `path`; link to that.

## Addresses kept for your front end

Your front end serves some paths itself: search, the preview route, a writers index, your feed. Velora must never give content one of those addresses. Tell it which in Velora: **Publication**, the **Article addresses** section, **Kept for your front end**. Nothing in the publication is given a kept path, or anything under it. A save that would put content there is refused.

Velora always keeps these, on every site:

```
/api  /author  /markdown  /feed.xml  /sitemap.xml  /news-sitemap.xml  /llms.txt  /robots.txt
```

Each site also starts with `/authors`, `/search` and `/preview` kept. Edit that list to match the routes you build. It holds up to 50 paths.

Add a path to the list **before** you deploy a route on it ([Deploy order](https://developers.velora.build/deploy.md)). A redirect that would lead into a kept path stops there, so your route serves it.

## Markdown copies

Serve each article as markdown at its address plus `.md` (`/racing/tour-stage-one.md`), for AI agents and anyone who wants the text alone:

1. Strip `.md` and resolve the rest.
2. For `redirect`, answer 308 to `to` plus `.md` when `to` is a path on your site; to `to` as it is otherwise.
3. For `article`, read `/articles/{slug}?format=markdown`. The answer's `markdown` field is the body as markdown. Add the title, byline and date above it.
4. Links in the body are site-relative (`/racing/other-story`). Make them absolute with your site's origin, so the copy works on its own.
5. Answer with `Content-Type: text/markdown; charset=utf-8` and a `Link: <{origin}{seo.canonical_path}>; rel="canonical"` header pointing at the article page.

Velora's own [`/llms.txt`](https://developers.velora.build/feeds.md#llmstxt) links each article to this copy.


# Caching and the revalidate webhook

Cache every read your front end makes, and keep it until Velora says its answer changed. When published content changes, Velora sends your front end a signed webhook that names exactly the requests whose answers changed. Drop those and keep the rest. A front end built this way serves every page from its own cache, and an edit or a takedown is live within seconds.

## Name each read

Velora names a request the way your front end makes it, after the Site id:

- the route's path, from the Site on: `/articles/tour-stage-one`, `/resolve`, `/site`;
- then the query, without `key`, with parameters **sorted by name**, a repeated parameter's values kept in the order you sent them, and encoded as a form (`application/x-www-form-urlencoded`: a space is `+`, a `/` is `%2F`).

| You call | Velora names it |
| --- | --- |
| `/site?key=...` | `/site` |
| `/articles?limit=3&category=news` | `/articles?category=news&limit=3` |
| `/resolve?path=/racing/tour-stage-one` | `/resolve?path=%2Fracing%2Ftour-stage-one` |
| `/many?r=/site&r=/home` | `/many?r=%2Fsite&r=%2Fhome` |

`URLSearchParams` in JavaScript and `urlencode` in Python encode this way. The simplest way to get it right is to build every request from the sorted query yourself and use that same string as the cache key. Send the read key in the `Authorization` header so it never appears in the name.

Tag each cached read with its name. In Next.js, for example, that is a cache tag on the `fetch`, such as `velora:/articles?category=news&limit=3`.

## Keep each answer an hour at most

Some answers change without a webhook naming them: an article's `related` list, for one, picks up newer articles over time. Keep each answer **until the webhook names it, or for an hour, whichever comes first**. Velora's edge does the same: no copy anywhere outlives the hour after its answer was built (`X-Velora-Built`, in Unix seconds).

## Reads not to cache

These are never named by the webhook. Do not keep them, or keep them briefly:

- any read with a `cursor` (each one is a step through the archive);
- `/search`, `/changes` and `/preview/...`;
- `/llms.txt`, which you can keep for up to an hour.

## The revalidate webhook

When content changes, Velora sends a `POST` to your **Revalidate URL** ([Connect](https://developers.velora.build/connect.md)):

```http
POST /api/revalidate HTTP/1.1
Content-Type: application/json
X-Velora-Signature: sha256=5d1c0e...

{
  "site_id": "6c0f...",
  "reason": "article_updated",
  "requests": ["/articles/tour-stage-one", "/home", "/resolve?path=%2Fracing%2Ftour-stage-one"],
  "everything": false,
  "sent_at": "2026-11-23T10:15:02.114Z"
}
```

| Field | Meaning |
| --- | --- |
| `requests` | Every request whose answer changed, named as above. Drop each from your cache. |
| `everything` | `true` when the Site's settings, navigation, sections, pages or redirects changed. Any answer may have changed: drop every cached read. |
| `reason` | Why, for your logs: `article_updated`, `article_removed` and others. Do not branch on it. |
| `site_id`, `sent_at` | Which Site, and when. |

Your handler:

1. Reads the raw body, as bytes, before parsing it.
2. Checks the signature (below). Answers `401` if it is wrong.
3. Drops every named request from its cache, or everything when `everything` is `true`. Drop the cached answers outright: a taken-down article must not be shown again, even once while a fresh copy loads.
4. Drops the pages built from those reads. Frameworks that tag reads do this for you.
5. Answers `200` within 5 seconds.

By the time the webhook arrives, Velora has already cleared its edge's copies, so your next read of a named request gets the new answer.

### Check the signature

`X-Velora-Signature` is `sha256=` followed by the hex HMAC-SHA256 of the raw request body, keyed with the **webhook secret**. Compute it over the exact bytes you received, not over JSON you parsed and serialised again, and compare in constant time.

```ts
import { createHmac, timingSafeEqual } from "node:crypto";

export function validSignature(rawBody: string, header: string | null, secret: string): boolean {
  if (!header?.startsWith("sha256=")) return false;
  const expected = Buffer.from(createHmac("sha256", secret).update(rawBody).digest("hex"));
  const given = Buffer.from(header.slice("sha256=".length).toLowerCase());
  return expected.length === given.length && timingSafeEqual(expected, given);
}
```

```python
import hashlib, hmac

def valid_signature(raw_body: bytes, header: str | None, secret: str) -> bool:
    if not header or not header.startswith("sha256="):
        return False
    expected = hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, header.removeprefix("sha256=").lower())
```

### Repeats, batching and failures

- **The same requests can arrive twice**, about 20 seconds apart. Velora clears its edge again after reads that were in flight during the change have landed, and tells your front end again. Make the handler safe to repeat; it already is if it only drops cache entries.
- **Changes are batched.** Velora waits for a quiet two seconds, and never more than 20, then sends one webhook for everything that changed.
- **Failures are retried.** Any status of 400 or more, a timeout or a connection error counts as not delivered. Velora retries, then tells your front end again every minute until it accepts. Publishing never waits on your front end.
- Velora does not follow redirects, and only calls a public address. Give the exact URL your handler answers on.

## Several reads in one call

`/many` takes up to ten reads as repeated `r` parameters, each a request as its own route takes it, and answers each in order with its status and body:

```bash
curl -H "Authorization: Bearer $VELORA_READ_KEY" \
  "https://delivery.velora.build/$SITE_ID/many?r=/site&r=/articles?category=news%26limit=3"
```

```json
{"results": [
  {"request": "/site", "status": 200, "body": {"name": "..."}},
  {"request": "/articles?category=news&limit=3", "status": 200, "body": {"items": []}}
]}
```

A batch is cached and named like any read: the webhook names the `/many` request when any read in it changes. One read answering 404 does not fail the batch; one failing with 500 or more fails all of it. A batch cannot hold `/many`, `/preview/...`, `/changes`, `/search`, `/llms.txt` or a read with a `cursor`.

## Keeping a copy in step

For a search index, a mirror or an agent that keeps its own copy, poll `/changes` instead of handling the webhook. It lists every article whose state changed for readers, oldest first: `live` (published or updated) or `removed` (taken down). Start without a `cursor` (or with an ISO time), then pass back `next_cursor` each time. It is never cached.


# Previews

The Preview button in Velora's editor opens a draft on your real site, so editors see it exactly as readers will. It sends the editor to your **Preview URL** ([Connect](https://developers.velora.build/connect.md)) with a signed link:

```
https://your-site.com/api/preview?article=<article id>&exp=<unix seconds>&sig=<hex>
```

- `article` is the article's id, a UUID.
- `exp` is when the link stops working, in Unix seconds. Links last 24 hours.
- `sig` is the hex HMAC-SHA256 of the string `preview:<article id>:<exp>`, keyed with the **webhook secret**. It has no `sha256=` prefix.

No Preview button appears until the Preview URL is set.

## Check the link

Before showing anything:

1. Check `article` is a UUID and `exp` is digits.
2. Check `exp` has not passed.
3. Compute `preview:<article>:<exp>` with the webhook secret and compare it with `sig` in constant time.
4. Answer `401` if any check fails.

```ts
import { createHmac, timingSafeEqual } from "node:crypto";

export function validPreview(article: string, exp: string, sig: string, secret: string): boolean {
  if (!/^\d{1,12}$/.test(exp) || Number(exp) < Date.now() / 1000) return false;
  const expected = Buffer.from(createHmac("sha256", secret).update(`preview:${article}:${exp}`).digest("hex"));
  const given = Buffer.from(sig.toLowerCase());
  return expected.length === given.length && timingSafeEqual(expected, given);
}
```

## Read the draft

Pass the same `sig` and `exp` on to the preview route, with the read key:

```bash
curl -H "Authorization: Bearer $VELORA_READ_KEY" \
  "https://delivery.velora.build/$SITE_ID/preview/$ARTICLE_ID?sig=$SIG&exp=$EXP"
```

Velora checks the signature again and answers the draft as an `ArticleDetail`, the same shape as a published article, with an empty `related` list. An expired or wrong link answers 404. Nothing about it is written or cached anywhere.

## Show it

- Render it with your article page, so the preview is faithful.
- Never cache it, and keep it out of search engines (`noindex`).
- Show a clear banner, so nobody mistakes a draft for the published page.
- Give the preview its own route, kept for your front end (Velora keeps `/preview` by default; see [Routing](https://developers.velora.build/routing.md#addresses-kept-for-your-front-end)). If your framework has a draft mode, the preview handler can turn it on and redirect to that route, carrying `sig` and `exp` with it.


# Content

What each route returns, and how the pieces fit a page. Field-level detail is in the [API reference](https://developers.velora.build/reference.md).

## The site

`/site` is everything that renders around the content, in one read per page:

- `name`, `url` (the site's public origin, when Velora knows it; use it for canonical URLs, the sitemap and the feed) and `language` (a language tag such as `en-GB`).
- `settings`: the title, description, logo, default share image, social links, SEO defaults and `time_zone`.
- `navigation`: `primary` and `footer`, each a list of `{label, url}`. Render them in order. `url` is a path on the site or a full URL.
- `categories` (sections, with their `parent`), `entity_types`, and `article_details` (below).

## The front page

`/home` returns the front page's `sections` in the order the editor chose in Velora. Render each in turn; change the order in Velora, not in code.

- `kind: "articles"`: a run of `articles` (cards).
- `kind: "entity_type"`: a run of `entities` of one type.

Each section can have a `title`, a `path` to link "more" to, and a `key`: the name the site gave the section, for your front end to place or style it by.

## Listings

`/articles` lists live articles, newest first. Filter it with:

| Parameter | Filters by |
| --- | --- |
| `category` | Section slugs. Several, comma separated, match any. |
| `tag` | Tag slugs, comma separated. |
| `type` | Article types, comma separated: `type=news,race`. |
| `author` | A writer's slug. |
| `entity_type` + `entity` | Articles about one entity: its type's slug and its own. |
| `detail` + `value` | An [article detail](#details): `detail=Sponsored&value=true`. A detail that links to an entity takes the entity's slug. |
| `match` | `all` (the default): an article must match every filter. `any`: it may match any of `category`, `tag` and `type`. |

Section, writer and entity pages have their own listing routes, which return the thing and its articles together: `/categories/{slug}`, `/authors/{slug}` and `/entities/{type_slug}/{slug}`.

Article cards (`ArticleCard`) carry what a list needs: `title`, `path`, `excerpt`, `eyebrow`, `cover`, dates, `reading_minutes`, `category`, `authors`, `tags` and `details`.

## Paging

Listings page two ways.

**By number**, for pages a reader visits: `page` (1 to 500) and `limit` (1 to 50, 12 by default; entity type indexes take up to 100, 48 by default). The answer has `page`, `pages` and `total`. Give each page a path ([Routing](https://developers.velora.build/routing.md#later-pages-of-a-listing)).

**By cursor**, for "load more" and for walking the whole archive. Every `/articles` answer has `next_cursor`; pass it back as `cursor` for the articles after the last one you got. It is `null` on the last page. An ISO time works as a cursor too: `cursor=2019-06-01T00:00:00Z` starts with the articles published before then. Cursors go past page 500. A read with a cursor is never cached anywhere, so do not cache it yourself.

## An article

`/articles/{slug}` returns an `ArticleDetail`: everything on the card, plus

- `body` (Portable Text), `html` (the same body as HTML) and `word_count`. Add `?format=markdown` for `markdown` too. See [Article bodies](https://developers.velora.build/bodies.md).
- `authors` in full, with `bio`, `social` links (a map of network to URL) and article counts.
- `seo`: `title`, `description`, `image_url` and `canonical_path`. Use them for the page's metadata and canonical link.
- `entities`: who and what the article is about, each with a `name`, `path`, `type_slug`, `type_name` and `image`. Only entities that have a page are listed, so every one can be a link.
- `corrections`: dated notes (`at`, `note`) to show readers.
- `related`: up to four cards from the same section.

### Details

Details are a site's own structured fields: a race's date, whether a story is sponsored, the team a rider rides for. Articles and entities both have them.

- The shape is declared once: `/site` has `article_details`, and each entity type in `entity_types` has `details`. Each is a `DetailView`: its `key`, its `kind` (`text`, `number`, `date`, `boolean`, `url`, `choice` or `link`), `options` for a choice, and for a link, the entity type it `links_to` and whether it holds `many`.
- The values are on each article (`details`) and entity (`fields`), keyed by `key`, in the declared order. A detail with no value is left out.
- A `link` value is a `LinkedEntity` (`id`, `slug`, `name`, `type_slug`, `path`), or a list of them when the detail holds many. `path` is `null` when that entity has no page: show the name without a link.

## Entities

- `/entities/{type_slug}` is a type's index (`/riders`): its entities that have a page, by number. With `via` and `to`, it lists instead every entity whose `via` detail links to the entity `to` names, with a page or not: `via=Team&to=ineos` lists a team's riders.
- `/entities/{type_slug}/{slug}` is one entity: `name`, `summary`, `image`, `fields` (its [details](#details)), `bio` (Portable Text) and `bio_html`, a page of its articles in `articles_page` (pass `page` and `limit`), and `linked_from`: the entities linking to it, grouped by type and detail (a team's riders, by Team).
- `seo.index` says whether search engines should index the page. Add `noindex` when it is `false`.

## Writers, sections, pages and tags

- `/authors` lists writers; `/authors/{slug}` is one writer with a page of their articles.
- `/categories` lists sections in the site's order, each with its `parent` when it has one. `/categories/{slug}` is a section with a page of its articles.
- `/pages/{slug}` is a static page (`/about`): `title`, `body`, `html`, `seo_title`, `seo_description`, `updated_at`.
- `/tags` lists the tags on live articles, most used first, with counts. Tags filter listings but have no page of their own.

## Search

`/search?q=...` finds live articles: words, `"quoted phrases"` and `-excluded` words, best match first, paged by `page` and `limit`. `q` is 2 to 200 characters. Search is never cached; render it per request on a route kept for your front end (Velora keeps `/search` by default).


# Article bodies and blocks

An article's `body` (and a page's `body`, and an entity's `bio`) is [Portable Text](https://portabletext.org): a list of typed nodes. Render it with a Portable Text library for your framework, such as `@portabletext/react`, giving each node type below a component.

If you would rather not, every body also comes as `html`, ready to place, and an article as `markdown` with `?format=markdown`. You lose the typed blocks and image control that way.

## Text

A `block` node is a paragraph, heading, quote or list item:

- `style`: `normal`, `h2` to `h6`, or `blockquote`. Article titles are the page's `h1`, so bodies start at `h2`.
- `listItem` (`bullet` or `number`) and `level` (nesting, from 1) on list items.
- `children`: spans of `text`, each with `marks`.
- A mark is a decorator (`strong`, `em`, `underline`, `strike-through`, `code`) or the `_key` of an entry in the block's `markDefs`. A `link` mark def has an `href`.

Links inside the site are paths (`/racing/other-story`); link them as such. Anything else is a full URL.

## Other nodes

| `_type` | Fields | Render as |
| --- | --- | --- |
| `image` | `url`, `alt`, `caption`, `credit`, `width`, `height`, `focalPoint`, `placeholder`, `link` | A figure. Reserve its space from `width` and `height`. See [Images](#images). |
| `table` | `title`, `subtitle`, `columns`, `rows[].cells` | A table. `cells` line up with `columns`. |
| `code` | `code`, `language` | Preformatted code. |
| `break` | none | A section break. |

## Preset blocks

Every site has six blocks the writer can place. Each arrives with its own `_type`:

| `_type` | Fields | Render as |
| --- | --- | --- |
| `embed` | `provider`, `url`, `caption` | A post or video from another service. `provider` is `twitter`, `instagram`, `youtube`, `tiktok`, `bluesky`, `threads`, `facebook`, `linkedin`, `vimeo`, `strava` or `other`. At least, a link to `url`. |
| `gallery` | `title`, `images` | A set of images, each shaped like an `image` node. |
| `table` | as above | A data, results or stage table. |
| `quote` | `text`, `credit` | A pull quote. |
| `callout` | `title`, `text` | A boxed note. |
| `graphic` | `id`, `title`, `alt`, `caption`, `image`, `markup`, `script` | An interactive graphic Velora made. Run `markup` and `script` in a sandboxed `iframe` (`srcdoc`, `sandbox="allow-scripts"`) so its script cannot touch your page, sized from `image.width` and `image.height`. Where scripts cannot run (feeds, email), show `image`. |

## Your own blocks

A site can define its own blocks: a race times table, a product card, a verdict. You define each in your front end, next to the component that draws it, and publish the list. Velora's writer places the blocks an editor switches on.

### Publish the list

Serve your list as JSON at `/velora/blocks.json` on the same origin as your **Revalidate URL** (or Preview URL, if that is the only one set):

```json
{
  "blocks": [
    {
      "name": "RACE_TIMES",
      "title": "Race times",
      "guidance": "Start and finish times for a race day.",
      "fields": {
        "race": {"type": "entity", "entity_type": "races"},
        "timezone": {"type": "string", "required": true},
        "events": {
          "type": "array",
          "of": {"type": "object", "fields": {
            "time": {"type": "string"},
            "label": {"type": "string", "required": true}
          }}
        }
      }
    }
  ]
}
```

- `name`: capitals, digits and underscores, starting with a capital, up to 50 characters. It is the marker the writer uses and the `_type` your body receives. It cannot be a preset's name (`EMBED`, `GALLERY`, `TABLE`, `QUOTE`, `CALLOUT`, `VELORA_GRAPHIC`).
- `title` (up to 100 characters) and `guidance` (when the writer should use it, up to 2,000; editors can rewrite it in Velora).
- `fields`: up to 50, named with a letter then letters, digits or `_`, nested up to 6 deep. Each is `{type, title?, description?, required?, max?}`.
- Up to 100 blocks, and 512 KB.

Field types:

| `type` | Value in the body |
| --- | --- |
| `string`, `text` (paragraphs), `url`, `email`, `date` (`2026-05-02`), `datetime` | string |
| `number` | number |
| `boolean` | boolean |
| `array` (with `of`) | list; objects in it get a `_key` |
| `object` (with `fields`) | object |
| `product` | Velora fills it: `name`, `brand`, `image`, and `links`, each `{kind: "buy" or "search", retailer, url, rel}`. Use `rel` on the link. |
| `entity` (with `entity_type`, one of your type slugs) | Velora fills it: `{_type: "entity", id, name, type, path}`. `path` is `null` when the entity has no page. |
| `article` | Velora fills it: `{_type: "article", id, title, path}` |
| `image` | an image, shaped like an `image` node |
| `graphic` | one of the article's graphics, shaped like a `graphic` block |

`max` is the most items for a list, characters for text, or the highest value for a number. `required` and `max` are checked on every publish.

### Tell Velora it changed

Velora reads the list when an editor presses Refresh in **Skills**, **Components**, every day, and when your deploy tells it to. After a production deploy, send:

```bash
curl -X POST "https://api.velora.build/v1/public/$SITE_ID/blocks/changed" \
  -H "Authorization: Bearer $VELORA_READ_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"hash\": \"$(curl -s https://your-site.com/velora/blocks.json | sha256sum | cut -d' ' -f1)\"}"
```

`hash` (optional) is the SHA-256 hex of the exact bytes your list serves. Velora answers `202` and reads the list every minute, up to ten times, until it sees that hash, so a ping sent before the deploy is live still lands. Do not fail your build on this call: the daily read catches a missed one.

If Velora cannot read the list, or it is not valid, Velora keeps the last good one.

### What reaches your body

A site block arrives as `{"_type": "RACE_TIMES", "_key": "...", ...fields}`. A field with no value is left out. Velora refuses to publish an article with a block your list does not define, or one whose fields do not fit, and tells the editor why.

Still render a block you have no component for: show its title and fields rather than dropping it. An article published before you removed a block from your list still holds it.

## Images

Every image is a `RenderedImage`: `url`, `alt`, `caption`, `credit`, `width`, `height` (when known), `focalPoint` and `placeholder`.

- `focalPoint` is `{x, y}`, each 0 to 1 from the left and top: the part of the image to keep in frame when it is cropped. `null` means the centre. When the browser crops (`object-fit: cover`), set `object-position: {x*100}% {y*100}%`.
- `placeholder` is a tiny WebP data URL, for a blurred preview while the image loads.

Images Velora stores come from `https://delivery.velora.build/media/...`, which resizes them at the edge. Add parameters to the `url` as given:

| Parameter | Does |
| --- | --- |
| `w` | Width. Snapped up to 320, 640, 960, 1280, 1920 or 2560. |
| `dpr` | Pixel density, 1 to 3. Multiplies `w` before snapping. |
| `ar=W:H` or `h` | Crop to a shape (`ar=16:9`). |
| `fp=x,y` | The focal point to keep in frame when cropping. Pass `focalPoint`. |
| `fit` | `cover` (the default with a shape), `contain` or `scale-down` (the default without). |
| `q` | Quality, 30 to 95 in steps of 5. |
| `format=auto` | AVIF or WebP, as the browser accepts, else JPEG. |

```
https://delivery.velora.build/media/abc123/photo.jpg?w=960&ar=16:9&fp=0.42,0.3&format=auto
```

Media responses are immutable and cached for a year. Images whose `url` is on any other host (a product's picture from a shop, for example) are not resized by Velora: use them as they are, or through your own image service.


# Sitemaps, feeds and llms.txt

Velora keeps `/sitemap.xml`, `/news-sitemap.xml`, `/feed.xml`, `/llms.txt` and `/robots.txt` for your front end on every site, so no content can take those addresses. Serve each from the delivery API, and cache them like pages: when the [revalidate webhook](https://developers.velora.build/caching.md) names the reads they are built from, rebuild them, so a story taken down leaves them at once.

Every entry needs a full URL. Use `/site`'s `url` as the origin, or your own setting when Velora does not have one.

## Sitemap

`/sitemap` lists every address on the site with its `updated_at`: the front page, live articles, static pages, sections, writers, entity type indexes and entity pages.

```json
{"items": [{"path": "/", "updated_at": "2026-11-23T09:40:00Z"}, {"path": "/racing/tour-stage-one", "updated_at": "2026-11-22T18:02:11Z"}]}
```

Search engines take up to 50,000 URLs per file. For a large archive, serve `/sitemap.xml` as a sitemap index of numbered files (`/sitemaps/1.xml`, `/sitemaps/2.xml`, ...), each a slice of the list, with each file's newest `updated_at` as its `lastmod`.

## Google News sitemap

`/news-sitemap.xml` lists stories published in the last 48 hours, up to 1,000. Page through `/articles?limit=50` until an article is older than 48 hours, and write each with its `title`, `published_at` and the site's name and language (`/site`'s `language`).

## RSS feed

`/feed.xml` is RSS 2.0 of `/articles?limit=50`. Use each article's `id` as the `guid` (not a permalink, since addresses can change), `published_at`, `excerpt`, `authors`, `category` and `cover`.

## llms.txt

`/llms.txt` describes the publication for AI agents ([llmstxt.org](https://llmstxt.org)): what it is, its sections and topics, and its latest 50 articles, each linked to its [markdown copy](https://developers.velora.build/routing.md#markdown-copies). Velora writes it:

```bash
curl -H "Authorization: Bearer $VELORA_READ_KEY" "https://delivery.velora.build/$SITE_ID/llms.txt"
```

Serve the answer as it is, with `Content-Type: text/markdown; charset=utf-8`. The webhook does not name it, so keep it for up to an hour.

## robots.txt

Point it at your sitemaps:

```
User-agent: *
Allow: /

Sitemap: https://your-site.com/sitemap.xml
Sitemap: https://your-site.com/news-sitemap.xml
```

Keep preview and search routes out of the index with `noindex` on the pages themselves.


# Deploy order

Some changes need a step in Velora and a deploy of your front end. Their order matters.

## First launch

1. **Copy the three values** (delivery URL, read key, webhook secret) from **Publication**, **Overview** into your front end's environment, for production and previews ([Connect](https://developers.velora.build/connect.md)).
2. **Keep your own routes.** In **Publication**, **Article addresses**, **Kept for your front end**, list every path your front end serves itself ([Routing](https://developers.velora.build/routing.md#addresses-kept-for-your-front-end)).
3. **Deploy the front end.** It renders straight from the API; nothing in Velora has to point at it yet.
4. **Point Velora at it.** Set the **Revalidate URL** and **Preview URL** (Overview, **Edit in CMS settings**). Velora starts sending the webhook, the Preview button appears, and Velora reads your [block list](https://developers.velora.build/bodies.md#your-own-blocks).
5. **Check it.** Publish a change to an article in Velora and watch the page update within seconds. Press Preview on a draft.

When the site moves to its own domain, update both URLs in Velora.

## A new route of your own

1. Add its path to **Kept for your front end**. Velora refuses if content already lives there; move that content first.
2. Deploy the route.

The other way round, content could be given the address between the deploy and the setting, and your route would hide it.

## A new block

1. Define the block in your list and deploy its component with it.
2. Let Velora read the list: the [deploy ping](https://developers.velora.build/bodies.md#tell-velora-it-changed), or Refresh in **Skills**, **Components**.
3. Switch the block on in **Skills**, **Components**, and say when the writer should use it.

The writer can only place a block once your front end can draw it.

## Removing a block

1. Switch it off in Velora, so no new article uses it.
2. Remove it from your list. Velora then refuses to publish an article that still holds it.
3. Keep rendering it, or a plain fallback, for as long as published articles hold it.

## Rotating a key or secret

Replacing the read key or the webhook secret in Velora stops the old one at once. Update your front end's environment and redeploy straight after. Until then, reads answer 404, or webhooks and preview links fail their signature check.


# API reference

Every read is a `GET` to `https://delivery.velora.build/{site_id}/...` with the Site's read key, as `Authorization: Bearer <key>` or `?key=<key>` ([Connect](https://developers.velora.build/connect.md)). Paths below start at the Site id. Every route answers `404` with `{"error": "NOT_FOUND", "detail": "Not found"}` when the Site, the key or the thing asked for does not exist, so the three cannot be told apart.

This page is written from the OpenAPI document at [https://developers.velora.build/openapi.json](https://developers.velora.build/openapi.json), which is generated from the routes themselves. Use it to generate types.

## Routes

| Route | What it answers |
| --- | --- |
| [`/site`](#get-site) | Everything that renders around the content: name, address, settings, navigation, sections, entity types and the article details a site keeps |
| [`/home`](#get-home) | The front page's sections, in the order the Site set |
| [`/articles`](#get-articles) | Live articles, newest first |
| [`/articles/{slug}`](#get-articles-slug) | One live article |
| [`/changes`](#get-changes) | What changed for readers after `cursor`, oldest first: for a search index, a cache or an agent keeping a copy in step |
| [`/preview/{article_id}`](#get-preview-article-id) | A draft, rendered without writing anything, through a link that expires (`exp`) |
| [`/categories`](#get-categories) | Every section, in the Site's order |
| [`/categories/{slug}`](#get-categories-slug) | A section and a page of its articles |
| [`/tags`](#get-tags) | Tags on live articles, most used first |
| [`/authors`](#get-authors) | The Site's writers |
| [`/authors/{slug}`](#get-authors-slug) | A writer and a page of their articles |
| [`/entities/{type_slug}`](#get-entities-type-slug) | The type's entities with a page, or with `via` and `to` every one whose `via` detail links to the entity `to` names, with a page or not |
| [`/entities/{type_slug}/{slug}`](#get-entities-type-slug-slug) | One entity: its details, bio, a page of the articles about it, and the entities linking to it |
| [`/pages/{slug}`](#get-pages-slug) | A static page, such as About |
| [`/resolve`](#get-resolve) | What lives at a path: an article, a page, a category, an entity type index or an entity, with the slug its own endpoint takes and the content itself (a listing's `page` of `limit`); or a redirect from an old address; or nothing |
| [`/sitemap`](#get-sitemap) | Every address on the Site, with when it last changed |
| [`/llms.txt`](#get-llms-txt) | The publication as an `llms.txt` index (llmstxt.org): what it is, its sections and topics, and its latest articles with links to their markdown. A front end serves it at its own `/llms.txt` |
| [`/search`](#get-search) | Live articles matching `q` (words, "quoted phrases", -excluded), best first |
| [`/many`](#get-many) | Several reads in one call |

### GET /site

Everything that renders around the content: name, address, settings,
navigation, sections, entity types and the article details a site keeps.

Returns [SiteView](#siteview) (`application/json`).

### GET /home

The front page's sections, in the order the Site set.

Returns [HomeView](#homeview) (`application/json`).

### GET /articles

Live articles, newest first. Filters: `category`, `tag`, `author` (slugs),
`type`, an entity as `entity_type` plus `entity` (its type's slug and
its own), and an article detail as `detail` plus `value` (`/site`'s
`article_details`: `detail=Sponsored&value=true`; a link detail takes the
linked entity's slug). `category`, `tag` and `type` take several, comma
separated (`type=news,race`), and match any of them. An article must match
every filter, or any of category, tag and type with `match=any`
(`category=tech&type=consumer&match=any`).

`cursor` reads on from a listing's `next_cursor` instead of a numbered
page, as far back as the archive goes: "load more", or every article in
turn. An ISO time instead starts at the articles published before it
(`cursor=2019-06-01T00:00:00Z`). A read with a cursor is never kept or
cached.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `page` | query | integer | default `1`, min 1, max 500 |
| `limit` | query | integer | default `12`, min 1, max 50 |
| `category` | query | string |  |
| `tag` | query | string |  |
| `author` | query | string |  |
| `type` | query | string |  |
| `entity_type` | query | string |  |
| `entity` | query | string |  |
| `detail` | query | string |  |
| `value` | query | string |  |
| `match` | query | `"all"` or `"any"` | default `"all"` |
| `cursor` | query | string |  |

Returns [ArticlePage](#articlepage) (`application/json`).

### GET /articles/{slug}

One live article. `?format=markdown` adds the body as markdown.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `slug` | path | string | required |
| `format` | query | string |  |

Returns [ArticleDetail](#articledetail) (`application/json`).

### GET /changes

What changed for readers after `cursor`, oldest first: for a search
index, a cache or an agent keeping a copy in step. Start with no cursor (or
an ISO time) and pass back `next_cursor`. Never cached.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `cursor` | query | string | default `"1970-01-01T00:00:00Z"` |
| `limit` | query | integer | default `100`, min 1, max 500 |

Returns [ChangesView](#changesview) (`application/json`).

### GET /preview/{article_id}

A draft, rendered without writing anything, through a link that expires
(`exp`). Never cached.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `article_id` | path | string (uuid) | required |
| `sig` | query | string | default `""` |
| `exp` | query | integer | default `0` |

Returns [ArticleDetail](#articledetail) (`application/json`).

### GET /categories

Every section, in the Site's order.

Returns list of [CategoryView](#categoryview) (`application/json`).

### GET /categories/{slug}

A section and a page of its articles.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `slug` | path | string | required |
| `page` | query | integer | default `1`, min 1, max 500 |
| `limit` | query | integer | default `12`, min 1, max 50 |

Returns [CategoryPage](#categorypage) (`application/json`).

### GET /tags

Tags on live articles, most used first.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `limit` | query | integer | default `100`, min 1, max 500 |

Returns list of [TagCountView](#tagcountview) (`application/json`).

### GET /authors

The Site's writers.

Returns list of [AuthorView](#authorview) (`application/json`).

### GET /authors/{slug}

A writer and a page of their articles.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `slug` | path | string | required |
| `page` | query | integer | default `1`, min 1, max 500 |
| `limit` | query | integer | default `12`, min 1, max 50 |

Returns [AuthorPage](#authorpage) (`application/json`).

### GET /entities/{type_slug}

The type's entities with a page, or with `via` and `to` every one whose
`via` detail links to the entity `to` names, with a page or not.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `type_slug` | path | string | required |
| `page` | query | integer | default `1`, min 1, max 500 |
| `limit` | query | integer | default `48`, min 1, max 100 |
| `via` | query | string | A link detail of the type |
| `to` | query | string | The linked entity's slug |

Returns [EntityTypePage](#entitytypepage) (`application/json`).

### GET /entities/{type_slug}/{slug}

One entity: its details, bio, a page of the articles about it, and
the entities linking to it.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `type_slug` | path | string | required |
| `slug` | path | string | required |
| `page` | query | integer | default `1`, min 1, max 500 |
| `limit` | query | integer | default `12`, min 1, max 50 |

Returns [EntityDetail](#entitydetail) (`application/json`).

### GET /pages/{slug}

A static page, such as About.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `slug` | path | string | required |

Returns [PageView](#pageview) (`application/json`).

### GET /resolve

What lives at a path: an article, a page, a category, an entity type
index or an entity, with the slug its own endpoint takes and the content
itself (a listing's `page` of `limit`); or a redirect from an old address;
or nothing. Front ends serve every path from this one call.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `path` | query | string | required |
| `page` | query | integer | default `1`, min 1, max 500 |
| `limit` | query | integer | default `12`, min 1, max 50 |

Returns [ResolvedPath](#resolvedpath) (`application/json`).

### GET /sitemap

Every address on the Site, with when it last changed.

Returns [Sitemap](#sitemap) (`application/json`).

### GET /llms.txt

The publication as an `llms.txt` index (llmstxt.org): what it is, its
sections and topics, and its latest articles with links to their markdown.
A front end serves it at its own `/llms.txt`.

Returns string (`text/plain`).

### GET /search

Live articles matching `q` (words, "quoted phrases", -excluded), best first.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `q` | query | string | required; max length 200 |
| `page` | query | integer | default `1`, min 1, max 500 |
| `limit` | query | integer | default `12`, min 1, max 50 |

Returns [ArticlePage](#articlepage) (`application/json`).

### GET /many

Several reads in one call. Each `r` is a request as its own endpoint
takes it, from the Site on (`r=/articles?category=news&limit=3`), and is
answered exactly as that endpoint answers it, in the order asked. The
answer is kept until a change touches any of them.

| Parameter | In | Type | Notes |
| --- | --- | --- | --- |
| `r` | query | list of string | required |

Returns [BatchView](#batchview) (`application/json`).

## Types

### ArticleCard

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string (uuid) |  |
| `slug` | string |  |
| `path` | string |  |
| `title` | string |  |
| `excerpt` | string or null |  |
| `eyebrow` | string or null |  |
| `cover` | [RenderedImage](#renderedimage) or null |  |
| `published_at` | string (date-time) or null |  |
| `updated_at` | string (date-time) or null |  |
| `reading_minutes` | integer | default `1` |
| `article_type` | string or null |  |
| `category` | [CategoryRef](#categoryref) or null |  |
| `authors` | list of [AuthorRef](#authorref) |  |
| `tags` | list of [TagRef](#tagref) |  |
| `details` | map of name to string or integer or number or boolean or [LinkedEntity](#linkedentity) or list of [LinkedEntity](#linkedentity) |  |

### ArticleDetail

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string (uuid) |  |
| `slug` | string |  |
| `path` | string |  |
| `title` | string |  |
| `excerpt` | string or null |  |
| `eyebrow` | string or null |  |
| `cover` | [RenderedImage](#renderedimage) or null |  |
| `published_at` | string (date-time) or null |  |
| `updated_at` | string (date-time) or null |  |
| `reading_minutes` | integer | default `1` |
| `article_type` | string or null |  |
| `category` | [CategoryRef](#categoryref) or null |  |
| `authors` | list of [AuthorView](#authorview) |  |
| `tags` | list of [TagRef](#tagref) |  |
| `details` | map of name to string or integer or number or boolean or [LinkedEntity](#linkedentity) or list of [LinkedEntity](#linkedentity) |  |
| `body` | list of [TextBlock](#textblock) or [ImageBlock](#imageblock) or [TableBlock](#tableblock) or [CodeBlock](#codeblock) or [BreakBlock](#breakblock) or [EmbedBlock](#embedblock) or [GalleryBlock](#galleryblock) or [QuoteBlock](#quoteblock) or [CalloutBlock](#calloutblock) or [GraphicBlock](#graphicblock) or [CustomBlock](#customblock) |  |
| `html` | string | default `""` |
| `markdown` | string or null |  |
| `word_count` | integer | default `0` |
| `seo` | [ArticleSeo](#articleseo) |  |
| `entities` | list of [EntityRef](#entityref) |  |
| `corrections` | list of [Correction](#correction) |  |
| `related` | list of [ArticleCard](#articlecard) |  |

### ArticlePage

A page of article cards.

| Field | Type | Notes |
| --- | --- | --- |
| `items` | list of [ArticleCard](#articlecard) |  |
| `page` | integer |  |
| `pages` | integer |  |
| `total` | integer |  |
| `next_cursor` | string or null | Where the next page starts, or null on the last: pass it as `cursor` to `/articles` with the same filters and `limit` (a category's, tag's, author's or entity's listing is `/articles` filtered by it). Pages read this way cost the same at any depth and go on past page 500. Always null from `/search`, which pages by number. |

### ArticleSeo

| Field | Type | Notes |
| --- | --- | --- |
| `title` | string |  |
| `description` | string or null |  |
| `image_url` | string or null |  |
| `canonical_path` | string |  |

### AuthorPage

| Field | Type | Notes |
| --- | --- | --- |
| `author` | [AuthorView](#authorview) |  |
| `articles` | [ArticlePage](#articlepage) |  |

### AuthorRef

| Field | Type | Notes |
| --- | --- | --- |
| `slug` | string |  |
| `name` | string |  |
| `path` | string |  |
| `avatar` | [RenderedImage](#renderedimage) or null |  |
| `title` | string or null |  |

### AuthorView

An author in full: on their own page, the author list and an
article's byline.

| Field | Type | Notes |
| --- | --- | --- |
| `slug` | string |  |
| `name` | string |  |
| `path` | string |  |
| `avatar` | [RenderedImage](#renderedimage) or null |  |
| `title` | string or null |  |
| `bio` | string or null |  |
| `social` | map of name to string |  |
| `articles` | integer or null |  |

### BatchItem

| Field | Type | Notes |
| --- | --- | --- |
| `request` | string |  |
| `status` | integer |  |
| `body` | any |  |

### BatchView

Several reads in one call, answered in the order they were asked.

| Field | Type | Notes |
| --- | --- | --- |
| `results` | list of [BatchItem](#batchitem) |  |

### BreakBlock

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `_type` | `"break"` |  |

### CalloutBlock

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `_type` | `"callout"` |  |
| `title` | string or null |  |
| `text` | string |  |

### CategoryPage

| Field | Type | Notes |
| --- | --- | --- |
| `category` | [CategoryView](#categoryview) |  |
| `articles` | [ArticlePage](#articlepage) |  |

### CategoryParent

The top-level category one sits inside, for a breadcrumb.

| Field | Type | Notes |
| --- | --- | --- |
| `slug` | string |  |
| `name` | string |  |
| `path` | string |  |

### CategoryRef

| Field | Type | Notes |
| --- | --- | --- |
| `slug` | string |  |
| `name` | string |  |
| `path` | string |  |
| `parent` | [CategoryParent](#categoryparent) or null |  |

### CategoryView

| Field | Type | Notes |
| --- | --- | --- |
| `slug` | string |  |
| `name` | string |  |
| `path` | string |  |
| `description` | string or null |  |
| `parent` | [CategoryParent](#categoryparent) or null |  |

### ChangeView

One entry whose reader-facing state changed: `live` (published or
updated) or `removed` (taken down). Poll with the last `changed_at` seen.

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string (uuid) |  |
| `slug` | string |  |
| `path` | string |  |
| `state` | `"live"` or `"removed"` |  |
| `published_at` | string (date-time) or null |  |
| `changed_at` | string (date-time) |  |

### ChangesView

| Field | Type | Notes |
| --- | --- | --- |
| `items` | list of [ChangeView](#changeview) |  |
| `next_cursor` | string |  |

### CodeBlock

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `_type` | `"code"` |  |
| `code` | string |  |
| `language` | string or null |  |

### Correction

A dated note on a published article, shown to readers.

| Field | Type | Notes |
| --- | --- | --- |
| `at` | string (date-time) |  |
| `note` | string | max length 1000 |

### CustomBlock

One of the Site's own blocks: `_type` is its name, and the fields its
definition names sit beside it.

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `_type` | string |  |
| *(any other)* | any | the block's own fields |

### DetailView

One detail every entity of a type (or every article) has, so a front
end knows the shape of its values before it reads one.

| Field | Type | Notes |
| --- | --- | --- |
| `key` | string |  |
| `kind` | string |  |
| `links_to` | string or null |  |
| `many` | boolean | default `false` |
| `options` | list of string |  |

### EmbedBlock

A post or video from another service, by its public URL.

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `_type` | `"embed"` |  |
| `provider` | `"twitter"` or `"instagram"` or `"youtube"` or `"tiktok"` or `"bluesky"` or `"threads"` or `"facebook"` or `"linkedin"` or `"vimeo"` or `"strava"` or `"other"` |  |
| `url` | string |  |
| `caption` | string or null |  |

### EntityCard

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string (uuid) |  |
| `slug` | string |  |
| `name` | string |  |
| `summary` | string or null |  |
| `image` | [RenderedImage](#renderedimage) or null |  |
| `articles` | integer | default `0` |
| `fields` | map of name to string or integer or number or boolean or [LinkedEntity](#linkedentity) or list of [LinkedEntity](#linkedentity) |  |
| `path` | string or null |  |

### EntityDetail

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string (uuid) |  |
| `slug` | string |  |
| `name` | string |  |
| `summary` | string or null |  |
| `image` | [RenderedImage](#renderedimage) or null |  |
| `articles` | integer | default `0` |
| `fields` | map of name to string or integer or number or boolean or [LinkedEntity](#linkedentity) or list of [LinkedEntity](#linkedentity) |  |
| `path` | string |  |
| `type` | [EntityTypeView](#entitytypeview) |  |
| `bio_html` | string | default `""` |
| `bio` | list of [TextBlock](#textblock) or [ImageBlock](#imageblock) or [TableBlock](#tableblock) or [CodeBlock](#codeblock) or [BreakBlock](#breakblock) or [EmbedBlock](#embedblock) or [GalleryBlock](#galleryblock) or [QuoteBlock](#quoteblock) or [CalloutBlock](#calloutblock) or [GraphicBlock](#graphicblock) or [CustomBlock](#customblock) |  |
| `articles_page` | [ArticlePage](#articlepage) |  |
| `seo` | [EntitySeo](#entityseo) |  |
| `linked_from` | list of [LinkedGroupView](#linkedgroupview) |  |

### EntityRef

| Field | Type | Notes |
| --- | --- | --- |
| `slug` | string |  |
| `name` | string |  |
| `path` | string |  |
| `type_slug` | string |  |
| `type_name` | string |  |
| `image` | [RenderedImage](#renderedimage) or null |  |

### EntitySeo

| Field | Type | Notes |
| --- | --- | --- |
| `index` | boolean |  |
| `canonical_path` | string |  |

### EntityTypePage

| Field | Type | Notes |
| --- | --- | --- |
| `type` | [EntityTypeView](#entitytypeview) |  |
| `items` | list of [EntityCard](#entitycard) |  |
| `page` | integer |  |
| `pages` | integer |  |
| `total` | integer |  |

### EntityTypeView

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string (uuid) |  |
| `slug` | string |  |
| `name` | string |  |
| `singular_name` | string |  |
| `kind` | string |  |
| `path` | string |  |
| `details` | list of [DetailView](#detailview) |  |

### GalleryBlock

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `_type` | `"gallery"` |  |
| `title` | string or null |  |
| `images` | list of [ImageBlock](#imageblock) |  |

### GraphicBlock

An interactive graphic: `markup` (and `script`) to draw it, `image` for
anywhere that cannot run it.

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `_type` | `"graphic"` |  |
| `id` | string |  |
| `title` | string |  |
| `alt` | string |  |
| `caption` | string or null |  |
| `image` | [RenderedImage](#renderedimage) or null |  |
| `markup` | string |  |
| `script` | string or null |  |

### HomeSection

| Field | Type | Notes |
| --- | --- | --- |
| `kind` | `"articles"` or `"entity_type"` |  |
| `key` | string or null |  |
| `title` | string or null |  |
| `path` | string or null |  |
| `articles` | list of [ArticleCard](#articlecard) |  |
| `entities` | list of [EntityCard](#entitycard) |  |

### HomeView

| Field | Type | Notes |
| --- | --- | --- |
| `sections` | list of [HomeSection](#homesection) |  |

### ImageBlock

An image in a body or a gallery: an image with a place and a link.

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `url` | string |  |
| `alt` | string | default `""` |
| `caption` | string or null |  |
| `credit` | string or null |  |
| `width` | integer or null |  |
| `height` | integer or null |  |
| `focalPoint` | [ImageFocalPoint](#imagefocalpoint) or null |  |
| `placeholder` | string or null |  |
| `_type` | `"image"` |  |
| `link` | string or null |  |

### ImageFocalPoint

0-1 from the left and the top of the image.

| Field | Type | Notes |
| --- | --- | --- |
| `x` | number |  |
| `y` | number |  |

### LinkMark

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `_type` | `"link"` |  |
| `href` | string |  |

### LinkedEntity

An entity a detail links to.

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string (uuid) |  |
| `slug` | string |  |
| `name` | string |  |
| `type_slug` | string |  |
| `path` | string or null |  |

### LinkedGroupView

The entities of one type linking to an entity through one of their
details: a team's riders, by Team.

| Field | Type | Notes |
| --- | --- | --- |
| `type_slug` | string |  |
| `type_name` | string |  |
| `detail` | string |  |
| `total` | integer |  |
| `items` | list of [EntityCard](#entitycard) |  |

### NavItem

| Field | Type | Notes |
| --- | --- | --- |
| `label` | string | max length 60 |
| `url` | string | max length 500 |

### Navigation

| Field | Type | Notes |
| --- | --- | --- |
| `primary` | list of [NavItem](#navitem) | optional |
| `footer` | list of [NavItem](#navitem) | optional |

### PageView

| Field | Type | Notes |
| --- | --- | --- |
| `slug` | string |  |
| `path` | string |  |
| `title` | string |  |
| `body` | list of [TextBlock](#textblock) or [ImageBlock](#imageblock) or [TableBlock](#tableblock) or [CodeBlock](#codeblock) or [BreakBlock](#breakblock) or [EmbedBlock](#embedblock) or [GalleryBlock](#galleryblock) or [QuoteBlock](#quoteblock) or [CalloutBlock](#calloutblock) or [GraphicBlock](#graphicblock) or [CustomBlock](#customblock) |  |
| `html` | string | default `""` |
| `seo_title` | string or null |  |
| `seo_description` | string or null |  |
| `updated_at` | string (date-time) or null |  |

### QuoteBlock

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `_type` | `"quote"` |  |
| `text` | string |  |
| `credit` | string or null |  |

### RenderedImage

An image as readers get it: a cover, a product's picture, a graphic's,
an author's or an entity's.

| Field | Type | Notes |
| --- | --- | --- |
| `url` | string |  |
| `alt` | string | default `""` |
| `caption` | string or null |  |
| `credit` | string or null |  |
| `width` | integer or null |  |
| `height` | integer or null |  |
| `focalPoint` | [ImageFocalPoint](#imagefocalpoint) or null |  |
| `placeholder` | string or null |  |

### ResolvedPath

What lives at a path. ``slug`` (and ``type_slug`` for an entity) is
what its own endpoint takes: `/articles/{slug}`, `/pages/{slug}`,
`/categories/{slug}`, `/entities/{type_slug}` or
`/entities/{type_slug}/{slug}`. A redirect says where to (``to``).

| Field | Type | Notes |
| --- | --- | --- |
| `kind` | `"article"` or `"page"` or `"category"` or `"entity_type"` or `"entity"` or `"redirect"` or `"not_found"` |  |
| `path` | string |  |
| `to` | string or null |  |
| `slug` | string or null |  |
| `type_slug` | string or null |  |
| `article` | [ArticleDetail](#articledetail) or null |  |
| `page` | [PageView](#pageview) or null |  |
| `category` | [CategoryPage](#categorypage) or null |  |
| `entity_type` | [EntityTypePage](#entitytypepage) or null |  |
| `entity` | [EntityDetail](#entitydetail) or null |  |

### SeoDefaults

| Field | Type | Notes |
| --- | --- | --- |
| `title_suffix` | string or null | optional |
| `description` | string or null | optional |

### SiteSettings

What renders around the content: name, logo, links, defaults.

| Field | Type | Notes |
| --- | --- | --- |
| `title` | string or null | optional |
| `description` | string or null | optional |
| `logo_url` | string or null | optional |
| `default_share_image_url` | string or null | optional |
| `social` | map of name to string | optional |
| `seo` | [SeoDefaults](#seodefaults) | optional |
| `time_zone` | string or null | optional |

### SiteView

Everything that renders around the content: one call per page load,
cached like the rest.

| Field | Type | Notes |
| --- | --- | --- |
| `name` | string |  |
| `url` | string or null |  |
| `language` | string |  |
| `settings` | [SiteSettings](#sitesettings) |  |
| `navigation` | [Navigation](#navigation) |  |
| `categories` | list of [CategoryView](#categoryview) |  |
| `entity_types` | list of [EntityTypeView](#entitytypeview) |  |
| `article_details` | list of [DetailView](#detailview) |  |

### Sitemap

| Field | Type | Notes |
| --- | --- | --- |
| `items` | list of [SitemapItem](#sitemapitem) |  |

### SitemapItem

| Field | Type | Notes |
| --- | --- | --- |
| `path` | string |  |
| `updated_at` | string (date-time) or null |  |

### Span

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `_type` | `"span"` |  |
| `text` | string |  |
| `marks` | list of string |  |

### TableBlock

Any table: a markdown table in the body, or a data, results or stage
table a writer filled in. `cells` line up with `columns`.

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `_type` | `"table"` |  |
| `title` | string or null |  |
| `subtitle` | string or null |  |
| `columns` | list of string |  |
| `rows` | list of [TableRow](#tablerow) |  |

### TableRow

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `cells` | list of string |  |

### TagCountView

| Field | Type | Notes |
| --- | --- | --- |
| `slug` | string |  |
| `name` | string |  |
| `articles` | integer |  |

### TagRef

A label on an article. Tags filter listings but have no page.

| Field | Type | Notes |
| --- | --- | --- |
| `slug` | string |  |
| `name` | string |  |

### TextBlock

A paragraph, heading, quote or list item (`listItem`, `level`).

| Field | Type | Notes |
| --- | --- | --- |
| `_key` | string |  |
| `_type` | `"block"` |  |
| `style` | `"normal"` or `"h2"` or `"h3"` or `"h4"` or `"h5"` or `"h6"` or `"blockquote"` | default `"normal"` |
| `listItem` | `"bullet"` or `"number"` | optional |
| `level` | integer | optional |
| `markDefs` | list of [LinkMark](#linkmark) |  |
| `children` | list of [Span](#span) |  |
