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

# Create subCategory



## OpenAPI

````yaml /api-reference/ai-cms/openapi.json post /subcategories/create
openapi: 3.1.0
info:
  title: Blog API
  version: 1.0.0
servers:
  - url: https://api.octaviatech.app/cms
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Tags
    description: Tag management endpoints
paths:
  /subcategories/create:
    post:
      tags:
        - Subcategories
      summary: Create subCategory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - name
                - categoryId
              properties:
                name:
                  type: object
                  description: Subcategory name in multiple languages
                  additionalProperties: false
                  properties:
                    en:
                      type: string
                    es:
                      type: string
                slug:
                  type: string
                  description: URL-friendly unique identifier
                categoryId:
                  type: string
                  description: Parent category ID
                  pattern: ^[a-fA-F0-9]{24}$
                description:
                  type: object
                  description: Optional description in multiple languages
                  additionalProperties: false
                  properties:
                    en:
                      type: string
                    es:
                      type: string
                icon:
                  type: string
                  format: uri
                  description: Optional icon URL
                banner:
                  type: string
                  format: uri
                  description: Optional banner URL
                order:
                  type: integer
                  minimum: 0
                  description: Optional ordering index
                isActive:
                  type: boolean
                  description: Whether subCategory is active
            examples:
              Create Subcategory:
                value:
                  name:
                    en: AI
                    es: IA
                  slug: ai
                  categoryId: 64b1f2c9a7d4f1a2b3c4d5e6
                  description:
                    en: Artificial Intelligence
                    es: Inteligencia Artificial
                  icon: https://cdn.example.com/icons/ai.svg
                  banner: https://cdn.example.com/banners/ai.jpg
                  order: 1
                  isActive: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              examples:
                Created:
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: '{{objectId}}'
                      slug: ai
                      categoryId: 64b1f2c9a7d4f1a2b3c4d5e6
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    success: false
                    statusCode: 401
                    message: Unauthorized
                    data: null
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    success: false
                    statusCode: 403
                    message: Forbidden
                    data: null
        '409':
          description: Conflict (slug exists)
          content:
            application/json:
              examples:
                Conflict:
                  value:
                    success: false
                    statusCode: 409
                    message: Slug already exists
                    data: null
        '422':
          description: Validation error
          content:
            application/json:
              examples:
                Validation:
                  value:
                    success: false
                    statusCode: 422
                    message: Validation failed
                    data: null
        '500':
          description: Server error
          content:
            application/json:
              examples:
                ServerError:
                  value:
                    success: false
                    statusCode: 500
                    message: Internal server error
                    data: null
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````