Zernio
Zernio
API Reference

Blogs

Blogs

List blogsGETCreate a blogPOSTGet a blogGETUpdate a blogPATCHDelete a blogDELETE

Articles

List blog articlesGETCreate a blog articlePOSTGet a blog articleGETUpdate a blog articlePATCHDelete a blog articleDELETE
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Blogs

Create a blog article

Creates an article on the blog. Publishing behavior:

  • WordPress defaults to a draft when both publishing fields are omitted.
  • isPublished: false keeps the article as a draft and takes priority over a future publishDate.
  • A future publishDate schedules publication natively on the platform; the platform publishes it at that time with no Zernio queue involved.
  • isPublished: true publishes immediately when there is no future publishDate.
  • seo.title / seo.description map to Shopify's global title_tag and description_tag metafields (the fields Shopify themes read for the page title and meta description). WordPress rejects seo; SEO plugin and custom-field writes are not supported.

Supported on Shopify (shopify) and WordPress (wordpress). WordPress native scheduling depends on the site's scheduler/WP-Cron.


PlatformsShopifyWordPress
POST
/v1/accounts/{accountId}/blogs/{blogId}/articles

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Path Parameters

accountId*string

Connected Shopify or WordPress account id.

blogId*string

Platform-native numeric blog/site id returned by the list operation.

Match^\d+$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.blogs.createBlogArticle({  path: {    accountId: 'account_abc123',    blogId: 'blog_abc123',  },  body: {    title: 'Example',  },});console.log(data);
{  "platform": "shopify",  "article": {    "id": "string",    "blogId": "string",    "platform": "shopify",    "title": "string",    "bodyHtml": "string",    "handle": "string",    "tags": [      "string"    ],    "author": "string",    "excerpt": "string",    "image": {      "url": "string",      "altText": "string"    },    "isPublished": true,    "publishedAt": "2019-08-24T14:15:22Z",    "status": "publish",    "publishDate": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}
Was this page helpful?

List blog articles

Lists the articles of a blog. Cursor-paginated: pass `limit` (1-50, default 20) and the `cursor` from a previous response's `nextCursor`; `nextCursor` is null when there are no more pages. Treat cursors as opaque and pass them unchanged. Supported on Shopify (`shopify`) and WordPress (`wordpress`). WordPress results include native `status` and include `publishDate` only for scheduled (`future`) posts.

Get a blog article

Fetches a single article. An article addressed through a blog it does not belong to is a 404 (code blog_article_not_found). Supported on Shopify (`shopify`) and WordPress (`wordpress`). WordPress returns its native `status`; `publishedAt` is present only for a published post and `publishDate` only for a scheduled post.

title*string
Length1 <= length
bodyHtml?string

Article body as HTML.

handle?string

URL slug. Generated from the title when omitted.

tags?array<>

Tag names. WordPress resolves existing names case-insensitively and creates missing tags.

Itemsitems <= 100
author?string

Shopify author display name, or numeric WordPress user id serialized as a string. Assigning another WordPress user may require elevated capability.

excerpt?string

Short summary shown in blog listings.

image?

Featured image from a public URL. WordPress downloads it into the media library; JPEG, PNG, GIF and WebP are accepted up to 10 MB.

seo?

Shopify only. Search-engine overrides mapped to global title_tag and description_tag metafields. WordPress rejects this field.

isPublished?boolean

Set false for a draft or true to publish. On WordPress false takes priority over a future publishDate; omission with no date defaults to draft.

publishDate?string

ISO 8601 datetime with offset (or Z). A future date schedules publication natively on the platform.

Formatdate-time