Skip to main content
PATCH
/
api
/
sandboxes
cURL
curl --request PATCH \
  --url https://recoup-api.vercel.app/api/sandboxes \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "snapshotId": "snap_abc123def456",
  "github_repo": "https://github.com/org/repo",
  "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "account_id": "550e8400-e29b-41d4-a716-446655440000",
  "snapshot_id": "snap_abc123def456",
  "expires_at": "2027-01-01T00:00:00.000Z",
  "github_repo": "https://github.com/org/repo",
  "created_at": "2025-01-01T00:00:00.000Z"
}

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Body

application/json

Snapshot configuration parameters

snapshotId
string

The snapshot ID to set for the account. This snapshot will be used as the base environment when creating new sandboxes.

Example:

"snap_abc123def456"

github_repo
string<uri>

The GitHub repository URL to associate with the account's sandbox environment. Must be a valid URL.

Example:

"https://github.com/org/repo"

account_id
string<uuid>

UUID of the account to update the snapshot for. Only applicable for organization API keys - org keys can specify an account_id for any account within their organization. If not provided, updates the snapshot for the API key's own account.

Response

Snapshot ID updated successfully

account_id
string<uuid>
required

The account ID this snapshot belongs to

Example:

"550e8400-e29b-41d4-a716-446655440000"

snapshot_id
string
required

The snapshot ID that was set for the account

Example:

"snap_abc123def456"

expires_at
string<date-time>
required

When the snapshot expires

Example:

"2027-01-01T00:00:00.000Z"

github_repo
string | null
required

The GitHub repository URL associated with the sandbox

Example:

"https://github.com/org/repo"

created_at
string<date-time> | null
required

When the snapshot record was created

Example:

"2025-01-01T00:00:00.000Z"