Inbox sign-in
Agent identity for other apps: an agent signs in as its own inbox.
AI agent identity, the standard way: BillionSend is an OpenID Connect provider for inboxes. An app treats it like any other identity provider and learns which inbox it is talking to, never anything inside it. The inbox approves each sign-in with its own API key, so the agent needs no password and no browser storage.
Off for every inbox until a person turns it on, and only for a team that has been claimed.
curl -X POST "https://api.billionsend.com/inboxes/$INBOX_ID/identity/authorize" \ -H "Authorization: Bearer $BILLIONSEND_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "auth_token": "<from the waiting page>", "client_id": "https://app.example.com" }'curl -X PATCH "https://api.billionsend.com/inboxes/$INBOX_ID/identity" \ -H "Authorization: Bearer $BILLIONSEND_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "enabled": true, "allowed_clients": ["https://app.example.com"] }'// 200 the app continues with a one-time code, valid for a minute
- 10minutes an ID token and an access token last
- 60seconds a one-time code lasts
- 50sign-ins one inbox may approve in 24 hours
- 200sign-ins one team may approve in 24 hours
How it works
Agent identity as a standard sign-in the inbox approves.
The app does the first and last steps. The inbox does the middle one.
- 01
The app starts a sign-in
It sends the browser to the issuer with a standard authorization code request and PKCE. The issuer answers with a waiting page that holds an auth token.
- 02
The inbox approves with its key
The agent posts the auth token and the app's client id with its own API key. The app must be one the inbox is allowed to sign in to.
- 03
The app gets an ID token
The browser continues with a one-time code, and the app's server exchanges it for an ID token and an access token that name the inbox, not its mail.
For apps
What an app needs to know.
Point any OpenID Connect library at the issuer. There is nothing to register.
| Part | How it works | Detail |
|---|---|---|
| Flow | Authorization code with PKCE, public clients only. | S256 only; no client secret |
| client_id | An https address the app controls, with no port, query or fragment. | No registration |
| Scopes | openid is required; email and profile are optional. | No scope reaches the inbox's mail |
| Tokens | ES256-signed ID and access tokens, published keys at a JWKS address. | No refresh token |
| userinfo | Returns the same claims and checks the inbox live. | 401 once the inbox is off or deleted |
In your code
Key your accounts on sub.
The claims name an inbox and its owning team, never a person.
- subAn opaque id of the inbox, different for every app. A deleted and recreated address gets a new one.
- owner_subAn opaque id of the team that owns the inbox, the same for all its inboxes in your app. Use it to cap accounts per team.
- client_not_allowedThe inbox's allow-list does not name this app. Refusals are named: inbox_disabled, team_unclaimed, team_suspended, inbox_inactive.
- 429inbox_cap or team_cap: the inbox or its team approved as many sign-ins as it may in 24 hours.
- 409client_mismatch, already_used or expired: start the sign-in again.
{ "sub": "mQ3vK8dJ1xR7tY2nA5cH9eL0wZ4uB6pS1fG8iO3kT7a", "actor_type": "agent", "email": "research-helper@team-k3m9x2.billionsend.app", "email_verified": true, "preferred_username": "research-helper"}Where it fits
Use agent identity where an agent needs an account.
- 01
Apps built for agents
Accept an inbox as an agent identity and skip passwords, captchas and mailed sign-in links.
- 02
Agents that register for services
Use agent identity to sign in to an app that supports it as the same address every time.
- 03
Platforms that cap accounts
Use owner_sub to limit how many accounts one team can open in your app.
Before you ship
Plan for safety and limits.
SwitchA person turns it on
Signing in is off for every inbox. An inbox-scoped key can read the setting but never change it, and a team nobody has claimed cannot use it. No MCP tool turns it on.
ScopeIdentity, not access
An agent identity sign-in grants the app no access to the inbox's mail. userinfo checks the inbox live, but a session your app already started cannot be ended from here.
SafetyApprove only what you started
An auth token handed over in an email or a message signs someone else in as your inbox. Approve only a token read from your own browser session.
AuditEvery approval is recorded
Each approval shows in the inbox's activity, and the daily caps count from it.
FAQ
Questions, answered.
Something missing? Ask us at support@billionsend.com.
Keep exploring
Related pages.
- Receiving and AI agentsAgent inboxesA mailbox for an AI agent, with guardrails.

- Receiving and AI agentsAgent signupAn agent creates its own account, a person claims it.
- Receiving and AI agentsMCP serverLet Claude, Cursor and other agents use your account.

Learn moreInboxes docsAgent safety