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

# Reinstall Server

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




## OpenAPI

````yaml post /servers/{server}/reinstall
openapi: 3.1.0
info:
  title: APIFiddle Sample Definition
  version: 0.0.0
  description: Example workspace
servers:
  - url: https://rdp.sh/api/v1
    description: Default production endpoint.
security: []
paths:
  /servers/{server}/reinstall:
    post:
      summary: Reinstall a server
      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
      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.
      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).
      security:
        - Authorization: []
components:
  parameters:
    server:
      in: path
      name: server
      schema:
        type: string
      required: true
  securitySchemes:
    Authorization:
      in: header
      name: Authorization
      type: apiKey

````