> ## Documentation Index
> Fetch the complete documentation index at: https://secdocs.asikoexpress.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create category (Admin only)



## OpenAPI

````yaml /openapi/product-service-inventory.json post /v1/categories
openapi: 3.0.0
info:
  title: Asiko Product Service — Inventory API
  description: >-
    Admin and Super Admin only endpoints: create/update/delete products,
    categories, brands
  version: '1.0'
  contact: {}
servers:
  - url: https://asikodevapi.candourit.io
    description: Production (via api-gateway)
  - url: http://localhost:3000
    description: Local development (via api-gateway)
security: []
tags:
  - name: inventory
    description: ''
paths:
  /v1/categories:
    post:
      tags:
        - inventory
      summary: Create category (Admin only)
      operationId: InventoryCategoriesController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCategoryBody'
      responses:
        '201':
          description: ''
      security:
        - bearer: []
components:
  schemas:
    CreateCategoryBody:
      type: object
      properties:
        name:
          type: string
          example: Rice & Grains
        slug:
          type: string
          example: rice-grains
        parentId:
          type: string
          example: null
          nullable: true
          description: >-
            Must be the id of another category already created, or null/omitted
            for a top-level category.
        iconSvg:
          type: object
          example: <svg viewBox="0 0 24 24"><path d="M4 4h16v16H4z"/></svg>
          nullable: true
      required:
        - name
        - slug
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````