---
title: "Create a new category"
method: POST
path: "/catalog/categories"
tags: ["Admin Catalog: Categories"]
---

# Create a new category

`POST /catalog/categories`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/catalog/categories`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/catalog/categories/post.ts> (a function with typed inputs; its response is checked against the schema)

Mirrors Bagisto admin Catalog → Categories → Create. Validates slug (unique), name, position, attributes. `description` required when `display_mode` is `description_only` or `products_and_description`. File-upload for `logo_path` / `banner_path` is NOT supported in v1.

## Request body

- object
  - `slug` string, required
  - `name` string, required
  - `description` string
  - `position` integer, required
  - `attributes` integer[], required
  - `parent_id` integer, nullable
  - `display_mode` 'products_and_description' | 'products_only' | 'description_only'
  - `status` integer
  - `locale` string
  - `meta_title` string

## Response `201`

Category created. Returns the same shape as GET /catalog/categories/{id}.

## Other responses

- `400`: Invalid input
- `422`: Validation failure.

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
