Skip to content

Mint a sandbox link code

POST
/billing/sandbox/link-code
curl --request POST \
--url https://api.sloose.com/billing/sandbox/link-code \
--header 'Authorization: Bearer <token>'

An admin of the production org mints a one-time code, valid for 24 hours. An admin of the org that is to become the sandbox then redeems it at POST /billing/sandbox/attach.

A single-use code, valid for 24 hours.

Media typeapplication/json
object
code
required
string
expiresAt
required
string
Examplegenerated
{
"code": "example",
"expiresAt": "example"
}

No bearer, or one that is expired, revoked or no longer resolves to a member.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The plan’s sandbox allowance is already used up.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed values: LIMIT_SANDBOX
max
required
number
used
required
number
key
additional properties
Example
{
"code": "LIMIT_SANDBOX"
}

The session’s org no longer exists.

Media typeapplication/json
object
error
required
string
key
additional properties
Examplegenerated
{
"error": "example"
}

A sandbox cannot have sandboxes of its own.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed values: SANDBOX_ORG
key
additional properties
Example
{
"code": "SANDBOX_ORG"
}