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

# Listar Projetos

> Retorna uma lista paginada de projetos.

**Permissão requerida:** `PROJECT:READ` ou `FULL_ACCESS`



## OpenAPI

````yaml GET /projects
openapi: 3.0.0
info:
  title: MisesPay API
  description: MisesPay Payment API documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.misespay.com/v2
security: []
paths:
  /projects:
    get:
      tags:
        - External API - Projects
      summary: Listar projetos
      description: |-
        Retorna uma lista paginada de projetos.

        **Permissão requerida:** `PROJECT:READ` ou `FULL_ACCESS`
      operationId: ExternalProjectsController_getAllProjects
      parameters:
        - name: page
          required: false
          in: query
          description: Número da página
          schema:
            minimum: 1
            default: 1
            type: integer
        - name: limit
          required: false
          in: query
          description: Itens por página
          schema:
            minimum: 1
            maximum: 100
            default: 20
            type: integer
        - name: sortBy
          required: false
          in: query
          description: Ordenar por campo
          schema:
            default: createdAt
            type: string
            enum:
              - createdAt
              - updatedAt
              - name
        - name: sortOrder
          required: false
          in: query
          description: Ordem de classificação
          schema:
            default: desc
            type: string
            enum:
              - asc
              - desc
      responses:
        '200':
          description: Lista de projetos
          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:
  schemas:
    GetAllProjectsOutput:
      type: object
      properties:
        items:
          description: Lista de projetos
          type: array
          items:
            $ref: '#/components/schemas/CreateProjectOutput'
        total:
          type: integer
          description: Número total de projetos
          example: 100
        page:
          type: integer
          description: Página atual
          example: 1
        limit:
          type: integer
          description: Itens por página
          example: 20
        totalPages:
          type: integer
          description: Número total de páginas
          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: ID do projeto
          format: uuid
        name:
          type: string
          description: Nome do projeto
          example: Minha Loja
        description:
          type: string
          description: Descrição do projeto
          example: Loja virtual de eletrônicos
        color:
          type: string
          description: Cor do projeto em formato hexadecimal
          example: '#3B82F6'
        logoUrl:
          type: string
          description: URL do logo do projeto
          format: uri
          example: https://example.com/logo.png
        createdAt:
          type: string
          description: Data de criação
          format: date-time
      required:
        - id
        - name
        - color
        - createdAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Access token obtido no POST /auth (client_id + client_secret). Válido
        por 300 segundos.

````