Skip to content

Content delivery ​

APIs for pulling published content into your website or app. The core is list and retrieve, plus retrieve media and record views for rendering pages.

Authenticate by sending an API key in the Authorization: Bearer header; the space is determined from the key. Call it with a full (full access) or content (read content) key.

Only published entries are served. Entries edited after publishing (changed) stay visible and return their current, edited values. Drafts, scheduled and archived entries return 404.

:content_type is the content type's api_id (e.g. blog) — the slug you set when creating the content type in the console.

Authentication
bash
curl https://api.cherpa.me/v1/content/blog/entries \
  -H "Authorization: Bearer chp_..."

The entry object ​

Represents a single piece of content (an entry). Internal fields such as status and view count aren't included.

PropertyDescription
idEntry ID (UUID)
content_typeContent type api_id (e.g. blog)
valuesMap of field_id → value. Rich text is a document JSON; media is an asset id. With lang_code, values in that language
localeLanguage code of values. null if the content type doesn't use multiple languages
published_atPublish time
created_at updated_atCreated and updated times

Media field values are asset ids — get the URL with Retrieve media.

Entry object
json
{
  "id": "0d6f3c2a-7b1e-4c8a-9f2d-1a2b3c4d5e6f",
  "content_type": "blog",
  "values": {
    "title": "Why now is the time to lease an EV",
    "slug": "ev-long-term-rental",
    "body": { "type": "doc", "content": [] },
    "cover": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
  },
  "locale": "en",
  "published_at": "2026-08-23T04:27:24Z",
  "created_at": "2026-08-04T08:27:24Z",
  "updated_at": "2026-08-23T08:27:24Z"
}

List content ​

GET/v1/content/:content_type/entries

Lists a content type's published entries, newest published first by default.

ParameterDescription
fields.{field_id}Dynamic filter — filter by field value
orderSort key. A - prefix sorts descending (default -published_at)
lang_codeLanguage code (e.g. en). Defaults to the default language
page limitPagination — limit up to 100

order accepts published_at, created_at, updated_at or fields.{field_id}.

Returns — A paginated list of entry objects. 404 if the content type doesn't exist.

Request
bash
curl "https://api.cherpa.me/v1/content/blog/entries?order=-published_at&limit=10" \
  -H "Authorization: Bearer chp_..."
Response · 200
json
{
  "items": [{ "id": "0d6f3c2a-...", "content_type": "blog", "...": "..." }],
  "total": 42,
  "page": 1,
  "limit": 10,
  "total_pages": 5
}

Dynamic filters ​

Content type fields are defined freely, so filters are dynamic too — use fields.{field_id} query parameters. Put the operator in square brackets; without one, it's eq (equals).

fields.{field_id}=value         → equals (eq)
fields.{field_id}[op]=value     → with operator
OperatorMeaningExample
eqEquals (default)fields.slug=hello
neNot equalfields.category[ne]=news
containsPartial match (case-insensitive)fields.title[contains]=ev
inOne of a list (comma-separated)fields.category[in]=news,event
existsWhether the field is set (true/false)fields.cover[exists]=true
lt lte gt gteComparison (numbers numerically, everything else lexicographically)fields.price[gte]=10000

Multiple filters are combined with AND. Filtering on a field the content type doesn't have returns 400.

Find one entry by slug
bash
curl "https://api.cherpa.me/v1/content/blog/entries?fields.slug=hello" \
  -H "Authorization: Bearer chp_..."
Title search + entries with a cover only
bash
curl "https://api.cherpa.me/v1/content/blog/entries\
?fields.title[contains]=ev&fields.cover[exists]=true" \
  -H "Authorization: Bearer chp_..."

Retrieve content ​

GET/v1/content/:content_type/entries/:id

Pick a language with the lang_code query parameter. 404 if the entry has no translation in that language.

Returns — An entry object. 404 if it isn't published (draft, scheduled or archived) or belongs to another content type or space.

To look up an entry by a field value such as its slug, use the list API's filters (fields.slug=...).

Request
bash
curl https://api.cherpa.me/v1/content/blog/entries/0d6f3c2a-... \
  -H "Authorization: Bearer chp_..."

Localization ​

Add languages to a content type and each entry can hold separate values per language. The default language's values are in values; other languages are stored as translations.

When you pass lang_code to list or retrieve:

  • Only entries translated into that language are returned (the list's total and pages count only those).
  • values holds that language's values. Fields that weren't translated (e.g. the cover image) fall back to the default language's value.
  • Dynamic filters and fields.{field_id} in order also work on that language's values.

If lang_code is the default language or omitted, all entries are returned in the default language. A language code the content type doesn't have returns 400. Codes are case-insensitive.

English entries only, by slug
bash
curl "https://api.cherpa.me/v1/content/blog/entries\
?lang_code=en&fields.slug=ev-long-term-rental" \
  -H "Authorization: Bearer chp_..."

Record views ​

POST/v1/content/:content_type/entries/:id/views

Call this once when your site shows an entry to increase its view count by 1. The Views column in the console's content list and the cumulative views chart on the content Dashboard are built from this value. No request body.

Only published entries are counted — drafts, scheduled and archived entries return 404. Deduplication (such as repeat views by the same visitor) is up to the caller.

Returns — { "views": total views }

Request
bash
curl -X POST https://api.cherpa.me/v1/content/blog/entries/0d6f3c2a-.../views \
  -H "Authorization: Bearer chp_..."
Response · 200
json
{ "views": 1284 }

Retrieve media ​

GET/v1/content/assets/:id

Looks up file details by an entry's media field value (the asset id). Access the file through url.

PropertyDescription
idAsset ID (UUID)
urlFile URL
filename altFile name · alt text
width heightImage size (px)
sizeFile size (bytes)
uploaded_atUpload time

CDN

Image serving and transforms through a dedicated CDN domain are on the way. For now, use url as-is.

Request
bash
curl https://api.cherpa.me/v1/content/assets/a1b2c3d4-... \
  -H "Authorization: Bearer chp_..."
Response · 200
json
{
  "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "url": "https://.../cover.jpg",
  "filename": "cover.jpg",
  "alt": "Cover image",
  "width": 1600,
  "height": 900,
  "size": 254859,
  "uploaded_at": "2026-08-01T10:00:00Z"
}