> Documentation index: https://docs.zernio.com/llms.txt. Every page is also Markdown: add .md to its URL.

# Blog articles

Create, draft, schedule and update the blog articles of a Shopify store, and the article fields they accept.

A connected store publishes blog articles, not social posts. 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](/blogs/list-blogs)):

```bash
curl "https://zernio.com/api/v1/accounts/66b2e19d8c3f5a7e9d0b1c2d/blogs" \
  -H "Authorization: Bearer $ZERNIO_API_KEY"
```

Response (`200`):

```json
{
  "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](/blogs/create-blog-article)).

<Tabs items={['Node.js', 'Python', 'curl']}>
<Tab value="Node.js">
```typescript
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);
```
</Tab>
<Tab value="Python">
```python
created = client.blogs.create_blog_article(
    account_id="66b2e19d8c3f5a7e9d0b1c2d",
    blog_id="121793282419",
    title="Autumn collection preview",
    body_html="<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.",
    is_published=True
)

print(created["article"]["id"])
```
</Tab>
<Tab value="curl">
```bash
curl -X POST "https://zernio.com/api/v1/accounts/66b2e19d8c3f5a7e9d0b1c2d/blogs/121793282419/articles" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "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
  }'
```
</Tab>
</Tabs>

Response (`201`):

```json
{
  "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`:

```json
{
  "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.

Until then the article reads back as `isPublished: false` with `publishedAt` set to the future date:

```json
{
  "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:

```json
{
  "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](/blogs/list-blogs) | `GET /v1/accounts/{accountId}/blogs` |
| [Create a blog](/blogs/create-blog) | `POST /v1/accounts/{accountId}/blogs` |
| [Get a blog](/blogs/get-blog) | `GET /v1/accounts/{accountId}/blogs/{blogId}` |
| [Update a blog](/blogs/update-blog) | `PATCH /v1/accounts/{accountId}/blogs/{blogId}` |
| [Delete a blog](/blogs/delete-blog) | `DELETE /v1/accounts/{accountId}/blogs/{blogId}` |
| [List articles](/blogs/list-blog-articles) | `GET /v1/accounts/{accountId}/blogs/{blogId}/articles` |
| [Create an article](/blogs/create-blog-article) | `POST /v1/accounts/{accountId}/blogs/{blogId}/articles` |
| [Get an article](/blogs/get-blog-article) | `GET /v1/accounts/{accountId}/blogs/{blogId}/articles/{articleId}` |
| [Update an article](/blogs/update-blog-article) | `PATCH /v1/accounts/{accountId}/blogs/{blogId}/articles/{articleId}` |
| [Delete an article](/blogs/delete-blog-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. |