---
title: "Create category"
method: POST
path: "/ecommerce/categories"
tags: ["🛒 Ecommerce"]
---

# Create category

`POST /ecommerce/categories`

The API endpoint allows an administrator user with the appropriate role to create a new category.

By sending a request to this endpoint with the desired category `name` provided in the request body, the API will create a new category in the system.

This functionality is restricted to users with an `ADMIN` role to ensure proper access control and authorization.

## Request body

- object
  - `name` string

## Response `201`

Create category

- object
  - `data` object
    - `__v` number
    - `_id` string
    - `createdAt` string
    - `name` string
    - `owner` string
    - `updatedAt` string
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi.md) · [All operations](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiteshchoudhary-ssesph/freeapi/versions/a9f3a290e4dc/schema)
