Skip to content

Articles

All paths are relative to https://seo.pulpsense.com/api/website-publishing/v1.

Method Path Result
GET /articles Managed article inventory
GET /articles/:id Current article
GET /articles/:id?revision=2 Retained revision
GET /articles/:id/history Revision history
POST /articles New manual Markdown draft
PATCH /articles/:id New revision of a manual/imported article
POST /articles/:id/preview Exact-revision preview job
POST /articles/:id/publish Production publication through the article publisher
GET /articles/:id/publication Production attempts and status

The inventory can include generated articles. Editing through this API supports manual and imported sources; it does not implicitly convert generated articles.

First upload its cover. Send the returned asset descriptor as cover:

const response = await fetch(`${baseUrl}/articles`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PULPSENSE_WEBSITE_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
operationId: crypto.randomUUID(),
slug: "preparing-for-your-consultation",
title: "Preparing for your consultation",
description: "What to bring and what to expect at your consultation.",
date: "2026-11-19",
body: "## Before your visit\n\nBring your questions and relevant medical history.",
cover: uploadedAsset,
imageAlt: "A consultation room at the practice",
}),
});
if (!response.ok) throw new Error(`Create failed: ${response.status}`);
const article = await response.json();

Use your intended publication date in YYYY-MM-DD format. baseUrl is the Website Publishing API base URL, and uploadedAsset is the result of the image upload. The operation UUID is the retained source identity for this creation; reuse it when retrying the same creation.

Article bodies use Markdown. Raw HTML, JSX, MDX expressions, imports, exports and executable URLs are rejected.

Send expectedRevision and a patch with any of title, description, body, imageAlt and cover. Omitted fields, existing URLs and aliases are preserved.

{
"expectedRevision": 2,
"patch": {
"description": "Your complete updated description."
}
}

A supplied body replaces the complete article body. Carry forward all paragraphs and links you intend to keep. A cover replacement must include its new descriptive imageAlt and a verified retained asset.

Both actions accept {"expectedRevision":3,"operationId":"YOUR_UUID"}. Article previews return a job to poll at /jobs/:id. Production articles use the article publication endpoint at /articles/:id/publication.

Production publishing requires permission and a launched managed website. Read preview and publish for job timing, retries and uncertain attempts.