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

# Reinstall OS

> Reinstalls the server with a new operating system template. All data on the server will be lost. You may optionally provide a new root password and install saved SSH keys by passing their IDs in `ssh_key_ids`.



## OpenAPI

````yaml POST /servers/{server}/reinstall
openapi: 3.0.3
info:
  title: CloudBlast API
  description: >-
    The CloudBlast V2 API provides a modern RESTful interface for managing your
    cloud infrastructure programmatically. All responses follow a consistent `{
    "data": ... }` or `{ "error": ... }` format.
  version: 2.0.0
servers:
  - url: https://console.cloudblast.io/api/v2
    description: Production
security:
  - bearerAuth: []
paths:
  /servers/{server}/reinstall:
    post:
      tags:
        - Servers
      summary: Reinstall OS
      description: >-
        Reinstalls the server with a new operating system template. All data on
        the server will be lost. You may optionally provide a new root password
        and install saved SSH keys by passing their IDs in `ssh_key_ids`.
      operationId: reinstallServer
      parameters:
        - $ref: '#/components/parameters/ServerIdentifier'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - template_slug
              properties:
                template_slug:
                  type: string
                  description: Template slug (e.g., `ubuntu-24.04`)
                  example: ubuntu-24.04
                password:
                  type: string
                  description: New root password. If omitted, one will be generated.
                  minLength: 8
                  example: myNewPassword123
                ssh_key_ids:
                  type: array
                  description: >-
                    IDs of saved SSH keys to install. Obtain IDs from `GET
                    /ssh-keys`.
                  minItems: 1
                  maxItems: 20
                  uniqueItems: true
                  items:
                    type: integer
                  example:
                    - 12
                    - 18
      responses:
        '200':
          description: Reinstall initiated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      status:
                        type: string
                        example: reinstalling
                      password:
                        type: string
                        description: The root password for the reinstalled server
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    ServerIdentifier:
      name: server
      in: path
      required: true
      schema:
        type: string
      description: >-
        Server identifier — any of: numeric `id`, `uuid_short` (8 chars), or
        full `uuid` (36 chars).
      example: a1b2c3d4
  responses:
    Unauthenticated:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHENTICATED
              message: >-
                Missing or invalid Authorization header. Use: Authorization:
                Bearer <token>
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: NOT_FOUND
              message: Server not found.
    Conflict:
      description: Server is in a conflicting state
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: SERVER_STATUS_CONFLICT
              message: >-
                This server is currently installing and cannot perform this
                action.
    ValidationError:
      description: Validation failed
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    example: VALIDATION_ERROR
                  message:
                    type: string
                    example: The given data was invalid.
                  details:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    example:
                      name:
                        - The name field is required.
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code
            message:
              type: string
              description: Human-readable error message
          required:
            - code
            - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API token from your CloudBlast account settings. Pass as `Authorization:
        Bearer <token>`.

````