> ## 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.

# Get subCategories by parent category id (public)



## OpenAPI

````yaml /api-reference/ai-cms/openapi.json get /subcategories/getByCategoryId/{categoryId}
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/getByCategoryId/{categoryId}:
    get:
      tags:
        - Subcategories
      summary: Get subCategories by parent category id (public)
      parameters:
        - in: path
          name: categoryId
          required: true
          schema:
            type: string
            pattern: ^[a-fA-F0-9]{24}$
            example: '{{objectId}}'
        - in: query
          name: page
          schema:
            type: integer
            example: 1
            minimum: 1
        - in: query
          name: limit
          schema:
            type: integer
            example: 50
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                OK:
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      items:
                        - id: '{{objectId}}'
                          name:
                            en: AI
                            es: IA
                          slug: ai
                          categoryId: '{{objectId}}'
                      pagination:
                        total: 1
                        page: 1
                        limit: 50
                        totalPages: 1
        '404':
          description: Not found
          content:
            application/json:
              examples:
                NotFound:
                  value:
                    success: false
                    statusCode: 404
                    message: Category not found
                    data: null
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````