Detach a sandbox
DELETE
/billing/sandbox/{orgId}
const url = 'https://api.sloose.com/billing/sandbox/org_2b81';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.sloose.com/billing/sandbox/org_2b81 \ --header 'Authorization: Bearer <token>'An admin of the production org removes one of its sandboxes. The sandbox org survives; it simply pays for itself again, as Free.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”orgId
required
The sandbox org’s id.
string
Example
org_2b81The sandbox org’s id.
Responses
Section titled “Responses”Detached.
Media typeapplication/json
A write that carries nothing back.
object
ok
required
boolean
Example
{ "ok": true}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 bearer’s role is too low, or it was issued for a different org.
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"}That org is not a sandbox of this billing account.
Media typeapplication/json
object
error
required
string
key
additional properties
Examplegenerated
{ "error": "example"}Only a production org detaches its sandboxes.
Media typeapplication/json
object
error
required
string
code
required
string
key
additional properties
Example
{ "code": "SANDBOX_ORG"}