Use the VPSNest API
Updated 27 Nov 2026 automation api
Create a token and read or control your servers from a script.
Create a token
Under Security, create an API token. Choose only the permissions you need, such as View servers or Control servers, and an expiry date. The token is shown once.
List servers
export VPSNEST_TOKEN='paste-token-here'
curl -s https://vpsnest.in/api/v1/vps \
-H "Authorization: Bearer $VPSNEST_TOKEN" \
-H 'Accept: application/json'
Restart a server
curl -s -X POST https://vpsnest.in/api/v1/vps/SERVER_ID/operations \
-H "Authorization: Bearer $VPSNEST_TOKEN" \
-H 'Content-Type: application/json' -H 'Accept: application/json' \
-d '{"action":"restart"}'
Actions run in the background. Expect status 202, then check /vps/SERVER_ID/operations.
Rules
- Amounts are whole numbers of paise.
- Requests are rate limited; status
429means slow down. - Reinstalling, rescue mode, the console, plan changes and cancellations are available only in the dashboard.
Keep tokens safe
Store them in a secret manager or a file readable only by you. Never commit them to a repository. Revoke a token as soon as it is exposed.