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

Update a blog article

Partial-updates an article. Send any subset of the create fields (title, bodyHtml, handle, tags, author, excerpt, image, seo, isPublished, publishDate); at least one field is required (an empty body returns 400). isPublished and publishDate behave as on create: isPublished: false unpublishes back to a draft and a future publishDate schedules publication natively on the platform. Omitting both fields preserves the current WordPress status. Omitting image preserves the current featured image; removal is not supported. WordPress rejects seo and does not support SEO-plugin/custom-field, category, or custom-post-type writes.

Supported on Shopify (shopify) and WordPress (wordpress).


PlatformsShopifyWordPress
PATCH
/v1/accounts/{accountId}/blogs/{blogId}/articles/{articleId}

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+$
articleId*string

Platform-native numeric article id. Non-numeric values return 400.

Match^\d+$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

At least one field is required.

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.updateBlogArticle({  path: {    accountId: 'account_abc123',    blogId: 'blog_abc123',    articleId: 'article_abc123',  },  body: {    title: 'Example',    bodyHtml: 'string',    handle: 'string',  },});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?

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.

Delete a blog article

Deletes the article. The delete happens on the platform and is permanent; Zernio stores nothing to restore it from. On WordPress the post is force-deleted, while uploaded attachments and tags remain in the site's media library and taxonomy. Supported on Shopify (`shopify`) and WordPress (`wordpress`).

title?string
Length1 <= length
bodyHtml?string

Article body as HTML.

handle?string

URL slug of the article.

tags?array<>

Replaces the full tag-name list. 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. Omit to preserve it; null removal is not supported.

seo?

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

isPublished?boolean

Set false to move to draft or true to publish. On WordPress false takes priority over a future publishDate; omission preserves status unless publishDate is sent.

publishDate?string

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

Formatdate-time