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/accountYour account, balance and reseller discount
GET/plansPlans on sale with prices
GET/osOperating systems you can install

Servers

GET/serversList your servers
POST/serversOrder 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}/startStart
POST/servers/{id}/stopStop
POST/servers/{id}/restartRestart
POST/servers/{id}/rebuildReinstall with another system
POST/servers/{id}/reset-passwordSet a new root password
POST/servers/{id}/request-ip-changeAsk for an IP replacement
GET/servers/{id}/upgrade-optionsPlans this server can upgrade to
POST/servers/{id}/upgradeUpgrade to a bigger plan
POST/servers/{id}/vncOpen a browser console session

Wallet and invoices

GET/walletWallet balance
GET/wallet/transactionsWallet transactions
GET/invoicesList invoices
GET/invoices/{id}Invoice details

Support tickets

GET/ticketsList tickets
POST/ticketsOpen a ticket
GET/tickets/{id}Ticket with its messages
POST/tickets/{id}/replyReply to a ticket
POST/tickets/{id}/closeClose 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.

WHMCS module

From signup to SSH

  1. Create an account

    Sign up with your email and confirm it.

  2. Top up your wallet

    By card or with USDT/TRX on TRC20.

  3. 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.

Create account