> ## 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.

# Criar Projeto

> Cria um novo projeto.

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



## OpenAPI

````yaml POST /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:
    post:
      tags:
        - External API - Projects
      summary: Criar um projeto
      description: |-
        Cria um novo projeto.

        **Permissão requerida:** `PROJECT:WRITE` ou `FULL_ACCESS`
      operationId: ExternalProjectsController_createProject
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectInput'
      responses:
        '201':
          description: Projeto criado com sucesso
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateProjectOutput'
        '400':
          description: Bad Request - Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized - Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '409':
          description: Conflict - Resource already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateProjectInput:
      type: object
      properties:
        name:
          type: string
          description: Nome do projeto
          maxLength: 255
          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
          pattern: ^#[0-9A-Fa-f]{6}$
          example: '#3B82F6'
        logoUrl:
          type: string
          description: URL do logo do projeto
          format: uri
          example: https://example.com/logo.png
      required:
        - name
        - color
    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
    BadRequestErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        error:
          type: string
          example: BadRequest
        message:
          type: string
          example: name must be longer than or equal to 2 characters
        details:
          type: object
        timestamp:
          type: string
          example: '2025-12-15T22:00:00.000Z'
        traceId:
          type: string
      required:
        - statusCode
        - error
        - message
        - timestamp
    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
    ConflictErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 409
        error:
          type: string
          example: Conflict
        message:
          type: string
          example: Resource with name 'Example' already exists
        details:
          type: object
          example:
            resource: Example
            field: name
            value: Example
        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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Access token obtido no POST /auth (client_id + client_secret). Válido
        por 300 segundos.

````