Sign in

REST API

Requests and errors

The conventions every endpoint shares: the base URL, headers, request IDs and how failures are reported.

Base URL

https://dev-api.renderops.com

Request bodies are JSON; send Content-Type: application/json with them. Responses are JSON unless noted (destroying a sandbox returns 204 with no body).

Request IDs

Every response carries an X-Request-ID header, and most JSON bodies repeat it as request_id. Send your own X-Request-ID to correlate calls with your logs, and include the ID when you contact support about a request.

Error responses

Errors come back with an HTTP status and, on most endpoints, a JSON body:

503 Service Unavailable
{
  "status": "error",
  "code": "no_capacity",
  "message": "no healthy worker has sufficient capacity",
  "request_id": "4e245aae-1694-4dd5-b944-7180bf480fe8"
}

Status codes

StatusMeaning
200Success.
201Created a sandbox, terminal, IDE session or preview link.
204Sandbox destroyed.
400The request is malformed or a field is invalid.
401Missing, unknown, inactive or expired API key.
402The account has no balance left.
403Your account’s policy doesn’t allow this operation (sessions_not_allowed).
404No such sandbox — or it belongs to someone else. The API doesn’t tell the two apart.
500Something failed on our side, e.g. provision_failed.
503No capacity right now (no_capacity, scheduler_busy) or a dependency is unavailable. Safe to retry with backoff.

Failed runs aren’t failed requests

When code you run exits with a non-zero code, the request itself still succeeds with 200. The body has status: "error", an error.code of execution_failed (or exec_failed for shell commands), and the full stdout, stderr and exit code. See Run code and commands.

Health check

GET /health needs no key and reports that the API process is responding:

GET /health
{
  "status": "ok",
  "message": "control plane is healthy",
  "role": "control-plane"
}
Ctrl I