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

# [Instances] Replace compute instance metadata

> Update modifiable properties of a compute instance such as name, description, and tags. Hardware configuration changes require the resize endpoint.



## OpenAPI

````yaml https://api.onetsolutions.net/schema put /v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}
openapi: 3.0.3
info:
  title: OnetSolutions API
  version: v1 (v1)
  description: >

    ## Overview


    The OnetSolutions API provides programmatic access to manage your cloud
    infrastructure, domains, and web hosting services.


    ## Authentication


    All API requests require authentication using one of the following methods:


    - **JWT Token**: Obtain a token via login endpoints and include it in the
    `Authorization: Bearer <token>` header

    - **API Key**: Generate an API key from your account settings and use it as
    `Authorization: Bearer sk-onetsolutions-...`


    ## Rate Limiting


    API requests are rate-limited to ensure fair usage:

    - **Standard**: 1000 requests per minute

    - **Burst**: 100 requests per second


    ## Pagination


    List endpoints return paginated results. Use `page` and `page_size` query
    parameters.


    ## Error Handling


    The API uses standard HTTP status codes:

    - `200` Success

    - `201` Created

    - `400` Bad Request

    - `401` Unauthorized

    - `403` Forbidden

    - `404` Not Found

    - `429` Too Many Requests
servers:
  - url: https://api.onetsolutions.net
    description: Production
security: []
tags:
  - name: Authentication
    description: >-
      Login, passwordless authentication, MFA, OAuth providers, and token
      management.
  - name: Organizations
    description: >-
      Organization management, members, roles, modules, audit logs, and
      notification settings.
  - name: Projects
    description: Project management, team members, and project-scoped resources.
  - name: Compute
    description: >-
      Cloud instances, volumes, snapshots, backups, VPCs, firewalls, SSH keys,
      uptime monitors, and instance tasks.
  - name: Domains
    description: >-
      Domain availability, registration, transfers, DNS zones, DNS records, and
      TLD information.
  - name: Web Hosting
    description: >-
      cPanel-based web hosting, emails, databases, subdomains, FTP accounts,
      addon domains, and SSL certificates.
paths:
  /v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{id}:
    put:
      tags:
        - Compute
      summary: '[Instances] Replace compute instance metadata'
      description: >-
        Update modifiable properties of a compute instance such as name,
        description, and tags. Hardware configuration changes require the resize
        endpoint.
      operationId: replace_instance
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          description: A UUID string identifying this Instance.
          required: true
        - in: path
          name: organization_id
          schema:
            type: string
          description: Unique identifier of the organization that owns the resource.
          required: true
        - in: path
          name: project_id
          schema:
            type: string
          description: Unique identifier of the project containing the resource.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Instance'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Instance'
          description: Instance updated successfully
        '400':
          description: Invalid request parameters
        '401':
          description: Authentication credentials missing or invalid
        '403':
          description: Insufficient permissions to modify this instance
        '404':
          description: Instance not found
      security:
        - BearerAuth: []
components:
  schemas:
    Instance:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        legacy_id:
          type: integer
          readOnly: true
        organization_id:
          type: string
          format: uuid
          readOnly: true
        project_id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: Instance name
          maxLength: 255
        hostname:
          type: string
          description: Instance hostname
          maxLength: 255
        status:
          enum:
            - pending
            - provisioning
            - active
            - suspended
            - terminated
            - cancelled
          type: string
          x-spec-enum-id: 37bb200cd5c75d35
          readOnly: true
          description: |-
            Billing status

            * `pending` - Pending
            * `provisioning` - Provisioning
            * `active` - Active
            * `suspended` - Suspended
            * `terminated` - Terminated
            * `cancelled` - Cancelled
        size:
          allOf:
            - $ref: '#/components/schemas/InstanceSize'
          readOnly: true
        size_id:
          type: string
          format: uuid
          writeOnly: true
        location:
          allOf:
            - $ref: '#/components/schemas/DatacenterLocation'
          readOnly: true
        location_id:
          type: string
          format: uuid
          writeOnly: true
        vpc:
          allOf:
            - $ref: '#/components/schemas/VPC'
          readOnly: true
        vpc_id:
          type: string
          format: uuid
          writeOnly: true
          nullable: true
        image:
          allOf:
            - $ref: '#/components/schemas/InstanceImage'
          readOnly: true
        image_id:
          type: string
          format: uuid
          writeOnly: true
        os_name:
          type: string
          description: Operating system name
          maxLength: 100
        primary_ipv4:
          type: string
          format: uuid
          readOnly: true
          nullable: true
          description: Primary IPv4 address
        primary_ipv6:
          type: string
          format: uuid
          readOnly: true
          nullable: true
          description: Primary IPv6 address
        ip_addresses:
          type: array
          items:
            $ref: '#/components/schemas/IPAddress'
          readOnly: true
        volumes:
          type: array
          items:
            $ref: '#/components/schemas/VolumeSummary'
          readOnly: true
        billing_cycle:
          enum:
            - free
            - one_time
            - hourly
            - monthly
            - quarterly
            - semi_annually
            - annually
            - biennially
            - triennially
          type: string
          description: |-
            * `free` - Free
            * `one_time` - One Time
            * `hourly` - Hourly
            * `monthly` - Monthly
            * `quarterly` - Quarterly
            * `semi_annually` - Semi-Annually
            * `annually` - Annually
            * `biennially` - Biennially
            * `triennially` - Triennially
          x-spec-enum-id: 99741277a111fd11
        billing_start_date:
          type: string
          format: date-time
          readOnly: true
        billing_end_date:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: For prepaid only
        next_billing_date:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        cancellation_requested_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: When cancellation was requested, effective at billing_end_date
        cancellation_reason:
          type: string
          readOnly: true
          description: Reason provided for cancellation request
        bandwidth_used_gb:
          type: string
          pattern: ^-?\d{0,13}(?:\.\d{0,2})?$
          readOnly: true
        tags:
          description: Custom tags
        is_active:
          type: boolean
          readOnly: true
        is_installed:
          type: boolean
          readOnly: true
          description: Whether the instance OS/service has been installed
        state_sync:
          allOf:
            - $ref: '#/components/schemas/InstanceStateSync'
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        modified:
          type: string
          format: date-time
          readOnly: true
      required:
        - bandwidth_used_gb
        - billing_end_date
        - billing_start_date
        - cancellation_reason
        - cancellation_requested_at
        - created
        - id
        - image
        - image_id
        - ip_addresses
        - is_active
        - is_installed
        - legacy_id
        - location
        - location_id
        - modified
        - name
        - next_billing_date
        - organization_id
        - os_name
        - primary_ipv4
        - primary_ipv6
        - project_id
        - size
        - size_id
        - state_sync
        - status
        - volumes
        - vpc
    InstanceSize:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: 'Ex: VPS-S, VPS-M, VPS-L'
          maxLength: 100
        slug:
          type: string
          description: 'Ex: vps-s, vps-m'
          maxLength: 50
          pattern: ^[-a-zA-Z0-9_]+$
        cpu_model:
          enum:
            - e5-2680-v4
            - epyc-7443
            - epyc-9554
          type: string
          x-spec-enum-id: e52bd36ae707aae4
          description: |-
            CPU model

            * `e5-2680-v4` - E5-2680 v4
            * `epyc-7443` - AMD EPYC 7443
            * `epyc-9554` - AMD EPYC 9554
        vcpu:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Number of vCPUs
        ram_mb:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: RAM in MB
        bandwidth_mbps:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Bandwidth in Mb/s
        is_active:
          type: boolean
        description:
          type: string
        available_volumes:
          type: array
          items:
            $ref: '#/components/schemas/InstanceSizeVolume'
          readOnly: true
        pricing_options:
          type: array
          items:
            $ref: '#/components/schemas/InstanceSizePricing'
          readOnly: true
        available_addons:
          type: array
          items:
            $ref: '#/components/schemas/InstanceSizeAddon'
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        modified:
          type: string
          format: date-time
          readOnly: true
      required:
        - available_addons
        - available_volumes
        - bandwidth_mbps
        - created
        - id
        - modified
        - name
        - pricing_options
        - ram_mb
        - slug
        - vcpu
    DatacenterLocation:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          description: 'Ex: Paris DC1, Frankfurt DC2'
          maxLength: 100
        slug:
          type: string
          maxLength: 50
          pattern: ^[-a-zA-Z0-9_]+$
        country_code:
          type: string
          description: 'Ex: FR, DE'
          maxLength: 2
        is_active:
          type: boolean
        created:
          type: string
          format: date-time
          readOnly: true
        modified:
          type: string
          format: date-time
          readOnly: true
      required:
        - country_code
        - created
        - id
        - modified
        - name
        - slug
    VPC:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 255
        cidr_block:
          type: string
          description: 'Ex: 10.0.0.0/16'
          maxLength: 50
        location:
          allOf:
            - $ref: '#/components/schemas/DatacenterLocation'
          readOnly: true
        location_id:
          type: string
          format: uuid
          writeOnly: true
        is_active:
          type: boolean
        created:
          type: string
          format: date-time
          readOnly: true
        modified:
          type: string
          format: date-time
          readOnly: true
      required:
        - cidr_block
        - created
        - id
        - location
        - modified
        - name
    InstanceImage:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        organization_id:
          type: string
          format: uuid
          readOnly: true
          nullable: true
        name:
          type: string
          description: 'Ex: Ubuntu 22.04 LTS, Debian 12'
          maxLength: 255
        slug:
          type: string
          description: 'Ex: ubuntu-22-04, debian-12'
          maxLength: 50
          pattern: ^[-a-zA-Z0-9_]+$
        description:
          type: string
        visibility:
          enum:
            - public
            - private
          type: string
          x-spec-enum-id: 076d8e197dd30156
          description: |-
            Public images are available to all, private to organization only

            * `public` - Public
            * `private` - Private
        os_name:
          type: string
          description: 'Ex: Ubuntu, Debian, CentOS'
          maxLength: 100
        os_version:
          type: string
          description: 'Ex: 22.04, 12, 8'
          maxLength: 50
        os_architecture:
          type: string
          description: 'Ex: x86_64, aarch64'
          maxLength: 20
        language:
          type: string
          readOnly: true
          description: Language code (fr, en, cn, etc.)
        is_active:
          type: boolean
        is_featured:
          type: boolean
          description: Featured public images
        is_windows:
          type: boolean
          readOnly: true
        requires_license_addon:
          type: boolean
          readOnly: true
        min_disk_gb:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Minimum disk size required (GB)
        min_ram_mb:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Minimum RAM required (MB)
        created:
          type: string
          format: date-time
          readOnly: true
        modified:
          type: string
          format: date-time
          readOnly: true
      required:
        - created
        - id
        - is_windows
        - language
        - modified
        - name
        - organization_id
        - os_name
        - os_version
        - requires_license_addon
        - slug
    IPAddress:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        address:
          type: string
        ip_type:
          enum:
            - ipv4
            - ipv6
          type: string
          description: |-
            * `ipv4` - IPv4
            * `ipv6` - IPv6
          x-spec-enum-id: 7aa5eccc95045be6
        interface:
          type: integer
          readOnly: true
          description: Network interface index (0=net0, 1=net1, etc.)
        netmask:
          type: string
          readOnly: true
          nullable: true
        gateway:
          type: string
          readOnly: true
        network_id:
          type: string
          format: uuid
          readOnly: true
          nullable: true
        vlan:
          type: integer
          readOnly: true
          nullable: true
        mac_address:
          type: string
          readOnly: true
        is_primary:
          type: boolean
          readOnly: true
        reverse_dns:
          type: string
          maxLength: 255
        created:
          type: string
          format: date-time
          readOnly: true
        modified:
          type: string
          format: date-time
          readOnly: true
      required:
        - address
        - created
        - gateway
        - id
        - interface
        - ip_type
        - is_primary
        - mac_address
        - modified
        - netmask
        - network_id
        - vlan
    VolumeSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          readOnly: true
          description: Volume name
        size_gb:
          type: integer
          readOnly: true
          description: Volume size in GB
        status:
          enum:
            - pending
            - creating
            - available
            - attached
            - detached
            - deleting
            - deleted
            - error
          type: string
          description: |-
            * `pending` - Pending
            * `creating` - Creating
            * `available` - Available
            * `attached` - Attached
            * `detached` - Detached
            * `deleting` - Deleting
            * `deleted` - Deleted
            * `error` - Error
          x-spec-enum-id: 846eb9b3e36e98dc
          readOnly: true
        disk_name:
          type: string
          readOnly: true
          description: 'Disk name in hypervisor (ex: scsi0)'
        location:
          allOf:
            - $ref: '#/components/schemas/DatacenterLocation'
          readOnly: true
        price_monthly:
          type: string
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          readOnly: true
          description: Prix mensuel
        is_active:
          type: boolean
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
      required:
        - created
        - disk_name
        - id
        - is_active
        - location
        - name
        - price_monthly
        - size_gb
        - status
    InstanceStateSync:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        vm_status:
          type: string
          description: Statut réel dans Hypervisor (running, stopped, etc.)
          maxLength: 20
        uptime:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Uptime en secondes
        cpu_usage:
          type: string
          pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
          description: Usage CPU en %
        memory_usage_mb:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Mémoire utilisée en MB
        disk_usage_gb:
          type: string
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          description: Disque utilisé en GB
        network_in_bytes:
          type: integer
          maximum: 9223372036854776000
          minimum: -9223372036854776000
          format: int64
          description: Bytes reçus
        network_out_bytes:
          type: integer
          maximum: 9223372036854776000
          minimum: -9223372036854776000
          format: int64
          description: Bytes envoyés
        last_synced_at:
          type: string
          format: date-time
          readOnly: true
          description: Dernière synchronisation avec Hypervisor
        sync_source:
          type: string
          description: Worker qui a effectué la sync
          maxLength: 100
      required:
        - id
        - last_synced_at
        - vm_status
    InstanceSizeVolume:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        volume_type:
          enum:
            - ssd
            - nvme
          type: string
          description: |-
            * `ssd` - SSD
            * `nvme` - NVMe
          x-spec-enum-id: defa042735ff9392
        disk_gb:
          type: integer
          maximum: 4294967295
          minimum: 0
          format: int64
          description: Disk size in GB
        is_default:
          type: boolean
          description: Default volume option for this size
        is_active:
          type: boolean
      required:
        - disk_gb
        - id
        - volume_type
    InstanceSizePricing:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        billing_cycle:
          enum:
            - hourly
            - monthly
            - quarterly
            - semi_annually
            - annually
            - biennially
            - triennially
          type: string
          description: |-
            * `hourly` - Hourly
            * `monthly` - Monthly
            * `quarterly` - Quarterly
            * `semi_annually` - Semi-Annually
            * `annually` - Annually
            * `biennially` - Biennially
            * `triennially` - Triennially
          x-spec-enum-id: 39fc1593b115d859
        price:
          type: string
          pattern: ^-?\d{0,6}(?:\.\d{0,4})?$
        discount_percent:
          type: string
          pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
          description: Discount percentage compared to monthly
        is_default:
          type: boolean
        is_active:
          type: boolean
      required:
        - billing_cycle
        - id
        - price
    InstanceSizeAddon:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        addon:
          allOf:
            - $ref: '#/components/schemas/Addon'
          readOnly: true
        pricing_options:
          type: array
          items:
            $ref: '#/components/schemas/InstanceSizeAddonPricing'
          readOnly: true
        is_included:
          type: boolean
          description: If true, addon is included in the base price
        is_default:
          type: boolean
          description: Pre-selected by default in cart
        is_active:
          type: boolean
      required:
        - addon
        - id
        - pricing_options
    Addon:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        slug:
          type: string
          maxLength: 50
          pattern: ^[-a-zA-Z0-9_]+$
        name:
          type: string
          description: Name in English (default)
          maxLength: 100
        name_fr:
          type: string
          description: Name in French
          maxLength: 100
        description:
          type: string
          description: Description in English (default)
        description_fr:
          type: string
          description: Description in French
        billing_type:
          enum:
            - recurring
            - one_time
          type: string
          description: |-
            * `recurring` - Recurring
            * `one_time` - One Time
          x-spec-enum-id: 62c1b9d6ecb52382
        is_active:
          type: boolean
      required:
        - id
        - name
        - slug
    InstanceSizeAddonPricing:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        billing_cycle:
          enum:
            - hourly
            - monthly
            - quarterly
            - semi_annually
            - annually
            - biennially
            - triennially
          type: string
          description: |-
            * `hourly` - Hourly
            * `monthly` - Monthly
            * `quarterly` - Quarterly
            * `semi_annually` - Semi-Annually
            * `annually` - Annually
            * `biennially` - Biennially
            * `triennially` - Triennially
          x-spec-enum-id: 39fc1593b115d859
        price:
          type: string
          pattern: ^-?\d{0,6}(?:\.\d{0,4})?$
        is_active:
          type: boolean
      required:
        - billing_cycle
        - id
        - price
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: >-
        Use `Authorization: Bearer <token>` header. Token can be a JWT token or
        an API key (format: `sk-onetsolutions-...`).

````