Velora CMS Developers

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 and preview links. 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). They are under Edit in CMS settings on the same card:

Call the API#

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

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

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:

{"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 describes every route and answer. Generate your types from it rather than writing them by hand, for example with openapi-typescript:

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

The API reference is the same document as a page.

This page as markdown: https://developers.velora.build/connect.md