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

# Update reserved IP (rename or attach/detach VM)

> Update reserved IP properties - rename it or attach/detach it to/from a VM



## OpenAPI

````yaml /api-reference/openapi.yaml patch /network/reserved_ips/{reserved_ip_id}
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/{reserved_ip_id}:
    patch:
      tags:
        - Reserved IPs
      summary: Update reserved IP (rename or attach/detach VM)
      description: >-
        Update reserved IP properties - rename it or attach/detach it to/from a
        VM
      parameters:
        - name: reserved_ip_id
          in: path
          description: Reserved IP ID
          required: true
          schema:
            type: string
            format: uuid
            example: d3c0dc7b-6ca4-4b35-8f3c-a00adc3993d5
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                team_id:
                  type: string
                  description: >-
                    Team ID to verify ownership. If not provided, uses the
                    user's primary team
                name:
                  type: string
                  maxLength: 64
                  description: >-
                    New name for the reserved IP (set to empty string to use IP
                    address as name)
                anchor_ip:
                  type: string
                  nullable: true
                  description: Anchor IP to route to. Use null to detach the current VM.
      responses:
        '200':
          description: Successfully updated
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      name:
                        type: string
                        description: Updated name (returned when renaming)
                  - type: object
                    properties:
                      attachment:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                            description: UUID of the attached VM
                          name:
                            type: string
                            description: Name of the attached VM
                    description: Attachment details (returned when attaching)
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  err:
                    type: string
                    enum:
                      - IP_NAME_TOO_LONG
                      - INVALID_LOCATION
                    description: Error code indicating validation failure
        '401':
          description: Unauthorized - user doesn't have write permission for the team
        '403':
          description: Forbidden - operation not allowed
          content:
            application/json:
              schema:
                type: object
                properties:
                  err:
                    type: string
                    enum:
                      - UNABLE_TO_DETACH_PRIMARY_IP
                      - RESERVED_IP_ALREADY_ATTACHED
                      - NO_ANCHOR_IP
                    description: Error code indicating why operation is forbidden
        '404':
          description: Reserved IP not found or not active
      security:
        - api_key: []
components:
  securitySchemes:
    api_key:
      type: http
      scheme: bearer

````