POST /v1/sandboxes
Requires Turnstile and rolling creation quotas. Keys are returned once. The claim token appears only in the claim URL fragment. The sandbox expires after seven days unless claimed. A deployment without a challenge verifier answers 503 sandbox_creation_unavailable (not retryable); a local deployment may accept any non-empty token instead (SANDBOX_LOCAL_CAPTCHA, refused at start-up outside DEPLOY_ENV=local). A new sandbox is seeded, where the test IdP runs, with a test organization whose SAML connection to the test IdP is pending its first test sign-in.
- Scope
public- Auth
- None
- Since
- 1.0
Request body
Section titled “Request body”turnstile_tokenstring Requiredmin length 1 · max length 2048
The handoff from createSandboxHandoff (thehandoff_idstring#handoff=fragment of itsbrowser_url). With it, the keys and claim URL are sealed into the handoff for the CLI and the response is SandboxHandedOff; an expired, used or unknown handoff answers 410 sandbox_handoff_expired.min length 43 · max length 43
Responses
Section titled “Responses”- 201 Created. The response must not be cached. one of
- 400 Invalid request. Codes: parameter_invalid, parameter_missing, version_unsupported and resource-specific codes from the catalogue. Error
- 410 Code: sandbox_handoff_expired. The handoff expired, was used or is unknown; start again. Error
- 429 Code: rate_limited. Retry-After is set. Error
- 503 Code: service_unavailable. Retry-After is set; writes are paused. Error
- default Any other error, including internal_error. Every code is in the error catalogue. Error
Errors share one shape; see the error code catalogue.
curl -X POST \ "https://api.ohauthcat.com/v1/sandboxes" \ -H "Content-Type: application/json" \ -d '{ "turnstile_token": "sk_test_example"}'const response = await fetch("https://api.ohauthcat.com/v1/sandboxes", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ "turnstile_token": "sk_test_example" }),});const data = await response.json();import osimport requests
response = requests.post( "https://api.ohauthcat.com/v1/sandboxes", json={ "turnstile_token": "sk_test_example", },)data = response.json(){ "environment": "env_01J9Z3K5V7W8X9Y0Z1A2B3C4D5", "secret_key": "sk_01J9ZQ4M7K2X8V3N5B6C1D0E9F", "publishable_key": "pk_01J9ZQ4M7K2X8V3N5B6C1D0E9F", "claim_url": "https://app.acme.com/callback", "expires_at": "2026-01-15T09:30:00Z"}