API
Everything you do in the panel can be done from your own code: order servers, control them, read your balance and invoices, and talk to support.
Basics
- Base URL
- https://api.turkishvps.com/v1
- Authentication
- Send your token as Authorization: Bearer YOUR_TOKEN. Create it in the panel under Developer → API Keys.
- Tokens
- Up to 10 tokens per account. Revoke any of them at any time.
- Rate limit
- 120 requests a minute per account.
- Billing
- Servers ordered through the API are paid from your wallet balance, the same as in the panel.
- Format
- JSON requests and responses. Send Accept: application/json.
Your first request
List the plans on sale. Use the id of a plan when you order.
curl https://api.turkishvps.com/v1/plans \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"Order a server
The root password must be 8 to 12 characters with a lowercase and an uppercase letter, a digit and one of ! # + $ * -.
curl -X POST https://api.turkishvps.com/v1/servers \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"plan_id": 17, "os_id": 5, "label": "web-1", "root_password": "Str0ng#Pass"}'Endpoints
Account and catalog
| GET | /account | Your account, balance and reseller discount |
| GET | /plans | Plans on sale with prices |
| GET | /os | Operating systems you can install |
Servers
| GET | /servers | List your servers |
| POST | /servers | Order a new server |
| GET | /servers/{id} | Server details |
| PATCH | /servers/{id} | Rename a server |
| DELETE | /servers/{id} | Cancel a server (unused time back to the wallet) |
| POST | /servers/{id}/start | Start |
| POST | /servers/{id}/stop | Stop |
| POST | /servers/{id}/restart | Restart |
| POST | /servers/{id}/rebuild | Reinstall with another system |
| POST | /servers/{id}/reset-password | Set a new root password |
| POST | /servers/{id}/request-ip-change | Ask for an IP replacement |
| GET | /servers/{id}/upgrade-options | Plans this server can upgrade to |
| POST | /servers/{id}/upgrade | Upgrade to a bigger plan |
| POST | /servers/{id}/vnc | Open a browser console session |
Wallet and invoices
| GET | /wallet | Wallet balance |
| GET | /wallet/transactions | Wallet transactions |
| GET | /invoices | List invoices |
| GET | /invoices/{id} | Invoice details |
Support tickets
| GET | /tickets | List tickets |
| POST | /tickets | Open a ticket |
| GET | /tickets/{id} | Ticket with its messages |
| POST | /tickets/{id}/reply | Reply to a ticket |
| POST | /tickets/{id}/close | Close a ticket |
Errors
A failed request returns a 4xx status and a JSON body with a message; validation errors list each field.
HTTP/1.1 422 Unprocessable Content
{
"message": "The root password field format is invalid.",
"errors": { "root_password": ["The root password field format is invalid."] }
}Selling servers from WHMCS?
Our free WHMCS module uses this API for you: orders, suspension, upgrades and prices in your own currency.
From signup to SSH
Create an account
Sign up with your email and confirm it.
Top up your wallet
By card or with USDT/TRX on TRC20.
Order a server
Pick a plan and a system. It is usually online within a few minutes, with the root or Administrator password in your panel.