---
updatedAt: 2025-09-16T00:02:54.000Z
agentTools:
  projectIndex: https://developers.hivelocity.net/llms.txt
---

# Reload a Custom Server

```python Python

import requests. # install with python -m install requests


YOUR_API_KEY = ""


def shutdown_device(device_id):
    url = f”https://core.hivelocity.net/api/v2/device/{device_id}/power?action=shutdown"

    headers = {
        "Accept": "application/json",
        "X-API-KEY": YOUR_API_KEY
    }

    response = requests.post(url, headers=headers)
    return response

  
def reload_device(device_id, os_id):
    url = f”https://core.hivelocity.net/api/v2/device/{device_id}/reload"
    payload = {"operatingSystemId": 144527}
    headers = {
        "Accept": "application/json",
        "Content-Type": "application/json",
        "X-API-KEY": YOUR_API_KEY
    }
    response = requests.post(url, json=payload, headers=headers)
    return response

  
device_id = 23278
os_id = 144527  # Ubuntu 20.x (Custom servers)
shutdown_device(device_id)
res = reload_device(device_id, os_id)
print(res.text)
```
```

```json Response Example
{
  "code": 202,
  "message": "Ticket #1005600 was opened with your request.",
  "ticket_id": 1005600
}
```

# Be Careful!



You will lose all data on your device during a reload.  If you are looking to reboot your device, see the [update power status endpoint].(https://developers.hivelocity.net/reference/post_power_resource)

# Add your API key here

<!-- python@5 -->

You can find your API key at this url: https://my.hivelocity.net/account

# Define the device and operating system

<!-- python@32-33 -->

Make sure you use the correct Operating System ID for your product.  

This example uses the ID for Ubuntu 20.x on Custom Servers.

# Shutdown your device

<!-- python@8-17,34 -->

This ensure that you reload the correct device.

# Do the reload

<!-- python@20-29,35 -->