This guide covers identity delegation. Wallet delegation for Web3 use cases is planned; an identity binding does not grant wallet signing or spending authority.
Before you start
For the partner-managed API route shown below, prepare:- A Partner ID and a partner login key with a published JWKS endpoint. See SDK authentication.
- AIR Kit installed in your frontend, with users signing in through
login. - A defined consent journey. For the in-app partner binding route below, your product shows the user the agent and its requested scopes before calling the API. See Ask for consent before binding.
- Agent keys enabled for your partner account. Otherwise, AIR API calls return
403 AGENT_KEYS_DISABLED. Contact the AIR team to enable them and confirm environment access.
How the flow fits together
1. Delegate to the agent identity
Through the AIR app
The standard user journey is to approve the agent through the AIR app. The user chooses the agent they want to connect and approves identity access. The agent integration then uses the resulting supported identity binding. AIR app link: coming soon. Contact the AIR team for this connection flow.Within your application
For a more integrated user experience, you can request access to the partner-managed delegation route. Your application owns the approval screen and binds the agent only after the user consents. The following examples document that route.1
Get the user's approval and AIR Kit session
After the user signs in and approves the agent on your consent screen, get their partner access token in the frontend. Send it to your backend over your authenticated channel, along with the scopes they approved.The token identifies the user. Everything else in this guide runs on your backend.
2
Bind the agent once
From your backend, call Bind an agent with the user’s session and a freshly signed partner JWT. Request only the scopes the user approved.The response is Add
201 and includes agentApiKey. AIR adds openid to the scope.commerce.checkout only if the user approved the agent starting merchant checkouts. Scopes are fixed at bind time; to add one later, get approval, bind a new key, and revoke the old one.2. Verify the user’s credentials
After delegation, the agent authenticates with its own bound key. Its backend creates a short-lived session and runs the verification program agreed with the receiving service. That program determines the accepted issuers, conditions, and disclosure. Listing credentials is optional when you already know which program to run. It can help the agent discover which evidence is available; only the verification result establishes whether the selected program is satisfied.1
Create a session for each operation
Exchange the API key for a short-lived agent JWT with Create an agent session. Request a subset of the bound scopes, or omit The JWT expires after 15 minutes and has no refresh token. Create a new session when it expires.
scope to receive all of them.2
List the user's credentials
With When
credentials.read, call List credentials on the Credential API. Filter by schemaId, issuerDid, or vct (each repeatable), and page with limit (1–100) and cursor.hasMore is true, pass nextCursor as cursor to get the next page.3
Verify a credential
With
credentials.verify, call Verify a credential with a verification program ID. This endpoint accepts agent JWTs only.statusisCompliant,Non-Compliant, orNotFound.verifiablePresentationis present only whenCompliant.fieldsToDisclosecan be omitted,"*", or a list such as["birthday", "documentType"]. What each option returns depends on the credential format; see the endpoint reference.- For SD-JWT programs, pass a
nonceto bind the presentation to your challenge. It is required when the credential was issued withcnf.jwk.
502 CREDENTIAL_STORAGE_UNAVAILABLE means storage was unavailable, not that the user lacks the credential.Merchant checkout handoff
An existing checkout session can carry the user’s AIR Account identity to a supported merchant when the user has approvedcommerce.checkout. It is a merchant-scoped token, not wallet delegation. Checkout and payment follow their own integration and approvals.
Manage bound agents
All key routes needx-partner-id and the user’s x-partner-access-token. Routes that change a key’s access also need x-partner-jwt.
Each user can have a limited number of agent keys. Binding past the limit returns
409 CONFLICT_REQUEST.
Use a public key instead of an API key
If the agent holds its own P-256 key pair, sendpublicKey (PEM or base64 DER) at bind. The agent can then create sessions with a signedMessage in the body instead of the x-agent-api-key header. Send exactly one of the two.
signedMessage.
Security checklist
- Keep
agentApiKey, the partner login key, andx-partner-jwton your backend. - Request only the scopes the agent’s task needs. Sessions can narrow them further.
- Create a session per operation, and don’t cache agent JWTs beyond their 15-minute lifetime.
- Rotate a key if it may have leaked. When the user disconnects the agent, rotate and then revoke the key so sessions already issued end too.
- Send checkout JWTs only to the merchant named in their
aud.