# Create a new subcategory

Endpoint: POST /categories/{categoryId}/subcategories
Version: 2.0.0
Security: oauth2ClientCredentials

## Path parameters:

  - `categoryId` (string, required)
    Category ID

## Header parameters:

  - `org_wallet_ref` (string)
    Organization wallet reference, defaults to "1" if not provided

  - `business_id` (string, required)
    Business identifier for the request

## Request fields (application/json):

  - `name` (string, required)
    Subcategory name
    Example: Water Bill

  - `description` (string, required)
    Subcategory description
    Example: Water bill expenses

  - `code` (string)
    Subcategory code
    Example: 405034

  - `teams` (array)
    Restricted to teams[_ids]
    Example: [team_oid]

## Response 201 fields (application/json):

  - `_id` (string)
    Subcategory MongoDB ID

  - `group_id` (string)
    Group ID

  - `category` (string)
    Parent category ID

  - `code` (string)
    Subcategory code

  - `name` (string)
    Subcategory name

  - `description` (string)
    Subcategory description

  - `status` (string)
    Subcategory status
    Enum: "ACTIVE", "ARCHIVED"

  - `teams` (array)
    Team IDs array

  - `createdAt` (string)
    Created timestamp

  - `updatedAt` (string)
    Updated timestamp

  - `mapping_id` (string)
    Mapping ID

  - `icon` (string)
    Icon

  - `__v` (number)
    Version key

