Create a blog
Creates a blog on the connected store. The platform generates the URL
handle from the title when omitted.
Supported on Shopify (platform shopify). Accounts on platforms
without blogs support return 400; a blogs-capable platform that lacks
this specific operation returns 405.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Connected Shopify SocialAccount id.
1 <= lengthURL slug. Generated from the title when omitted.
1 <= lengthResponse 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.createBlog({ path: { accountId: 'account_abc123', }, body: { title: 'Example', },});console.log(data);{
"platform": "shopify",
"blog": {
"id": "string",
"platform": "shopify",
"title": "string",
"handle": "string"
}
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}{
"error": "Unauthorized"
}Create a blog article POST
Creates an article on the blog. Publishing behavior: - `isPublished: false` keeps the article as a draft. - A future `publishDate` schedules publication natively on the platform; the platform publishes it at that time with no Zernio queue involved. - `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). Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
Get a blog article GET
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 (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.