Polyblog API 1.0.0

Public REST API for Polyblog. Authenticate with an API key (HTTP Basic, the key as the username) or an operator access token. Each key carries a set of scopes that gate which resources it may read or write.

Base URL https://www.polyblog.io
  • apiKey — API key as HTTP Basic credentials: Authorization: Basic base64(apiKey)
  • accessToken — Operator access token: Authorization: Token <token>

Download the OpenAPI specification

Articles

GET/api/articles

List articles

Lists the articles of a blog. Requires the articles:read scope. Anonymous (unauthenticated) callers only ever see published articles; drafts are visible only to an API key or operator token of the owning organization.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
blogId required query string
locale query string
published query boolean
slug query string
limit query integer default 0
skip query integer default 0

Responses

StatusMeaning
200A list of articles
401Missing or invalid credentials
403API key is missing the articles:read scope
429API key rate limit exceeded

POST/api/articles

Create or update an article

Creates an article (or updates one when the body carries an existing _id). Requires the articles:write scope. Fires the article.created webhook.

Authentication apiKey accessToken

Request body application/json

FieldTypeDescription
blogId string
title string
content string
slug string
locale string
published boolean

Responses

StatusMeaning
200The created or updated article
401Missing or invalid credentials
403API key is missing the articles:write scope
429API key rate limit exceeded

GET/api/articles/{idOrSlug}

Get an article

Returns a single article by id or slug. Requires the articles:read scope. An article belonging to another organization responds 404 so ids cannot be probed. Anonymous callers can only read a published article; a draft responds 404 unless the caller is an API key or operator token of the owning organization.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
idOrSlug required path string

Responses

StatusMeaning
200The article
404Not found (or owned by another organization / unpublished)

POST/api/articles/generate

Generate an article with AI

Generates (and by default publishes) an SEO article for a blog. Requires the articles:write scope. Fires the article.created webhook when the generated article is persisted.

Authentication apiKey accessToken

Responses

StatusMeaning
200The generated article and metadata
403API key is missing the articles:write scope

DELETE/api/articles/{articleId}

Delete an article

Deletes an article. Requires the articles:write scope. An article owned by another organization responds 404. Fires the article.deleted webhook.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
articleId required path string

Responses

StatusMeaning
200The deleted article id
404Not found (or owned by another organization)

Blogs

GET/api/blogs

List blogs

Lists the blogs of your organization. Requires the blogs:read scope.

Authentication apiKey accessToken

Responses

StatusMeaning
200A list of blogs
403API key is missing the blogs:read scope

POST/api/blogs

Create a blog

Creates a blog for your organization. Requires the blogs:write scope. Fires the blog.created webhook.

Authentication apiKey accessToken

Responses

StatusMeaning
200The created blog
403API key is missing the blogs:write scope

PUT/api/blogs/{blogId}

Update a blog

Updates a blog owned by your organization. Requires the blogs:write scope.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
blogId required path string

Responses

StatusMeaning
200The updated blog
403Not your organization's blog, or missing the blogs:write scope

Other

GET/blogs

get blog details

returns a blog details

Parameters

NameInTypeDescription
blogId required path string

Responses

StatusMeaning
200blog details

Topics

GET/api/topics

List topic ideas

Lists the topic ideas of a blog you own. Requires the topics:read scope.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
blogId required query string

Responses

StatusMeaning
200The topic ideas
403API key is missing the topics:read scope

Webhook subscriptions

GET/api/webhooksubscriptions

List webhook subscriptions

Webhook subscriptions deliver article.created, article.updated, article.deleted, blog.created and contact.created events to your server as signed POST requests (X-Polyblog-Signature: t=<timestamp>,v1=<hex HMAC-SHA256 of "timestamp.body">). An endpoint failing 20 times in a row is disabled automatically. Subscriptions are managed with an operator access token; the secret is only returned once, on create.

Authentication accessToken

Responses

StatusMeaning
200Array of webhook subscriptions (without secrets)

POST/api/webhooksubscriptions

Create a webhook subscription

Pass a blogId to receive only that blog's events, or omit it for an organization-wide subscription. The response includes the signing secret exactly once — store it; it cannot be retrieved again.

Authentication accessToken

Request body application/json

FieldTypeDescription
blogId string
url required string
events array Empty array subscribes to all events

Responses

StatusMeaning
200The created subscription, including its secret

PUT/api/webhooksubscriptions/{webhookSubscriptionId}

Update a webhook subscription

url, events and active are editable; the secret, organization and blog are immutable. Re-enabling an auto-disabled endpoint is done by setting active back to true.

Authentication accessToken

Parameters

NameInTypeDescription
webhookSubscriptionId required path string

Responses

StatusMeaning
200The updated subscription (without secret)

DELETE/api/webhooksubscriptions/{webhookSubscriptionId}

Delete a webhook subscription

Authentication accessToken

Parameters

NameInTypeDescription
webhookSubscriptionId required path string

Responses

StatusMeaning
200Deleted