---
title: "Create a blog category"
method: POST
path: "/post_categories"
tags: ["Blog Categories"]
---

# Create a blog category

`POST /post_categories`

## Request

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

## Request body

- object
  - `post_category` object, required: Attributes of the blog category to create.
    - `seo_keywords` string: Comma-separated keywords rendered in the category page's SEO keywords meta tag. Omit to set none.
    - `link` object: SEO url settings for the category page.
      - `url_link` string: SEO url slug of the category, unique across the merchant's posts and categories. Omit to let the platform generate one from the name.
      - `image` object: Share image reference; requires an already uploaded media ID.
        - `_id` string: Uploaded media ID.
    - `name_translations` object, required: Category name per locale, keyed by locale code such as en or zh-hant. At least one locale must be non-empty; a request whose names are all empty is rejected with 422.
    - `seo_title_translations` object: Category page SEO title per locale, keyed by locale code. Omit to fall back to the category name.
    - `seo_description_translations` object: Category page SEO description per locale, keyed by locale code. Omit to set none.
    - `banner_media_translations` object: Category banner media per locale, keyed by locale code; requires already uploaded media objects.

## Response `201`

The created blog category.

- BlogCategory
  - `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.

## Other responses

- `422`: Invalid payload, url link already taken, or category 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/post_categories/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)
