Skip to content

REST API

HTTP API reference for the InlineCMS backend.

All API routes are prefixed with /v1. Most routes require either an API key (x-inlinecms-key header) or a Bearer token (Authorization header), or both.

Authenticate a CMS user.

Terminal window
POST /v1/auth/login
Content-Type: application/json
{ "email": "editor@example.com", "password": "..." }

Returns: { data: { user, token, expiresAt }, error: null }

Invalidate the current session.

Terminal window
POST /v1/auth/logout
Authorization: Bearer <token>

Get the current authenticated user.

Terminal window
GET /v1/auth/me
Authorization: Bearer <token>

Rotate the session token.

Fetch content for a page. Visitors see published entries only. Editors (with auth header) see drafts.

Terminal window
GET /v1/content/%2F
x-inlinecms-key: <api-key>

Update a content entry’s fields and/or status. Requires editor role.

Terminal window
PATCH /v1/content/<entry-id>
Authorization: Bearer <token>
x-inlinecms-key: <api-key>
{ "fields": { "content": "New text" }, "status": "published" }

Publish all draft entries for a page.

Terminal window
POST /v1/content/bulk-publish
Authorization: Bearer <token>
x-inlinecms-key: <api-key>
{ "pageId": "/" }

Get the publish audit trail for a content entry.

The project’s published override snapshot — what a build “bakes” in. Returns content grouped by page path, object overrides, a deterministic version hash, and the server bakeEnabled kill-switch. Published-only and read-only. See the Build-Time Hydration guide.

Terminal window
GET /v1/snapshot
x-inlinecms-key: <api-key>

Returns:

{
"data": {
"schema": 1,
"version": "sha256:324ebbfc…",
"generatedAt": "2026-06-05T21:46:37.497Z",
"content": { "/": [ { "instanceKey": "hero-title", "fields": { "content": "…" }, } ] },
"objectFields": [],
"objectCollections": [],
"objectTypes": [],
"bakeEnabled": true
},
"error": null
}

Called by the SDK on mount. Registers component schemas and creates stub content entries.

Terminal window
POST /v1/definitions/sync
x-inlinecms-key: <api-key>
{
"pageId": "/",
"components": [
{ "componentId": "__inline_abc123", "instanceKey": "abc123", "fields": [{ "key": "content", "type": "text" }] }
]
}

Get component schemas for a page (used by the dashboard).

Create a new project with its first admin user. No auth required (onboarding).

Terminal window
POST /v1/projects
Content-Type: application/json
{
"name": "My Site",
"admin": { "email": "admin@example.com", "password": "secure-password" }
}

Returns: { data: { project: { id, apiKey, ... }, admin: { id, email, role } } }

Get project details. Requires auth.

Update project settings (name, domains, CDN URL, deploy hooks). Requires admin role.

Terminal window
PATCH /v1/projects/<id>
Authorization: Bearer <token>
{
"deployHooks": [
{ "id": "prod", "type": "generic", "url": "https://api.netlify.com/build_hooks/abc" },
{ "id": "gh", "type": "github", "url": "https://api.github.com/repos/me/site/dispatches", "secret": "ghp_…" }
]
}

deployHooks fire a rebuild on every publish (debounced) — see Build-Time Hydration → deploy triggers. A hook’s secret is write-only: responses include hasSecret but never the value.

Generate a new API key. Invalidates the old one. Requires admin role.

List all CMS users in the project.

Create a new CMS user. Requires admin role.

Update a user’s name or role. Requires admin role.

Remove a CMS user. Requires admin role.

Upload an image. Multipart form data with a file field.

List all uploaded media for the project.

Delete an uploaded file.

Returns { status: "ok", version: "0.1.0" }.

Was this page helpful? Your feedback goes straight to the docs team.