🎬 New — watch the 2-minute guide videos →

Teams & workspaces

A BharatRouter account can belong to several orgs. When you sign up you get a personal org; you can also create or join team orgs that share one prepaid balance, one set of keys, and one ledger. Inside an org, workspaces group keys and usage by environment or team.

Orgs & switching

EndpointWhat it does
GET /me/orgsOrgs you belong to, with your role and member count (the switcher list).
POST /me/orgsCreate a team org — you become its owner. Up to 10 team orgs per user.
POST /me/orgs/switchSwitch the active org and re-sign your session.

Your personal org is single-user — create a team org to add people. The ₹100 signup credit is per person, not per org, so new team orgs start at ₹0.

Members & roles

You add members by email. An invitation is created and a notification email is sent; membership is established when the invitee accepts (matched on their OAuth-verified email). Roles:

RoleCan
ownerEverything, including billing, member roles, and deleting the org. At least one owner always exists — the last owner can't be demoted or removed.
adminManage keys, BYOK, routing, workspaces, and invite members — but can't remove owners.
memberUse keys and read org data; star and fork collections.
EndpointWhat it does
GET /me/membersMembers of the active org plus pending invites.
POST /me/membersInvite by email + role (owner/admin). Up to 50 members + pending per org.
PATCH /me/members/:idChange a member's role (owner).
DELETE /me/members/:idRemove a member, or leave the org yourself (owner/admin to remove others).
DELETE /me/members/pending/:idWithdraw a pending invite (owner/admin).

Accepting an invite

EndpointWhat it does
GET /me/invitationsYour pending invitations (matched to your sign-in email).
POST /me/invitations/:id/acceptJoin the org.
POST /me/invitations/:id/declineDecline.

Workspaces

A workspace is a grouping of keys and usage within one org — staging vs production, or per-team — while the org keeps the single wallet and legal identity. Every org has a Default workspace that always exists and can't be archived; keys you don't assign elsewhere live there. Assign a key to another workspace when you create it. Archiving a workspace is a soft delete — an organizational boundary, not a kill switch, so its keys keep working.

EndpointWhat it does
GET /me/workspacesActive workspaces with their active-key counts.
POST /me/workspacesCreate one (owner/admin). Up to 20 per org.
PATCH /me/workspaces/:idRename, set a monthly ₹ budget, or edit the description (owner/admin).
DELETE /me/workspaces/:idArchive (keys keep working) (owner/admin).

Workspace budgets

A workspace can carry a monthly ₹ budget — a spend cap, drawn on the org's single wallet, across every key in that workspace. It's enforced: once the workspace's spend for the IST calendar month reaches the cap, requests on its keys are rejected with 429 budget_exceeded until the next month or until you raise the cap. Set or clear it via PATCH (owner/admin); 0 or null removes the cap.

PATCH /me/workspaces/:id
{ "monthly_budget_inr": 5000 }        // 0 or null clears the cap
→ { "workspace": { "id": 4, "name": "staging", "monthly_budget_uinr": 5000000000 } }

This is the workspace-level companion to a per-key monthly budget: a key's own budget caps that one key, while the workspace budget caps the whole workspace. Either limit can trip first; both return 429 budget_exceeded and reset on the IST month boundary. GET /me/workspaces returns each workspace's cap (monthly_budget_uinr) and its spend so far this month (spent_month_uinr), both in micro-rupees (₹ × 10⁶).