> For the complete documentation index, see [llms.txt](https://cloudblast.gitbook.io/cloudblast-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cloudblast.gitbook.io/cloudblast-api/api-endpoints/create-server.md).

# /create-server

## Create a new VM

<mark style="color:green;">`POST`</mark> [`https://console.cloudblast.io/api/public/create-server`](http://cloudblast.local/api/public/create-server)

This endpoint allows users to create a new virtual private server (VPS) on the Cloudblast platform. Users can specify server configurations such as Plan, Location and OS.

**Body**

| Name            | Type   | Description                                                                  |
| --------------- | ------ | ---------------------------------------------------------------------------- |
| `authKey`       | string | Your API Key                                                                 |
| `plan_id`       | int    | ID of the plan ([List Here](/cloudblast-api/id-lists/plans-list.md))         |
| `location_id`   | int    | ID of the location ([List Here](/cloudblast-api/id-lists/locations-list.md)) |
| `hostname`      | string | Hostname for the VM                                                          |
| `template_uuid` | string | ID of the OS ([List Here](/cloudblast-api/id-lists/os-list.md))              |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "result": true,
    "server": {
        "id": 12,
        "user_id": 2,
        "plan_id": 1,
        "server_id": 14,
        "status": "active",
        "last_paid": null,
        "current_month_cost": 0,
        "os": "Ubuntu 24.04",
        "os_version": null,
        "created_at": "2024-09-15T11:00:50+00:00",
        "updated_at": "2024-09-15T11:00:50+00:00",
        "deleted_at": null,
        "user": {
            "data": {
                "id": 2,
                "name": "Name",
                "email": "youremail@sample.com",
                "email_verified_at": null,
                "root_admin": true,
                "created_at": "2024-07-25T19:24:46.000000Z",
                "updated_at": "2024-09-14T07:35:08.000000Z"
            }
        },
        "plan": {
            "data": {
                "id": 1,
                "plan_name": "VMA11",
                "cpu": 1,
                "memory": 1073741824,
                "disk": 10737418240,
                "bandwidth_limit": 536870912000,
                "hourly_price": 0.01,
                "monthly_price": 5,
                "backup_price": "0.000125",
                "backup_limit": 5
            }
        },
        "root_password": "!SkfnW3Fmnwi"
    }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}
