Create a team
Creates a new team owned by your credential’s user. Self-serve teams are created in the main tenant and the caller becomes the team owner.
/v1/teamsAuthorizationBearer token · headerrequiredBetter Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.
AuthorizationOAuth2 access token · headerrequiredOAuth 2.0 with explicit Spacefast capability scopes. Use the authorization-code flow for people and client credentials for machines.
teams:createapplication/jsonnamestringrequiredDisplay name for the new team.
slugstringOptional URL slug. If omitted, the server generates the lowest available slug.
Response for status 201
$schemastring<uri>Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
dataobjectrequiredShow propertiesHide properties
idstringrequiredThe team id (the Better Auth team id in the main tenant).
namestringrequiredThe team display name.
slugstringrequiredURL-safe team slug, unique per tenant.
rolestringrequiredRequesting member's role; member for non-session credentials.
owneradminmemberplanstringrequiredResolved plan code from the active subscription.
freegoplusgoldenterpriseinternalpartnerobject | nullrequiredPartner access for this team, or null when the team is not a partner.
Show propertiesHide properties
enabledAtstring<date-time>requiredThe instant this team became a partner.
nulldefaultDataLocationstringrequiredDefault placement region for new spaces; "auto" lets placement decide.
createdAtstring<date-time>requiredupdatedAtstring<date-time>requiredlogostring | nullrequiredOptional team logo URL.
metadatastring | nullrequiredOpaque team metadata stored by the client.
stripeCustomerIdstring | nullrequiredStripe customer id linked to this team; null until billing is initialized.
systemSpaceIdstring | nullrequiredThe space that supplies this team's page, theme, and presentation defaults.
manifestStatusobjectrequiredThe status of the restricted manifest from the team's system space.
Show propertiesHide properties
itemsobject[]requiredPer-key materialization status.
Show propertiesHide properties
objectkeystringrequiredThe manifest key this item materializes.
statestringrequiredWhere the last reconcile landed this key.
pendingactivefaileddetailstringHuman-readable reason, present when the state warrants one (typically failed).
sincestring<date-time>requiredWhen this key last CHANGED state — stable across no-op re-runs, so it reads as <state> since ….
challengestringSign this challenge with every new issuer key, using the supplied audience, then republish proofs. Existing active keys remain usable while rotation is pending.
audiencestringtokenIssuers only: the server-minted opaque audience for the issuer this key materialized. Not a secret — it rides in every partner token's aud claim and is verified server-side — and the partner needs it to sign the activation proof and to mint tokens, so it is served here rather than handed over out of band.
sourceVersionIdstring | nullrequiredThe system space's live version every item was converged from, or null when nothing is materialized.
presentationobject | nullrequiredThe presentation from the team's system space, or null when no value is active.
Show propertiesHide properties
namestringlogostringsupportUrlstringclaimOriginstringaccessHandoffOriginstringproblemDocsBaseUrlstringcontactsobjectNamed contact URLs or addresses shown to claimants and partners.
nullProblem details (RFC 9457). Any 4xx/5xx response is one application/problem+json document.
$schemastring<uri>Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
typestringrequiredProblem type URI resolving to the error docs page. The server derives it mechanically from code against the docs origin.
titlestringrequiredShort human-readable summary of the problem type. The server derives it mechanically from code.
statusintegerrequiredHTTP status code of this response, repeated in the body.
detailstringrequiredHuman-readable failure explanation for this occurrence.
codestringrequiredStable snake_case error code naming the failed public contract.
pointerstringRFC 6901 JSON Pointer into the failing request field, for example "/files/37/path", on validation failures.
detailsobjectMachine-readable context for the error code.
suggestionsstring[]Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.
nextstring[]Copy-pasteable commands or API requests an agent can run next.
requestIdstringrequiredThe request id to quote when contacting support.