Sandboxes

Create a sandbox. Returns the initial sandbox snapshot synchronously.

With snapshotId: 404 with code: snapshot_not_found if the snapshot does not exist; 409 with code: snapshot_not_available if it is not available, or code: snapshot_plan_mismatch if a runtime snapshot was requested with a different plan.

With snapshotName: 400 with code: invalid_snapshot_name if the name is malformed, 400 without a code if snapshotId is also set, and 404 with code: snapshot_not_found if no available snapshot in the group has the name. The 409 cases above apply to the resolved snapshot.

409 with code: sandbox_group_suspended if the sandbox group is suspended.

400 with code: sandbox_group_limit_reached if the owner has no default sandbox group and is already at its sandbox group limit.

400 with code: invalid_sandbox_plan if plan is not one the API currently accepts. The message lists the accepted plans.

400 with code: invalid_timeout_seconds if timeoutSeconds is below 0 or above the plan's maximum: 2592000 (30 days), or 86400 (24 hours) on Hobby workspaces.

post/sandboxes

Request

  • Base URL
    https://api.render.com/v1
  • Auth
    HTTP bearer

Request body

ownerIdstring required

The ID of the workspace the sandbox belongs to.

sandboxGroupIdSchema (unresolved $ref)
timeoutSecondsinteger

Maximum sandbox lifetime in seconds. Sandbox is terminated when reached. Use 0 for no timeout.

idleTimeoutSecondsinteger

Seconds of inactivity before the sandbox is suspended. Use 0 to disable automatic idle suspension. Positive values must be at least 300.

envobject

Inline environment variables injected into the sandbox at creation.

snapshotIdSchema (unresolved $ref)
snapshotNameName (unresolved $ref)

Response

Sandbox created. Returns the initial sandbox snapshot.

idSchema required(unresolved $ref)
sandboxGroupIdSchema (unresolved $ref)
statusItems required(unresolved $ref)
planstring required

Compute plan. See sandboxPlan for known values.

regionstring required

Region the sandbox is running in.

timeoutSecondsinteger required

Maximum sandbox lifetime in seconds. 0 means the sandbox has no timeout.

idleTimeoutSecondsinteger required

Seconds of inactivity before the sandbox is suspended. 0 disables automatic idle suspension.

createdAtstring date-time required
terminatedAtstring date-time nullable

When the sandbox was terminated, or null.

Changes