Organization admins
Last updated: 2026-11-27T11:44:32-03:00 (UTC-3)
With organization_admins, the gateway runs in a multi-tenant mode: the org_admin console role administers exactly one organization and nothing outside it. Without the flag (the default, single-tenant), nothing changes: the role does not exist and administrators can do everything.
How to turn it on
Section titled “How to turn it on”features: organizations: true organization_management: true console_users: true granular_rbac: true team_scoped_console: true team_admin_console: true organization_admins: true # operator control, default false; requires PostgreSQLA global administrator creates an organization admin in Console users (role Organization admin, then the organization) or through the API:
POST /api/v1/admin/usersContent-Type: application/jsonX-CSRF-Token: <token>
{"name": "Acme admin", "role": "org_admin", "organization_id": "org_acme"}org_admin takes no team_ids: its teams are always every active team of its organization, read again on every request, so a team created, moved or deleted later is covered at once. Users can also be placed in an organization by a global administrator with organization_id on create or update; every team of such a user must belong to that organization.
Placement rules:
- Only team-scoped users (
user,team_viewer,team_admin) andorg_adminbelong to an organization.organization_idwith a global role answers400; changing a user to a global role drops its organization. - On update, omitting
organization_idkeeps the stored one, and"organization_id": ""clears it (also while the flag is off, so a single-tenant edit is never blocked by an earlier placement). - A user of an organization holds only that organization’s teams: manual and IdP-synced memberships are checked on every write (
403 organization_forbidden), an IdP sync drops a synced membership of another organization, and a SCIM group bound to another organization’s team gives nothing to a user of an organization. An organization admin gets its teams only from its organization, never from a SCIM group. - When its organization is deleted, a team-scoped user is gateway-wide again at its next edit.
- Moving a team to another organization is refused with
409 team_has_organization_memberswhile a member belongs to the team’s current organization; remove those memberships first. Gateway-wide users stay: they belong to the global administrator, and the new organization’s admin neither lists nor edits them. - A global administrator edits an organization admin without resending
organization_id, and can remove a user from its organization in the console editor (Remove from organization) or with"organization_id": "".
What an organization admin can do
Section titled “What an organization admin can do”Inside its own organization, an organization admin is a team administrator over every team, plus:
| Area | Routes | Rule |
|---|---|---|
| Teams | POST /api/v1/admin/teams, PUT/DELETE /api/v1/admin/teams/{id} |
Created teams always belong to its organization; organization_id may be omitted or its own. A team of another organization answers 404. |
| Users | GET /api/v1/admin/users, POST, PUT /api/v1/admin/users/{id}, DELETE /api/v1/admin/users/{id} |
It lists only the users of its organization. It creates and edits only user, team_viewer and team_admin users, in its organization’s teams; the users it creates belong to its organization. A user of another organization or a gateway-wide user answers 404. |
| Invitations | GET, POST /api/v1/admin/invitations, DELETE /api/v1/admin/invitations/{id} |
It lists and revokes only its organization’s invitations. An invitation it creates has a team-scoped role and only its organization’s teams, and the invited user joins its organization on acceptance (teams checked again then). With invitation_email it can send it by e-mail; the SMTP settings stay global. |
| Bulk import | POST /api/v1/admin/users/bulk |
The same rules per row; a row naming another organization’s team is invalid in the dry run. A reused idempotency_key never reads another organization’s rows. |
| JIT decisions | POST /api/v1/admin/users/{id}/approve, …/reject |
Only pending JIT users routed to its organization by its jit_email_domains; others answer 409 jit_not_pending. An approved user then needs teams, which it assigns with PUT /api/v1/admin/users/{id}. |
| User inventory and detail | GET /api/v1/admin/users/page, GET /api/v1/admin/users/{id}/detail |
Only its organization’s users (with identity_inventory and identity_details). |
| Keys, logs, analytics and the other team screens | the existing team-scoped routes | The team administrator rules, on its organization’s teams. |
| What was recorded in the organization | The read routes of usage, logs, traces, captures, evaluations, durable receipts, alerts and team or key detail | Everything recorded in its organization, read through the organization on each row: its teams’ rows, and what a team recorded there before it moved away (never what that team records since). ?team=<team> narrows to one team, also one that left (former_teams in GET /api/v1/admin/config lists them, and the console’s team selectors show them as “left on ?organization=<its organization> reads all of it on the usage routes; another organization’s ID answers 403 organization_forbidden. Reads only, with the permissions it already holds. See when a team moves. |
| Budgets | GET /api/v1/admin/quota-policies, PUT/DELETE /api/v1/admin/quota-policies/{id}, PUT/DELETE /api/v1/admin/rate-policies/{id} |
Quota policies (budget, TPM, TPD) and rate policies on its teams, managed keys and team-scoped users (and, with membership_budgets and quota_subject_lists, their memberships and subject lists of only its own subjects), within its tenant ceilings. See Budgets inside the organization. |
| Model aliases | GET /api/v1/admin/organizations/{id}/model-aliases, PUT/DELETE …/model-aliases/{alias} |
With organization_model_aliases: client names only its organization’s keys resolve. Another organization’s ID answers 404. See Organization aliases. |
| Manual release of unknown reservations | GET /api/v1/admin/quota-finance/unknown-reservations, POST …/release-unknown, GET …/manual-releases |
With quota_manual_release: it lists and releases by hand only reservations of its organization’s teams, with a written reason, and reads only its own trail. A reservation that also holds a ceiling set above the organization (a tenant ceiling, a global or provider budget in force, a group, a subject list or an account) is the global administrator’s to release. Another organization’s reservation answers 409 reservation_not_unknown, as one that does not exist. |
| Audit | GET /api/v1/admin/audit |
Only events recorded for its organization: identity events store the organization of their target (team, user, key or membership) when they are written, so the view does not follow a team or a user that changes organization later. Control-plane events appear only when they were recorded for it (migration 177): quota and rate policy writes on its subjects (its own or the global administrator’s), its tenant ceilings and its model aliases. |
Every write checks the organization of the target as stored, inside the same database transaction, never an organization ID taken from the request. A request that names another organization (organization_id on a team or user) is refused with 403 organization_forbidden; it is never followed.
Tenant ceilings
Section titled “Tenant ceilings”A global administrator bounds the whole organization, on every request of every key of its teams:
| Ceiling | Where it is set |
|---|---|
| Models | allowed_models of the organization. |
| Budget, TPM, TPD | A quota policy with subject: tenant and the organization ID. |
| Requests per minute | A rate policy with subject: tenant and the organization ID. |
Teams and keys inside the organization are enforced within those ceilings: their own policies apply on top, never instead. The organization admin reads them in My organization (console) or GET /api/v1/admin/organization, which returns its organization, its ceilings (read_only: true) and its teams; every write to a ceiling answers 403.
Budgets inside the organization
Section titled “Budgets inside the organization”An organization admin manages the budgets of its organization with the global administrator’s routes and editors (console: My organization → Budgets and Rate limits). It needs quota_management for quota policies and rate_policy_management for rate policies, like the global administrator.
| It may write | It may not write (403 organization_forbidden) |
|---|---|
Quota policies with subject: team, key (a managed key) or user (a team-scoped user of its organization, not an organization admin) |
A tenant ceiling, a global, provider, model, project, organization, end_user or group policy, a per-child template, a YAML policy |
Rate policies with subject: team, key, key_model or end_user (of its teams) |
A tenant or model rate policy, a YAML policy |
Rules, checked in the store transaction on the subject as stored:
- The subject must belong to its organization before the write (when the policy exists) and after it. Moving a policy’s subject to another organization’s team, or taking over the ID of another organization’s policy, is refused; an unknown subject answers the same
403, so the answer does not reveal other organizations’ team, key or user IDs. Policy IDs are gateway-wide: an ID another organization already uses answers403too, so prefix yours (for example with your organization’s name). - A policy it writes never allows more than an enabled tenant ceiling of its organization (
422 exceeds_tenant_ceiling): TPM and TPD at most the tenant’s; a budget, plus its temporary increase, at most a tenant budget of the same or a longer period (a daily team budget is compared with a monthly tenant budget; a yearly one is not). Rate policies admit at most the tenant’s requests per minute (a request-window policy counts its requests per window as a per-minute rate). A disabled policy limits nothing and is not compared. - The tenant counter still caps every request: a team policy larger than the tenant (for example one the global administrator set) never lifts it.
- It lists (
GET /api/v1/admin/quota-policies, and thebudgetsofGET /api/v1/admin/organization) only the policies whose subject belongs to its organization now, never the gateway’s prices, settings or connections. - A team moved out later. When the global administrator moves a team to another organization, its policies stay and keep applying. The old organization’s admin no longer lists or edits them; the new organization’s admin may, and the global administrator always can.
- The global administrator is not bound by tenant ceilings when it writes.
Isolation between organizations
Section titled “Isolation between organizations”In multi-tenant mode an organization is a tenant. Apart from the limits listed after the table, its organization admin, its team users and its keys never read, count, export, search or change another organization’s data, and never reach it through a cache:
| Data | What another organization gets |
|---|---|
| Request logs, log export, request detail and journey, sessions, analytics, valuation, savings and durable usage | Only its own teams’ rows, filtered before every count, total and page, whether the view reads PostgreSQL or the analytics store. A team that moved from one organization to another is split by the organization each request ran in: neither organization reads or counts the other’s side (when a team moves) |
| Traces and spans | Only its own spans, also for a W3C trace both organizations share and for spans read from the analytics store copy |
| Evaluations: datasets, runs, scores, captures, rules and their jobs, annotation queues, comments and mentions | Only its own teams’. When both organizations send the same request ID, each keeps its own capture, and a rule only ever judges its own team’s (evals) |
| Prompts, skills, vector stores, files, batches, containers, fine-tuning jobs, stored responses and conversations, customers, budgets, audit and the recycle bin | Only its own. A team or organization admin shares a vector store only inside its organization |
| Chat answer cache and exact cache | A cached answer is served only inside the team, or inside the organization with share: organization |
previous_response_id on /v1/responses and /v1/responses/input_tokens, with responses_lifecycle on |
Only the key’s own signed IDs; a raw provider ID answers 404 (capabilities) |
| Other state held at the provider under its own ID | Refused before the provider with 422 provider_state_not_isolated and the setting that fixes it: a raw previous_response_id without responses_lifecycle, a raw conversation without conversations, a container ID in Responses tools or input without containers, an item reference input (typed or not) or a reasoning item sent by ID without its encrypted_content, a provider file the request makes the provider read (a Responses input_file or input_image file_id, also inside a tool call output, a Chat Completions file part’s file_id, a Messages file source or container_upload, a Gemini fileData.fileUri in the contents, the system instruction or a function response), an Anthropic Messages container ID, a Gemini cachedContent, and, on passthrough actions with a Responses, Messages, Chat or Gemini usage profile, a subpath, a body naming such state or a body the gateway cannot read. File IDs a client only replays (citations and annotations in earlier output, code-execution results) stay accepted. Stored provider prompts (prompt.id) and provider vector stores (file_search) are created by the global administrator in the shared account, not by organizations, and stay usable |
| A2A agents shared by several organizations | Only its own tasks and contexts: another team’s task, or a task ID the gateway never handed to the team, answers 404 (JSON-RPC -32001) before the agent, and ListTasks shows only the team’s tasks, without totalSize (A2A agents) |
Another organization’s team, user, key, request, trace, capture, store or other object answers like one that does not exist: usually 404, and 400 team_not_found when named as a vector store’s shared team.
What stays shared, on purpose, because it belongs to the global administrator and makes no sense per organization: providers and their credentials, models, gateway-wide aliases, routing, guardrails, MCP servers, A2A agents, flags, plans, log destinations, retention, alert channels and the /metrics endpoint. Team-scoped sessions see only what they use of these (the models their keys may call, for instance), never a secret, and a few infrastructure status views (log destination delivery counters, span store and analytics store status) count every organization’s traffic together.
To keep the guarantee:
- Turn on
responses_lifecycle,conversationsandcontainerswith the Responses API. Without them, a request that continues stored state is refused in multi-tenant mode, since the gateway could not tell whose state the provider’s ID names. - Do not set
share: allwithchat_cache_cross_tenantunless every organization trusts the others: it serves one organization’s cached answers to all of them. - Mind passthrough actions without a usage profile. Their bodies are opaque to the gateway; an action the global administrator configures to address stored provider objects reaches them with the provider’s own IDs.
- Prefix the IDs you choose. Prompt, policy, score, skill-submission, MCP-submission and extension-submission IDs are unique across the gateway: an ID another organization already uses is refused (
404,403or409), so prefix yours with the organization’s name. Let the gateway generate request IDs, or prefix your own.
What stays with the global administrator
Section titled “What stays with the global administrator”- Creating, renaming and deleting organizations, and their ceilings: allowed models, plan ceilings, budgets and rate limits.
- Moving a team between organizations.
- Gateway-wide settings: flags, providers and shared provider credentials, models and gateway-wide aliases, routing, guardrails, SSO, SCIM, invitations, custom roles, audit export.
- Creating or changing an organization admin and any global role.
Limits on the organization admin
Section titled “Limits on the organization admin”- It never grants more than it holds: only team-scoped roles, never
org_admin,admin,vieweroroperator. - It cannot edit or disable its own user (
403 own_role). - No route makes it a global administrator. Routes outside the table above are denied (
403 role_forbidden), as for every role (default deny). - It takes no custom role: binding one answers
400, and a YAML binding makes its session invalid (fail closed). - Native MFA names it
org_admin:admin.local_mfa.required_rolesmay listorg_admin, at sign-in and on every request alike. A policy that lists onlyteam_admindoes not cover organization admins; list both. - The invitations it issued are accepted only while it is still an active organization admin of that organization and the mode is on; disabling or demoting it, or turning the flag off, makes them invalid.
- It never invites
org_admin(400); a global administrator creates organization admins directly. - In the user inventory it sees neither itself nor other organization admins; a global administrator sees them with the role
org_admin. - A user detail shows only that user’s usage on the organization’s teams, never its history elsewhere.
- When the flag is turned off, or the organization is deleted, its sessions stop at the next request, and the customer credentials it issued stop working (they are revoked, as when a team administrator is demoted).
Limits
Section titled “Limits”- An organization admin writes no per-child quota template and no budget on YAML keys (keys declared in YAML belong to the operator); it budgets its managed keys.
- A global administrator may also place a single invitation in an organization with
organization_id; bulk rows take none. - Events written before migration 175 carry no organization; for them the audit view still matches the target’s current organization.
Upgrade
Section titled “Upgrade”Since T192, in multi-tenant mode:
- a team or organization admin can no longer add another organization’s team to a vector store’s sharing (teams already in the list, for example shared by a global administrator, may stay);
- a raw
previous_response_idanswers404whenresponses_lifecycleis on, so a provider whose responses the gateway cannot sign (no"object": "response") cannot be continued; withresponses_lifecycleoff it, a rawconversationwithoutconversations, container IDs withoutcontainers,item_referenceinputs, Anthropic MessagescontainerIDs and passthrough Responses or Messages subpaths and state-naming bodies answer422 provider_state_not_isolated, naming the setting that fixes it; - A2A tasks created before the upgrade are not bound to a team and answer
404until the team starts new ones; - the durable usage view’s background responses count only the reader’s team, and the GitOps dry run hides rate policies, the digest and the control version from team-scoped sessions.
In both modes, each team keeps its own evaluation capture of a request ID and a rule judges only its own team’s. Migration 199 re-keys captures by team and request ID (existing captures keep their team and stay readable) and redacts the comment of each older judge score whose job had read another team’s capture: the value stays, the comment becomes a fixed marker, redacted_reason is judged_another_team_capture, and every redaction plus the total is in the audit (eval.score_redact, eval.capture_remediation by system:migration-199). A score whose capture or job had already expired cannot be told apart and is left as it was. Migration 200 adds the A2A task ownership table. Migration 199 also renames the capture table, so an older replica still running during the upgrade stops capturing, judging, reviewing and erasing captures (it logs errors such as capture_store_failed) rather than read a capture by request ID alone, which could now be another team’s; end-user erasures it fails are run again by an upgraded replica. Upgrade every replica promptly. Nothing else changes in single-tenant mode.
Migration 177 adds the nullable organization_id to control-plane audit rows; older rows keep NULL and stay out of organization admins’ audit views. Migration 178 adds the organization model aliases table (Organization aliases). Both are additive.
Migration 174 adds organization_id and organization_admin to console users and adds the organization admins’ teams to the effective-membership view. Migration 175 then:
- confines the view: a user of an organization counts only that organization’s teams, an organization admin only the teams of its organization (not when disabled, not deleted teams), with no per-row probes;
- clears
organization_idfrom users with a global role and adds a check that keeps it on team-scoped users; - allows
org_adminas a native MFA subject; - adds the recorded organization to identity audit events (a trigger fills it on insert);
- removes, audited as
membership.idp_removebysystem:migration-175, IdP-synced memberships held by a role the sync never manages (team administrators and global roles), which would otherwise administer the team.
Rollback. The view lives in the database: an older binary sees an organization admin as a team administrator of every team of its organization, with no flag and no deleted-organization check. Before rolling back, disable every org_admin user or change its role, then remove organization_admins from YAML.
Admin API routes
Section titled “Admin API routes”Every route below needs a console session or an admin Bearer token, the role’s permission and, for writes, the X-CSRF-Token header; the full contract is in the API reference.
| Route | What it does |
|---|---|
POST /api/v1/admin/users/{id}/enable |
Enables a disabled console user again |