Skip to content

REST API endpoints

All paths are relative to the base namespace octa-editor-api/v1, giving a full URL of https://example.com/wp-json/octa-editor-api/v1/…. Posts and terms have a symmetric set of endpoints.

Method Path Purpose
GET /post/{id} Read a post as the canonical document.
GET /post/lookup Resolve a post by identifier, such as URL or slug, without knowing its ID.
GET /post/list List the caller’s posts, scoped anti-oracle to what they may access.
POST /post/publish Create or update a post (upsert), using _match for identity.
POST /post/create Create a new post.
Method Path Purpose
GET /term/{id} Read a term as the canonical document.
GET /term/lookup Resolve a term by identifier without knowing its ID.
GET /term/list List the caller’s terms, scoped anti-oracle.
POST /term/publish Create or update a term (upsert).
POST /term/create Create a new term.
Terminal window
curl https://example.com/wp-json/octa-editor-api/v1/post/123 \
--user "editor:APPLICATION_PASSWORD"

Identity comes from _match, and the rest of the body is the document. Send _dry_run first to preview.

Terminal window
curl -X POST https://example.com/wp-json/octa-editor-api/v1/post/publish \
--user "editor:APPLICATION_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"_dry_run": true,
"_match": { "id": 123 },
"type": "post",
"title": "Updated title",
"seo": { "description": "New meta description." }
}'

Remove _dry_run to write. For hierarchical types, include parent, because identity is (parent, slug). See Record identity.

Terminal window
curl -X POST https://example.com/wp-json/octa-editor-api/v1/term/create \
--user "editor:APPLICATION_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"type": "term",
"taxonomy": "series",
"title": "Implementation series",
"slug": "implementation-series"
}'