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

# List Categories

> Retrieve all product categories in your workspace

## Authorization

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication. Format: `Bearer qwoty_your_token`
</ParamField>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl https://qwoty.app/api/categories \
    -H "Authorization: Bearer qwoty_your_token"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://qwoty.app/api/categories', {
    headers: {
      Authorization: 'Bearer qwoty_your_token',
    },
  })

  const data = await response.json()
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://qwoty.app/api/categories',
      headers={
          'Authorization': 'Bearer qwoty_your_token'
      }
  )

  data = response.json()
  ```
</CodeGroup>

## Response

<ResponseField name="success" type="boolean">
  Indicates whether the request was successful
</ResponseField>

<ResponseField name="data" type="array">
  Array of category objects

  <Expandable title="Category Object">
    <ResponseField name="id" type="string">
      Unique identifier (UUID)
    </ResponseField>

    <ResponseField name="workspace_id" type="string">
      Workspace ID (UUID)
    </ResponseField>

    <ResponseField name="name" type="string">
      Category name
    </ResponseField>

    <ResponseField name="api_name" type="string">
      API identifier (unique, immutable)
    </ResponseField>

    <ResponseField name="description" type="string">
      Category description
    </ResponseField>

    <ResponseField name="is_active" type="boolean">
      Active status
    </ResponseField>

    <ResponseField name="parent_category_id" type="string | null">
      ID of parent category for hierarchical organization (UUID)
    </ResponseField>

    <ResponseField name="created_at" type="string">
      Creation timestamp (ISO 8601)
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      Last update timestamp (ISO 8601)
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440001",
        "workspace_id": "660e8400-e29b-41d4-a716-446655440000",
        "name": "Electronics",
        "api_name": "electronics",
        "description": "Electronic products and accessories",
        "is_active": true,
        "parent_category_id": null,
        "created_at": "2026-01-15T10:00:00Z",
        "updated_at": "2026-01-15T10:00:00Z"
      },
      {
        "id": "550e8400-e29b-41d4-a716-446655440002",
        "workspace_id": "660e8400-e29b-41d4-a716-446655440000",
        "name": "Smartphones",
        "api_name": "smartphones",
        "description": "Mobile phones and accessories",
        "is_active": true,
        "parent_category_id": "550e8400-e29b-41d4-a716-446655440001",
        "created_at": "2026-01-16T14:30:00Z",
        "updated_at": "2026-01-16T14:30:00Z"
      }
    ]
  }
  ```
</ResponseExample>
