Docs
Get started

Quickstart

Create a model, publish an entry, make a key and read it with curl. About five minutes.

View as Markdown

By the end of this page you will have one published entry and a curl command that reads it from Capa's CDN.

You need a Capa account. Sign in at app.capacms.com.

Create a project

A project holds one site's models, entries, media and keys.

  1. On Projects, choose Create project.
  2. Enter a Project name, such as Northpeak Outdoor.
  3. Choose Create.

Capa opens the new project. Already have a project? Open it and skip this step.

Create a model

A model is a content type, such as an article or a product.

  1. Choose Models in the sidebar, then New model.
  2. Enter Article in Unique Model Name. The Namespace fills in as article. That is the name the API uses.
  3. Choose Create Model.

Every new model starts with a title field.

Add a field

  1. Open the model's row menu and choose Edit fields.
  2. Under the card of fields, choose Add field, then Rich Text.
  3. In the field's settings, set Name to Body. Its namespace becomes body.
  4. Choose Done, then Save fields in the top bar.

Fields are saved only when you choose Save fields.

Write and publish an entry

  1. Choose Content in the sidebar, then New content, then Article.
  2. Fill in Title and Body.
  3. Choose Publish.

Publish saves and publishes in one step. Save draft saves without publishing, and a production key never sees a draft.

Create a key

  1. Open Developers > Keys and choose New key.
  2. Set Name to Website.
  3. Leave Environment on Production.
  4. Under Grants, choose Read only.
  5. Choose Create key, and copy the key.
The key is shown once. Capa stores it hashed and cannot show it again. If you lose it, rotate the key.

Read it

Put the key in an environment variable, then read the model's entries:

export CAPA_KEY=cap_live_...

curl "https://cdn.capacms.com/api/entries/article?select=title,body" \
  -H "x-api-key: $CAPA_KEY" \
  -H "Capa-Version: 2026-10-01"

You get your entry back:

{ "data": [
    { "id": "…3a", "model": "article", "status": "published",
      "fields": { "title": "Winter Field Guide 2026: Layering Above Treeline",
                  "body": "The cherries came in late this year…" } } ],
  "page": { "limit": 25, "hasNext": false, "next": null, "hasPrev": false, "prev": null },
  "meta": { "version": "2026-10-01", "contract": 1, "environment": "production", "requestId": "req_0f3c…" } }

What just happened

  • article in the URL is the model's namespace.
  • select chose two fields. Without it you get every field.
  • The response came from Capa's CDN. When you publish a change, Capa purges the cached copy, and the next read gets the new version.
  • Capa-Version pins the shape of the response. See Versions.

Something went wrong?

You gotIt means
401 missing_key or invalid_keyThe x-api-key header is missing, or the key is wrong. Copy it again, or rotate it.
404 model_not_foundNo model with that namespace, or the key cannot read it. Check the namespace under Models.
"data": []The entry is a draft. Publish it, or read with a draft key.

Every error has its own page under Errors.

Next