Skip to main content
POST
/
api
/
sandbox
Create or restore session sandbox
curl --request POST \
  --url https://api.recoupable.com/api/sandbox \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "repoUrl": "<string>",
  "sessionId": "<string>"
}
'
{
  "createdAt": 123,
  "timeout": 123,
  "currentBranch": "<string>",
  "mode": "vercel",
  "timing": {
    "readyMs": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://developers.recoupable.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Body

application/json
repoUrl
string
required

GitHub repository URL the sandbox should clone (e.g. https://github.com/owner/repo). Validated against GitHub URL rules; private repos require the service GitHub token configured server-side.

sessionId
string

Owning session id. Required for the chat UX flow — the sandbox is named deterministically from the session id, enabling resume across reconnects. When omitted, a one-shot ephemeral sandbox is created (legacy).

Response

Sandbox provisioned and bound to the session.

createdAt
integer<int64>
required

Epoch milliseconds when the sandbox handle was returned.

timeout
integer<int64>
required

Sandbox idle-timeout in milliseconds. The lifecycle workflow uses this to schedule hibernation.

currentBranch
string
required

Branch the sandbox checked out.

mode
enum<string>
required

Sandbox provider. Currently always vercel.

Available options:
vercel
timing
object
required