TentoCMS
Getting Started

Quickstart

Make your first authenticated request to the TentoCMS Public API in a few minutes.

Read your first published page from the API. You need a project with at least one published page, and an API key.

1. Get an API key

Create a key in the TentoCMS admin panel under Settings → API Keys. For reading content, a public key (tento_pk_*) is enough — it is read-only and safe to use from a browser.

Use a secret key (tento_sk_*) only when you need to write, and only from a server. See Authentication for the difference and for the permissions a secret key can hold.

2. List published pages

Pass the key in the X-API-Key header:

curl -H "X-API-Key: tento_pk_abc123..." \
  https://your-api-host/api/v1/pages
{
  "data": [
    {
      "slug": "about-us",
      "name": "About Us",
      "publishedAt": "2026-07-01T09:00:00.000Z"
    }
  ],
  "pagination": { "page": 1, "limit": 20, "total": 1, "totalPages": 1 }
}

3. Fetch one page

curl -H "X-API-Key: tento_pk_abc123..." \
  https://your-api-host/api/v1/pages/about-us

Every list endpoint supports field selection, filtering, sorting and pagination — ask for only what you need rather than trimming the response client-side:

curl -H "X-API-Key: tento_pk_abc123..." \
  "https://your-api-host/api/v1/pages?fields=slug,name&limit=5"

See Query Parameters for the full set.

Endpoint summary

Read endpoints accept either key type:

MethodEndpointDescription
GET/pagesList published pages
GET/pages/:slugGet published page
GET/collections/:typeList published collection items
GET/collections/:type/:slugGet published collection item
GET/media/:idGet media metadata + URL
GET/blog/postsList blog posts
GET/blog/posts/:slugGet blog post
GET/blog/categoriesList blog categories
GET/blog/categories/:slugGet blog category
GET/blog/tagsList blog tags
GET/blog/tags/:slugGet blog tag

Write endpoints require a secret key with the permission shown:

MethodEndpointPermissionDescription
POST/pagescontent:writeCreate page
PUT/pages/:slugcontent:writeUpdate page
POST/pages/:slug/publishcontent:writePublish page
POST/pages/:slug/unpublishcontent:writeUnpublish page
DELETE/pages/:slugcontent:writeDelete page
POST/collections/:typecontent:writeCreate collection item
PUT/collections/:type/:slugcontent:writeUpdate collection item
DELETE/collections/:type/:slugcontent:writeDelete collection item
POST/mediamedia:writeUpload media file

Writes additionally require an Idempotency-Key header — see Write Operations.

Next steps

Copyright © 2026