Docs

Update a docs article

Updated Dec 2, 2026

PUT/docs/articles/{article_id}

Saves changes to the article's working copy, which readers see once you publish it. Only the fields you send change: a field left out or sent as null keeps its value, and "" clears description or segment. A save that changes nothing keeps current_version.

base_version is required: the current_version you read. If someone saved after it, nothing is written and the answer is 409 stale_version. Read the article again, apply your change to the new text, and send that with the new current_version. Sending your old text again would overwrite their work.

An endpoint page (kind: endpoint) takes its title, description and slug from its API reference: a changed title or description, or any slug, is refused with 400.

A new segment on a plan without user segmentation is refused with HTTP 200 and data.code: upgrade_required. Each update counts toward the save limit of the key's owner.

Authorization

AuthorizationstringHeaderrequired
Bearer <token>

Authorization: Bearer YOUR_API_KEY. /v2 accepts no other method.

Parameters

Path

article_idintegerrequired

Find an article's id with GET /docs/articles?search=.

Request body required

application/json
base_versionintegerrequired

The article's current_version as you read it.

titlestring

One line: line breaks become spaces. On a draft whose slug you never set, the slug follows the new title.

minLength: 1maxLength: 200
descriptionstring

A one-line summary. "" clears it.

maxLength: 300
contentstring

The whole body: it replaces the stored one. Markdown (GitHub flavored), plus: alerts, > [!NOTE] alone on the first line of a quote (NOTE, TIP, IMPORTANT, WARNING, CAUTION); :::steps with a ### Title per step; ::::tabs holding :::tab{title="…"}; :::accordion{title="…"}; ::::cards{cols=2} holding :::card{title="…" icon="rocket" href="…"}; ::::code-group holding fenced code blocks; a code block's title on its opening fence, after the language (js title="app.js"); links to another article [text](docs:<article_id>). A container closes with a line of the same colons. Images: ![alt](https://…). Raw HTML is shown as text.

At most 1 MB. This API takes no uploads, so an image is an https address you link to. The images the article already holds come back as full URLs from a read, and sending them back keeps them.

slugstring

The last part of the page's address. What you send becomes a slug: lower-case letters and digits joined by hyphens, at most 120 characters. Once set, it no longer follows the title. On an article that was published before, the old address redirects to the new one.

segmentstring

The slug of the segment whose users may read the article. "": everyone.

maxLength: 255

Responses

OK

statusstring
dataDocsArticle

The published shape of a docs article. Text fields hold the saved working copy: while state is changed, readers still see the version last published. Fields are added over time and never removed: ignore any you do not recognise.