1. Docs
  2. API Reference
  3. Create an additional Account for the authenticated admin (no new user)

Create an additional Account for the authenticated admin (no new user)

POST/v1/auth/accounts

Creates 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

  • dataCreateAccountResponseDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Returned object

Request
curl -X POST "https://auth.canopy-io.com/v1/auth/accounts" \
  -H "Content-Type: application/json" \
  -d '{
    "account_name": "string",
    "application_name": "string"
  }'
Response
{
  "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"
  }
}
Related endpoints
POSTRegister a new user
GETReview the parked account-creation intent before resuming
POSTResume a deferred account creation parked at the register form
DELETEDismiss the parked account-creation intent without creating anything
POSTLook up invite details by token
POSTAccept an invite
POSTAuthenticate and receive tokens
POSTSelect an Account from a pre-auth session (multi-Account login)
POSTSwitch the active Application in an authenticated session
POSTRefresh access token
POSTLogout and revoke tokens
GETVerify email address
POSTResend verification email
POSTResend verification email by token
POSTRequest password reset
POSTReset password with token
POSTChange password (authenticated)
GETGet current user profile
GETGet current user avatar image
POSTUpload profile avatar
DELETERemove profile avatar
POSTRequest an email-address change
POSTConfirm an email-address change
GETGet current user permissions
GETList the Accounts the current user belongs to
GETList active sessions
DELETERevoke all sessions
DELETERevoke a specific session
Was this page helpful?

Tell us how we can improve this guide.