Roles
Every user in a tenant has exactly one role:| Role | Can do |
|---|---|
| Developer | View their own usage, sessions, and budget on MY LANE; request budget increases |
| Manager | Everything a developer can, plus: approve/deny budget requests, create/edit policies and virtual keys, create teams, invite members, assign a member’s team |
| Admin | Everything a manager can, plus: change a member’s role, remove a member, and manage billing |
admin, for example), while day-to-day team reassignment stays a manager-level action.
The team model
A team is a named cost center with an optional monthlybudgetPoolUsd — a reporting target LEDGER tracks utilization against (shown as POOL $X · N% CONSUMED), not a gateway-enforced limit. Enforcement happens at the per-key and per-user budget level; the pool is a planning figure. Teams themselves are created and managed through the team API — there’s no dedicated teams panel in the Console today; a manager assigns each existing member to a team from the Members panel. Deleting a team unassigns its members and keys rather than deleting them.
A user has one home team (users.team_id, nullable — “Unassigned” is a valid state). A manager sets it per-member from the Members panel:
Console → Team & roles → Members — the Team column on each row.
Key → team cost-attribution rule
Spend doesn’t post to a person — it posts to a virtual key, and every key has its own, independent team assignment (virtual_keys.team_id). Owner and cost center are deliberately separate concepts:
- Owner (
user_id) — who the key is attributed to in analytics; who can see it as “their” key on MY LANE. - Team (
team_id) — which team’s budget pool and LEDGER row the key’s spend rolls up into.
Where this shows up
- LEDGER — the cost-allocation table groups every key’s spend by its resolved team, with an “Unassigned” row for keys with no resolvable team. Click a team row to drill into its per-key breakdown.
- Overview — the team allocation card is the same rollup, condensed to a bar list for the org-wide summary.
- Console → Team & roles — where roles, invites, and per-member team assignment are managed.
- Outcomes scoring — cost/session, one of the scoring diagnostics, is read off the same session-grouped spend that feeds LEDGER.
Managing teams via the API
POST /v1/team/teams · GET /v1/team/teams · GET /v1/team/members · PATCH /v1/team/members/:userId/team · PATCH /v1/team/members/:userId/role.
A key’s own team is set at creation or updated afterward via the key-management endpoints — see Virtual Keys.