Publishing API Guide
Learn how to publish ScaleBlogger articles to your CMS via the API. Covers authentication, endpoints, CMS setup, content format, and error handling.
Publishing API Guide
Audience: Developers integrating ScaleBlogger with their CMS or building custom publishing workflows
Overview
ScaleBlogger can publish generated articles directly to your CMS. This guide covers authentication, the publishing API endpoints, and how to set up your CMS connection.
Authentication
- Sign in to obtain a session token
- Include the token as
Authorization: Bearer <token>in all requests - Tokens are scoped to your account — you can only access your own websites and articles
Publishing Endpoints
Publish an Article
POST /api/articles/publish
Authorization: Bearer <token>
Content-Type: application/json
{
"draft_id": "uuid-of-draft-to-publish"
}
Response
{
"success": true,
"published_url": "https://yourblog.com/blog/article-slug",
"cms_post_id": "123"
}
Refresh a Published Article
POST /api/articles/refresh
Authorization: Bearer <token>
Content-Type: application/json
{
"draft_id": "uuid-of-published-draft"
}
CMS Connection Setup
Before publishing, connect your CMS in the ScaleBlogger dashboard under Settings → Connections.
WordPress
- Enter your WordPress site URL
- Provide an Application Password (Settings → Users → Application Passwords in WordPress)
- ScaleBlogger publishes via the WordPress REST API (
wp-json/wp/v2/posts)
Ghost
- Enter your Ghost site URL
- Create a Custom Integration in Ghost Admin and provide the Admin API key
- ScaleBlogger publishes via the Ghost Admin API
Custom CMS (Headless, Next.js, Astro, etc.)
For any other CMS, implement a simple REST API that ScaleBlogger calls.
Minimum requirements:
GET /posts?slug=...— for connection testing and duplicate detection (return JSON array)POST /posts— accepts article data, returns{ id, url }PUT /posts/:id— for updating existing posts
See our dedicated Connecting a Custom API guide for the full API contract, payload reference, and a complete webhook example.
Published Content Format
When ScaleBlogger publishes to your CMS, it sends the following fields:
| Field | Type | Description |
|---|---|---|
title | string | Article title (plain text) |
content | string | Complete HTML with inline styles — ready to render |
slug | string | URL-safe slug for the article |
excerpt | string | Short description / meta description |
meta_description | string | SEO meta description |
featured_image_url | string | null | URL of the hero image |
author | string | null | Article author name — use for bylines and E-E-A-T signals |
seo_title | string | null | SEO-optimized title (may differ from title) — use for <title> tag |
og_title | string | null | Open Graph title for social sharing |
og_image | string | null | Open Graph image URL for social cards |
canonical_url | string | null | Canonical URL for syndicated content (currently null) |
schema_markup | object | null | JSON-LD structured data — inject as <script type="application/ld+json"> |
tags | string[] | Combined target keywords and focus keywords (deduplicated) |
categories | string[] | Category names derived from the content cluster |
focus_keywords | string[] | Primary SEO keywords the article is optimized for |
Publishing Behavior
Slug Generation
ScaleBlogger generates URL-safe slugs automatically from the article title. Your CMS can use this slug directly or generate its own.
Categories and Tags
ScaleBlogger sends categories (derived from the article's content cluster) and tags (merged from target keywords and focus keywords, deduplicated). Your CMS should auto-create categories if they don't already exist.
SEO Metadata
ScaleBlogger generates SEO, GEO, and AISEO-optimized content. Use the seo_title for the <title> tag, og_title and og_image for Open Graph social cards, and inject schema_markup as JSON-LD for rich search results. See the Custom API guide for detailed implementation examples.
Featured Images
ScaleBlogger can generate featured images using AI. The image URL is included in the published payload. For WordPress and Ghost, the image is automatically set as the post's featured image.
Retry Logic
If publishing fails (e.g., your CMS is temporarily unavailable), ScaleBlogger will retry automatically. Failed attempts are logged and visible in the dashboard.
Error Handling
| Error | Cause | Solution |
|---|---|---|
| No CMS connection | Website has no active CMS connection configured | Add a CMS connection in Settings → Connections |
| Authentication failed | CMS credentials are invalid or expired | Update your CMS credentials in the connection settings |
| Duplicate slug | An article with the same slug already exists on your CMS | Edit the article slug or enable auto-deduplication |
| CMS unreachable | Your CMS server is down or blocking requests | Check your server status and ensure ScaleBlogger IPs are whitelisted |