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

# Convert VM's primary IP to reserved IP

> Convert an existing VM's primary public IP address into a reserved IP (floating IP)



## OpenAPI

````yaml /api-reference/openapi.yaml post /network/reserved_ips/convert
openapi: 3.0.3
info:
  title: Onidel Cloud API - OpenAPI 3.0
  description: >-
    Welcome to the **Onidel Cloud API** documentation. This API allows
    developers to seamlessly integrate with the Onidel Cloud platform, enabling
    them to manage cloud resources efficiently and securely. With our API, you
    can automate processes, retrieve detailed account information, and manage
    virtual machines (VPS), networking, storage, and more.
  termsOfService: https://docs.onidel.com/policies/terms-of-service
  contact:
    email: support@onidel.com
  version: 1.2.0
servers:
  - url: https://api.cloud.onidel.com
security: []
tags:
  - name: SSH Key
    description: Manage SSH keys for secure server access.
  - name: VPC
    description: Manage Virtual Private Cloud (VPC) networks for isolated networking.
  - name: Firewall
    description: Manage firewall groups for VM security.
  - name: OS Template
    description: >-
      We have a wide range of operating systems available to deploy server
      instances.
  - name: Instance Type
    description: We provide different instance types for different workload.
  - name: Startup Script
    description: >-
      Manage startup scripts that run on first boot of a server instance.
      Maximum 10 scripts per team.
  - name: IP List
    description: >-
      Manage IP lists for use in firewall rules. IP lists group multiple IP
      addresses/CIDRs together.
  - name: Firewall Rule
    description: Manage firewall rules within a firewall group.
  - name: Object Storage
    description: Manage S3-compatible object storage services, buckets, and access keys.
  - name: Custom ISO
    description: Manage custom ISO images that can be used to boot server instances (BYOI).
  - name: Measured Boot Image
    description: >-
      Manage SEV-SNP measured direct boot images (UKIs) and attach/detach them
      to instances.
paths:
  /network/reserved_ips/convert:
    post:
      tags:
        - Reserved IPs
      summary: Convert VM's primary IP to reserved IP
      description: >-
        Convert an existing VM's primary public IP address into a reserved IP
        (floating IP)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                team_id:
                  type: string
                  description: >-
                    Team ID that owns the VM. If not provided, uses the user's
                    primary team
                ip_address:
                  type: string
                  format: ipv4
                  description: The VM's primary public IP address to convert
                name:
                  type: string
                  maxLength: 64
                  description: >-
                    Custom name for the reserved IP (defaults to IP address if
                    not provided)
              required:
                - ip_address
      responses:
        '200':
          description: IP successfully converted to reserved IP
          content:
            application/json:
              schema:
                type: object
                properties:
                  reserved_ip:
                    $ref: '#/components/schemas/ReservedIP'
                required:
                  - reserved_ip
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  err:
                    type: string
                    enum:
                      - IP_NAME_TOO_LONG
                      - UNSUPPORTED_LOCATION
                    description: Error code indicating validation failure
        '401':
          description: Unauthorized - user doesn't have write permission for the team
        '402':
          description: Payment required - insufficient balance
          content:
            application/json:
              schema:
                type: object
                properties:
                  err:
                    type: string
                    enum:
                      - INSUFFICIENT_BALANCE
        '403':
          description: Forbidden - quota exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  err:
                    type: string
                    enum:
                      - RESERVED_IP_QUOTA_EXCEEDED
                    description: Daily or total reserved IP quota exceeded
        '404':
          description: >-
            Not found - IP address not found, VM not active, or IP already
            reserved
      security:
        - api_key: []
components:
  schemas:
    ReservedIP:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Reserved IP UUID
        name:
          type: string
          description: Name of the reserved IP
        location:
          type: string
          description: Location name where the IP is allocated
        status:
          type: string
          enum:
            - active
            - suspended
          description: Current status of the reserved IP
        attachment:
          type: object
          nullable: true
          description: VM attachment details, null if not attached
          properties:
            id:
              type: string
              format: uuid
              description: UUID of the attached VM
            name:
              type: string
              description: Name of the attached VM
        billing_cycle:
          type: integer
          description: Billing cycle in months
        renewal_date:
          type: string
          format: date-time
          description: Next renewal date
        last_renewal:
          type: string
          format: date-time
          description: Last renewal date
        recurring_amount:
          type: number
          format: decimal
          description: Recurring billing amount
        currency:
          type: string
          description: Currency code for billing
        total_billed:
          type: number
          format: decimal
          description: Total amount billed
        ip_addr:
          type: string
          format: ipv4
          description: The reserved IP address
        suspension_reason:
          type: string
          description: Reason for suspension (empty string if not suspended)
      required:
        - id
        - name
        - location
        - status
        - billing_cycle
        - renewal_date
        - last_renewal
        - recurring_amount
        - currency
        - total_billed
        - ip_addr
        - suspension_reason
  securitySchemes:
    api_key:
      type: http
      scheme: bearer

````