Skip to content
# Events & errors

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.

js
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);
}
order.provisionedServer is online and reachable.
order.terminatedServer was deleted by you or billing failure.
hosting.deploy.succeededA hosting app finished deploying (console, API or deploy hook); data includes id, name, image, trigger and duration_seconds.
hosting.deploy.failedThe deployment did not become healthy in time.
server.alert_firedA server usage alert with webhook delivery started; data includes server_id, hostname, alert_id, metric, threshold, duration_minutes and value.
server.alert_resolvedThe value went back to or below the alert's threshold.
json
{
  "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.

CodeStatusMeaning
invalid_request400Missing or malformed parameters.
unauthenticated401Missing or invalid Bearer token.
insufficient_balance402Wallet balance too low for this operation.
monthly_spend_limit_reached402Your monthly spend cap is exhausted — raise it in your profile.
forbidden403Valid token, but not allowed for this resource.
ip_not_allowed403Token is restricted to an IP allowlist.
insufficient_scope403The API key's permissions do not cover this request.
new_account_limit403New accounts can run one small server, one app and one database at first. GET /api/v1/me shows the limits.
not_found404Order or resource does not exist.
insufficient_capacity409No free capacity in the selected location.
location_unavailable409The location, or this tier at the location, is currently not taking orders.
server_limit_reached409You hit your per-account server limit.
concurrent_request409Same idempotency key is already being processed — retry later.
terminated409The server is terminated; the operation is not allowed.
ticket_closed409The support ticket is closed.
rate_limited429Too many requests. Retry after the Retry-After header.
internal_error500Something went wrong on our side. Retry with idempotency key.