Overview
The DigiRDP Reseller API provisions and manages white-label VPS and RDP servers programmatically: provision, list and terminate servers, read your prepaid wallet, pull credentials, and subscribe to webhooks. It is REST over HTTPS, JSON in and out.
Base URL: https://manage.digirdp.com/modules/addons/reseller/api.php. Paths are appended, for example …/api.php/v1/catalog.
Go-live note. The sandbox (test keys) and the catalog, balance and webhook endpoints are usable today. Live VM provisioning is rolling out. Build and test against the sandbox now, and go live the moment it opens.
Quickstart
Get a key
Issue a live (df_live_…) or test (df_test_…) key in the reseller dashboard after identity verification (KYC).
Verify the key
Call /v1/ping with your key to confirm it works and see its mode and scopes. (The /v1/catalog call below also needs a key.)
ping.shRequest
curl https://manage.digirdp.com/modules/addons/reseller/api.php/v1/ping \
-H "Authorization: Bearer df_test_xxxxxxxx"
responseResponse
{ "ok": true, "data": { "reseller_id": 1204, "mode": "test", "scopes": ["read", "provision", "manage"] } }
Provision in the sandbox
With a df_test_… key the call is simulated: no charge, and it never touches a real VM.
provision.shRequest
curl -X POST https://manage.digirdp.com/modules/addons/reseller/api.php/v1/vms \
-H "Authorization: Bearer df_test_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"plan": "p3",
"location": "blr",
"os": "ubuntu-22.04",
"hostname": "web-01",
"end_client": { "name": "Acme Ltd", "email": "ops@acme.com" },
"idempotency_key": "a1b2c3d4"
}'
Authentication
Send your key as a bearer token: Authorization: Bearer df_live_xxxxxxxx for live, or df_test_xxxxxxxx for the sandbox. The header X-Api-Key: df_xxxxxxxx is also accepted.
Each key carries one or more scopes: read, provision and manage. Every endpoint below lists the scope it needs.
The only endpoint that needs no key is /v1/openapi.json. Keys are issued in the reseller dashboard after KYC.
Conventions
- Responses are JSON. Success is
{"ok":true,"data":{…}}. Errors are {"ok":false,"error":{"code":"…","message":"…"}}.
- Sandbox. A
df_test_ key hits a fully simulated sandbox. It never provisions a real server or debits your wallet.
- Idempotency.
POST /v1/vms takes an idempotency_key (8 to 100 characters). Replaying it returns the same VM without a second charge, so retries never double-create.
- Rate limiting. Requests are rate limited per IP. Exceeding a limit returns HTTP 429.
- No caching. All responses are sent with
Cache-Control: no-store.
successShape
{ "ok": true, "data": { ... } }
errorShape
{ "ok": false, "error": { "code": "invalid_plan", "message": "..." } }
Endpoints
Server objects carry id (integer), status (provisioning, active, suspended, failed, terminated, unknown), plan, location, os, hostname, ip, mode (live or test), price_usd, discount_percent, paid_until, created_at and activated_at. Examples below show a subset.
List the locations and plans you can sell. White-label safe: no hypervisor ids.
requestcurl
curl https://manage.digirdp.com/modules/addons/reseller/api.php/v1/catalog \
-H "Authorization: Bearer df_live_xxxxxxxx"
response200
{
"ok": true,
"data": {
"locations": [
{ "lkey": "blr", "name": "Bangalore", "description": "India" }
],
"plans": [
{ "pkey": "p3", "name": "3 GB", "ram_gb": 3, "disk_gb": 60, "vcpu": 2, "price_usd": "<your wholesale rate>" }
]
}
}
price_usd is your wholesale rate, shown once you authenticate.
Your prepaid wallet balance, in USD.
requestcurl
curl https://manage.digirdp.com/modules/addons/reseller/api.php/v1/balance \
-H "Authorization: Bearer df_live_xxxxxxxx"
response200
{ "ok": true, "data": { "balance_usd": "128.50", "currency": "USD" } }
The balance shown is illustrative.
List your servers.
requestcurl
curl https://manage.digirdp.com/modules/addons/reseller/api.php/v1/vms \
-H "Authorization: Bearer df_live_xxxxxxxx"
response200
{
"ok": true,
"data": {
"vms": [
{ "id": 1042, "status": "active", "plan": "p3", "location": "blr",
"os": "ubuntu-22.04", "hostname": "web-01", "ip": "203.0.113.10", "mode": "live" }
]
}
}
Provision a server. plan, location, end_client (name and email) and idempotency_key are required; os and hostname are optional. Live keys debit your wallet. Test keys simulate the call.
requestcurl
curl -X POST https://manage.digirdp.com/modules/addons/reseller/api.php/v1/vms \
-H "Authorization: Bearer df_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"plan": "p3",
"location": "blr",
"os": "ubuntu-22.04",
"hostname": "web-01",
"end_client": { "name": "Acme Ltd", "email": "ops@acme.com" },
"idempotency_key": "a1b2c3d4"
}'
response201
# 201 Created
{
"ok": true,
"data": {
"id": 1042,
"status": "active",
"plan": "p3",
"location": "blr",
"os": "ubuntu-22.04",
"hostname": "web-01",
"ip": "203.0.113.10",
"mode": "test",
"price_usd": "<your wholesale rate>"
}
}
A test key simulates this call. Live provisioning is rolling out.
One server's details.
requestcurl
curl https://manage.digirdp.com/modules/addons/reseller/api.php/v1/vms/1042 \
-H "Authorization: Bearer df_live_xxxxxxxx"
response200
{ "ok": true, "data": { "id": 1042, "status": "active", "plan": "p3", "location": "blr", "mode": "live" } }
Terminate a server. Termination is non-refundable, and a server on an administrative hold cannot be terminated.
requestcurl
curl -X DELETE https://manage.digirdp.com/modules/addons/reseller/api.php/v1/vms/1042 \
-H "Authorization: Bearer df_live_xxxxxxxx"
response200
{ "ok": true, "data": { "id": 1042, "status": "terminated" } }
GET/v1/vms/{id}/credentialsmanage
Root credentials for a live server. Sensitive: handle and store them like a password. Returns credentials_unavailable if the server is not in a state that has credentials.
requestcurl
curl https://manage.digirdp.com/modules/addons/reseller/api.php/v1/vms/1042/credentials \
-H "Authorization: Bearer df_live_xxxxxxxx"
response200
{
"ok": true,
"data": {
"id": 1042,
"hostname": "web-01",
"ip": "203.0.113.10",
"username": "root",
"root_password": "<password>"
}
}
List your registered webhooks.
requestcurl
curl https://manage.digirdp.com/modules/addons/reseller/api.php/v1/webhooks \
-H "Authorization: Bearer df_live_xxxxxxxx"
response200
{ "ok": true, "data": { "webhooks": [ ... ] } }
Register a webhook. url must be https to a public host. events is a comma-separated list of event names, or * for all (the default).
requestcurl
curl -X POST https://manage.digirdp.com/modules/addons/reseller/api.php/v1/webhooks \
-H "Authorization: Bearer df_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://you.example.com/hook",
"events": "vm.provisioned,wallet.low_balance"
}'
response201
# 201 Created. The signing secret is shown once.
{ "ok": true, "data": { "id": 7, "secret": "<shown once>" } }
DELETE/v1/webhooks/{id}manage
Delete a webhook.
requestcurl
curl -X DELETE https://manage.digirdp.com/modules/addons/reseller/api.php/v1/webhooks/7 \
-H "Authorization: Bearer df_live_xxxxxxxx"
response200
{ "ok": true, "data": {} }
Webhooks
Register an HTTPS URL to receive events. Your signing secret is shown once, when you register the endpoint.
vm.provisionedvm.failedvm.terminatedvm.suspendedvm.unsuspendedvm.renewedwallet.low_balancewallet.recharged
Each delivery carries three headers. Delivery is at-least-once, so dedupe on X-Reseller-Delivery.
headersDelivery
X-Reseller-Event: vm.provisioned
X-Reseller-Delivery: <unique delivery id>
X-Reseller-Signature: sha256=<hex>
X-Reseller-Signature is sha256=<hex>, where <hex> is HMAC-SHA256(rawRequestBody, yourWebhookSecret). Compute it over the raw body and compare in constant time:
verify.jsNode
const crypto = require('crypto');
// rawBody: the exact request body bytes, before any JSON parsing
function verify(rawBody, signatureHeader, secret) {
const expected = 'sha256=' +
crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
const a = Buffer.from(expected);
const b = Buffer.from(signatureHeader || '');
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
Errors
Errors use the shape {"ok":false,"error":{"code","message"}}. Match on code, not the message.
no_credentials401
No API key was sent. Provide Authorization: Bearer df_….
invalid_key401
The key is missing, invalid, expired or revoked.
insufficient_scope403
The key does not carry the scope this endpoint requires.
invalid_plan400
Unknown plan key. Use a pkey from the catalog.
invalid_location400
Unknown location key. Use an lkey from the catalog.
invalid_os400
Unknown operating system value.
insufficient_funds402
Your prepaid wallet balance is too low for this server.
max_vms_reached409
Your account has reached its server cap.
daily_limit_reached429
The per-day provisioning cap has been hit. Try again tomorrow.
not_terminable409
The server cannot be terminated in its current state, for example while still provisioning.
admin_held409
The server is on an administrative hold.
credentials_unavailable409
No credentials are available for the server in its current state.
provisioning_disabled503
Live provisioning is not yet enabled for your account. Test keys still work.