Docs

Publishing API

Send checked pages straight to your own blog, once their hold ends. Any JSON endpoint works, and WordPress works out of the box.

What you need

In the app, open Publishing and add a destination. Only pages that pass the editor's checks, and have finished their hold, are ever sent. Fill in these fields:

FieldWhat to enter
Create URLThe endpoint that creates a post. We send a POST request with your payload.
Update URL (optional)The endpoint that updates a post, with {{id}} where the post id goes. We send a PUT request. Needed for the second pass that fixes internal links.
Auth headerOne header line, name and value separated by a colon.
Payload templateThe JSON body, with placeholders. It must be valid JSON after the placeholders are filled.
link_pathA dot path to the public URL in your API's response.
id_pathA dot path to the post id in your API's response.

Example

Create URL:  https://api.yourblog.com/posts
Update URL:  https://api.yourblog.com/posts/{{id}}
Auth header: Authorization: Bearer xyz

Every request also sends Content-Type: application/json and Accept: application/json.

Placeholders

PlaceholderReplaced with
{{heading}}The page title (the H1). Inserted as an escaped JSON string.
{{subheading}}A one-line summary. Escaped JSON string.
{{html}}The article body as HTML, without the H1. Escaped JSON string.
{{keywords}}A JSON array of strings, inserted as-is. Do not wrap it in quotes.
{{slug}}The planned URL slug, such as best-payroll-software-india. Escaped JSON string.
{{id}}Your blog's id for the page, from id_path. Filled on updates only.
{{url}}The page's public URL, from link_path. Filled on updates only.

Text placeholders are JSON-escaped, so put them inside quotes in your template. Keywords is already an array, so leave it bare.

Dot paths

link_path and id_path tell us where to find the URL and id in your response. Separate keys with dots. Use a number for an array position.

Response:
{"savedBlogs":[{"_id":"66f1c2","link":"https://yourblog.com/blog/best-payroll-software"}]}

link_path: savedBlogs.0.link   ->  https://yourblog.com/blog/best-payroll-software
id_path:   savedBlogs.0._id    ->  66f1c2

Presets

Pick a preset in the app and adjust it if your API differs.

Custom blog API

Payload template:
{"heading":"{{heading}}","subheading":"{{subheading}}","description":"{{html}}","keywords":{{keywords}}}

link_path: link
id_path:   id

Bulk create API (array body)

Payload template:
[{"heading":"{{heading}}","subheading":"{{subheading}}","description":"{{html}}","keywords":{{keywords}},"isHTML":true}]

link_path: savedBlogs.0.link
id_path:   savedBlogs.0._id

WordPress (REST API)

Payload template:
{"title":"{{heading}}","excerpt":"{{subheading}}","content":"{{html}}","status":"draft","slug":"{{slug}}"}

link_path: link
id_path:   id

For WordPress, the create URL is usually https://yoursite.com/wp-json/wp/v2/posts and the update URL is https://yoursite.com/wp-json/wp/v2/posts/{{id}}. Use an application password in a Basic auth header. The preset creates posts as drafts, so you publish them from WordPress.

Two-pass link resolution

Pages link to each other, but a page's URL is only known after your blog creates it. Drafts therefore write internal links as tokens, such as {{LINK:best-payroll-software}}.

  1. Pass 1: create. Pages are posted in link order, so pages that others link to go first. Each token is replaced with the real URL if that page is already live, or a placeholder if not. We record the URL and id your API returns.
  2. Pass 2: update. For each live page whose tokens can now all be resolved, we fill in the real URLs and send the page to your update URL. Pages without tokens are marked done.

Without an update URL, pass 2 is skipped and some links may point to a placeholder until you fix them by hand. A failed update is retried on the next publish run.

What the HTML contains

  • The article body in semantic HTML: sections with H2 and H3, lists, tables and FAQ details. No H1, since the title is sent as the heading.
  • Scoped styles, so the page looks right inside your theme without changing the rest of your site.
  • An answer-first section, a last-verified line, a methodology box and a limits box.
  • JSON-LD structured data: Article, FAQPage, and ItemList on best-of list pages.
  • A meta block with the title, description and keywords, for your own SEO fields.
  • Any fact we may not publish yet stays in an HTML comment marked [VERIFY], never as visible text. That is a claim about the wider world with no source behind it; your own prices and features are published as you gave them.

Troubleshooting

  • A non-2xx response marks the page as failed. The first part of your API's response is shown in the app.
  • If the URL is empty after posting, check link_path against a real response.
  • If the template fails, check that it is valid JSON and that text placeholders sit inside quotes.

Need help connecting? Contact us.