Build on the VASTROX API
A clean, token-authenticated REST API to manage your account, services, invoices, orders and tickets programmatically.
Base URL https://vastrox.com/api/v11Authenticate
Create a personal access token in your Account → API Keys, then send it as a Bearer token:
Authorization: Bearer <your-key>
2Choose a scope
Read-only keys can view everything in your account. Read & write keys can also open/reply to tickets and power VPS servers. Write calls with a read key return 403.
3Read responses
Every response uses one envelope:
{ "ok": true, "data": … }
or{ "ok": false, "error": {…} }
Endpoints
Example
# List your services curl -H "Authorization: Bearer <your-key>" \ https://vastrox.com/api/v1/services # Open a ticket (needs a Read & write key) curl -X POST https://vastrox.com/api/v1/tickets \ -H "Authorization: Bearer <your-key>" \ -H "Content-Type: application/json" \ -d '{"department":"support","subject":"Hi","priority":"low","message":"Hello"}'
Rate limit: 90 requests/minute per token. All data is scoped to the token owner.
Errors
Failures return the same envelope with an HTTP status and a stable
error.code you can switch on:
{ "ok": false, "error": { "code", "message" } }.
Webhooks
Instead of polling, register an HTTPS endpoint under
API Keys and we push events to you as they happen.
Available events: invoice.paid, service.created,
service.activated, service.suspended and
service.terminated.
# Every delivery is a signed JSON POST POST https://example.com/hooks/vastrox X-Vastrox-Event: invoice.paid X-Vastrox-Delivery: 8f14e45f-ceea-467f-a1d2-91a3c5f0f3aa X-Vastrox-Signature: sha256=<hmac> {"id":"8f14e45f...","event":"invoice.paid","created_at":"2026-07-04T12:00:00+00:00", "data":{"invoice_id":1234,"total":12.99,"currency":"USD"}} # Verify the signature (PHP) $valid = hash_equals( 'sha256=' . hash_hmac('sha256', $rawBody, $yourSecret), $_SERVER['HTTP_X_VASTROX_SIGNATURE'] );
Respond with any 2xx within 10 seconds. Failed deliveries retry twice with backoff; endpoints pause automatically after 10 consecutive failures.