Quickstart
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:
| Method | Endpoint | Description |
|---|---|---|
| GET | /pages | List published pages |
| GET | /pages/:slug | Get published page |
| GET | /collections/:type | List published collection items |
| GET | /collections/:type/:slug | Get published collection item |
| GET | /media/:id | Get media metadata + URL |
| GET | /blog/posts | List blog posts |
| GET | /blog/posts/:slug | Get blog post |
| GET | /blog/categories | List blog categories |
| GET | /blog/categories/:slug | Get blog category |
| GET | /blog/tags | List blog tags |
| GET | /blog/tags/:slug | Get blog tag |
Write endpoints require a secret key with the permission shown:
| Method | Endpoint | Permission | Description |
|---|---|---|---|
| POST | /pages | content:write | Create page |
| PUT | /pages/:slug | content:write | Update page |
| POST | /pages/:slug/publish | content:write | Publish page |
| POST | /pages/:slug/unpublish | content:write | Unpublish page |
| DELETE | /pages/:slug | content:write | Delete page |
| POST | /collections/:type | content:write | Create collection item |
| PUT | /collections/:type/:slug | content:write | Update collection item |
| DELETE | /collections/:type/:slug | content:write | Delete collection item |
| POST | /media | media:write | Upload media file |
Writes additionally require an Idempotency-Key header — see
Write Operations.
Next steps
- Authentication — key types, permissions and auth errors
- API Overview — versioning, preview mode and the endpoint reference
- Rate limits and error codes — what to expect when a request fails

