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

# Изменить тариф

> Изменить тарифный план

<script src="/locale-bridge.js" />


## OpenAPI

````yaml /openapi.ru.json POST /v1/public/accounts/{account_id}/billing/change-plan
openapi: 3.1.0
info:
  title: Code API (Public)
  version: 1.0.0
servers:
  - url: https://api.hybridbox.io
security: []
paths:
  /v1/public/accounts/{account_id}/billing/change-plan:
    post:
      tags:
        - public-accounts
        - public-billing
      summary: Изменить тарифный план
      description: Измените тарифный план аккаунта.
      operationId: >-
        change_public_billing_plan_v1_public_accounts__account_id__billing_change_plan_post
      parameters:
        - in: path
          name: account_id
          required: true
          schema:
            format: uuid
            title: Account Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BillingChangePlanRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicBillingPlanOperationResponse'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Ошибка валидации
      security:
        - PublicBearerAuth: []
components:
  schemas:
    BillingChangePlanRequest:
      description: Схема клиентского запроса для изменения плана подписки аккаунта.
      properties:
        effective_date:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Запрошенная дата вступления в силу изменения плана
          title: Дата вступления в силу
        plan_id:
          description: Идентификатор целевого тарифного плана
          enum:
            - smtp_per_mailbox
            - smtp_per_proxy
          title: Id плана
          type: string
      required:
        - plan_id
      title: BillingChangePlanRequest
      type: object
    PublicBillingPlanOperationResponse:
      properties:
        account_status:
          anyOf:
            - type: string
            - type: 'null'
          description: Состояние счета после операции
          title: Статус аккаунта
        effective_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Когда изменение платежного баланса вступило в силу
          title: Эффективен при
        eligible:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Подходил ли аккаунт для операции
          title: Доступно
        previous_plan_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Идентификатор предыдущего тарифного плана
          title: Идентификатор предыдущего плана
        status:
          description: Статус платежной операции
          title: Статус
          type: string
        target_plan_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Идентификатор целевого тарифного плана
          title: Идентификатор целевого плана
      required:
        - status
      title: PublicBillingPlanOperationResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Сведения
          type: array
      title: HTTPОшибка проверки
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Расположение
          type: array
        msg:
          title: Сообщение
          type: string
        type:
          title: Тип ошибки
          type: string
      required:
        - loc
        - msg
        - type
      title: Ошибка проверки
      type: object
  securitySchemes:
    PublicBearerAuth:
      bearerFormat: JWT or Hybridbox Service account token
      description: >-
        Public API bearer credential sent as `Authorization: Bearer <token>`.
        Use either an OAuth access token or a Hybridbox Service account token.
      scheme: bearer
      type: http

````