Webhooks & errors
Signed webhook events and the error codes every endpoint can return.
Webhooks
Subscribe to events in your dashboard. We POST a signed JSON payload to your endpoint. A signing secret is created when you save your first endpoint URL; verify every delivery with it.
Verify the signature
Each request carries X-Bashrack-Timestamp and X-Bashrack-Signature-V2 (t=<timestamp>,v1=<hex>). Take the raw request body, compute HMAC_SHA256(secret, "<t>.<raw body>"), compare it with v1 in constant time, and reject the request when the timestamp is more than 300 seconds from your clock. The older X-Bashrack-Signature header and the signature body field (no timestamp) are still sent for existing integrations.
import { createHmac, timingSafeEqual } from "node:crypto";
function verify(rawBody, header, secret) {
const [t, v1] = header.split(",").map((p) => p.split("=")[1]);
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const expected = createHmac("sha256", secret).update(t + "." + rawBody).digest("hex");
const a = Buffer.from(expected);
const b = Buffer.from(v1 ?? "");
return a.length === b.length && timingSafeEqual(a, b);
}{
"event": "order.provisioned",
"data": {
"id": "ord_2vR9kP...",
"ipv4": "185.203.114.12",
"ready_at": "2026-06-12T09:52:00Z"
},
"signature": "sha256=abc123..."
}
X-Bashrack-Timestamp: 1781257920
X-Bashrack-Signature-V2: t=1781257920,v1=9f2c...
X-Bashrack-Signature: sha256=abc123...Errors
Errors return a consistent JSON shape with an HTTP status and a machine-readable code.
| Code | Status | Meaning |
|---|---|---|
| invalid_request | 400 | Missing or malformed parameters. |
| unauthenticated | 401 | Missing or invalid Bearer token. |
| insufficient_balance | 402 | Wallet balance too low for this operation. |
| monthly_spend_limit_reached | 402 | Your monthly spend cap is exhausted — raise it in your profile. |
| forbidden | 403 | Valid token, but not allowed for this resource. |
| ip_not_allowed | 403 | Token is restricted to an IP allowlist. |
| insufficient_scope | 403 | The API key's permissions do not cover this request. |
| new_account_limit | 403 | New accounts can run one small server, one app and one database at first. GET /api/v1/me shows the limits. |
| not_found | 404 | Order or resource does not exist. |
| insufficient_capacity | 409 | No free capacity in the selected location. |
| location_unavailable | 409 | The location, or this tier at the location, is currently not taking orders. |
| server_limit_reached | 409 | You hit your per-account server limit. |
| concurrent_request | 409 | Same idempotency key is already being processed — retry later. |
| terminated | 409 | The server is terminated; the operation is not allowed. |
| ticket_closed | 409 | The support ticket is closed. |
| rate_limited | 429 | Too many requests. Retry after the Retry-After header. |
| internal_error | 500 | Something went wrong on our side. Retry with idempotency key. |