---
title: "Create a blog post"
method: POST
path: "/posts"
tags: ["Blog Posts"]
---

# Create a blog post

`POST /posts`

## Request

- Base URL: `https://open.shopline.io/v1`
- URL: `https://open.shopline.io/v1/posts`
- Auth: HTTP bearer

## Request body

- object
  - `post` object, required: Attributes of the blog post to create.
    - `status` 'draft' | 'publish': Publication state. draft keeps the post hidden from the storefront; publish makes it publicly visible immediately. Omit to keep the platform default (draft).
    - `category_ids` string[]: Blog category IDs this post belongs to; entries must be unique. Obtain them from the blog category list endpoint. Omit to leave the post uncategorised.
    - `seo_metadatas` object[]: SEO meta tags rendered on the post page. Omit to set none.
      - `key` string, required: Meta tag name, for example description or keywords.
      - `value` string: Meta tag value used when no locale translation matches the storefront language.
      - `value_translations` object: Meta tag value per locale, keyed by locale code such as en or zh-hant.
    - `link` object: SEO url settings for the post page.
      - `url_link` string: SEO url slug of the post, unique across the merchant's posts and categories. Omit to let the platform generate one from the title.
      - `image` object: Share image reference; requires an already uploaded media ID.
        - `_id` string: Uploaded media ID.
    - `related_product_ids` string[]: IDs of products displayed as related on the post page; entries must be unique. Obtain them from the product list endpoint. Omit to show none.
    - `title_translations` object, required: Post title per locale, keyed by locale code such as en or zh-hant. At least one locale must be non-empty; a request whose titles are all empty is rejected with 422.
    - `content_translations` object: Post body per locale as HTML, keyed by locale code such as en or zh-hant. Omit to create an empty post.

## Response `201`

The created blog post.

- BlogPost
  - `id` string: Blog post UUID/hex ID or legacy WordPress numeric ID, usable as input to the other blog post endpoints.
  - `status` 'draft' | 'publish': Publication state. draft is hidden from the storefront; publish is publicly visible.
  - `created_at` string, date-time: ISO-8601 timestamp of when the post was created, in UTC.
  - `updated_at` string, date-time: ISO-8601 timestamp of the last update to the post, in UTC.
  - `seo_metadatas` object[]: SEO meta tags rendered on the post page.
    - `key` string: Meta tag name, for example description or keywords.
    - `value` string: Meta tag value used when no locale translation matches the storefront language.
    - `value_translations` object: Meta tag value per locale, keyed by locale code.
  - `thumbnail_info` object, nullable: Thumbnail media of the post as stored by the media service; null when the post has no thumbnail.
  - `link` object, nullable: SEO url settings of the post, including its url_link slug; null when none is set.
  - `categories` BlogCategory[]: Blog categories this post is assigned to.
    - `id` string: Blog category ID, usable as input to the other blog category endpoints and as the category_id filter when listing posts.
    - `posts_count` integer: Number of blog posts currently assigned to this category.
    - `status` 'active' | 'removed': Lifecycle state of the category. active is in use; removed has been deleted.
    - `seo_keywords` string: Comma-separated keywords rendered in the category page's SEO keywords meta tag.
    - `created_at` string, date-time: ISO-8601 timestamp of when the category was created, in UTC.
    - `updated_at` string, date-time: ISO-8601 timestamp of the last update to the category, in UTC.
    - `name_translations` object: Category name per locale, keyed by locale code.
    - `seo_title_translations` object: Category page SEO title per locale, keyed by locale code.
    - `seo_description_translations` object: Category page SEO description per locale, keyed by locale code.
    - `banner_media_translations` object: Category banner media per locale, keyed by locale code; a locale is null when it has no banner.
    - `link` object, nullable: SEO url settings of the category, including its url_link slug; null when none is set.
  - `related_product_ids` string[]: IDs of products displayed as related on the post page.
  - `title_translations` object: Post title per locale, keyed by locale code.
  - `content_translations` object: Post body per locale as HTML, keyed by locale code. Can be very large.

## Other responses

- `422`: Invalid payload, url link already taken, or plan quantity exceeded
- `503`: Blog Service unavailable
- `504`: Blog Service timeout

## Changes

- **2026-11-03** `d2518391b149`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/shoplineapp/apis/shopline-open-api/changes/posts/post.md)

---

[API](https://skmtc.dev/shoplineapp/apis/shopline-open-api.md) - [All operations](https://skmtc.dev/shoplineapp/apis/shopline-open-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shoplineapp/apis/shopline-open-api/revisions/d2518391b149?raw)
