Billing getSubscription
Get current subscription status for the authenticated user.
Responses
Successful response
subscriptionIdrequiredtierrequiredstatusrequiredcurrentPeriodEndrequiredusageThisMonthnumber · requiredusageLimitrequiredbillingCycleStartrequiredeverPaidboolean · requiredEver made a real Stripe payment (top-up or paid plan) — lifetime full model catalog.
intervalrequiredHow the active subscription is billed; null for free/none. Plan changes must stay on this interval, so the pricing toggle follows it.
endsAtrequiredA free time-boxed grant (e.g. a claim-link trial) ends here; null when the plan renews or is open-ended.
cancelsAtrequiredThe paid subscription is scheduled to cancel here (Stripe cancel_at); null when it renews.
welcomeTrialEndsAtrequiredWelcome-gift trial (full catalog) ends here; null when no gift was claimed.
Billing createSubscription
Create a new subscription.
Request Body
tierrequiredintervalrequired
couponCodestringOptional Stripe promotion code (customer-facing, e.g. "LAUNCH100") to pre-apply at checkout.
currencyCheckout currency; default usd. huf = the Hungarian pricing page.
Responses
Successful response
successboolean · required
subscriptionIdstringclientSecretstringcheckoutUrlstringmessagestring
Billing updateSubscription
Update subscription tier (upgrade/downgrade).
Request Body
newTierrequired
intervalcouponCodestringOptional promo code — only applied when upgrading from a free tier to a first paid plan.
currencyCheckout currency when coming from a free/local plan; a live subscription keeps its own.
Responses
Successful response
successboolean · required
subscriptionIdstringclientSecretstringcheckoutUrlstringmessagestring
Billing syncAppleTransaction
Verify a signed StoreKit transaction and apply it to the account (iOS in-app purchase).
Responses
Successful response
subscriptionIdrequiredtierrequiredstatusrequiredcurrentPeriodEndrequiredusageThisMonthnumber · requiredusageLimitrequiredbillingCycleStartrequiredeverPaidboolean · requiredEver made a real Stripe payment (top-up or paid plan) — lifetime full model catalog.
intervalrequiredHow the active subscription is billed; null for free/none. Plan changes must stay on this interval, so the pricing toggle follows it.
endsAtrequiredA free time-boxed grant (e.g. a claim-link trial) ends here; null when the plan renews or is open-ended.
cancelsAtrequiredThe paid subscription is scheduled to cancel here (Stripe cancel_at); null when it renews.
welcomeTrialEndsAtrequiredWelcome-gift trial (full catalog) ends here; null when no gift was claimed.
Billing getUsageStatus
Get usage status: balances, monthly plan usage, and anchored session/weekly rate-limit windows. Pass projectId to see the pool that funds work in that project (a team's, if it is a team project).
Responses
Successful response
totalBalancenumber · requiredmanualBalancenumber · requiredsubscriptionBalancenumber · requiredtierrequiredhasActivePaidSubscriptionboolean · requiredallowExtraSpendboolean · requiredcreditLimitnumber · requiredmonthlyTopUprequiredpercentUsednumber · requiredusageThisMonthnumber · requiredbillingCycleStartrequiredsessionrequiredweeklyrequired
fundedByTeamOwnerIdstringSet when this is a TEAM's pool, not the user's own: the paying team's owner id. Undefined = the user's own account funds work here.
Billing getTeams
List every team the authenticated user belongs to, as owner or member.
Responses
Successful response
ownerIdstring · requiredThe team is addressed by its funding owner on this API.
organizationIdstring · requiredThe organization row behind it (better-auth organization plugin / SSO).
ownerEmailstring · requiredisOwnerboolean · requiredmyRolerequiredRole of a user within a team (IAM). owner: billing + full control; admin: manage members; member: belongs only.
canManageboolean · requiredactiveboolean · requiredpromoBoostboolean · requiredmembersobject[] · requiredinvitesobject[] · required
ownerNamestringownerOnlinebooleanownerTagsstring[]The owner's team tags (members carry theirs on
members).namestringOrganization display name.
logostringThe company logo (https image URL): every team workspace without its own icon or logo shows it.
tierThe owner's subscriptionTier: tells a free team from a paid/legacy one (with
activefor dormant).maxSeatsnumberTotal seats including the owner; undefined = no cap (paid plans: each person's machine is charged from the credit).
welcomeTrialEndsAtnumberThe owner's welcome-gift trial (full catalog for the whole team) ends here.
guestsobject[]People outside the team with access to its projects — managers only.
requestsobject[]Coworkers at the company domain asking to join — managers only.
joinDomainstringEmail domain that auto-joins this team on signup/sign-in; undefined = off.
eligibleDomainstringDomain the owner is eligible to enable (their own, when not a public mail provider).
spendLimitobjectA team member's cap on the team credit, in % of the owner's monthly credit so it scales with the plan. Unset field = no cap on that period;
{}= no limit.poolCreditsnumberThe owner's monthly credit the limit percentages are taken of; undefined = no plan credit.
providerPolicyobjectteamProjectIdsstring[]The team's shared projects: every member holds write access, and work inside one of them is billed to THIS team's pool. Empty = not set up yet. Optional until the multi-team backend lands.
teamLandingProjectIdstringThe team project a new member lands in on join (their
/). One of teamProjectIds; managers may re-point it. Unset when the team has none.
teamProjectIdstring · deprecated · required
Billing addTeamMember
Invite someone to the team by email — emails a join link they must accept.
Request Body
emailstring · required
roleownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +7 more |
Billing requestCompanyTeam
Billing approveTeamJoinRequest
Billing declineTeamJoinRequest
Billing revokeTeamInvite
Billing setTeamProject
Attach/detach one of the owner's projects as a shared team project (owner/admin). Members get write access and work there is billed to the team pool.
Request Body
projectIdstring · requiredProject to attach/detach — must be owned by the team owner. Required: a team may hold several projects, so there is no "the" one to infer.
isTeamProjectboolean · requiredtrue = shared team project (members get write access, spend draws the pool).
ownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +7 more |
Billing setTeamLandingProject
Pick which team project new members land in on join (owner/admin). Must already be a team project.
Request Body
projectIdstring · requiredMust already be one of the team's projects.
ownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +7 more |
Billing setTeamJoinDomain
Enable/disable auto-join for everyone on the owner's company email domain (owner only).
Request Body
enabledboolean · requiredtrue = auto-join on the owner's verified email domain, false = off.
ownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +7 more |
Billing setTeamProviderPolicy
Restrict which model providers the team's projects use: any, EU by default, EU only; optionally zero-data-retention only (team owner only, Team/Scale).
Request Body
moderequiredany = no restriction; eu_default = new chats start on an EU provider, members may switch per chat; eu_only = EU providers only, enforced at dispatch.
zdrOnlyboolean · required
ownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +7 more |
Billing renameTeam
Rename the team, e.g. to the company name (owner or admin).
Request Body
namestring · minLength: 1 · maxLength: 60 · required
ownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +7 more |
Billing setTeamLogo
Set or remove the company logo shown on the team's workspaces (owner or admin).
Request Body
logostring · maxLength: 2048 · requiredhttps image URL; '' removes it.
ownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +7 more |
Billing previewTeamInvite
Preview an invite before signing in. Non-consuming.
path Parameters
tokenstring · required
Responses
Successful response
ownerEmailstring · requiredMasked (
j***@acme.com) — a forwarded link must not leak the owner's address.emailstring · requiredFull invited address — the invite email already contains it, and the sign-in form prefills from it.
rolerequiredRole of a user within a team (IAM). owner: billing + full control; admin: manage members; member: belongs only.
teamNamestring · required
Billing acceptTeamInvite
Billing setTeamMemberRole
Promote/demote a team member between admin and member (owner only).
path Parameters
memberIdstring · required
Request Body
memberIdstring · requiredrolerequiredRole of a user within a team (IAM). owner: billing + full control; admin: manage members; member: belongs only.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +7 more |
Billing setTeamMemberTags
Replace a team member's tags (owner or admin; the owner can be tagged too). A board group shared with a tag is visible to everyone carrying it.
path Parameters
memberIdstring · required
Request Body
memberIdstring · requiredtagsstring[] · requiredThe full list;
[]removes them all.
ownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +7 more |
Billing setTeamSpendLimit
Team owner only: cap a member's spend of the team credit (daily and/or monthly % of the monthly credit). Without memberId it sets the default for every member without their own; limit null = back to the default, {} = no limit. A member at their cap is out of credit in the team's projects.
Request Body
limitrequired
memberIdstringownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +7 more |
Billing removeTeamGuest
Owner/admin: take someone outside the team out of every team project and off every team machine shared with them.
path Parameters
guestIdstring · required
Request Body
guestIdstring · required
ownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +7 more |