Blog Posts & Categories

Part of the Content API. Endpoints for the site’s blog: posts, categories and the blog’s landing page. Scopes: blog:read / blog:write.

Blog posts

GETPOST/api/v3/blog/posts/
GETPUTPATCHDELETE/api/v3/blog/posts/<id>/
Field Type Notes
id int Read-only.
title string ≤200 Required.
slug slug ≤200 Required, unique.
body HTML Required, sanitized; use <!--read more--> for the summary break.
summary HTML Read-only: the body up to <!--read more-->.
status draft / published Defaults to published — send draft unless you mean it.
state string Read-only, computed: draft, published, or scheduled (published with a future publish).
publish datetime Defaults to now.
created_at, updated_at datetime Read-only.
allow_comments, nofollow_comments bool Default true.
page_title, meta_description, meta_keywords string ≤400 SEO fields.
facebook_image string / null Image URL for social sharing.
categories list On write: category ids or slugs. On read: [{"id", "name", "slug"}].
path, url string Read-only.

List filters: status, state, slug, q (title contains), category (id or slug), ordering (publish, updated_at, created_at, title, id; default -publish), include_body=false to omit body/summary.

curl -X POST \
  https://www.example.com/api/v3/blog/posts/ \
  -H "Authorization: Bearer rg_live_..." \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Spring market update",
  "slug": "spring-market-update",
  "status": "draft",
  "categories": ["market-updates"],
  "body":
    "<p>Up.</p><!--read more--><p>More.</p>"
}'

Blog home page

GETPATCH/api/v3/blog/home-page/

The blog’s landing page: title (≤127), meta_description, meta_keywords, content (sanitized HTML), plus read-only path/url. GET is 404 blog_home_page_missing until one exists; PATCH creates it (201) in that case and updates it otherwise.

Blog categories

GETPOST/api/v3/blog/categories/
GETPUTPATCHDELETE/api/v3/blog/categories/<id>/

Fields: id, name (required), slug (required, unique), post_count (read-only), path, url. Filters: slug, q, ordering (name, slug, id).

Deleting a category that posts use returns 409 conflict unless you pass ?force=true, which removes it from those posts.