Skip to content

Docs

›

Content API

Writing entries

Create and update CMS entries with an API token, as drafts or published.

Updated November 8, 2026

A token with create or update on a collection can write entries. Every write goes through the same validation as the CMS editor, so required fields, lengths and field types are enforced, and every change is versioned.

Create

Send the field values as a flat JSON object. Rich text fields accept HTML.

curl -X POST "https://your-workspace.praismahub.com/api/v1/public/YOUR_TOKEN/ORG_ID/blog-posts" \ -H "Content-Type: application/json" \ -d '{"title": "Our autumn update", "body": "<p>Hello <strong>world</strong></p>"}'

A successful create answers 201 with {"data": {...}, "meta": {"type": "blog-posts"}}.

Update

Updates are partial: fields you leave out keep their value.

curl -X PUT "https://your-workspace.praismahub.com/api/v1/public/YOUR_TOKEN/ORG_ID/blog-posts/ENTRY_ID" \ -H "Content-Type: application/json" \ -d '{"body": "<p>Updated</p>"}'

Drafts and publishing

By default every API write lands as a draft, and a status in the body is ignored. To let the API publish, open the collection in the CMS and turn on Allow publishing through the public API. Then a write may send "status": "published" or "status": "draft". Without a status, a create is a draft and an update keeps the current status. Other values are ignored.

Validation errors

Invalid input answers 422:

{ "message": "Validation failed.", "errors": { "title": ["The title field is required."] } }

If a plan limit is reached (for example the number of entries), a create answers 429 with "code": "PLAN_LIMIT_EXCEEDED".

Questions about building on Praisma Hub? We're happy to help.

Contact us