Claim an onboarding workspace with a real account
const url = 'https://testperch.com/api/public/v1/onboardings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/claim';const options = { method: 'POST', headers: { cookie: 'better-auth.session_token=<better-auth.session_token>', 'X-Onboarding-Claim': '<X-Onboarding-Claim>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://testperch.com/api/public/v1/onboardings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/claim \ --header 'X-Onboarding-Claim: <X-Onboarding-Claim>' \ --cookie better-auth.session_token=<better-auth.session_token>Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”Requires a real signed-in account session, X-Onboarding-Claim, and a matching Origin header. Claims ownership atomically and revokes every temporary browser session, handoff and claim proof. Preserves all workspace/project identities, keys, modes, configuration, mappings and results. Open setup_url to complete Stripe Checkout and activate the 14-day trial with $5 shared AI credit; claiming alone does not start a trial. Canceled or failed Checkout can resume on the same setup page. A guest cookie alone cannot claim. Human browser signup/login can instead use the separate HttpOnly continuation established by a browser handoff.
object
object
Example generated
{ "workspace": { "id": "example", "name": "example", "slug": "example" }, "setup_url": "example"}Invalid request. Secret values are never echoed.
object
object
object
Example
{ "error": { "code": "invalid_request" }}The request secret was already used with different names.
object
object
object
Example
{ "error": { "code": "invalid_request" }}Onboarding_closed: recovery is permanently unavailable; the request cannot recreate anything.
object
object
object
Example
{ "error": { "code": "invalid_request" }}JSON request body exceeds 4096 bytes.
object
object
object
Example
{ "error": { "code": "invalid_request" }}Credential or workspace rate limit exceeded.
object
object
object
Example
{ "error": { "code": "invalid_request" }}Headers
Section titled “Headers”Seconds before retrying.
Seconds before retrying.
Internal server error. Retry provisioning with the same saved request secret.
object
object
object
Example
{ "error": { "code": "invalid_request" }}