Blog Articles
Create, draft, schedule and update the blog articles of a Shopify store, and the article fields they accept.
There are no social posts. A connected store publishes blog articles: a store has one or more blogs (Shopify creates a "News" blog by default), and each blog holds articles. All content lives on Shopify; Zernio proxies it and stores nothing.
List blogs
Start by listing the blogs to get the id you will write into (List blogs):
curl "https://zernio.com/api/v1/accounts/66b2e19d8c3f5a7e9d0b1c2d/blogs" \
-H "Authorization: Bearer $ZERNIO_API_KEY"Response (200):
{
"platform": "shopify",
"blogs": [
{ "id": "121793282419", "platform": "shopify", "title": "News", "handle": "news" }
],
"nextCursor": null
}Create an article
Call POST /v1/accounts/{accountId}/blogs/{blogId}/articles with title and bodyHtml (Create an article).
const { data: created } = await zernio.blogs.createBlogArticle({
path: { accountId: '66b2e19d8c3f5a7e9d0b1c2d', blogId: '121793282419' },
body: {
title: 'Autumn collection preview',
bodyHtml: '<p>The first pieces land next month.</p>',
tags: ['autumn', 'new-arrivals'],
author: 'Maria Costa',
excerpt: 'An early look at what is arriving this September.',
isPublished: true
}
});
console.log(created.article.id);Response (201):
{
"platform": "shopify",
"article": {
"id": "589234567890",
"blogId": "121793282419",
"platform": "shopify",
"title": "Autumn collection preview",
"handle": "autumn-collection-preview",
"tags": ["autumn", "new-arrivals"],
"isPublished": true,
"publishedAt": "2026-09-08T09:00:00Z"
}
}Draft
isPublished: false keeps the article as a draft; it reads back with publishedAt: null:
{
"title": "Autumn collection preview",
"bodyHtml": "<p>The first pieces land next month.</p>",
"isPublished": false
}Scheduled article
A future publishDate schedules the article natively on Shopify. Shopify publishes it at that time with no Zernio queue involved, and until then the article reads back as isPublished: false with publishedAt set to the future date:
{
"title": "Autumn collection preview",
"bodyHtml": "<p>The first pieces land next month.</p>",
"publishDate": "2027-01-01T12:00:00+01:00"
}Featured image and SEO
image.url sets the featured image; Shopify downloads it, so the URL must be publicly reachable. seo.title and seo.description map to Shopify's title_tag and description_tag metafields, which themes read for the page title and meta description:
{
"title": "Autumn collection preview",
"bodyHtml": "<p>The first pieces land next month.</p>",
"image": { "url": "https://cdn.example.com/autumn.jpg", "altText": "Wool coats on a rail" },
"seo": { "title": "Autumn collection preview", "description": "An early look at the autumn pieces." }
}Every operation
| Operation | Endpoint |
|---|---|
| List blogs | GET /v1/accounts/{accountId}/blogs |
| Create a blog | POST /v1/accounts/{accountId}/blogs |
| Get a blog | GET /v1/accounts/{accountId}/blogs/{blogId} |
| Update a blog | PATCH /v1/accounts/{accountId}/blogs/{blogId} |
| Delete a blog | DELETE /v1/accounts/{accountId}/blogs/{blogId} |
| List articles | GET /v1/accounts/{accountId}/blogs/{blogId}/articles |
| Create an article | POST /v1/accounts/{accountId}/blogs/{blogId}/articles |
| Get an article | GET /v1/accounts/{accountId}/blogs/{blogId}/articles/{articleId} |
| Update an article | PATCH /v1/accounts/{accountId}/blogs/{blogId}/articles/{articleId} |
| Delete an article | DELETE /v1/accounts/{accountId}/blogs/{blogId}/articles/{articleId} |
Media requirements
None. Article images are referenced by URL in image.url and downloaded by Shopify, not uploaded to Zernio.
Platform fields
There is no platformSpecificData for Shopify, because a store is not a POST /v1/posts target. The article fields:
| Field | Type | Default | Description |
|---|---|---|---|
title | string | Required. | |
bodyHtml | string | Article body as HTML. | |
handle | string | (slug of the title) | URL slug. Shopify sets it once, at creation; renaming the article later leaves the URL unchanged, so set it explicitly when the URL matters. |
tags | Array<string> | Shopify returns them alphabetized, not in the order you sent. | |
author | string | Display name of the author. | |
excerpt | string | Short summary shown in blog listings. | |
image | {url, altText?} | Featured image, downloaded by Shopify from a public URL. | |
seo | {title?, description?} | Maps to Shopify's title_tag and description_tag metafields. | |
isPublished | boolean | false creates a draft. | |
publishDate | datetime | ISO 8601 with offset or Z. A future date schedules publication on Shopify. |