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

# Get all categories

> Retrieve a list of all article categories used by the account with their usage counts.
The categories returned depend on the authentication used:

**Authenticated Access:**
- **Admin API keys**: Returns categories from all accounts across the system
- **Account API keys**: Returns categories only from the account that owns the key

**Public Access** (from valid domains):
- **No authentication required** when accessing from verified domains (*.localhost, *.suprsonic.blog, *.suprsonic.app, or verified custom domains)
- Returns only categories from **published articles** from the domain-associated account




## OpenAPI

````yaml get /api/v1/categories
openapi: 3.1.0
info:
  title: SuprSonic API
  version: 1.0.0
  description: API for autonomous content generation and blog management
  contact:
    name: SuprSonic API Support
    url: https://www.suprsonic.com/support
    email: support@suprsonic.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://www.suprsonic.com
    description: Production server
  - url: http://localhost:3000
    description: Development server
security: []
tags: []
paths:
  /api/v1/categories:
    get:
      tags:
        - Categories
      summary: Get all categories
      description: >
        Retrieve a list of all article categories used by the account with their
        usage counts.

        The categories returned depend on the authentication used:


        **Authenticated Access:**

        - **Admin API keys**: Returns categories from all accounts across the
        system

        - **Account API keys**: Returns categories only from the account that
        owns the key


        **Public Access** (from valid domains):

        - **No authentication required** when accessing from verified domains
        (*.localhost, *.suprsonic.blog, *.suprsonic.app, or verified custom
        domains)

        - Returns only categories from **published articles** from the
        domain-associated account
      responses:
        '200':
          description: Successfully retrieved categories
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    category:
                      type: string
                      enum:
                        - opinion_piece
                        - industry_forecast
                        - how_to_guide
                        - comparison
                        - deep_research
                        - checklist
                        - roundup
                      description: The category name
                    usage_count:
                      type: integer
                      minimum: 1
                      description: Number of published articles using this category
                  example:
                    category: how_to_guide
                    usage_count: 15
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - AdminApiKey: []
        - AccountApiKey: []
        - {}
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Invalid request data
            details:
              type: object
  securitySchemes:
    AdminApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Admin API key for managing accounts and creating content
    AccountApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Account-specific API key for accessing account data

````