Ask
Elements

Elements API

An API and code-heavy template with endpoint cards and example requests.

This article uses the API / Code template. It is built for endpoint docs, snippets, payload examples, and implementation notes.

List Docs

GET /wp-json/wp/v2/docs

Retrieve published docs articles for headless or app-driven interfaces.

Get Sections

GET /wp-json/wp/v2/doc_section

Return the available section taxonomy terms and hierarchy.

Get Article Meta

GET /wp-json/wp/v2/docs/<id>

Read template style, badges, icon classes, and subtitles through REST.

Example Request

fetch("/wp-json/wp/v2/docs?per_page=5")n  .then((response) => response.json())n  .then((docs) => console.log(docs));

Notes

Because Docs is registered as a normal WordPress post type with REST enabled, you can mix classic server-rendered pages with app integrations whenever you need them.