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

# Publishing articles

List, create, publish, update and delete Webflow CMS items through the Blogs API, and how fields map to your collection.

## Find the blog

`GET /v1/accounts/ACCOUNT_ID/blogs` lists the site's CMS collections that have a rich text field. Use a collection's `id` as the blog id.

## Publish articles

```bash
curl -X POST "https://zernio.com/api/v1/accounts/ACCOUNT_ID/blogs/COLLECTION_ID/articles" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Spring menu is here",
    "bodyHtml": "<p>Five new dishes from our kitchen.</p>",
    "excerpt": "Five new dishes.",
    "tags": ["menu", "seasonal"],
    "image": { "url": "https://cdn.example.com/spring.jpg", "altText": "Spring dishes" },
    "isPublished": true
  }'
```

## How fields map

Zernio reads the collection's fields and maps by type and slug:

| Article field | Webflow field |
|---------------|---------------|
| `title`, `handle` | Name and slug. Without `handle`, the slug comes from the title (with a suffix if it is taken). |
| `bodyHtml` | The rich text field (one named body, content or post first) |
| `excerpt` | A plain text field named summary, excerpt, description or intro |
| `image` | An image field (one named main, cover, featured, hero, header or thumbnail first) |
| `tags` | A multi-reference field named tags, categories or topics. Tags are matched by name and created (published) when missing. |
| `author` | A reference field named author or writer. Send the referenced item's id. |
| `publishedAt` | A date field named publish or date, else the item's last publish time |

Sending a field the collection does not have returns `400`.

### Your collection's own fields

Most templates have fields of their own, and some are required. Send them in `fieldData`, keyed by the field's slug, in Webflow's value format: a reference is an item id, an image is `{ "url": "...", "alt": "..." }`.

```json
{
  "title": "How we rebuilt our pricing page",
  "bodyHtml": "<p>Three experiments.</p>",
  "author": "6ad9205f1c2b3a4d5e6f7a80",
  "fieldData": { "category-5": "6ad9205f1c2b3a4d5e6f7a81", "text": "A short summary" }
}
```

A create that leaves a required field empty returns `400` listing every field still missing.

A slug Zernio already fills (name, slug, body, summary, image, tags, author, date) returns `400`: send those through their article fields.

## How it behaves

- **Publishing.** `isPublished: true` publishes the item to the live site now. `isPublished: false`, or no publishing field on create, keeps a draft. Edits to a published item go live. `isPublished: false` on a published item unpublishes it.
- **No scheduling.** Webflow's API cannot schedule, so a future `publishDate` returns `400`. With `isPublished: false`, the date is only written to the collection's date field.
- **Status.** `status` is `publish` or `draft`.
- **Body.** HTML goes into the rich text field as is. Webflow drops code blocks.
- **SEO.** `seo` returns `400`.
- **Delete** unpublishes the item from the live site, then deletes it.
- **Slugs.** A `handle` that is already taken gets a suffix from Webflow. The response has the slug the post really got.
- **Images in the body** are copied into Webflow's own asset hosting.