Make a key in the dashboard under Settings → API keys, and send it with every request as the Authorization: Bearer <key> header. Addresses start with https://steadnode.com/api/v1, and every answer is JSON ({ "data": … } or { "error": "…" }).
The two kinds of key
- View only reads your services, their state, snapshots, firewall and reverse DNS.
- View and control also starts, stops and reinstalls them, and changes snapshots, the firewall and reverse DNS.
A key never does more than your account can. Another person's service answers as one that does not exist (404).
Addresses
| Method | Address | What it does | |---|---|---| | GET | /api/v1/services | Your services (add ?all=1 for ended ones too) | | GET | /api/v1/services/{id} | One service | | POST | /api/v1/services/{id}/actions | An action: start, stop, restart, poweroff, reinstall, reset_password, rescue | | GET, POST | /api/v1/services/{id}/snapshots | Snapshots, or a new one ({"name": "…"}) | | DELETE | /api/v1/services/{id}/snapshots/{snapshotId} | Delete a snapshot | | POST | /api/v1/services/{id}/snapshots/{snapshotId}/rollback | Restore a snapshot | | GET, PUT | /api/v1/services/{id}/firewall | The firewall, or switch it on or off ({"on": true}) | | POST | /api/v1/services/{id}/firewall/rules | Add a rule | | DELETE | /api/v1/services/{id}/firewall/rules/{ruleId} | Remove a rule | | GET, PUT | /api/v1/services/{id}/reverse-dns | Reverse DNS, or set it ({"ip": "…", "ptr": "…"}) |
Examples
Restart a server:
curl -X POST "https://steadnode.com/api/v1/services/<id>/actions" \
-H "Authorization: Bearer sn_list_…" \
-H "Content-Type: application/json" \
-d '{"type":"restart"}'Reinstall with Ubuntu 24.04 and Docker (the answer holds the new root password):
-d '{"type":"reinstall","image":"ubuntu-24.04","app":"docker"}'Open the web ports on the firewall (leave out sources for every address):
curl -X POST "https://steadnode.com/api/v1/services/<id>/firewall/rules" \
-H "Authorization: Bearer sn_list_…" \
-H "Content-Type: application/json" \
-d '{"protocol":"tcp","ports":"80,443","note":"web"}'Good to know
- A reinstall and a snapshot restore overwrite the disk. Unlike the dashboard, the API does not ask you to type the server's name first, so send them with care.
- The answers to
reinstall,reset_passwordandrescuehold new passwords. Keep them out of your logs. - Limits: 240 requests a minute for all your keys together, plus the dashboard's own limits (power 30 times in 10 minutes, reinstall 5 times an hour, and so on). Past a limit the answer is
429. - Errors come as codes, like
{"error": "service_not_active"}. No key or a wrong one answers401; a change with a view-only key answers403. - The game server console API is in the [server list API](/server-list/api). It takes the same keys.