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

# CDN projects this key may see

> Requires projects:["read"]. Accepts either key class. A key bound to one project (today, only a wordpress key can be) sees exactly that project; an unbound key — every api-class key, by design — sees the org's full paginated list.



## OpenAPI

````yaml /api/openapi.json get /projects
openapi: 3.1.0
info:
  title: PixGlory Machine API
  version: 1.0.0
  description: >-
    The versioned /api/v1/* machine API — bearer-key authenticated, for the
    WordPress plugin and future integrations. Hand-written and maintained
    alongside apps/start/src/routes/api/v1/*; see machine-api-v1.md for the
    human-readable walkthrough. THIS FILE IS THE SOURCE OF TRUTH where the two
    disagree.
servers:
  - url: https://pixglory.com/api/v1
security:
  - bearerKey: []
paths:
  /projects:
    get:
      summary: CDN projects this key may see
      description: >-
        Requires projects:["read"]. Accepts either key class. A key bound to one
        project (today, only a wordpress key can be) sees exactly that project;
        an unbound key — every api-class key, by design — sees the org's full
        paginated list.
      operationId: listProjects
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
        - name: pageSize
          in: query
          schema:
            type: integer
            default: 20
            maximum: 100
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectsList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    ProjectsList:
      type: object
      required:
        - projects
        - page
        - pageSize
        - total
        - hasMore
        - publicBaseUrl
      properties:
        projects:
          type: array
          items:
            $ref: '#/components/schemas/Project'
        page:
          type: integer
        pageSize:
          type: integer
        total:
          type: integer
        hasMore:
          type: boolean
        publicBaseUrl:
          type: string
          format: uri
    Project:
      type: object
      required:
        - id
        - slug
        - name
        - sourceType
        - fileCount
        - totalSizeBytes
        - publicUrl
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        sourceType:
          type: string
          enum:
            - direct
            - publish
        fileCount:
          type: integer
        totalSizeBytes:
          type: integer
        publicUrl:
          type: string
          format: uri
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - code
          properties:
            message:
              type: string
            code:
              type: string
            details: {}
  responses:
    Unauthorized:
      description: Missing, malformed, unknown, expired, or disabled key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              value:
                error:
                  message: 'Missing API key. Send it as `Authorization: Bearer <key>`.'
                  code: MISSING_API_KEY
            invalid:
              value:
                error:
                  message: Invalid or expired API key.
                  code: INVALID_API_KEY
    Forbidden:
      description: >-
        The key is valid but either lacks a required permission, or is a real
        key of a class this endpoint doesn't accept.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            insufficient:
              value:
                error:
                  message: This key does not have the required permissions.
                  code: INSUFFICIENT_PERMISSIONS
            wrongClass:
              value:
                error:
                  message: >-
                    This endpoint requires a wordpress-class key; the presented
                    key is class "api".
                  code: WRONG_KEY_CLASS
    TooManyRequests:
      description: >-
        Rate limited — ours or the underlying key plugin's own. Honour
        Retry-After.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds until the window resets.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            rateLimited:
              value:
                error:
                  message: Too many requests, please try again shortly.
                  code: RATE_LIMIT
  securitySchemes:
    bearerKey:
      type: http
      scheme: bearer
      bearerFormat: pxg_... or pxg_wp_...
      description: >-
        An API key minted from the dashboard (POST /api/api-keys), of either
        class: `api` (prefix `pxg_`) or `wordpress` (prefix `pxg_wp_`). Which
        class a given route accepts is documented per-endpoint below; presenting
        a real key of a class the route doesn't accept is `403 WRONG_KEY_CLASS`,
        never folded into `401 INVALID_API_KEY`. No cookie fallback exists.

````