Create an additional Account for the authenticated admin (no new user)
/v1/auth/accountsCreates an additional Account (plus a Free subscription, owner membership, first Application, and seeded Development/Production environments) for the already-authenticated admin without creating a new user; guarded by UserJwtGuard and rate-limited to 10 per hour. Returns 201 with an access token already bound to the new Account's first Application and sets the admin refresh and session-marker cookies, so the SPA lands directly in the new Account. An SSO-only admin with no password is refused with 403 — but the intent is first parked and a set-password link emailed, giving them the same set-password path as a logged-out SSO user.
Request body
application/json
account_namestring Required Account name (the customer's billing tenant + identity directory). Slug is auto-derived.
application_namestring Required Name of the first Application inside the new Account. Slug is auto-derived.
Responses
application/json
data *CreateAccountResponseDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Returned object
curl -X POST "https://auth.canopy-io.com/v1/auth/accounts" \ -H "Content-Type: application/json" \ -d '{ "account_name": "string", "application_name": "string" }'
{ "data": { "access_token": "string", "token_type": "string", "expires_in": 0, "account": { "id": "string", "name": "string", "slug": "string" }, "application": { "id": "string", "name": "string", "slug": "string" }, "default_environment_slug": "string" } }
Tell us how we can improve this guide.