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

# List categories

> This API allows to get a list of all categories.

<Warning>
  **Deprecated:** This is a **v1** endpoint. It will continue to work, but we recommend migrating to
  the [v2 equivalent](/api-reference) for improved REST compliance (correct HTTP status codes,
  consistent response envelopes, and hyphenated URLs).
</Warning>

<Info>Replace `{your-subdomain}` with your workspace's subdomain. <br /> Learn how to find your subdomain in [Workspace subdomain](/getting-started/workspace-subdomain).</Info>


## OpenAPI

````yaml bundled-v1/categories.yaml GET /categories
openapi: 3.0.3
info:
  title: NeetoKB Categories API
  description: APIs to list all categories in a workspace.
  version: 1.0.0
servers:
  - description: NeetoKB API
    url: https://{your-subdomain}.neetokb.com/api/external/v1
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/getting-started/workspace-subdomain).
security: []
paths:
  /categories:
    get:
      tags:
        - Categories
      summary: List all categories
      description: This API allows to get a list of all categories.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/page_number_param'
        - $ref: '#/components/parameters/page_size_param'
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  categories:
                    type: array
                    items:
                      $ref: '#/components/schemas/category_details'
                  pagination:
                    $ref: '#/components/schemas/pagination'
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/getting-started/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
    page_number_param:
      in: query
      name: page_number
      description: >-
        Retrieve paginated results by specifying the desired page number.
        Defaulting to 1 when omitted.
      required: false
      schema:
        type: integer
    page_size_param:
      in: query
      name: page_size
      description: >-
        Set the number of results returned in the response. Defaulting to 30
        when omitted.
      required: false
      schema:
        type: integer
  schemas:
    category_details:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
          nullable: true
        slug:
          type: string
        sequence:
          type: integer
          nullable: true
        parent_id:
          type: string
          nullable: true
        depth:
          type: integer
          nullable: true
        articles_count:
          type: integer
        categories_count:
          type: integer
        total_articles_count:
          type: integer
        url:
          type: string
        subcategories:
          type: array
          items:
            $ref: '#/components/schemas/category_details'
        ancestors:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
              url:
                type: string
        children:
          type: array
          items:
            type: string
            format: uuid
        articles:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              url:
                type: string
              title:
                type: string
              created_at:
                type: string
              content:
                type: string
    pagination:
      type: object
      properties:
        total_records:
          type: integer
        total_pages:
          type: integer
        current_page_number:
          type: integer
        page_size:
          type: integer

````