Docs Publishing API
Read docs, publish guides, set page meta and update node introductions through the content API.
Use the same content credential as the Content Publishing API. Changes publish without a deployment.
Authentication
Send Authorization: Bearer YOUR_CONTENT_WEBHOOK_SECRET. Admin sessions and admin-owned API keys are also accepted. API-key mutations require the explicit content:write scope in addition to the admin role. A wildcard () alone does not grant this scope; request ["content:write"] or ["", "content:write"] when creating the key. A regular user API key cannot publish docs, even with content:write. Only an admin session or an admin-owned key with content:write can lock or unlock a page. The shared content secret cannot change locks.
All mutations require Content-Type: application/json. Session mutations also require a same-origin Origin (or Referer) on a trusted Wireflow host. Requests from published-app subdomains or custom domains are refused. Missing or unsupported content types return 415; untrusted session origins return 403.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /api/content/docs/pages | List every page with its resolved meta |
| GET | /api/content/docs/pages/{slug} | Read one page's meta and its current Markdown body |
| POST | /api/content/docs/pages | Create a guide with slug, title, description, body and optional meta |
| PUT | /api/content/docs/pages/{slug} | Create or replace a guide with title, description, body and optional meta |
| PATCH | /api/content/docs/pages/{slug} | Send one of meta, intro, or locked (admin) |
| DELETE | /api/content/docs/pages/{slug}/overlay?part=meta | Reset the overlay; part is meta, body or all |
Slugs are relative to /docs, for example getting-started or api/run. Use index for the docs home page. Use lowercase letters, numbers, hyphens and underscores, with at most four path segments and 180 characters. New pages appear in llms.txt. Node slugs already exist and accept only intro edits.
The existing MCP, Editor MCP and Publishing Apps references render from code. They support listing, meta and locks, but their body is not editable here: GET returns body: null and editable: none. Their Markdown export at the returned url plus .md is generated from the rendered page.
Every page in a GET carries slug, url, title, description, updatedAt, metaUpdatedAt, locked, type (GUIDE, REFERENCE, NODE or CATALOG), editable, meta (every field below, resolved), metaSource (overlay, repo, default or fixed, per field), bodySource (repo, overlay or code), unresolved (meta values that failed the schema and were dropped, related, next_steps and models entries that are not live yet, a parent that no longer resolves, and the children whose parent link to this page no longer resolves), contentError (a stored intro or body that no longer applies to the repo page, which is then served without it while every other write still works; clear it with DELETE /api/content/docs/pages/{slug}/overlay?part=body), hidden, hiddenReason and nodeId.
Success responses use { "success": true, "data": ... }. Lists put pages inside data.pages. Single-page responses return body as Markdown without frontmatter. Errors use { "success": false, "error": "..." }. POST returns 201; other successes return 200.
Page meta
Meta places a page in the docs sidebar and breadcrumbs, and links it to related pages. A meta write never changes the body, so bodySource stays repo, and it does not move Last updated unless it changes the title or description.
curl -X PATCH https://www.wireflow.ai/api/content/docs/pages/api/run \
-H "Authorization: Bearer $CONTENT_WEBHOOK_SECRET" \
-H "Content-Type: application/json" \
-d '{"meta":{"section":"api","page_type":"how-to","order":20,"related":["api/executions","api/webhooks"]}}'
Send meta writes one at a time (or through a batch endpoint once one exists). Every docs write takes the same lock, so parallel writes queue; when they back up, the API returns 503 with Retry-After: 2, and the write is safe to retry.
Each field resolves to the overlay, else the repo frontmatter, else the default. PATCH sets only the keys you send, null resets a key to the repo or default, and arrays replace whole. A PUT without meta keeps the saved meta. Unknown keys return 400, and every 400 names the field.
| Field | Value | Default |
|---|---|---|
| title, description | Plain text, 200 and 600 characters | The repo file |
| section | home, get-started, agents, workflows, nodes, recipes, api, publish or account | None, which files the page under More |
| page_type | hub, quickstart, how-to, recipe, concept, reference, skill, troubleshooting, node, family, category or changelog | None |
| nav_label | Sidebar and breadcrumb label, 40 characters | The title |
| parent | An existing slug in the same section, no cycles | The section hub |
| order | 0 to 999, ties broken by title | 100 |
| primary_question | 200 characters, not rendered | None |
| related, next_steps | Up to 5 and 6 docs slugs | Empty |
| tags, clients | Up to 8 each, lowercase a-z, 0-9 and hyphens, 30 characters | Empty |
| models | Node IDs such as video:kling_video_2_5_i2v, or family:slug | Empty |
| template | publishedSlug of a public template with API execution on | None |
| agent_prompt | 300 characters | None |
| reviewed | YYYY-MM-DD, shown in the page header | None |
| hidden | true keeps the page at 200 but noindexes it and drops it from the sidebar, breadcrumbs, related links, prev and next, the docs home cards, every llms.txt line and the sitemaps. The generated /docs/nodes catalog body still lists hidden nodes | false |
| hide_from_nav | true drops it from the sidebar only | false |
| canonical | An https://www.wireflow.ai URL | The page's own URL |
| og_image | An https://cdn.wireflow.ai URL | None |
| owner | Read-only: michael when a repo file exists, else content |
Section hubs are fixed: index, getting-started, use-wireflow-from-your-agent, workflows, nodes, recipes, api, publish and account. A hub's section cannot change and its parent is ignored. A write that moves, hides or resets a parent page is not refused when it breaks a child's parent link: the child shows it under unresolved.parent and sits at the top of its group until fixed. Related, next_steps and models entries that are unknown or hidden are saved, listed under unresolved and rendered once the page goes live.
Node pages take title, description, nav_label, related, tags, reviewed, hidden, template, agent_prompt, family, category and maker. Their section and page_type are fixed, so sending either returns 400. A node's title becomes its H1 and page title, and its description replaces the registry text on the page, in its Markdown and in /docs/nodes/llms.txt. The code-rendered references take every field except title and description.
DELETE /api/content/docs/pages/{slug}/overlay?part=meta resets meta (with title and description when a repo file exists), part=body resets the body and intro, and part=all does both. A page created through this API has no repo file, so part=body returns 409 and part=all deletes it.
Update the getting-started intro
curl -X PATCH https://www.wireflow.ai/api/content/docs/pages/getting-started \
-H "Authorization: Bearer $CONTENT_WEBHOOK_SECRET" \
-H "Content-Type: application/json" \
-d '{"intro":"Create your Wireflow account, open a workflow and connect your first nodes."}'
intro must be one Markdown paragraph, up to 4,000 characters. On a guide it replaces the first paragraph. On a node reference it replaces the first paragraph under Description. Fields, ports, prices and all other generated sections stay unchanged.
Publish a guide
{
"title": "Working with reference images",
"description": "Use reference images to keep your outputs consistent.",
"body": "Start with a clear reference image.\n\n## Connect the image\n\nAdd it to your workflow."
}
PUT that object to /api/content/docs/pages/working-with-reference-images. A POST to the collection also requires slug and refuses an existing page. PUT replaces the full editable guide body and may carry a meta object (without title and description, which go at the top level). PATCH changes only what it names.
Locks and validation
As an admin, PATCH { "locked": true } to protect a page or { "locked": false } to unlock it. A locked page rejects content, meta and reset writes with 423, and the message names the fields that were not saved. Lock changes must be sent separately from content edits.
Titles allow 200 characters, descriptions 600 and bodies 100,000. Requests are limited to 128,000 bytes. Unknown fields, raw HTML, unsafe links and private infrastructure or pricing details are refused with 400. Missing pages return 404, duplicate creates return 409 and non-admin lock requests return 403. HTML rendering uses the shared sanitized Markdown renderer.
Publication and audit
The saved overlay takes precedence over repository Markdown. A content save updates Last updated. Every save invalidates the HTML page, its .md copy, the llms.txt indexes, and the sidebar and breadcrumbs on every docs page. Public response caches expire within 60 seconds. Existing repository content remains the fallback where no override exists.
Each edit records its credential source and time. Admin edits also record the user and API key identity when available. Shared-secret edits are attributed to content-webhook. Lock changes are recorded separately in the audit log.
Related
- Content Publishing API
Create and update tool pages, articles, feature pages, and model pages via the content webhook.
- Authentication
Create API keys, configure scopes, and authenticate requests to the Wireflow API.
- Errors
Error response format, error types, and HTTP status codes for the Wireflow API.