1
Create an organization and a project
Sign in to the web app at app.nohead.io. The first time, it asks you to create an organization and a project. A project holds one site’s or app’s content.
2
Create a collection
Under Collections, choose New collection. Start from a template (blog posts, pages, products, team members or FAQ) or from a blank collection, and adjust the fields to your needs. Content modelling explains the field types.
3
Add and publish a record
Open the collection, choose New record, fill in its fields and choose Create and publish from the Create button’s menu. Records start unpublished; only published records are visible to published-only keys.
4
Create an API key
Under API keys, choose New API key and give it the Read records scope (The SDKs read the key from
records:read). Leave Published records only on (the default) for a key your live site uses, so unpublished records never reach it; turn it off for a key that writes. A published-only key starts nohead_pk_, and any other key nohead_sk_. API keys lists every scope.Store the key somewhere safe, for example as NOHEAD_API_KEY in your app’s environment:NOHEAD_API_KEY when you don’t pass one. They don’t read the key that nohead login saves for the CLI, so even after signing in there, your app needs a key like this one.5
Fetch your content
List the collection’s records: a published-only key sees only the published ones. With an API key, you can use the collection’s slug instead of its ID.The SDKs also page through results, retry safely and verify webhooks.
The response
Lists return the records underdata, with a cursor for the next page under meta. Each record’s values are under its own data, keyed by field key. A record is published when it has a published_at:
Next steps
- Pass
limit(1 to 100) andcursorto page through long lists, andsort(for example-published_at) to order them. - Filter on a field with
filter[<key>]=value, for examplefilter[tags]=news(on a field with several values, it matches records whose list includes the value). - Embed assets or related records with
expand, for exampleexpand=cover_image. Asset and rich text fields need the key’s Read assets scope (assets:read) too. - Fetch one record with
GET /v1/records/{record_id}.