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

# Create Server

> Creates a new server. The system automatically selects the best node in the given location based on available resources, template availability, and IP availability. Use template slugs (from `GET /locations/{id}/templates`) instead of UUIDs.

The server will be in `installing` status while being provisioned. To fetch the server password after installation completes, use `GET /servers/{server}/credentials`.



## OpenAPI

````yaml POST /servers
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:
    post:
      tags:
        - Servers
      summary: Create a server
      description: >-
        Creates a new server. The system automatically selects the best node in
        the given location based on available resources, template availability,
        and IP availability. Use template slugs (from `GET
        /locations/{id}/templates`) instead of UUIDs.


        The server will be in `installing` status while being provisioned. To
        fetch the server password after installation completes, use `GET
        /servers/{server}/credentials`.
      operationId: createServer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateServerRequest'
      responses:
        '201':
          description: Server created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CreatedServerDetail'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '402':
          description: Overdue invoice
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: OVERDUE_INVOICE
                  message: >-
                    You have an overdue invoice. Please pay it before creating
                    new servers.
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    CreateServerRequest:
      type: object
      required:
        - plan_id
        - location_id
        - template_slug
      properties:
        plan_id:
          type: integer
          description: Plan ID from `GET /plans`
          example: 1
        location_id:
          type: integer
          description: Location ID from `GET /locations`
          example: 1
        template_slug:
          type: string
          description: Template slug from `GET /locations/{id}/templates`
          example: ubuntu-24.04
        hostname:
          type: string
          nullable: true
          description: Server hostname. Defaults to the plan name if omitted.
          maxLength: 191
          example: web-01.example.com
    CreatedServerDetail:
      allOf:
        - $ref: '#/components/schemas/Server'
        - type: object
          properties:
            password_status:
              type: string
              enum:
                - ready
                - generating
                - failed
              description: >-
                `ready` = password is available, `generating` = server is still
                installing
              example: generating
            plan:
              type: object
              nullable: true
              properties:
                id:
                  type: integer
                name:
                  type: string
                monthly_price:
                  type: number
                  format: float
                hourly_price:
                  type: number
                  format: float
            operating_system:
              type: string
              nullable: true
              description: Installed OS name
              example: Ubuntu 24.04 LTS
    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
    Server:
      type: object
      properties:
        id:
          type: integer
          description: >-
            Numeric server ID. Can be used as the `{server}` path parameter (as
            can `uuid` and `uuid_short`).
          example: 42
        uuid:
          type: string
          format: uuid
          description: >-
            Server UUID. Use this (or `uuid_short`) as the `{server}` path
            parameter.
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        uuid_short:
          type: string
          description: >-
            First 8 characters of the UUID. Can also be used as the `{server}`
            path parameter.
          example: a1b2c3d4
        name:
          type: string
          example: Starter VPS
        status:
          type: string
          nullable: true
          description: Application status. `null` means the server is healthy.
          enum:
            - null
            - installing
            - install_failed
            - suspended
            - restoring_backup
            - restoring_snapshot
            - deleting
            - deletion_failed
          example: null
        cpu:
          type: integer
          description: CPU cores
          example: 2
        memory:
          type: integer
          description: RAM in bytes
          example: 2147483648
        disk:
          type: integer
          description: Disk in bytes
          example: 42949672960
        bandwidth_usage:
          type: integer
          description: Current month bandwidth usage in bytes
          example: 536870912
        bandwidth_limit:
          type: integer
          nullable: true
          description: Monthly bandwidth limit in bytes
          example: 1073741824000
        node_id:
          type: integer
          example: 1
        created_at:
          type: string
          format: date-time
          example: '2026-01-10T14:00:00+00:00'
        ip_addresses:
          type: array
          items:
            $ref: '#/components/schemas/IpAddress'
    IpAddress:
      type: object
      properties:
        address:
          type: string
          example: 203.0.113.50
        type:
          type: string
          enum:
            - ipv4
            - ipv6
          example: ipv4
        gateway:
          type: string
          example: 203.0.113.1
        cidr:
          type: integer
          example: 24
        rdns:
          type: string
          nullable: true
          description: Reverse DNS hostname
          example: server1.example.com
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    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>
    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.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API token from your CloudBlast account settings. Pass as `Authorization:
        Bearer <token>`.

````