Skip to content
Wardcase Docs

Authentication

Every request to https://api.wardcase.com carries an API key. The dashboard uses a session cookie instead, after you sign in with GitHub.

Create keys in the dashboard at app.wardcase.com, under API keys, or with POST /v1/api-keys. A key is vv_live_ followed by 32 characters. It is shown once, when you create it: we store only its SHA-256 hash, and later listings show only the first 12 characters as prefix.

Send the key as a bearer token:

Terminal window
curl https://api.wardcase.com/v1/me \
-H "Authorization: Bearer $VIVARIUM_API_KEY"

GET /v1/me returns your organization and the scopes of the key you used. Revoke a key in the dashboard or with DELETE /v1/api-keys/{id}. A revoked key gets 401 on its next request.

A key can do only what its scopes allow. Give each key the smallest set it needs.

ScopeAllows
sandboxes:readRead operations on sandboxes, files, ports and snapshots
sandboxes:writeAnything that creates, changes or destroys them, including running commands and minting SSH tokens
audit:read/v1/audit and audit exports
billing:read/v1/usage and /v1/billing/*
org:adminAPI keys, SSH keys, egress policies and the organization itself

Dashboard sessions carry every scope. The full list the API accepts:

sandboxes:read, sandboxes:write, audit:read, billing:read, org:admin.

A request without a valid key returns unauthorized (401). A key without the scope an endpoint needs returns forbidden (403).

Requests that create something accept an Idempotency-Key header of up to 128 characters: POST /v1/sandboxes, POST /v1/sandboxes/{id}/ports, POST /v1/sandboxes/{id}/snapshots and POST /v1/audit/exports. A retry with the same key within 24 hours returns the original response instead of doing the work twice. The SDKs send one on every sandbox create.

Terminal window
curl https://api.wardcase.com/v1/sandboxes \
-H "Authorization: Bearer $VIVARIUM_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 5f0c7a1e-run-42" \
-d '{"image":"python","size":"small","region":"eu-west"}'

Limits apply per API key and per organization: 60 write requests (POST, PUT, PATCH and DELETE) and 600 read requests a minute each, so extra keys do not raise an organization’s rate. Past the limit the API returns rate-limited (429) with a Retry-After header in seconds. The SDKs wait and retry for you.