---
title: Docs Publishing API
description: Read docs, publish guides and update node introductions through the content API.
updated: 2026-10-17
---

Use the same content credential as the [Content Publishing API](/docs/api/publishing). 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 slug, title, description, updatedAt, locked, type and editable |
| GET | /api/content/docs/pages/{slug} | Read metadata and the current Markdown body |
| POST | /api/content/docs/pages | Create a guide with slug, title, description and body |
| PUT | /api/content/docs/pages/{slug} | Create or replace a guide with title, description and body |
| PATCH | /api/content/docs/pages/{slug} | Replace intro, or set locked as an admin |

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 and locks but have no Markdown export: GET returns body: null, editable: none and markdownAvailable: false. Read their current HTML at the returned url. Their old repository Markdown is not the live page.

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.

## Update the getting-started intro

~~~bash
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

~~~json
{
  "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. PATCH changes only the intro.

## Locks and validation

As an admin, PATCH { "locked": true } to protect a page or { "locked": false } to unlock it. A locked page rejects content writes with 423. 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 save updates Last updated and invalidates the HTML page, its .md copy and the llms.txt indexes. 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.

Last updated: 2026-10-17

---

Documentation index: fetch https://www.wireflow.ai/llms.txt for the full list of Wireflow docs.
