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

# Создать проект

> Создаёт новый проект.

**Требуемое разрешение:** `PROJECT:WRITE` или `FULL_ACCESS`



## OpenAPI

````yaml openapi.ru.json POST /projects
openapi: 3.0.0
info:
  title: pague.dev API
  description: Документация платёжного API pague.dev
  version: '1.0'
  contact: {}
servers:
  - url: https://api-gateway.pague.dev/v2
security: []
paths:
  /projects:
    post:
      tags:
        - External API - Projects
      summary: Создать проект
      description: |-
        Создаёт новый проект.

        **Требуемое разрешение:** `PROJECT:WRITE` или `FULL_ACCESS`
      operationId: ExternalProjectsController_createProject
      parameters:
        - $ref: '#/components/parameters/SubAccount'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectInput'
      responses:
        '201':
          description: Проект успешно создан
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateProjectOutput'
        '400':
          description: Bad Request — ошибка валидации
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized — требуется аутентификация
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '409':
          description: Conflict — ресурс уже существует
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictErrorResponse'
        '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 субсчёта, в котором должна выполняться операция. Если
        заголовок не передан, операция выполняется в основном аккаунте;
        зарезервированное значение `principal` также указывает на основной
        аккаунт и равнозначно отсутствию заголовка. Принимается всеми
        эндпоинтами, кроме `POST /auth` и самих эндпоинтов `/sub-accounts`,
        которые всегда работают с основным аккаунтом.


        Возможные ошибки: `404 SUB_ACCOUNT_NOT_FOUND`, `403
        SUB_ACCOUNT_FORBIDDEN`, `403 SUB_ACCOUNT_SUSPENDED`.


        Требует, чтобы у учётных данных был включён **доступ к субсчетам**
        (Настройки → Интеграция → Учётные данные API). По умолчанию он выключен
        и не заменяется никаким разрешением, даже `FULL_ACCESS`: без него ответ
        — `403 SUB_ACCOUNT_FORBIDDEN`.
      schema:
        type: string
        pattern: ^[a-z0-9][a-z0-9_-]{1,31}$
        example: loja-centro
  schemas:
    CreateProjectInput:
      type: object
      properties:
        name:
          type: string
          description: Название проекта
          maxLength: 255
          example: Minha Loja
        description:
          type: string
          description: Описание проекта
          example: Loja virtual de eletrônicos
        color:
          type: string
          description: Цвет проекта в шестнадцатеричном формате
          pattern: ^#[0-9A-Fa-f]{6}$
          example: '#3B82F6'
        logoUrl:
          type: string
          description: URL логотипа проекта
          format: uri
          example: https://example.com/logo.png
      required:
        - name
        - color
    CreateProjectOutput:
      type: object
      properties:
        id:
          type: string
          description: ID проекта
          format: uuid
        name:
          type: string
          description: Название проекта
          example: Minha Loja
        description:
          type: string
          description: Описание проекта
          example: Loja virtual de eletrônicos
        color:
          type: string
          description: Цвет проекта в шестнадцатеричном формате
          example: '#3B82F6'
        logoUrl:
          type: string
          description: URL логотипа проекта
          format: uri
          example: https://example.com/logo.png
        createdAt:
          type: string
          description: Дата создания
          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: >-
        Токен доступа, полученный через POST /auth (client_id + client_secret).
        Действителен в течение 300 секунд.

````