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

# Reinstall a Server

> Wipes the disk and installs `image_id`. The server must be running or stopped. Returns `202` while it reinstalls.



## OpenAPI

````yaml /api-reference/openapi.json post /servers/{server_id}/reinstall
openapi: 3.1.0
info:
  title: Arct Cloud API
  description: >-
    Manage Arct Cloud servers over HTTPS with an API token. Errors return an
    `error` object with `code`, `message` and `details`.
  version: 1.0.0
servers:
  - url: https://api.arct.cloud/v1
security: []
tags:
  - name: Account
    description: The account and token behind the request.
  - name: Servers
    description: List, read, create, update, power, reinstall, resize and delete servers.
  - name: Catalog
    description: Locations, plans and OS images you can order.
  - name: Invoices
    description: Your invoices.
  - name: SSH Keys
    description: Keys to install on new and reinstalled servers.
paths:
  /servers/{server_id}/reinstall:
    post:
      tags:
        - Servers
      summary: Reinstall a Server
      description: >-
        Wipes the disk and installs `image_id`. The server must be running or
        stopped. Returns `202` while it reinstalls.
      operationId: reinstall_server_servers__server_id__reinstall_post
      parameters:
        - name: server_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Server Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServerReinstall'
      responses:
        '202':
          description: Accepted. Poll `GET /servers/{server_id}` for `status`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReinstallResponse'
        '400':
          description: '`bad_request`; `message` says why.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: '`invalid_token`, `token_disabled` or `token_expired`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: '`account_disabled`, `api_access_disabled` or `insufficient_scope`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: '`not_found`: unknown ID, or not yours.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: '`conflict`: the current state doesn''t allow this.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: '`validation_error`; see `details.fields`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: '`rate_limit_exceeded`; see `Retry-After`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: '`internal_error`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ServerReinstall:
      properties:
        image_id:
          type: string
          format: uuid
          title: Image Id
          description: Image ID from `GET /images`, for the server's location and plan.
        ssh_key_ids:
          items:
            type: string
            format: uuid
          type: array
          maxItems: 20
          title: Ssh Key Ids
          description: >-
            IDs of your SSH keys to install. Omit for all saved keys (a password
            if none); send `[]` for a password. Ignored for Windows images.
        hostname:
          type: string
          maxLength: 63
          minLength: 1
          pattern: ^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$
          title: Hostname
          description: Hostname for the reinstalled OS.
      additionalProperties: false
      type: object
      required:
        - image_id
      title: ServerReinstall
    ReinstallResponse:
      properties:
        server:
          $ref: '#/components/schemas/Server'
        password:
          anyOf:
            - type: string
            - type: 'null'
          title: Password
          description: >-
            Login password for `server.login_user`, or null when SSH keys are
            installed. Shown only here and in the email. If support retries the
            build or Windows password setup fails, follow the email. The old
            password stops working.
      type: object
      required:
        - server
      title: ReinstallResponse
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - error
      title: ErrorResponse
    Server:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        hostname:
          type: string
          title: Hostname
        status:
          $ref: '#/components/schemas/VMStatus'
        location:
          type: string
          title: Location
          description: Location code, such as `fra`.
        plan:
          type: string
          title: Plan
          description: Plan slug.
        plan_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Plan Name
        cpu_cores:
          type: integer
          title: Cpu Cores
        ram_gb:
          type: integer
          title: Ram Gb
        storage_gb:
          type: integer
          title: Storage Gb
        bandwidth_tb:
          type: integer
          title: Bandwidth Tb
        ipv4:
          anyOf:
            - type: string
            - type: 'null'
          title: Ipv4
          description: Null until the server is set up.
        ipv6:
          anyOf:
            - type: string
            - type: 'null'
          title: Ipv6
          description: IPv6 address, or null if none is assigned.
        os:
          type: string
          title: Os
        login_user:
          anyOf:
            - type: string
            - type: 'null'
          title: Login User
          description: OS user to sign in as. Null in list responses.
        labels:
          items:
            type: string
          type: array
          title: Labels
        delete_protection:
          type: boolean
          title: Delete Protection
          description: True blocks `DELETE`.
        billing_period:
          type: string
          title: Billing Period
          description: '`monthly`, `quarterly`, `semi_annual` or `yearly`.'
        price:
          type: number
          title: Price
          description: Price per billing period, in USD.
        next_due_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Next Due Date
          description: Next renewal date.
        cancel_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Cancel At
          description: Date a scheduled cancellation takes effect, or null if none.
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - hostname
        - status
        - location
        - plan
        - plan_name
        - cpu_cores
        - ram_gb
        - storage_gb
        - bandwidth_tb
        - ipv4
        - ipv6
        - os
        - login_user
        - labels
        - delete_protection
        - billing_period
        - price
        - next_due_date
        - cancel_at
        - created_at
      title: Server
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        details:
          anyOf:
            - type: object
            - type: 'null'
          title: Details
      type: object
      required:
        - code
        - message
      title: ErrorDetail
    VMStatus:
      type: string
      enum:
        - provisioning
        - running
        - stopped
        - restarting
        - reinstalling
        - restoring
        - error
        - deleting
        - suspended
        - pre_order
      title: VMStatus
      description: VM status enumeration.
  securitySchemes:
    bearerAuth:
      type: http
      description: API token from Dashboard > Settings > API Tokens.
      scheme: bearer
      bearerFormat: arct_...

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.