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

# List Projects

> Returns a paginated list of projects.

**Required permission:** `PROJECT:READ` or `FULL_ACCESS`



## OpenAPI

````yaml openapi.en.json GET /projects
openapi: 3.0.0
info:
  title: pague.dev API
  description: pague.dev Payment API documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api-gateway.pague.dev/v2
security: []
paths:
  /projects:
    get:
      tags:
        - External API - Projects
      summary: List projects
      description: |-
        Returns a paginated list of projects.

        **Required permission:** `PROJECT:READ` or `FULL_ACCESS`
      operationId: ExternalProjectsController_getAllProjects
      parameters:
        - name: page
          required: false
          in: query
          description: Page number
          schema:
            minimum: 1
            default: 1
            type: integer
        - name: limit
          required: false
          in: query
          description: Items per page
          schema:
            minimum: 1
            maximum: 100
            default: 20
            type: integer
        - name: sortBy
          required: false
          in: query
          description: Sort by field
          schema:
            default: createdAt
            type: string
            enum:
              - createdAt
              - updatedAt
              - name
        - name: sortOrder
          required: false
          in: query
          description: Sort order
          schema:
            default: desc
            type: string
            enum:
              - asc
              - desc
        - $ref: '#/components/parameters/SubAccount'
      responses:
        '200':
          description: List of projects
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAllProjectsOutput'
        '401':
          description: Unauthorized - Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    SubAccount:
      name: X-Sub-Account
      in: header
      required: false
      description: >-
        Reference of the sub-account the operation runs against. When omitted,
        the operation happens on the main account; the reserved value
        `principal` also resolves to the main account and is equivalent to
        omitting the header. Accepted on every endpoint except `POST /auth` and
        the `/sub-accounts` endpoints themselves, which always operate on the
        main account.


        Possible errors: `404 SUB_ACCOUNT_NOT_FOUND`, `403
        SUB_ACCOUNT_FORBIDDEN`, `403 SUB_ACCOUNT_SUSPENDED`.


        Requires the credential to have **sub-account access** enabled (Settings
        → Integration → API Credentials). It starts turned off and is not
        replaced by any permission, not even `FULL_ACCESS`: without it the
        response is `403 SUB_ACCOUNT_FORBIDDEN`.
      schema:
        type: string
        pattern: ^[a-z0-9][a-z0-9_-]{1,31}$
        example: loja-centro
  schemas:
    GetAllProjectsOutput:
      type: object
      properties:
        items:
          description: List of projects
          type: array
          items:
            $ref: '#/components/schemas/CreateProjectOutput'
        total:
          type: integer
          description: Total number of projects
          example: 100
        page:
          type: integer
          description: Current page
          example: 1
        limit:
          type: integer
          description: Items per page
          example: 20
        totalPages:
          type: integer
          description: Total number of pages
          example: 5
      required:
        - items
        - total
        - page
        - limit
        - totalPages
    UnauthorizedErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        error:
          type: string
          example: Unauthorized
        message:
          type: string
          example: Authentication token is required
        details:
          type: object
        timestamp:
          type: string
          example: '2025-12-15T22:00:00.000Z'
        traceId:
          type: string
      required:
        - statusCode
        - error
        - message
        - timestamp
    InternalServerErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 500
        error:
          type: string
          example: InternalError
        message:
          type: string
          example: An unexpected error occurred
        details:
          type: object
        timestamp:
          type: string
          example: '2025-12-15T22:00:00.000Z'
        traceId:
          type: string
          example: 2771463d58840c8e116dc6dda1e1e5d0
      required:
        - statusCode
        - error
        - message
        - timestamp
    CreateProjectOutput:
      type: object
      properties:
        id:
          type: string
          description: Project ID
          format: uuid
        name:
          type: string
          description: Project name
          example: Minha Loja
        description:
          type: string
          description: Project description
          example: Loja virtual de eletrônicos
        color:
          type: string
          description: Project color in hexadecimal format
          example: '#3B82F6'
        logoUrl:
          type: string
          description: Project logo URL
          format: uri
          example: https://example.com/logo.png
        createdAt:
          type: string
          description: Creation date
          format: date-time
      required:
        - id
        - name
        - color
        - createdAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Access token obtained from POST /auth (client_id + client_secret). Valid
        for 300 seconds.

````