info:
  title: APIFiddle Sample Definition
  version: 0.0.0
  description: Example workspace
paths:
  /order:
    post:
      summary: Order a new server
      security:
        - Authorization: []
      responses:
        "201":
          content:
            application/json:
              schema:
                type: object
                title: OrderANewServerCreated
                required:
                  - success
                properties:
                  success:
                    type: boolean
                  server_id:
                    type: integer
                  invoice_id:
                    type: integer
                    description: ID of the invoice created for this purchase.
                  duration:
                    type: integer
                    description: Number of months the server was purchased for.
                    examples:
                      - 1
                  amount_charged:
                    type: number
                    description: |
                      Total amount deducted from the user's balance after applying
                      the duration discount tier.
                    examples:
                      - 102
                  expiry_date:
                    type: string
                    description: ISO-8601 expiry timestamp for the new server.
                    examples:
                      - "2027-05-04T12:00:00.000000Z"
          description: The request was successful, and a new resource was created.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - plan_id
                - region_id
                - distro_id
              properties:
                plan_id:
                  type: integer
                  description: ID of the plan to purchase.
                region_id:
                  type: integer
                  description: ID of the region to deploy in.
                  examples:
                    - 1
                distro_id:
                  type: integer
                  description: ID of the distro or ISO image to install on the server.
                duration:
                  type: integer
                  minimum: 1
                  maximum: 12
                  default: 1
                  description: |
                    Number of months to purchase the server for (1-12). The total
                    is calculated as `plan.price * duration` with the duration
                    discount tier applied:
                    - 3 months: 5% off
                    - 6 months: 10% off
                    - 12 months: 15% off

                    Other durations (1, 2, 4, 5, 7, 8, 9, 10, 11) receive no
                    discount.
                ssh_key:
                  type: string
                  maxLength: 8192
                  description: |
                    Optional raw SSH **public** key (e.g. `ssh-ed25519 AAAA... user@host`)
                    to install on the new server. Only valid when `distro_id`
                    refers to a Linux distro — supplying it together with a
                    Windows ISO returns an error.

                    The key is provisioned via cloud-init at first boot. You do
                    not need to register the key on the dashboard first.
                  examples:
                    - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKeyDataHere user@example"
      description: |
        This API endpoint allows you to purchase a new server using your
        available balance. By default the server is provisioned for one month;
        pass `duration` to purchase a longer initial term and benefit from the
        duration discount tiers.
      operationId: orderANewServer
  /plans:
    get:
      summary: Get plans
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/plan"
          description: The request was successful, and the server has returned the
            requested resource in the response body.
      parameters: []
      description: Retrieve a list of available plans.
      operationId: getPlans
  /stock:
    get:
      summary: Get stock
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/stock"
                title: GetStockOk
          description: The request was successful, and the server has returned the
            requested resource in the response body.
      operationId: getStock
  /distros:
    get:
      summary: Get distros
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/distro"
                title: GetDistrosOk
          description: The request was successful, and the server has returned the
            requested resource in the response body.
      parameters: []
      description: Retrieve a list of available distros.
      operationId: getDistros
  /regions:
    get:
      summary: Get regions
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/region"
                title: GetRegionsOk
          description: The request was successful, and the server has returned the
            requested resource in the response body.
      parameters: []
      description: Retrieve a list of available regions.
      operationId: getRegions
  /servers:
    get:
      summary: Get servers
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/server"
                title: GetServersOk
          description: The request was successful, and the server has returned the
            requested resource in the response body.
      parameters: []
      description: Retrieve a list of your servers.
      operationId: getServers
  /billing/balance:
    get:
      summary: Get balance
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: GetBalanceOk
                required:
                  - balance
                properties:
                  balance:
                    type: string
                    examples:
                      - "4300"
                    description: returned in decimal format
          description: The request was successful, and the server has returned the
            requested resource in the response body.
      parameters: []
      description: Retrieve your account's balance. Balance is returned in decimal value.
      operationId: getBalance
  /servers/{server}:
    get:
      summary: Get server
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/serverDetail"
          description: The request was successful, and the server has returned the
            requested resource in the response body.
      parameters:
        - $ref: "#/components/parameters/server"
      description: Retrieve a single server.
      operationId: getServer
    delete:
      summary: Delete a server
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: DeleteServerOk
                required:
                  - status
                  - message
                  - server_id
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Server deleted successfully
                  server_id:
                    type: integer
                    examples:
                      - 123
          description: Server deleted successfully.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: DeleteServerUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
        "404":
          description: Server not found.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Permanently delete a server you own. The server is stopped and removed
        immediately on the hypervisor; this action is irreversible. **No balance
        is refunded**, regardless of the remaining time on the server.
      operationId: deleteServer
  /servers/{server}/power/{state}:
    post:
      summary: Changes power state of server
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: ChangesPowerStateOfServerOk
                required:
                  - status
                properties:
                  status:
                    type: boolean
          description: The request was successful, and the server has returned the
            requested resource in the response body.
      parameters:
        - $ref: "#/components/parameters/server"
        - $ref: "#/components/parameters/state"
      description: Change the power state of your server.
      operationId: changesPowerStateOfServer
  /servers/{server}/renew:
    post:
      summary: Renew a server
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: RenewServerOk
                required:
                  - status
                  - message
                  - invoice_id
                  - amount_charged
                  - new_expiry_date
                  - server
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Server renewed for 1 month(s)
                  invoice_id:
                    type: integer
                    examples:
                      - 123
                  amount_charged:
                    type: number
                    examples:
                      - 10
                  new_expiry_date:
                    type: string
                    examples:
                      - "2026-02-16T00:00:00.000Z"
                  server:
                    type: object
                    properties:
                      id:
                        type: integer
                      ip_address:
                        type: string
                      expiry_date:
                        type: string
                      suspended:
                        type: boolean
          description: Server renewed successfully.
        "400":
          content:
            application/json:
              schema:
                type: object
                title: RenewServerInsufficientBalance
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Insufficient balance
                  required:
                    type: number
                    examples:
                      - 10
                  available:
                    type: number
                    examples:
                      - 5
          description: Insufficient balance to renew the server.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: RenewServerUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
      parameters:
        - $ref: "#/components/parameters/server"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                duration:
                  type: integer
                  minimum: 1
                  maximum: 12
                  default: 1
                  description: |
                    Number of months to renew (1-12). The duration discount
                    tier is automatically applied:
                    - 3 months: 5% off
                    - 6 months: 10% off
                    - 12 months: 15% off

                    Other durations receive no discount.
      description: |
        Renew a server using your account balance. The cost is `plan.price *
        duration` with the duration discount tier applied (3 months: 5%, 6
        months: 10%, 12 months: 15%). A 10% surcharge applies to suspended
        servers and stacks with the duration discount.
      operationId: renewServer
  /servers/{server}/reinstall:
    post:
      summary: Reinstall a server
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: ReinstallServerOk
                required:
                  - status
                  - message
                  - server_id
                  - previous_server_id
                  - deployment_id
                  - expiry_date
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Reinstallation has been dispatched
                  server_id:
                    type: integer
                    description: ID of the new server replacing the previous one.
                    examples:
                      - 124
                  previous_server_id:
                    type: integer
                    description: ID of the server that was deleted.
                    examples:
                      - 123
                  deployment_id:
                    type: integer
                    examples:
                      - 45
                  expiry_date:
                    type: string
                    description: Expiry date carried over from the previous server.
                    examples:
                      - "2026-06-04T00:00:00.000000Z"
          description: Reinstallation dispatched successfully.
        "400":
          content:
            application/json:
              schema:
                type: object
                title: ReinstallServerBadRequest
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - The selected operating system is not available for this plan
          description: Invalid distro, region out of stock, or OS not compatible with the plan.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: ReinstallServerUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
        "404":
          description: Server not found.
        "422":
          description: Validation error (missing distro_id).
      parameters:
        - $ref: "#/components/parameters/server"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - distro_id
              properties:
                distro_id:
                  type: integer
                  description: |
                    ID of the operating system to install. Accepts either a
                    Linux `distro` ID (for Linux plans) or a Windows `iso` ID
                    (for Windows plans). Use `GET /distros` to list available
                    Linux distros.
      description: |
        Reinstall a server with a new operating system. This deletes the
        existing VM and provisions a new one on the same node, preserving the
        original `expiry_date` and `hostname`. The response returns the new
        `server_id` immediately, while the actual install runs asynchronously.
        Stock and OS-compatibility checks identical to the order endpoint are
        applied. **No balance is charged.**
      operationId: reinstallServer
  /servers/{server}/password/reset:
    post:
      summary: Reset the password
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: ResetServerPasswordOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  outcome:
                    type: string
                    enum:
                      - changed
                      - changed_restart
                      - changed_stop_start
                    description: What is left to do, see above.
                    examples:
                      - changed_restart
                  message:
                    type: string
                    examples:
                      - Password has been changed. Please restart your server before you change it to a password of your own choice.
                  username:
                    type: string
                    examples:
                      - Administrator
                  password:
                    type: string
                    examples:
                      - Pv93xK2mQ8sL
          description: The password was changed.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: ResetServerPasswordUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
        "404":
          description: Server not found.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: ResetServerPasswordConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  outcome:
                    type: string
                    enum:
                      - no_answer
                      - not_accepted
                      - no_drive
                      - password_ignored
                      - not_written
                      - busy
                    description: Left out when the server is suspended, or is being installed or moved.
                    examples:
                      - no_answer
                  error:
                    type: string
                    examples:
                      - Your server did not respond, so its password was not changed. Please make sure it is running and try again.
          description: |
            The password was not changed. Either the server is suspended or is being installed
            or moved, or `outcome` says why:

            - `no_answer`: the guest agent of a Windows server did not respond. Make sure the server is running and try again.
            - `not_accepted`: Windows did not accept the new password. Try again in a few minutes.
            - `no_drive`: the server has no cloud-init drive. Contact support.
            - `password_ignored`: the server was deployed with preinstalled software. Contact support.
            - `not_written`: the password could not be written. Try again in a few minutes.
            - `busy`: another reset of this server is still running. Try again in a minute.
        "429":
          description: |
            Too many resets: 5 every 2 minutes per server and 30 a minute per account.
            Refused resets count too.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Sets a new random password on the server, as "Reset Password" in the panel does,
        and answers with it. `GET /servers/{server}` shows the same password from then on.
        The password is random and goes through your systems, so have your customer
        choose one of their own.

        What is left to do depends on `outcome`:

        - `changed`: nothing. The server already runs on the new password.
        - `changed_restart`: restart the server. A Linux server takes the new password
          when it restarts. A Windows server already runs on it and sets it again at its
          next start, so restart it before choosing another password.
        - `changed_stop_start`: stop the server and start it again. It takes the new
          password at its next start, and a restart is not enough.
      operationId: resetServerPassword
  /servers/{server}/region-changes:
    get:
      summary: Get region change options
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: GetRegionChangeOptionsOk
                required:
                  - status
                  - available
                  - price
                  - regions
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  available:
                    type: boolean
                    description: Whether the server can be moved right now.
                    examples:
                      - true
                  unavailable_reason:
                    type:
                      - string
                      - "null"
                    description: Why the server cannot be moved right now, or `null`.
                    examples:
                      - This server is suspended, so it cannot be moved to another location.
                  price:
                    type: object
                    properties:
                      amount:
                        type: number
                        description: What the move costs, VAT of your country included. `0` on a reseller account.
                        examples:
                          - 2.5
                      net:
                        type: number
                        description: The price before VAT. `0` on a reseller account.
                        examples:
                          - 2.1
                      vat_rate:
                        type: number
                        description: The VAT rate in percent. `0` on a reseller account.
                        examples:
                          - 19
                      currency:
                        type: string
                        examples:
                          - EUR
                      free:
                        type: boolean
                        description: Whether moves are free for your account, as they are for reseller accounts.
                        examples:
                          - false
                  current_region:
                    $ref: "#/components/schemas/region"
                  regions:
                    type: array
                    description: Every other location that offers the server's plan.
                    items:
                      allOf:
                        - $ref: "#/components/schemas/region"
                        - type: object
                          properties:
                            in_stock:
                              type: boolean
                              description: |
                                Whether the location has room for the server's plan.
                                It is refreshed every ten minutes; ordering checks the
                                live stock again.
                            ipv6:
                              type: boolean
                              description: Whether the location hands out IPv6 addresses.
                  latest_region_change:
                    oneOf:
                      - $ref: "#/components/schemas/regionChange"
                      - type: "null"
          description: The locations the server can move to, and the price.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: GetRegionChangeOptionsUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
        "404":
          description: Server not found.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Lists the locations a server can be moved to, whether each has room for the
        server's plan, the price of a move, and the latest move of the server. A
        server cannot be moved while it is suspended, expired, being installed, or
        busy with an IP change, another move or a backup.
      operationId: getRegionChangeOptions
    post:
      summary: Move a server to another region
      security:
        - Authorization: []
      responses:
        "201":
          content:
            application/json:
              schema:
                type: object
                title: ChangeServerRegionOk
                required:
                  - status
                  - message
                  - invoice_id
                  - amount_charged
                  - region_change
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - The move to New York has been queued
                  invoice_id:
                    type:
                      - integer
                      - "null"
                    description: The invoice paid from your balance, or `null` on a reseller account.
                    examples:
                      - 5012
                  amount_charged:
                    type: number
                    description: What was taken from your balance, `0` on a reseller account.
                    examples:
                      - 2.5
                  region_change:
                    $ref: "#/components/schemas/regionChange"
          description: The move was paid from your balance, or is free on a reseller account, and queued.
        "400":
          content:
            application/json:
              schema:
                type: object
                title: ChangeServerRegionBadRequest
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Insufficient balance
                  required:
                    type: number
                    description: Only when the balance is too low.
                    examples:
                      - 2.5
                  available:
                    type: number
                    description: Only when the balance is too low.
                    examples:
                      - 1
          description: Insufficient balance, an unknown distro, or an SSH key that is not yours.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: ChangeServerRegionUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
        "404":
          description: Server or region not found.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: ChangeServerRegionConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - New York is out of stock for this server's plan right now. Please try again later or choose another location.
                  region_change:
                    $ref: "#/components/schemas/regionChange"
          description: |
            The move cannot be made: the location is out of stock, the server is
            already there, it cannot be moved right now, or the guest cannot be
            copied (choose `fresh` instead). Nothing is charged. If the payment was
            taken and the move refused at that moment, `region_change` is included
            and the fee is already back on your balance.
        "422":
          description: Validation error (missing `region_id` or `mode`, or `distro_id` for a fresh server).
      parameters:
        - $ref: "#/components/parameters/server"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - region_id
                - mode
              properties:
                region_id:
                  type: integer
                  description: The location to move to, from `regions` in the options.
                  examples:
                    - 6
                mode:
                  type: string
                  enum:
                    - transfer
                    - fresh
                  description: |
                    `transfer` copies the server's disk to the new location, so files,
                    applications and settings come along. The server is stopped while
                    the disk is copied. `fresh` replaces the server with a new
                    installation in the new location; everything on its disk is erased.
                distro_id:
                  type: integer
                  description: |
                    Required for `fresh`: the operating system to install. Accepts a
                    Linux `distro` ID or a Windows `iso` ID, as on reinstall.
                ssh_key_id:
                  type: integer
                  description: Optional for a fresh Linux server, one of your SSH keys.
      description: |
        Moves a server to another location for a one-time fee of €2.50 (VAT of your
        country included), paid from your account balance. The live stock of the
        location is checked before anything is charged.

        Reseller accounts move their servers for free: nothing is taken from the
        balance, `amount_charged` is `0` and `invoice_id` is `null`.

        The move then runs on its own; follow it with `GET /region-changes/{regionChange}`.
        Either way the server gets an IP address of the new location, and its old
        address is released. A move that fails is credited back to your balance.

        - **transfer** keeps the server, its ID and its data. It is stopped while the
          disk is copied, usually 15 to 60 minutes, and started again in the new
          location if it was running. A Linux server boots with new SSH host keys.
        - **fresh** replaces the server with a new one carrying the same expiry date
          and name. The response's `region_change.new_server_id` and `deployment_id`
          are set once the setup has started.
      operationId: changeServerRegion
  /region-changes/{regionChange}:
    get:
      summary: Get a region change
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: GetRegionChangeOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  region_change:
                    $ref: "#/components/schemas/regionChange"
          description: The move and how far it has got.
        "404":
          content:
            application/json:
              schema:
                type: object
                title: GetRegionChangeNotFound
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Region change not found
          description: No move with this ID on your account.
      parameters:
        - $ref: "#/components/parameters/regionChange"
      description: |
        Reads a move by its ID, so it can be followed after the server it was ordered
        for has been replaced by a fresh one.
      operationId: getRegionChange
  /servers/{server}/graphs/{timeframe}:
    get:
      summary: Get server graphs
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: GetServerGraphsOk
                properties:
                  status:
                    type: boolean
                  metrics:
                    type: array
                    items:
                      type: string
                    examples:
                      - ["cpu", "mem", "netin", "netout"]
                  timeframe:
                    type: string
                  data:
                    type: array
          description: Server graph data retrieved successfully.
        "400":
          description: Invalid timeframe.
        "403":
          description: Unauthorized access.
      parameters:
        - $ref: "#/components/parameters/server"
        - $ref: "#/components/parameters/timeframe"
      description: Get server resource usage graphs (CPU, memory, network) for the specified timeframe.
      operationId: getServerGraphs
  /servers/{server}/hostname:
    put:
      summary: Update server hostname
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: UpdateHostnameOk
                properties:
                  status:
                    type: boolean
                  message:
                    type: string
                  hostname:
                    type: string
          description: Hostname updated successfully.
        "403":
          description: Unauthorized access.
        "422":
          description: Validation error.
      parameters:
        - $ref: "#/components/parameters/server"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                hostname:
                  type: string
                  maxLength: 16
                  description: New hostname (max 16 characters, min 3 to set, less clears it)
      description: Update the display hostname for a server. Set to null or less than 3 characters to clear.
      operationId: updateServerHostname
  /servers/{server}/rdns:
    put:
      summary: Update server reverse DNS
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: UpdateRdnsOk
                properties:
                  status:
                    type: boolean
                  message:
                    type: string
                  rdns:
                    type: string
          description: Reverse DNS updated successfully.
        "403":
          description: Unauthorized access.
        "500":
          description: Failed to update reverse DNS.
      parameters:
        - $ref: "#/components/parameters/server"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                rdns:
                  type: string
                  minLength: 4
                  maxLength: 40
                  description: Reverse DNS hostname (4-40 characters). Leave empty for default.
      description: Update the reverse DNS (PTR) record for the server's IP address.
      operationId: updateServerRdns
  /servers/{server}/ip-changes:
    get:
      summary: Get IP change options
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: GetIpChangeOptionsOk
                required:
                  - status
                  - available
                  - price
                  - subnets
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  available:
                    type: boolean
                    description: Whether the server's IP address can be changed right now.
                    examples:
                      - true
                  unavailable_reason:
                    type:
                      - string
                      - "null"
                    description: Why the address cannot be changed right now, or `null`.
                    examples:
                      - This server is suspended, so its IP address cannot be changed.
                  price:
                    type: object
                    properties:
                      amount:
                        type: number
                        description: What the change costs, VAT of your country included.
                        examples:
                          - 2.5
                      net:
                        type: number
                        examples:
                          - 2.1
                      vat_rate:
                        type: number
                        examples:
                          - 19
                      currency:
                        type: string
                        examples:
                          - EUR
                  current_ip:
                    type:
                      - string
                      - "null"
                    examples:
                      - 203.0.113.10
                  subnets:
                    type: array
                    description: |
                      The /24 subnets in the server's location that have a free address,
                      the server's current subnet included.
                    items:
                      type: object
                      properties:
                        subnet:
                          type: string
                          examples:
                            - 198.51.100.0/24
                        free:
                          type: integer
                          description: How many addresses of the subnet are free.
                          examples:
                            - 12
                        current:
                          type: boolean
                          description: Whether the server's current address is in this subnet.
                          examples:
                            - false
                  latest_ip_change:
                    oneOf:
                      - $ref: "#/components/schemas/ipChange"
                      - type: "null"
          description: The subnets a new address can come from, and the price.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: GetIpChangeOptionsUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
        "404":
          description: Server not found.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Lists the /24 subnets in the server's location that have a free IPv4 address,
        the price of a change, and the latest IP change of the server. An address
        cannot be changed while the server is suspended, expired, being installed or
        moved, while a backup runs, or while another change is on its way. An address
        with open abuse reports is changed by our support team instead.
      operationId: getIpChangeOptions
    post:
      summary: Change a server's IP address
      security:
        - Authorization: []
      responses:
        "201":
          content:
            application/json:
              schema:
                type: object
                title: ChangeServerIpOk
                required:
                  - status
                  - message
                  - invoice_id
                  - amount_charged
                  - ip_change
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - The IP address change has been queued
                  invoice_id:
                    type: integer
                    examples:
                      - 5013
                  amount_charged:
                    type: number
                    examples:
                      - 2.5
                  ip_change:
                    $ref: "#/components/schemas/ipChange"
          description: The change was paid from your balance and queued.
        "400":
          content:
            application/json:
              schema:
                type: object
                title: ChangeServerIpBadRequest
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Insufficient balance
                  required:
                    type: number
                    examples:
                      - 2.5
                  available:
                    type: number
                    examples:
                      - 1
          description: Insufficient balance.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: ChangeServerIpUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
        "404":
          description: Server not found.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: ChangeServerIpConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - 198.51.100.0/24 has no free address for this server. Please choose another subnet.
                  ip_change:
                    $ref: "#/components/schemas/ipChange"
          description: |
            The change cannot be made: the subnet has no free address, the server
            cannot change its address right now, or the change has to be made by our
            support team. Nothing is charged. If the payment was taken and the change
            refused at that moment, `ip_change` is included and the fee is already
            back on your balance.
        "422":
          description: Validation error (missing `subnet`, or one that is not a /24).
      parameters:
        - $ref: "#/components/parameters/server"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - subnet
              properties:
                subnet:
                  type: string
                  description: |
                    The /24 to take the new address from, one of `subnets` in the
                    options. The server's current subnet can be chosen too.
                  examples:
                    - 198.51.100.0/24
      description: |
        Moves a server onto a new IPv4 address in the same location for a one-time
        fee of €2.50 (VAT of your country included), paid from your account balance.
        The server keeps its data.

        The change then runs on its own, usually within a few minutes; follow it with
        `GET /ip-changes/{ipChange}`. A Linux server restarts once and boots with new
        SSH host keys, so SSH drops for a minute or two. On a Windows server, Remote
        Desktop drops for about a minute while the address switches. The old address
        is released afterwards, and its reverse DNS goes with it. An IPv6 address, if
        the server has one, changes with it.

        A change that fails puts the server back on its old address, and the fee is
        credited back to your balance.
      operationId: changeServerIp
  /ip-changes/{ipChange}:
    get:
      summary: Get an IP change
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: GetIpChangeOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  ip_change:
                    $ref: "#/components/schemas/ipChange"
          description: The change and how far it has got.
        "404":
          content:
            application/json:
              schema:
                type: object
                title: GetIpChangeNotFound
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - IP change not found
          description: No IP change with this ID on your account.
      parameters:
        - $ref: "#/components/parameters/ipChange"
      description: Reads an IP change by its ID, to follow it until it has `completed` or `failed`.
      operationId: getIpChange
  /servers/{server}/ipv6:
    get:
      summary: Get IPv6 address
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: GetServerIpv6Ok
                required:
                  - status
                  - enabled
                  - available
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  enabled:
                    type: boolean
                    description: Whether the server has an IPv6 address.
                    examples:
                      - false
                  available:
                    type: boolean
                    description: Whether IPv6 can be enabled for the server right now.
                    examples:
                      - true
                  unavailable_reason:
                    type:
                      - string
                      - "null"
                    description: Why IPv6 cannot be enabled right now, or `null`.
                    examples:
                      - IPv6 address has already been assigned.
                  ipv6:
                    oneOf:
                      - $ref: "#/components/schemas/ipv6Address"
                      - type: "null"
          description: The server's IPv6 address, or whether it can get one.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: GetServerIpv6Unauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
        "404":
          description: Server not found.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Shows the server's IPv6 address, or whether one can be enabled. IPv6 is
        offered in some locations only, see [IPv6](/faq/ipv6).
      operationId: getServerIpv6
    post:
      summary: Enable IPv6
      security:
        - Authorization: []
      responses:
        "201":
          content:
            application/json:
              schema:
                type: object
                title: EnableServerIpv6Ok
                required:
                  - status
                  - message
                  - reboot_required
                  - ipv6
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - IPv6 address 2a12:a800:11:1:203:0:113:10 has been assigned. Please reboot your server.
                  reboot_required:
                    type: boolean
                    description: |
                      Whether the server takes the address at its next reboot. `false`
                      for a Windows server that takes no network settings from us: add
                      the address and gateway to its network adapter yourself.
                    examples:
                      - true
                  ipv6:
                    $ref: "#/components/schemas/ipv6Address"
          description: The IPv6 address was assigned.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: EnableServerIpv6Unauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
        "404":
          description: Server not found.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: EnableServerIpv6Conflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - IPv6 address has already been assigned.
          description: |
            IPv6 cannot be enabled: the server already has an address, its location
            offers no IPv6, or the server is suspended or busy.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Gives the server an IPv6 address (/128), free of charge. The address is
        derived from the server's IPv4 address, so it changes when the IPv4 address
        does.

        A Linux server takes the address at its next reboot. A Windows server takes
        it at its next reboot when `reboot_required` is `true`, and that reboot also
        sets the Administrator password to the one shown in the panel. Otherwise add
        the address and gateway to its network adapter yourself, see [IPv6](/faq/ipv6).
      operationId: enableServerIpv6
  /servers/{server}/console/sessions:
    post:
      summary: Open a console session
      security:
        - Authorization: []
      responses:
        "201":
          content:
            application/json:
              schema:
                type: object
                title: OpenServerConsoleSessionCreated
                required:
                  - status
                  - url
                  - websocket_url
                  - password
                  - expires_at
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  url:
                    type: string
                    description: |
                      The console in the browser, to open in a new window or embed in an
                      `iframe`. It connects as it loads. The password is in its fragment,
                      which the browser never sends to a server.
                    examples:
                      - "https://terminal.rdp.sh/novnc/vnc.html?autoconnect=1&resize=scale&encrypt=1&host=terminal.rdp.sh&port=443&path=vnc%3Ftoken%3DeyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0MjEzIiwic2VydmVyX2lkIjoxOTQwMjksImV4cCI6MTc5MzEwNzAyNywianRpIjoiMWIzOWZjYTQtM2QwNy00NWEwLTk4NmUtN2ExZDc2ZDZjYzY1In0.dWNUOGv-ghEZaq2tVb-7Bw46eZWfynJa9T_iUIAyTUY&quality=4&compression=8#password=x7%26Kq%232m"
                  websocket_url:
                    type: string
                    description: |
                      The console's WebSocket, for a page that runs its own
                      [noVNC](https://github.com/novnc/noVNC) client instead of `url`.
                      Connect to it and answer the VNC password prompt with `password`.
                    examples:
                      - "wss://terminal.rdp.sh/vnc?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0MjEzIiwic2VydmVyX2lkIjoxOTQwMjksImV4cCI6MTc5MzEwNzAyNywianRpIjoiMWIzOWZjYTQtM2QwNy00NWEwLTk4NmUtN2ExZDc2ZDZjYzY1In0.dWNUOGv-ghEZaq2tVb-7Bw46eZWfynJa9T_iUIAyTUY"
                  password:
                    type: string
                    description: The VNC password of this session. `url` already carries it.
                    examples:
                      - "x7&Kq#2m"
                  expires_at:
                    type: string
                    format: date-time
                    description: Connect before this time, ten seconds after the session was opened.
                    examples:
                      - "2026-10-27T13:17:07+00:00"
          description: The session is open. Connect to it within ten seconds.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: OpenServerConsoleSessionUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
        "404":
          description: Server not found.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: OpenServerConsoleSessionConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - The console needs the QXL display first, and switching to it restarts the server once. Switch it with PUT /api/v1/servers/194029/console/display.
                  needs_display_switch:
                    type: boolean
                    description: |
                      Present, and `true`, when a Linux server needs the QXL display first.
                      Switch it with `PUT /servers/{server}/console/display`.
                    examples:
                      - true
          description: |
            The server is stopped, a Linux server needs its console display switched
            first (`needs_display_switch`), or the server is suspended or busy.
        "429":
          content:
            application/json:
              schema:
                type: object
                title: OpenServerConsoleSessionTooManyRequests
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - You can open the console of this server at most 10 times every 2 minutes. Please try again in 37 seconds.
          description: |
            Too many sessions: at most 10 every 2 minutes per server, and 60 a minute
            per account.
        "503":
          content:
            application/json:
              schema:
                type: object
                title: OpenServerConsoleSessionUnavailable
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Could not open a console session. Please try again in a moment.
          description: The session could not be opened.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Opens the server's console screen (VNC), the one the Console tab in the panel
        shows, to show it to your own customers. Open `url` in a new window or an
        `iframe`, or connect your own noVNC client to `websocket_url` with `password`.

        A session is good for one connection, made within ten seconds (`expires_at`).
        Open a new session for every connection, reconnects included. A connected
        console stays open for up to four hours. The server must be running.

        A Linux server needs the QXL display for its console, and switching to it
        restarts the server once. Until then this answers `409` with
        `needs_display_switch: true`; see `PUT /servers/{server}/console/display`.
      operationId: openServerConsoleSession
  /servers/{server}/console/display:
    put:
      summary: Switch the console display
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: SwitchServerConsoleDisplayReady
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  restarting:
                    type: boolean
                    examples:
                      - false
                  message:
                    type: string
                    examples:
                      - The console display is ready.
          description: The server needs no switch and was left alone.
        "202":
          content:
            application/json:
              schema:
                type: object
                title: SwitchServerConsoleDisplayAccepted
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  restarting:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - The server is restarting onto the console display.
          description: The server is restarting onto the console display.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: SwitchServerConsoleDisplayUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
        "404":
          description: Server not found.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: SwitchServerConsoleDisplayConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - The server could not be restarted onto the console display. It keeps running as it was. Please try again in a few minutes.
          description: |
            The server is stopped, could not be restarted (it keeps running as it was),
            or is suspended or busy.
        "429":
          description: |
            Too many power actions. This counts towards the limit of
            `POST /servers/{server}/power/{state}`: 6 a minute per server.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Switches a Linux server to the QXL display its console needs. **This restarts
        the server once**, so ask your customer first. A server that needs no switch,
        such as a Windows server or one switched before, answers `200` with
        `restarting: false` and is not touched.

        Open a console session once the restart has finished, which usually takes
        under a minute. The server must be running.
      operationId: switchServerConsoleDisplay
  /servers/{server}/backups:
    get:
      summary: Get backups
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                title: GetServerBackupsOk
                allOf:
                  - type: object
                    properties:
                      status:
                        type: boolean
                        examples:
                          - true
                  - $ref: "#/components/schemas/backupSettings"
                  - type: object
                    properties:
                      paid_slots_price:
                        type: object
                        description: |
                          What the paid slots cost, VAT of your country included in the
                          amounts. The free slot costs nothing.
                        properties:
                          monthly_amount:
                            type: number
                            description: What the paid slots add to each monthly renewal.
                            examples:
                              - 2.38
                          monthly_net:
                            type: number
                            examples:
                              - 2
                          prorated_amount:
                            type: number
                            description: What buying them now charges, for the days left until the server expires.
                            examples:
                              - 1.19
                          prorated_net:
                            type: number
                            examples:
                              - 1
                          remaining_days:
                            type: integer
                            examples:
                              - 15
                          currency:
                            type: string
                            examples:
                              - EUR
                      backups:
                        type: array
                        description: The server's backups, newest first.
                        items:
                          $ref: "#/components/schemas/backup"
                      latest_restore:
                        oneOf:
                          - $ref: "#/components/schemas/backupRestore"
                          - type: "null"
                      downloads:
                        type: array
                        description: The ten latest downloads, newest first.
                        items:
                          $ref: "#/components/schemas/backupDownload"
          description: The server's backups and how they are set up.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: GetServerBackupsUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the server.
        "404":
          description: Server not found.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Shows whether backups are enabled for the server, its slots and schedule, what
        the paid slots cost, its backups, the latest restore and the latest downloads.

        Every server can keep **one backup free of charge**. Buying the paid slots
        raises that to five, for a monthly surcharge on each renewal.
      operationId: getServerBackups
    post:
      summary: Create a backup
      security:
        - Authorization: []
      responses:
        "201":
          content:
            application/json:
              schema:
                type: object
                title: CreateServerBackupOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Backup creation has been started.
                  backup:
                    $ref: "#/components/schemas/backup"
          description: The backup was queued.
        "403":
          description: User does not own the server.
        "404":
          description: Server not found.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: CreateServerBackupConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - The backup slot of this server is in use. Delete it first, or upgrade to 5 slots to keep more.
          description: |
            Backups are not enabled, every slot is in use, another backup or a restore
            is running, or the server is suspended or busy.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Starts a backup of the server now. It takes one of the server's slots; when
        all are in use, delete a backup first or buy the paid slots. Follow it with
        `GET /servers/{server}/backups/{backup}`.
      operationId: createServerBackup
  /servers/{server}/backups/enable:
    post:
      summary: Enable backups
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                title: EnableServerBackupsOk
                allOf:
                  - type: object
                    properties:
                      status:
                        type: boolean
                        examples:
                          - true
                      message:
                        type: string
                        examples:
                          - Backups have been enabled for this server.
                  - $ref: "#/components/schemas/backupSettings"
          description: Backups are enabled on the free slot.
        "403":
          description: User does not own the server.
        "404":
          description: Server not found.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: EnableServerBackupsConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Backups are already enabled for this server.
          description: Backups are already enabled, the server has expired, or it is suspended or busy.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Enables backups on the free slot: one backup, kept **free of charge**. Nothing
        is charged and no invoice is raised.

        The server is backed up daily at 03:00 UTC; change that with
        `PUT /servers/{server}/backups/schedule`. On the free slot each scheduled
        backup replaces the previous one.
      operationId: enableServerBackups
  /servers/{server}/backups/disable:
    post:
      summary: Disable backups
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                title: DisableServerBackupsOk
                allOf:
                  - type: object
                    properties:
                      status:
                        type: boolean
                        examples:
                          - true
                      message:
                        type: string
                        examples:
                          - Backups have been disabled and all existing backups are being removed.
                  - $ref: "#/components/schemas/backupSettings"
          description: Backups are disabled and the stored backups are being deleted.
        "403":
          description: User does not own the server.
        "404":
          description: Server not found.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: DisableServerBackupsConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - A backup or restore is currently running. Please wait for it to finish before disabling.
          description: Backups are not enabled, a backup or restore is running, or the server is suspended or busy.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Disables backups and **deletes every stored backup** of the server. Paid slots
        are not refunded, and the server goes back to the free slot.
      operationId: disableServerBackups
  /servers/{server}/backups/schedule:
    put:
      summary: Update the backup schedule
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                title: UpdateBackupScheduleOk
                allOf:
                  - type: object
                    properties:
                      status:
                        type: boolean
                        examples:
                          - true
                      message:
                        type: string
                        examples:
                          - Backup schedule updated.
                  - $ref: "#/components/schemas/backupSettings"
          description: The schedule was saved.
        "403":
          description: User does not own the server.
        "404":
          description: Server not found.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: UpdateBackupScheduleConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Enable backups before configuring the schedule.
          description: Backups are not enabled, or the server is suspended or busy.
        "422":
          description: |
            Validation error, for example a `retention` above the server's slots
            (`slots.total`) or a weekly schedule without `weekday`.
      parameters:
        - $ref: "#/components/parameters/server"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - frequency
                - hour
                - retention
              properties:
                frequency:
                  type: string
                  enum:
                    - daily
                    - weekly
                hour:
                  type: integer
                  minimum: 0
                  maximum: 23
                  description: The hour the backup starts, in UTC.
                  examples:
                    - 3
                weekday:
                  type: integer
                  minimum: 0
                  maximum: 6
                  description: Required for `weekly`, 0 = Sunday to 6 = Saturday. Ignored for `daily`.
                  examples:
                    - 0
                retention:
                  type: integer
                  minimum: 1
                  description: |
                    How many backups to keep, at most the server's slots (`slots.total`).
                    Once a new backup has completed, the oldest beyond this number are deleted.
                  examples:
                    - 3
      description: Sets when the server is backed up and how many backups are kept.
      operationId: updateServerBackupSchedule
  /servers/{server}/backups/slots:
    post:
      summary: Buy the paid backup slots
      security:
        - Authorization: []
      responses:
        "201":
          content:
            application/json:
              schema:
                title: BuyBackupSlotsOk
                allOf:
                  - type: object
                    properties:
                      status:
                        type: boolean
                        examples:
                          - true
                      message:
                        type: string
                        examples:
                          - This server can now keep up to 5 backups.
                      invoice_id:
                        type: integer
                        examples:
                          - 5014
                      amount_charged:
                        type: number
                        examples:
                          - 1.19
                  - $ref: "#/components/schemas/backupSettings"
          description: The paid slots were charged to your balance.
        "400":
          content:
            application/json:
              schema:
                type: object
                title: BuyBackupSlotsBadRequest
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Insufficient balance
                  required:
                    type: number
                    examples:
                      - 1.19
                  available:
                    type: number
                    examples:
                      - 1
          description: Insufficient balance.
        "403":
          description: User does not own the server.
        "404":
          description: Server not found.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: BuyBackupSlotsConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This server already has all 5 backup slots.
          description: |
            The server already has the paid slots, has expired, has no backup storage
            on its node yet, or is suspended or busy. Nothing is charged.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Buys the paid slots, so the server can keep up to five backups. They are paid
        from your account balance at once: the monthly surcharge prorated over the
        days left until the server expires, VAT of your country included (see
        `paid_slots_price`). Every renewal afterwards includes the surcharge.

        Enables backups in the same step if they were off.
      operationId: buyServerBackupSlots
    delete:
      summary: Give up the paid backup slots
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                title: RemoveBackupSlotsOk
                allOf:
                  - type: object
                    properties:
                      status:
                        type: boolean
                        examples:
                          - true
                      message:
                        type: string
                        examples:
                          - Backups continue on the free slot. There is no refund for the current period.
                  - $ref: "#/components/schemas/backupSettings"
          description: The server is back on the free slot.
        "403":
          description: User does not own the server.
        "404":
          description: Server not found.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: RemoveBackupSlotsConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Delete backups until only 1 remains, then switch back to the free slot.
          description: |
            The server has no paid slots, stores more backups than the free slot holds,
            a backup or restore is running, or the server is suspended or busy.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Goes back to the free slot. Nothing is refunded and nothing is deleted: delete
        backups until only one is left first. Renewals no longer include the surcharge.
      operationId: removeServerBackupSlots
  /servers/{server}/backups/{backup}:
    get:
      summary: Get a backup
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: GetServerBackupOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  backup:
                    $ref: "#/components/schemas/backup"
          description: The backup and how far it has got.
        "403":
          description: User does not own the server.
        "404":
          content:
            application/json:
              schema:
                type: object
                title: GetServerBackupNotFound
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Backup not found
          description: Server not found, or no backup with this ID on the server.
      parameters:
        - $ref: "#/components/parameters/server"
        - $ref: "#/components/parameters/backup"
      description: Reads one backup, to follow it until it has `completed` or `failed`.
      operationId: getServerBackup
    delete:
      summary: Delete a backup
      security:
        - Authorization: []
      responses:
        "202":
          content:
            application/json:
              schema:
                type: object
                title: DeleteServerBackupOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - The backup is being deleted.
          description: The backup is being deleted.
        "403":
          description: User does not own the server.
        "404":
          description: Server not found, or no backup with this ID on the server.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: DeleteServerBackupConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - A backup that is still running cannot be deleted.
          description: The backup is still running or being restored, or the server is suspended or busy.
      parameters:
        - $ref: "#/components/parameters/server"
        - $ref: "#/components/parameters/backup"
      description: Deletes a finished backup and frees its slot.
      operationId: deleteServerBackup
  /servers/{server}/backups/{backup}/restore:
    post:
      summary: Restore a backup
      security:
        - Authorization: []
      responses:
        "201":
          content:
            application/json:
              schema:
                type: object
                title: RestoreServerBackupOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - The restore has been started. Your server will be stopped and overwritten with the backup.
                  restore:
                    $ref: "#/components/schemas/backupRestore"
          description: The restore was queued.
        "403":
          description: User does not own the server.
        "404":
          description: Server not found, or no backup with this ID on the server.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: RestoreServerBackupConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Only completed backups can be restored.
          description: |
            The backup has not completed, another backup or restore is running, or the
            server is suspended or busy.
      parameters:
        - $ref: "#/components/parameters/server"
        - $ref: "#/components/parameters/backup"
      description: |
        Overwrites the server with the backup: it is stopped, its disk is replaced and
        it is started again. **Everything written since the backup was taken is lost**,
        a password changed since included. Follow it in `latest_restore` of
        `GET /servers/{server}/backups`.
      operationId: restoreServerBackup
  /servers/{server}/backups/{backup}/download:
    post:
      summary: Download a backup
      security:
        - Authorization: []
      responses:
        "201":
          content:
            application/json:
              schema:
                type: object
                title: DownloadServerBackupOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Your download is being prepared. This can take a while for large disks.
                  download:
                    $ref: "#/components/schemas/backupDownload"
          description: The download is being prepared.
        "403":
          description: User does not own the server.
        "404":
          description: Server not found, or no backup with this ID on the server.
        "409":
          content:
            application/json:
              schema:
                type: object
                title: DownloadServerBackupConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - A download is already being prepared for this server. Please wait for it to finish.
          description: |
            The backup has not completed, a download is already being prepared, backups
            are not enabled, or the server is suspended or busy.
      parameters:
        - $ref: "#/components/parameters/server"
        - $ref: "#/components/parameters/backup"
      description: |
        Prepares the backup's disk as a VMDK file. That can take a while for large
        disks; the link then appears as `url` in `downloads` of
        `GET /servers/{server}/backups` and works for 24 hours. One download is
        prepared at a time per server, free of charge.
      operationId: downloadServerBackup
  /servers/{server}/firewall:
    get:
      summary: Get firewall rules
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: GetFirewallRulesOk
                properties:
                  status:
                    type: boolean
                  rules:
                    type: array
                    items:
                      $ref: "#/components/schemas/firewallRule"
                  options:
                    type: object
          description: Firewall rules retrieved successfully.
        "403":
          description: Unauthorized access.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Get the list of firewall rules for a server. A rule the server's
        firewall refused at the last sync has the reason in `sync_error` and
        is not in effect.
      operationId: getFirewallRules
    post:
      summary: Create firewall rule
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: CreateFirewallRuleOk
                properties:
                  status:
                    type: boolean
                  message:
                    type: string
          description: Firewall rule created successfully.
        "403":
          description: Unauthorized access.
        "422":
          description: |
            Validation error.
            The reason a port list was refused is in `errors.dport` or `errors.sport`.
            A rule with a port but no `proto` returns
            "A rule with a port needs a protocol, tcp or udp." in `errors.proto`.
        "500":
          description: Failed to create rule.
      parameters:
        - $ref: "#/components/parameters/server"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - action
                - type
              properties:
                action:
                  type: string
                  enum: [ACCEPT, DROP, REJECT]
                  description: Rule action
                type:
                  type: string
                  enum: [in, out]
                  description: Traffic direction
                proto:
                  type: string
                  description: Protocol (tcp, udp, icmp, etc.). Required when `dport` or `sport` is set.
                dport:
                  type: string
                  maxLength: 255
                  description: |
                    Destination ports, separated by commas: ports from 1 to 65535,
                    `from:to` ranges and service names such as `https`.
                    At most 15 ports, with a range counting as two.
                    Leave it empty to match every port; `*` is refused.
                    Requires `proto`.

                    Spaces between entries and `-` in ranges are accepted and normalised:
                    `80, 443` is stored as `80,443` and `1000-2000` as `1000:2000`.
                    Any other list returns a 422.
                sport:
                  type: string
                  maxLength: 255
                  description: |
                    Source ports, in the same format as `dport`.
                    Requires `proto`.
                source:
                  type: string
                  description: Source IP/CIDR
                dest:
                  type: string
                  description: Destination IP/CIDR
                comment:
                  type: string
                  maxLength: 255
                  description: Rule comment
                enable:
                  type: boolean
                  description: Whether rule is enabled
      description: |
        Create a new firewall rule for the server. The rule is applied to the
        server's firewall in the background. If the firewall refuses it, for
        example because of a service name it does not know,
        `GET /servers/{server}/firewall` returns the reason in the rule's
        `sync_error`.
      operationId: createFirewallRule
  /servers/{server}/firewall/toggle:
    post:
      summary: Toggle firewall
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: ToggleFirewallOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Firewall enabled successfully
                  enabled:
                    type: boolean
                    description: Current firewall state after the toggle.
                    examples:
                      - true
          description: Firewall state updated successfully.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: ToggleFirewallForbidden
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Firewall cannot be disabled. Only whitelisted servers can disable the firewall.
          description: Unauthorized, or the server is not whitelisted to disable the firewall.
        "422":
          description: Validation error.
        "500":
          description: Failed to toggle firewall.
      parameters:
        - $ref: "#/components/parameters/server"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - enable
              properties:
                enable:
                  type: boolean
                  description: |
                    Set to `true` to enable the firewall, `false` to disable it.
                    Disabling is only permitted for whitelisted servers.
                  examples:
                    - true
      description: |
        Enable or disable the firewall for a server. The response includes the
        firewall state after the change. Only whitelisted servers may disable
        the firewall; for everyone else, `enable: false` returns 403.
      operationId: toggleFirewall
  /servers/{server}/firewall/reset:
    post:
      summary: Reset firewall
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: ResetFirewallOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Server firewall has been reset.
          description: Firewall reset successfully.
        "403":
          description: Unauthorized access.
        "500":
          content:
            application/json:
              schema:
                type: object
                title: ResetFirewallFailed
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Failed to reset network. Please contact support if the issue remains.
          description: Firewall reset failed.
      parameters:
        - $ref: "#/components/parameters/server"
      description: |
        Reset the server's firewall configuration. This whitelists the server
        and re-applies its base network configuration on the hypervisor. Use
        this when the firewall is in a bad state and the regular toggle is not
        enough to restore connectivity.
      operationId: resetFirewall
  /servers/{server}/firewall/{pos}:
    delete:
      summary: Delete firewall rule
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: DeleteFirewallRuleOk
                properties:
                  status:
                    type: boolean
                  message:
                    type: string
          description: Firewall rule deleted successfully.
        "403":
          description: Unauthorized access or protected port.
        "500":
          description: Failed to delete rule.
      parameters:
        - $ref: "#/components/parameters/server"
        - in: path
          name: pos
          schema:
            type: integer
          required: true
          description: Rule position index
      description: Delete a firewall rule by its position. Protected ports (25, 5000) cannot be deleted.
      operationId: deleteFirewallRule
  /billing/invoices:
    get:
      summary: Get invoices
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/invoice"
                title: GetInvoicesOk
          description: Invoices retrieved successfully.
      parameters: []
      description: Retrieve your account's invoices (last 50).
      operationId: getInvoices
  /tickets:
    get:
      summary: List tickets
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ticketSummary"
                title: ListTicketsOk
          description: Tickets retrieved successfully.
      parameters: []
      description: Retrieve a list of your support tickets.
      operationId: listTickets
  /tickets/{ticket}:
    get:
      summary: Get ticket
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ticketDetail"
          description: Ticket retrieved successfully.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: GetTicketUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the ticket.
      parameters:
        - $ref: "#/components/parameters/ticket"
      description: Retrieve a single ticket with all its comments.
      operationId: getTicket
  /tickets/{ticket}/reply:
    post:
      summary: Reply to ticket
      security:
        - Authorization: []
      responses:
        "201":
          content:
            application/json:
              schema:
                type: object
                title: ReplyTicketCreated
                required:
                  - status
                  - message
                  - comment
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Reply added successfully
                  comment:
                    $ref: "#/components/schemas/comment"
          description: Reply added successfully.
        "400":
          content:
            application/json:
              schema:
                type: object
                title: ReplyTicketClosed
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Cannot reply to a closed ticket
          description: Ticket is closed.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: ReplyTicketUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the ticket.
        "422":
          description: Validation error.
      parameters:
        - $ref: "#/components/parameters/ticket"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - message
              properties:
                message:
                  type: string
                  minLength: 1
                  maxLength: 5000
                  description: The reply message content
      description: Add a reply to an existing support ticket. Cannot reply to closed tickets.
      operationId: replyToTicket
  /tickets/{ticket}/close:
    post:
      summary: Close ticket
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: CloseTicketOk
                required:
                  - status
                  - message
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Ticket closed successfully
          description: Ticket closed successfully.
        "400":
          content:
            application/json:
              schema:
                type: object
                title: CloseTicketAlreadyClosed
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Ticket is already closed
          description: Ticket is already closed.
        "403":
          content:
            application/json:
              schema:
                type: object
                title: CloseTicketUnauthorized
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This action is unauthorized
          description: User does not own the ticket.
      parameters:
        - $ref: "#/components/parameters/ticket"
      description: Close an open support ticket.
      operationId: closeTicket
  /domains:
    get:
      summary: List domains
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                title: ListDomainsOk
                items:
                  $ref: "#/components/schemas/domain"
          description: The authenticated user's domains.
      parameters: []
      description: List all domains belonging to the authenticated user.
      operationId: listDomains
    post:
      summary: Register domain
      security:
        - Authorization: []
      responses:
        "201":
          content:
            application/json:
              schema:
                type: object
                title: RegisterDomainCreated
                required:
                  - status
                  - message
                  - invoice_id
                  - amount_charged
                  - years
                  - domain
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Domain registered
                  invoice_id:
                    type: integer
                    description: ID of the balance invoice created for this registration.
                    examples:
                      - 8231
                  amount_charged:
                    type: number
                    description: Gross amount deducted from the account balance, VAT included.
                    examples:
                      - 11.9
                  years:
                    type: integer
                    description: Registration term that was purchased.
                    examples:
                      - 1
                  domain:
                    $ref: "#/components/schemas/domain"
                  warning:
                    type: string
                    description: |
                      Present only when the registration succeeded but applying
                      the requested nameservers did not. The domain is
                      registered either way.
          description: |
            The domain was registered and the account balance was charged. In
            rare cases the registration lands but the managed DNS zone does
            not; `dns_records_count` is 0 when that happens and support is
            alerted automatically.
        "400":
          content:
            application/json:
              schema:
                type: object
                title: RegisterDomainInsufficientBalance
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Insufficient balance
                  required:
                    type: number
                    description: Gross amount needed, in EUR.
                    examples:
                      - 11.9
                  available:
                    type: number
                    description: Current account balance, in EUR.
                    examples:
                      - 5
          description: The account balance does not cover the registration.
        "409":
          description: |
            Another registration for the same domain is already in flight.
            Retry once it settles.
        "422":
          description: |
            Validation error, the extension is not supported, the domain is
            already registered on RDP.sh, or the domain is not available.
        "500":
          description: |
            The registrar could not be reached or rejected the order. Nothing is
            charged: a payment taken before the failure is refunded to the
            account balance.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - domain
              properties:
                domain:
                  type: string
                  minLength: 3
                  maxLength: 253
                  pattern: "^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\\.[a-zA-Z]{2,}$"
                  description: |
                    Domain to register, as one label plus a top-level extension
                    -- `example.com`. Subdomains and second-level extensions
                    such as `.co.uk` are not accepted. The extension must be
                    active in the RDP.sh price list, which
                    `GET /domains/pricing` returns.
                  examples:
                    - example.com
                years:
                  type: integer
                  minimum: 1
                  maximum: 10
                  default: 1
                  description: Registration term in years.
                auto_renew:
                  type: boolean
                  default: false
                  description: |
                    Renew the domain automatically. Auto-renewals are charged to
                    the account balance in the week before expiry.
                nameservers:
                  type: array
                  minItems: 2
                  maxItems: 6
                  items:
                    type: string
                    examples:
                      - ns1.example.net
                      - ns2.example.net
                  description: |
                    Point the domain at your own nameservers instead of the
                    RDP.sh ones. Omit to keep the RDP.sh nameservers and the
                    managed DNS zone. If the switch fails the domain is still
                    registered and the response carries a `warning`.
      description: |
        Register a domain and pay for it from the account balance.

        The domain is registered with WHOIS privacy and a registrar transfer
        lock, pointed at the RDP.sh nameservers (`ns1.rdp.sh`, `ns2.rdp.rs`),
        and given a DNS zone with default `@` and `www` A records. Pass
        `nameservers` to point it elsewhere straight away, or call
        `PUT /domains/{domain}/nameservers` later.

        Pricing comes from the RDP.sh price list rather than the registrar:
        `registration_price * years`, plus 19% VAT unless the account is VAT
        exempt. Call `GET /domains/search` first for the exact amount.
      operationId: registerDomain
  /domains/search:
    get:
      summary: Search domain
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: SearchDomainOk
                required:
                  - status
                  - domain
                  - available
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  domain:
                    type: string
                    description: The looked-up domain, lowercased.
                    examples:
                      - example.com
                  tld:
                    type: string
                    examples:
                      - com
                  available:
                    type: boolean
                    description: |
                      Whether the domain can be registered. Premium domains are
                      reported as unavailable, because RDP.sh does not sell them.
                  currency:
                    type: string
                    examples:
                      - EUR
                  pricing:
                    $ref: "#/components/schemas/domainPricing"
                  quote:
                    $ref: "#/components/schemas/domainQuote"
          description: Availability and pricing for the requested domain.
        "422":
          description: Validation error, or the extension is not supported.
        "429":
          description: Too many lookups. This endpoint allows 60 requests per minute.
        "500":
          description: The registrar could not be reached.
      parameters:
        - in: query
          name: domain
          schema:
            type: string
            minLength: 3
            maxLength: 253
            pattern: "^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\\.[a-zA-Z]{2,}$"
            examples:
              - example.com
          required: true
          description: |
            A single domain to look up, as one label plus a top-level
            extension. Subdomains and second-level extensions such as `.co.uk`
            are not accepted.
        - in: query
          name: years
          schema:
            type: integer
            minimum: 1
            maximum: 10
            default: 1
          required: false
          description: Term to quote for, in years.
      description: |
        Check whether one domain is available, and what it costs.

        Availability answers are cached for 72 hours. `pricing` holds the list
        prices per year net of VAT. `quote` prices a **registration** of
        `years` for this account, VAT included, so it is the figure to put in
        front of a customer buying the domain -- it is not a renewal or
        transfer quote, which are priced from `pricing.renewal_price` and
        `pricing.transfer_price`.
      operationId: searchDomain
  /domains/pricing:
    get:
      summary: List domain pricing
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                title: ListDomainPricingOk
                items:
                  $ref: "#/components/schemas/domainExtensionPricing"
          description: Every extension RDP.sh currently sells, ordered by extension.
      parameters: []
      description: |
        List the extensions available for registration together with their
        yearly list prices, net of VAT.
      operationId: listDomainPricing
  /domains/{domain}:
    get:
      summary: Get domain
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/domain"
                  - type: object
                    properties:
                      dns_records:
                        type: array
                        items:
                          $ref: "#/components/schemas/dnsRecord"
          description: Domain details including its DNS records.
        "403":
          description: User does not own the domain.
        "404":
          description: Domain not found.
      parameters:
        - $ref: "#/components/parameters/domain"
      description: Get a single domain owned by the authenticated user, including its DNS records.
      operationId: getDomain
  /domains/{domain}/renew:
    post:
      summary: Renew domain
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: RenewDomainOk
                required:
                  - status
                  - message
                  - invoice_id
                  - amount_charged
                  - years
                  - domain
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Domain renewed
                  invoice_id:
                    type: integer
                    description: ID of the balance invoice created for this renewal.
                    examples:
                      - 8232
                  amount_charged:
                    type: number
                    description: Gross amount deducted from the account balance, VAT included.
                    examples:
                      - 14.28
                  years:
                    type: integer
                    examples:
                      - 1
                  domain:
                    $ref: "#/components/schemas/domain"
          description: The domain was renewed and the account balance was charged.
        "400":
          content:
            application/json:
              schema:
                type: object
                title: RenewDomainInsufficientBalance
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Insufficient balance
                  required:
                    type: number
                    description: Gross amount needed, in EUR.
                    examples:
                      - 14.28
                  available:
                    type: number
                    description: Current account balance, in EUR.
                    examples:
                      - 5
          description: The account balance does not cover the renewal.
        "403":
          description: User does not own the domain, or the domain is suspended.
        "404":
          description: Domain not found.
        "422":
          description: |
            Validation error, or the domain has no expiry date on file to
            extend.
        "500":
          description: |
            The registrar could not be reached or refused the renewal. The
            charge is refunded to the account balance.
      parameters:
        - $ref: "#/components/parameters/domain"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                years:
                  type: integer
                  minimum: 1
                  maximum: 10
                  default: 1
                  description: Number of years to extend the registration by.
      description: |
        Extend a domain's registration and pay for it from the account balance.

        Priced at `renewal_price * years` from the RDP.sh price list, plus 19%
        VAT unless the account is VAT exempt. Extensions that are no longer in
        the price list -- and so never appear in `GET /domains/pricing` -- fall
        back to EUR 19.99 per year. The new expiry date is the old one plus
        `years`, so renewing early never loses the remaining term.
      operationId: renewDomain
  /domains/{domain}/settings:
    put:
      summary: Update domain settings
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: UpdateDomainSettingsOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Domain settings updated
                  domain:
                    $ref: "#/components/schemas/domain"
          description: Domain settings updated successfully.
        "403":
          description: User does not own the domain, or the domain is suspended.
        "422":
          description: Validation error.
        "500":
          description: Failed to update domain settings at the registrar.
      parameters:
        - $ref: "#/components/parameters/domain"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                auto_renew:
                  type: boolean
                  description: Whether the domain should renew automatically before expiry.
                whois_privacy:
                  type: boolean
                  description: Toggle WHOIS privacy protection at the registrar.
                lock_status:
                  type: boolean
                  description: Toggle the registrar transfer lock for the domain.
      description: |
        Update registrar-level settings for a domain. Each field is optional;
        only the provided fields are changed. WHOIS privacy and lock status
        changes are applied at the registrar.
      operationId: updateDomainSettings
  /domains/{domain}/nameservers:
    put:
      summary: Update nameservers
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: UpdateNameserversOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Nameservers updated
                  domain:
                    $ref: "#/components/schemas/domain"
          description: Nameservers updated successfully.
        "403":
          description: User does not own the domain, or the domain is suspended.
        "422":
          description: Validation error.
        "500":
          description: Failed to update nameservers.
      parameters:
        - $ref: "#/components/parameters/domain"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - use_rdp_nameservers
              properties:
                use_rdp_nameservers:
                  type: boolean
                  description: |
                    When `true`, the domain is switched to RDP.sh nameservers and
                    its DNS is managed through this API. When `false`, you must
                    supply your own `nameservers`.
                nameservers:
                  type: array
                  minItems: 2
                  maxItems: 6
                  description: |
                    Custom nameservers (2-6). Required when
                    `use_rdp_nameservers` is `false`.
                  items:
                    type: string
                    examples:
                      - ns1.example.com
      description: |
        Switch a domain between RDP.sh-managed nameservers and custom external
        nameservers.
      operationId: updateNameservers
  /domains/{domain}/auth-code:
    get:
      summary: Get domain auth code
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: GetAuthCodeOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  auth_code:
                    type: string
                    nullable: true
                    description: The EPP/transfer authorization code, or null if unavailable.
                    examples:
                      - AUTH123CODE
          description: Authorization code retrieved successfully.
        "403":
          description: User does not own the domain, or the domain is suspended.
        "422":
          description: Failed to retrieve the auth code from the registrar.
      parameters:
        - $ref: "#/components/parameters/domain"
      description: Retrieve the EPP/transfer authorization code used to transfer the domain to another registrar.
      operationId: getDomainAuthCode
  /domains/{domain}/dns:
    get:
      summary: List DNS records
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: array
                title: ListDnsRecordsOk
                items:
                  $ref: "#/components/schemas/dnsRecord"
          description: The DNS records for the domain.
        "403":
          description: User does not own the domain.
      parameters:
        - $ref: "#/components/parameters/domain"
      description: List all DNS records for a domain.
      operationId: listDnsRecords
    post:
      summary: Create DNS record
      security:
        - Authorization: []
      responses:
        "201":
          content:
            application/json:
              schema:
                type: object
                title: CreateDnsRecordOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - DNS record added
                  record:
                    $ref: "#/components/schemas/dnsRecord"
          description: DNS record created successfully.
        "403":
          description: User does not own the domain, or the domain is suspended.
        "422":
          description: Validation error, or DNS management is unavailable for this domain.
      parameters:
        - $ref: "#/components/parameters/domain"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/dnsRecordInput"
      description: Create a new DNS record for the domain.
      operationId: createDnsRecord
  /domains/{domain}/dns/{record}:
    put:
      summary: Update DNS record
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: UpdateDnsRecordOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - DNS record updated
                  record:
                    $ref: "#/components/schemas/dnsRecord"
          description: DNS record updated successfully.
        "403":
          description: User does not own the domain, or the domain is suspended.
        "404":
          description: The record does not belong to the domain.
        "422":
          description: Validation error, or DNS management is unavailable for this domain.
      parameters:
        - $ref: "#/components/parameters/domain"
        - $ref: "#/components/parameters/record"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/dnsRecordInput"
      description: Update an existing DNS record on the domain.
      operationId: updateDnsRecord
    delete:
      summary: Delete DNS record
      security:
        - Authorization: []
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
                title: DeleteDnsRecordOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - DNS record deleted
                  record_id:
                    type: integer
                    examples:
                      - 42
          description: DNS record deleted successfully.
        "403":
          description: User does not own the domain, or the domain is suspended.
        "404":
          description: The record does not belong to the domain.
      parameters:
        - $ref: "#/components/parameters/domain"
        - $ref: "#/components/parameters/record"
      description: Delete a DNS record from the domain.
      operationId: deleteDnsRecord
openapi: 3.1.0
servers:
  - url: https://rdp.sh/api/v1
    description: Default production endpoint.
components:
  schemas:
    plan:
      type: object
      required: []
      properties:
        id:
          type: integer
          examples:
            - 1
        cores:
          type: integer
          examples:
            - 2
        price:
          type: integer
          examples:
            - 10
        title:
          type: string
          examples:
            - RDP-40-2C-6M
        memory:
          type: integer
          examples:
            - 6
        storage:
          type: integer
          examples:
            - 40
      description: Plan object.
    stock:
      type: object
      required:
        - region
        - stock
      properties:
        stock:
          type: object
          required:
            - available
            - stock
            - plan
          properties:
            plan:
              $ref: "#/components/schemas/plan"
            stock:
              type: integer
              examples:
                - 3
            available:
              type: boolean
        region:
          $ref: "#/components/schemas/region"
      description: ""
    distro:
      type: object
      required: []
      properties:
        id:
          type: integer
          examples:
            - 1
        description:
          type: string
          examples:
            - Debian 12
      description: ""
    region:
      type: object
      required:
        - id
      properties:
        id:
          type: integer
          examples:
            - 1
            - 2
        region:
          type: string
          examples:
            - nl
            - us
        location:
          type: string
          examples:
            - Amsterdam
            - Phoenix
      description: ""
    regionChange:
      type: object
      required:
        - id
        - server_id
        - status
        - mode
      properties:
        id:
          type: integer
          examples:
            - 17
        server_id:
          type: integer
          description: The server the move was ordered for.
          examples:
            - 123
        status:
          type: string
          enum:
            - awaiting_payment
            - pending
            - running
            - completed
            - failed
          examples:
            - running
        mode:
          type: string
          enum:
            - transfer
            - fresh
          examples:
            - transfer
        step:
          type: string
          description: What the move is doing right now.
          examples:
            - Copying the disk
        progress:
          type: integer
          minimum: 0
          maximum: 100
          examples:
            - 46
        from_region:
          $ref: "#/components/schemas/region"
        to_region:
          $ref: "#/components/schemas/region"
        distro:
          type:
            - string
            - "null"
          description: The operating system of a fresh server.
          examples:
            - Ubuntu 24.04
        old_ip:
          type:
            - string
            - "null"
          examples:
            - 45.138.16.20
        new_ip:
          type:
            - string
            - "null"
          description: The new address once a transfer has finished.
          examples:
            - 147.90.219.31
        new_server_id:
          type:
            - integer
            - "null"
          description: The server that replaced this one, for a fresh installation.
        deployment_id:
          type:
            - integer
            - "null"
          description: The setup of the fresh server.
        invoice_id:
          type:
            - integer
            - "null"
          description: The invoice that paid for the move, or `null` for a free move.
        refunded:
          type: boolean
          description: Whether the fee was credited back to your balance.
        error:
          type:
            - string
            - "null"
          description: Why the move failed, once it has.
        created_at:
          type: string
          examples:
            - "2026-10-21T12:00:00+00:00"
        finished_at:
          type:
            - string
            - "null"
      description: A move of a server to another location.
    ipChange:
      type: object
      required:
        - id
        - server_id
        - status
        - subnet
      properties:
        id:
          type: integer
          examples:
            - 42
        server_id:
          type: integer
          examples:
            - 123
        status:
          type: string
          enum:
            - awaiting_payment
            - pending
            - running
            - completed
            - failed
          description: |
            `awaiting_payment` is only seen for a change ordered on the server page
            whose invoice is still open.
          examples:
            - running
        step:
          type: string
          description: What the change is doing right now.
          examples:
            - Waiting for the server on its new address
        progress:
          type: integer
          minimum: 0
          maximum: 100
          examples:
            - 80
        subnet:
          type: string
          description: The /24 the new address is taken from.
          examples:
            - 198.51.100.0/24
        old_ip:
          type:
            - string
            - "null"
          examples:
            - 203.0.113.10
        new_ip:
          type:
            - string
            - "null"
          description: |
            The address the server is moving to, once it has been reserved. `null`
            again if the change failed.
          examples:
            - 198.51.100.20
        invoice_id:
          type:
            - integer
            - "null"
        refunded:
          type: boolean
          description: Whether the fee was credited back to your balance.
        error:
          type:
            - string
            - "null"
          description: Why the change failed, once it has.
        created_at:
          type: string
          examples:
            - "2026-10-22T12:00:00+00:00"
        finished_at:
          type:
            - string
            - "null"
      description: A change of a server's IPv4 address.
    ipv6Address:
      type: object
      required:
        - address
        - prefix
      properties:
        address:
          type: string
          examples:
            - 2a12:a800:11:1:203:0:113:10
        prefix:
          type: integer
          description: The prefix length the server is configured with.
          examples:
            - 128
        gateway:
          type:
            - string
            - "null"
          examples:
            - 2a12:a800:11::1
        assigned_at:
          type:
            - string
            - "null"
          examples:
            - "2026-10-22T12:00:00+00:00"
      description: A server's IPv6 address.
    backupSettings:
      type: object
      required:
        - enabled
        - slots
      properties:
        enabled:
          type: boolean
          description: Whether backups are enabled for the server.
          examples:
            - true
        slots:
          type: object
          properties:
            total:
              type: integer
              description: How many backups the server can keep.
              examples:
                - 1
            free:
              type: integer
              description: How many of them are free of charge.
              examples:
                - 1
            paid:
              type: boolean
              description: Whether the paid slots are bought.
              examples:
                - false
            paid_total:
              type: integer
              description: How many backups the server can keep with the paid slots.
              examples:
                - 5
        schedule:
          description: When the server is backed up, or `null` while backups are disabled.
          oneOf:
            - type: object
              properties:
                frequency:
                  type: string
                  enum:
                    - daily
                    - weekly
                hour:
                  type: integer
                  description: The hour the backup starts, in UTC.
                  examples:
                    - 3
                weekday:
                  type:
                    - integer
                    - "null"
                  description: 0 = Sunday to 6 = Saturday, for a weekly schedule.
                retention:
                  type: integer
                  description: How many backups are kept.
                  examples:
                    - 1
            - type: "null"
      description: Whether a server's backups are enabled, its slots and its schedule.
    backup:
      type: object
      required:
        - id
        - type
        - status
      properties:
        id:
          type: integer
          examples:
            - 812
        type:
          type: string
          enum:
            - manual
            - scheduled
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
          examples:
            - completed
        progress:
          type: integer
          minimum: 0
          maximum: 100
          examples:
            - 100
        size_bytes:
          type:
            - integer
            - "null"
          examples:
            - 4294967296
        error:
          type:
            - string
            - "null"
          description: Why the backup failed, once it has.
        created_at:
          type: string
          examples:
            - "2026-10-22T03:00:04+00:00"
        started_at:
          type:
            - string
            - "null"
        finished_at:
          type:
            - string
            - "null"
      description: A backup of a server.
    backupRestore:
      type: object
      required:
        - id
        - backup_id
        - status
      properties:
        id:
          type: integer
          examples:
            - 57
        backup_id:
          type: integer
          examples:
            - 812
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
          examples:
            - running
        progress:
          type: integer
          minimum: 0
          maximum: 100
          examples:
            - 40
        error:
          type:
            - string
            - "null"
          description: Why the restore failed, once it has.
        created_at:
          type: string
        started_at:
          type:
            - string
            - "null"
        finished_at:
          type:
            - string
            - "null"
      description: A restore of a backup onto its server.
    backupDownload:
      type: object
      required:
        - id
        - backup_id
        - status
      properties:
        id:
          type: integer
          examples:
            - 31
        backup_id:
          type: integer
          examples:
            - 812
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
            - expired
          examples:
            - completed
        progress:
          type: integer
          minimum: 0
          maximum: 100
          examples:
            - 100
        url:
          type:
            - string
            - "null"
          description: The VMDK file, once it is ready and until the link expires.
        size_bytes:
          type:
            - integer
            - "null"
        expires_at:
          type:
            - string
            - "null"
          description: When the link stops working.
        error:
          type:
            - string
            - "null"
          description: Why preparing the download failed, once it has.
        created_at:
          type: string
      description: A backup prepared as a file to download.
    domain:
      type: object
      required: []
      properties:
        id:
          type: integer
          examples:
            - 1
        domain_name:
          type: string
          examples:
            - example.com
        status:
          type: string
          description: Domain lifecycle status.
          examples:
            - active
            - suspended
            - transferring
            - expired
        provider:
          type: string
          description: Registrar backing the domain.
          examples:
            - internetbs
            - netim
        auto_renew:
          type: boolean
        whois_privacy:
          type: boolean
        lock_status:
          type: boolean
          description: Whether the registrar transfer lock is enabled.
        use_rdp_nameservers:
          type: boolean
          description: Whether the domain uses RDP.sh-managed nameservers.
        nameservers:
          type: array
          items:
            type: string
          examples:
            - ns1.rdp.sh
            - ns2.rdp.rs
        registration_date:
          type: string
          nullable: true
          examples:
            - "2025-01-01T00:00:00.000000Z"
        expiry_date:
          type: string
          nullable: true
          examples:
            - "2027-01-01T00:00:00.000000Z"
        days_until_expiry:
          type: integer
          nullable: true
          examples:
            - 180
        is_expiring_soon:
          type: boolean
          description: True when the domain expires within 30 days.
        dns_records_count:
          type: integer
          examples:
            - 2
        created_at:
          type: string
          examples:
            - "2025-01-01T00:00:00.000000Z"
      description: Domain object.
    domainPricing:
      type: object
      required: []
      properties:
        registration_price:
          type: number
          examples:
            - 10
        renewal_price:
          type: number
          examples:
            - 12
        transfer_price:
          type: number
          examples:
            - 11
      description: Yearly list prices for the extension, in EUR and net of VAT.
    domainQuote:
      type: object
      required: []
      properties:
        years:
          type: integer
          examples:
            - 1
        net:
          type: number
          description: Price for the whole term, before VAT.
          examples:
            - 10
        vat:
          type: number
          description: VAT at 19%, or 0 when the account is VAT exempt.
          examples:
            - 1.9
        total:
          type: number
          description: Amount that will be deducted from the account balance.
          examples:
            - 11.9
        currency:
          type: string
          examples:
            - EUR
      description: |
        What the authenticated account pays to register the domain for the
        requested term. Renewals and transfers are priced separately.
    domainExtensionPricing:
      type: object
      required: []
      properties:
        tld:
          type: string
          examples:
            - com
        description:
          type: string
          nullable: true
          examples:
            - The most recognised extension on the internet.
        currency:
          type: string
          examples:
            - EUR
        registration_price:
          type: number
          examples:
            - 10
        renewal_price:
          type: number
          examples:
            - 12
        transfer_price:
          type: number
          examples:
            - 11
        searchable:
          type: boolean
          description: |
            Whether the extension is offered in the search on rdp.sh itself.
            It does not restrict this API: `GET /domains/search` and
            `POST /domains` accept every extension listed here.
      description: Yearly list prices for one extension, in EUR and net of VAT.
    dnsRecord:
      type: object
      required: []
      properties:
        id:
          type: integer
          examples:
            - 42
        type:
          type: string
          enum: [A, AAAA, CNAME, MX, TXT, NS, SRV, CAA]
          examples:
            - A
        name:
          type: string
          description: Record name. Use `@` for the apex/root.
          examples:
            - "@"
            - www
        value:
          type: string
          examples:
            - 185.241.208.160
        ttl:
          type: integer
          examples:
            - 3600
        priority:
          type: integer
          nullable: true
          description: Priority, used by MX and SRV records.
          examples:
            - 10
        created_at:
          type: string
          examples:
            - "2025-01-01T00:00:00.000000Z"
      description: DNS record object.
    dnsRecordInput:
      type: object
      required:
        - type
        - name
        - value
      properties:
        type:
          type: string
          enum: [A, AAAA, CNAME, MX, TXT, NS, SRV, CAA]
          description: DNS record type.
        name:
          type: string
          maxLength: 255
          description: Record name. Use `@` for the apex/root.
          examples:
            - "@"
        value:
          type: string
          maxLength: 1000
          description: Record value (e.g. an IP address, hostname, or text).
          examples:
            - 185.241.208.160
        ttl:
          type: integer
          minimum: 60
          maximum: 86400
          default: 3600
          description: Time-to-live in seconds (60-86400). Defaults to 3600.
        priority:
          type: integer
          minimum: 0
          maximum: 65535
          nullable: true
          description: Priority for MX and SRV records.
      description: Payload for creating or updating a DNS record.
    server:
      type: object
      required: []
      properties:
        id:
          type: string
          examples:
            - "1"
        hostname:
          type: string
          nullable: true
          examples:
            - my-server
        node:
          type: string
          examples:
            - 001-ams
        rdns:
          type: string
          examples:
            - 1.3.3.7.powered.by.rdp.sh.
        distro:
          type: string
          examples:
            - Windows Server 2025
            - Debian 12
            - Debian 11
            - Ubuntu 24.04 LTS
        status:
          type: string
          examples:
            - stopped
        plan_id:
          type: integer
          examples:
            - 1
        created_at:
          type: string
          examples:
            - 2023-12-23T01:06:46.000000Z
        ip_address:
          type: string
          examples:
            - 1.3.3.7
        expiry_date:
          type: string
          examples:
            - 2024-11-20T05:20:00.000000Z
      description: ""
    serverDetail:
      type: object
      required: []
      allOf:
        - $ref: "#/components/schemas/server"
        - type: object
          properties:
            username:
              type: string
              description: |
                Login username for the server. Returned values:
                - `Administrator` for Windows servers
                - `root` for selected Linux distros (Debian, Ubuntu, CentOS, etc.)
                - `vshell` for managed Linux distros
              examples:
                - Administrator
                - root
                - vshell
            password:
              type: string
              nullable: true
              description: |
                Decrypted credential for the server. For Windows this is the RDP
                password; for Linux it is the SSH password for the user returned
                in `username`. Only available to the server owner.
              examples:
                - s3cret-p4ssw0rd
      description: Detailed server view, including login credentials.
    invoice:
      type: object
      properties:
        id:
          type: integer
        action:
          type: string
          examples:
            - purchase
            - renewal
            - topup
        gateway:
          type: string
          examples:
            - balance
            - cryptomus
        netto:
          type: number
        brutto:
          type: number
        duration:
          type: integer
        paid:
          type: boolean
        delivered:
          type: boolean
        server_id:
          type: integer
        plan_id:
          type: integer
        created_at:
          type: string
      description: Invoice object.
    firewallRule:
      type: object
      properties:
        pos:
          type: integer
          description: Rule position index
        type:
          type: string
          enum: [in, out]
        action:
          type: string
          enum: [ACCEPT, DROP, REJECT]
        proto:
          type: string
        dport:
          type: string
        sport:
          type: string
        source:
          type: string
        dest:
          type: string
        comment:
          type: string
        enable:
          type: integer
        sync_error:
          type: string
          nullable: true
          description: |
            `null`, or the reason the server's firewall refused the rule at the last sync.
            A rule with `sync_error` set is not in effect.
          examples:
            - "Parameter verification failed. dport: invalid format - invalid port ' 443'"
      description: Firewall rule object.
    ticketSummary:
      type: object
      properties:
        id:
          type: integer
          examples:
            - 1
        title:
          type: string
          examples:
            - Server not responding
        status:
          type: string
          examples:
            - open
            - closed
        priority:
          type: string
          examples:
            - normal
            - emergency
            - low
        server_id:
          type: integer
          nullable: true
          examples:
            - 123
        created_at:
          type: string
          examples:
            - "2024-01-28T10:00:00.000000Z"
        updated_at:
          type: string
          examples:
            - "2024-01-28T12:30:00.000000Z"
      description: Ticket summary object.
    ticketDetail:
      type: object
      properties:
        id:
          type: integer
          examples:
            - 1
        title:
          type: string
          examples:
            - Server not responding
        message:
          type: string
          examples:
            - My server has been down for 2 hours
        status:
          type: string
          examples:
            - open
            - closed
        priority:
          type: string
          examples:
            - normal
            - emergency
            - low
        server_id:
          type: integer
          nullable: true
          examples:
            - 123
        created_at:
          type: string
          examples:
            - "2024-01-28T10:00:00.000000Z"
        updated_at:
          type: string
          examples:
            - "2024-01-28T12:30:00.000000Z"
        comments:
          type: array
          items:
            $ref: "#/components/schemas/comment"
      description: Ticket detail object with comments.
    comment:
      type: object
      properties:
        id:
          type: integer
          examples:
            - 1
        comment:
          type: string
          examples:
            - Working on this issue now
        user:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
        staff:
          type: boolean
          examples:
            - false
        created_at:
          type: string
          examples:
            - "2024-01-28T10:30:00.000000Z"
      description: Ticket comment object.
  responses:
    Ok:
      content:
        application/json:
          schema:
            type: object
            required:
              - data
            properties:
              data:
                type: object
      description: The request was successful, and the server has returned the
        requested resource in the response body.
  parameters:
    state:
      in: path
      name: state
      schema:
        enum:
          - reset
          - start
          - stop
        type: string
        examples:
          - start
      required: true
    server:
      in: path
      name: server
      schema:
        type: string
      required: true
    timeframe:
      in: path
      name: timeframe
      schema:
        enum:
          - hour
          - day
          - week
          - month
        type: string
        examples:
          - hour
      required: true
      description: Time range for graph data
    ticket:
      in: path
      name: ticket
      schema:
        type: integer
      required: true
      description: Ticket ID
    domain:
      in: path
      name: domain
      schema:
        type: integer
      required: true
      description: Domain ID
    record:
      in: path
      name: record
      schema:
        type: integer
      required: true
      description: DNS record ID
    regionChange:
      in: path
      name: regionChange
      schema:
        type: integer
      required: true
      description: Region change ID
    ipChange:
      in: path
      name: ipChange
      schema:
        type: integer
      required: true
      description: IP change ID
    backup:
      in: path
      name: backup
      schema:
        type: integer
      required: true
      description: Backup ID
  securitySchemes:
    ApiKey:
      in: header
      name: API_KEY
      type: apiKey
      description: "Key Auth: Requests contain a valid `API_KEY` in the request headers."
    Authorization:
      in: header
      name: Authorization
      type: apiKey
      description: |
        Your API key as it is, without `Bearer`. API access is off for new
        accounts: until it is turned on under Settings > API, every request
        answers `403` with `API access is turned off for this account. Turn it
        on under Settings > API.` If the account lists allowed IPs, a request
        from any other address answers `403` with `This API key is not allowed
        from <address>`.
