Skip to main content
The Vers REST API exposes /api/v2 endpoints for creating, executing commands in, checkpointing, branching, sleeping, waking, and deleting computers and projects. Every endpoint reference in the sidebar is generated directly from the server’s OpenAPI specification.

Base URL

All paths begin with /api/v2. For ready-to-run client wrappers, see the Python & TypeScript cookbook.

Authentication

Pass your API key as a Bearer token in the Authorization header:
Create a key from the Vers dashboard. All endpoints require a Bearer token except the unauthenticated liveness check (GET /api/v2/system/health) and public repository reads (GET /api/v2/public/repositories*).

Durable operations and idempotency

Long-running lifecycle mutations execute asynchronously and require a caller-generated UUID in the Idempotency-Key header: For asynchronous mutations: Durable operation lifecycle: POST with Idempotency-Key returns 202 Accepted pending, observed by polling or streaming /events until succeeded or failed. Durable operation lifecycle: POST with Idempotency-Key returns 202 Accepted pending, observed by polling or streaming /events until succeeded or failed.
  1. Send a caller-generated UUID in the Idempotency-Key header.
  2. Receive 202 Accepted with an Operation payload (or one Operation per checkpoint on project restores).
  3. Poll GET /api/v2/operations/{operation_id} or stream events from /events until status reaches succeeded, failed, or quarantined.
Replaying the exact same request with the same Idempotency-Key converges on the original operation rather than creating duplicate resources.

Streaming operation events (NDJSON)

To follow an operation without polling, stream newline-delimited JSON (application/x-ndjson) from /events:
Each line is one OperationEvent:
  • {"type": "snapshot", "operation": {...}} — durable operation state at operation.cursor.
  • {"type": "gap", "requested_cursor": ..., "available_cursor": ...} — emitted if intermediate stages were compacted before your cursor.
  • {"type": "end", "cursor": ..., "terminal": true|false} — stream ended (terminal: true means the operation reached a final state).
If your connection drops, reconnect with cursor=<last_seen_cursor>&follow=true.

Error codes and retry guidance

Failed asynchronous operations carry a structured failure object: {"code": "<machine_code>", "message": "<human_detail>"}.