Admin API.

The routes under /admin/v1/ that administrators call, with a second factor, to inspect and revoke users, sessions, and agents.

On this page
  1. Agents
  2. Alerts
  3. Overview
  4. Events
  5. Me
  6. Meta
  7. Signup
  8. Users
  9. Sessions
  10. Schemas

18 routes, from the server's OpenAPI document. Every refusal is an RFC 9457 problem; the codes are in the error catalog.

Agents

GET /admin/v1/agents

List agents

Lists agents ordered by ID.

Auth
A session token, as Authorization: Bearer
ParameterInTypeDescription
ownerqueryAdminIDOnly agents this user owns.
unclaimedquerybooleantrue for only agents that signed themselves up and that no human has claimed. Don't combine it with owner.
disabledquerybooleantrue for disabled agents only, claimed or not.
cursorquerystringnext_cursor from the previous page.
limitqueryintegerItems per page. From 1 to 200. Default: 50.
StatusMeaningBody
200A page of agents.AdminAgentList
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

GET /admin/v1/agents/{agent}

Get an agent

Returns the agent and its stored sessions. An unclaimed agent's signup sessions belong to no user and aren't listed.

Auth
A session token, as Authorization: Bearer
ParameterInTypeDescription
agentrequiredpathAdminID
StatusMeaningBody
200The agent and its sessions.AdminAgentBody
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
404not_found: the user, session, or agent doesn't exist.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

POST /admin/v1/agents/{agent}/revoke

Revoke an agent

Disables the agent, so no new sessions can be delegated to it, and revokes its sessions and every session delegated from them. Needs a human session that authenticated within the freshness window (10 minutes by default); agents always get human_required. The change is rate-limited per administrator and recorded in the audit log with the administrator as the actor.

Auth
A session token, as Authorization: Bearer
ParameterInTypeDescription
agentrequiredpathAdminID
StatusMeaningBody
200The agent after the revocation.AdminAgentBody
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
404not_found: the user, session, or agent doesn't exist.AdminError
429throttled: too many changes.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

Alerts

GET /admin/v1/alerts

List alerts

Derives alerts, newest first: token reuse, leaked tokens, suspected passkey clones, TOTP locks, bursts of failed attempts from one client or against one user, signup spikes, a full signup quota, and unclaimed agents close to their claim deadline. Alerts are computed on each request and aren't stored.

Auth
A session token, as Authorization: Bearer
ParameterInTypeDescription
sincequerystring (date-time)Scan back to this time, at most 30 days ago by default. The default is 24 hours ago.
StatusMeaningBody
200Alerts since the given time.AdminAlertList
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

Overview

Totals and the audit chain status.

GET /admin/v1/audit/chain

Get the audit chain status

The result of the last full verification of the audit log's hash chain, against the trusted checkpoints the application passes to authadmin.WithChainCheck. When the last check is older than the interval set there, 5 minutes by default, the server starts a new one in the background and still answers with the last. Only the first request waits for a check. Events that are not yet sealed into the chain are not covered; unsealed counts them.

Auth
A session token, as Authorization: Bearer
StatusMeaningBody
200The last check.AdminChainStatus
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

GET /admin/v1/stats

Count users, sessions, agents, and events

Totals for an overview. Counting reads every row, so poll it no more than once a minute.

Auth
A session token, as Authorization: Bearer
StatusMeaningBody
200The totals.AdminStats
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

Events

GET /admin/v1/events

List audit events

Pages through the audit log, newest first by default. Events written in concurrent transactions can commit out of seq order, so use seq for display and paging, not for exactly-once processing.

Auth
A session token, as Authorization: Bearer
ParameterInTypeDescription
userqueryAdminIDOnly events about this user.
agentqueryAdminIDOnly events about this agent.
actorqueryAdminIDOnly changes this user made on someone else's behalf.
kindqueryarray of stringOnly these event kinds. Repeat the parameter or separate kinds with commas; at most 32.
orderquery"asc" or "desc"desc for newest first, the default, or asc. A cursor carries its order.
cursorquerystringnext_cursor from the previous page.
limitqueryintegerItems per page. From 1 to 200. Default: 50.
StatusMeaningBody
200A page of events.AdminEventList
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

Me

The caller's own session.

GET /admin/v1/me

Describe your own session

Shows who the caller is and until when their session passes the freshness checks for changes. A client uses it to ask for a step-up before a change instead of after a 403 step_up_required.

Auth
A session token, as Authorization: Bearer
StatusMeaningBody
200The caller's session.AdminMe
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

Meta

GET /admin/v1/openapi.json

Get this document

Returns this OpenAPI document.

Auth
A session token, as Authorization: Bearer
StatusMeaningBody
200The OpenAPI document.object
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

Signup

Agent self-signup settings.

GET /admin/v1/signup/settings

Get the signup settings

Shows the agent self-signup policy in effect, with defaults filled in. With overrides on (auth.WithSignupOverrides), it also shows the code policy, the stored override, and its version, and sets the ETag header to the version. Hooks are code: the response says only whether each is set.

Auth
A session token, as Authorization: Bearer
StatusMeaningBody
200The signup policy in effect.AdminSignupSettings
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

PUT /admin/v1/signup/settings

Change the signup override

Replaces the stored signup override, which can only narrow the code policy. It needs a human who signed in with more than one factor in the last 10 minutes, and If-Match with the ETag from GET, so two admins can't overwrite each other. The change is recorded as a signup_settings_changed event, and every server applies it within 5 seconds.

Auth
A session token, as Authorization: Bearer
Body
AdminSignupOverride as application/json
ParameterInTypeDescription
If-MatchrequiredheaderstringThe ETag from GET /v1/signup/settings.
StatusMeaningBody
200The settings in effect after the change.AdminSignupSettings
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
409version_conflict: someone changed the override since the given version.AdminError
428precondition_required: If-Match is missing.AdminError
429throttled: too many changes.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

Users

GET /admin/v1/users

List users

Lists users who have a stored session or own an agent, ordered by ID. The library knows users only through their sessions and agents; your application's user directory is the source of truth for accounts.

Auth
A session token, as Authorization: Bearer
ParameterInTypeDescription
cursorquerystringnext_cursor from the previous page.
limitqueryintegerItems per page. From 1 to 200. Default: 50.
StatusMeaningBody
200A page of users.AdminUserList
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

GET /admin/v1/users/{user}

Get a user

Returns one user's summary.

Auth
A session token, as Authorization: Bearer
ParameterInTypeDescription
userrequiredpathAdminID
StatusMeaningBody
200The user.AdminUserBody
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
404not_found: the user, session, or agent doesn't exist.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

POST /admin/v1/users/{user}/revoke

Revoke a user's sessions

Revokes every session of the user, human and agent, and every session delegated from them. Agents stay enabled; revoke them separately. Needs a human session that authenticated within the freshness window (10 minutes by default); agents always get human_required. The change is rate-limited per administrator and recorded in the audit log with the administrator as the actor.

Auth
A session token, as Authorization: Bearer
ParameterInTypeDescription
userrequiredpathAdminID
StatusMeaningBody
200The user after the revocation.AdminUserBody
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
404not_found: the user, session, or agent doesn't exist.AdminError
429throttled: too many changes.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

Sessions

GET /admin/v1/users/{user}/connections

List a user's connections

Lists the user's live OAuth grants for a resource, such as MCP clients connected to an MCP server, oldest first. Each grant is its own connection, even when several share a client ID. Revoke one with revokeSession on its id, which ends every token under it and leaves the user's other connections.

Auth
A session token, as Authorization: Bearer
ParameterInTypeDescription
userrequiredpathAdminID
StatusMeaningBody
200The user's connections.AdminConnectionList
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
404not_found: the user, session, or agent doesn't exist.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

GET /admin/v1/users/{user}/sessions

List a user's sessions

Lists every stored session of the user, live or not, in creation order. Build the delegation tree from parent_id.

Auth
A session token, as Authorization: Bearer
ParameterInTypeDescription
userrequiredpathAdminID
StatusMeaningBody
200The user's sessions.AdminSessionList
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
404not_found: the user, session, or agent doesn't exist.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

GET /admin/v1/users/{user}/sessions/{session}

Get a session and its delegation tree

Returns the session and every session delegated from it, at any depth, in creation order.

Auth
A session token, as Authorization: Bearer
ParameterInTypeDescription
userrequiredpathAdminID
sessionrequiredpathAdminID
StatusMeaningBody
200The session and its descendants.AdminSessionTree
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
404not_found: the user, session, or agent doesn't exist.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

POST /admin/v1/users/{user}/sessions/{session}/revoke

Revoke a session and its delegation tree

Revokes the session and every session delegated from it. The session must belong to the user in the path. Revoking a revoked session succeeds and changes nothing. Needs a human session that authenticated within the freshness window (10 minutes by default); agents always get human_required. The change is rate-limited per administrator and recorded in the audit log with the administrator as the actor.

Auth
A session token, as Authorization: Bearer
ParameterInTypeDescription
userrequiredpathAdminID
sessionrequiredpathAdminID
StatusMeaningBody
200The session and its descendants after the revocation.AdminSessionTree
400invalid_request: a parameter is malformed, or invalid_cursor: the cursor is malformed or from another route.AdminError
401unauthenticated: no credential, or one that doesn't work.AdminError
403forbidden: the principal isn't an administrator, step_up_required: a change from a stale session, stronger_factor_required: a change from a session whose factors are too weak, such as a recovery code alone, or human_required: a change from an agent or a token.AdminError
404not_found: the user, session, or agent doesn't exist.AdminError
429throttled: too many changes.AdminError
503unavailable: the store or limiter failed. Retry later.AdminError

Schemas

AdminActor

Who made a change on someone else's behalf.

FieldTypeDescription
agent_idAdminID
session_idAdminID
user_idrequiredAdminID

AdminAgent

An agent: a delegated identity.

FieldTypeDescription
claim_bystring (date-time)For an unclaimed agent, when it's deleted unless a human claims it.
claimed_atstring (date-time)When a human claimed the agent. Absent for agents that never signed themselves up.
claimed_typestringThe agent type the agent reported when it signed itself up, for example claude-code. Self-reported: trust it only when type_verified is true.
created_atrequiredstring (date-time)
disabled_atstring (date-time)Absent while the agent is enabled.
idrequiredAdminID
namerequiredstring
owner_idAdminIDThe human who owns the agent. Absent while the agent is unclaimed.
scopesrequiredarray of stringThe most any session of the agent may hold.
staterequiredstringactive, disabled, or unclaimed for an agent that signed itself up and that no human has claimed. A disabled agent is disabled whether or not it was claimed. The set is open: accept values you don't know.
type_verifiedrequiredbooleanTrue only when the application's verifier accepted an attestation of claimed_type.

AdminAgentBody

FieldTypeDescription
agentrequiredAdminAgent
sessionsrequiredarray of AdminSession

AdminAgentCounts

Agents by state.

FieldTypeDescription
activerequiredintegerOwned by a user and not disabled. At least 0.
disabledrequiredintegerDisabled, claimed or not. At least 0.
unclaimedrequiredintegerSigned themselves up, not claimed, and not disabled. At least 0.

AdminAgentList

FieldTypeDescription
agentsrequiredarray of AdminAgent
next_cursorAdminCursor

AdminAlert

An alert derived from the audit log.

FieldTypeDescription
agent_idAdminID
agent_idsarray of AdminIDUp to 10 agents, for alerts about agent state such as unclaimed_near_expiry.
clientstring
countrequiredintegerHow many attempts or events the alert covers. At least 1.
first_atrequiredstring (date-time)
first_seqintegerAbsent for alerts about agent state, such as unclaimed_near_expiry. At least 1.
idrequiredstringStable for the same alert across requests.
kindrequiredstringtoken_reuse, token_leaked, passkey_clone_suspected, totp_locked, failure_burst, signup_spike, signup_quota_pressure, unclaimed_near_expiry, export_started, users_exported, or a kind that an alert source adds, such as the server's webhook_late and webhook_skipped. The set is open: accept values you don't know.
last_atrequiredstring (date-time)
last_seqintegerAbsent for alerts about agent state, such as unclaimed_near_expiry. At least 1.
messagerequiredstring
session_idAdminID
severityrequiredstringhigh, medium, or low. The set is open.
sourcestringFor token_leaked, where the token was found. Show it as text; don't follow it automatically.
user_idAdminID

AdminAlertList

FieldTypeDescription
alertsrequiredarray of AdminAlert
scannedrequiredintegerHow many events the scan read. At least 0.
sincerequiredstring (date-time)
truncatedrequiredbooleanTrue when the scan stopped at its limit before reaching since.

AdminChainStatus

The last verification of the audit chain.

FieldTypeDescription
checked_atrequiredstring (date-time)
checkpointsrequiredintegerHow many trusted checkpoints the chain was checked against. At least 0.
head_hashstringThe hex SHA-256 chain hash at verified_through. Absent for an empty chain.
messagestringWhat failed, when status is not verified.
oldest_unsealed_atstring (date-time)When the oldest unsealed event was recorded. Absent when every event is sealed.
statusrequiredstringverified, tampered, or unavailable when the check could not run. The set is open.
unsealedrequiredintegerHow many events were not yet sealed into the chain when the check ran. The check can't detect a change to them. A count that keeps growing means nothing runs Service.Run. At least 0.
verified_throughrequiredintegerThe chain position the check reached. When status is tampered, the first bad position follows it. At least 0.

AdminChallenge

What would make a refused change succeed.

FieldTypeDescription
actionrequiredstringThe route's action.
approvalobjectAn approval an agent can wait for. The admin API never sets it, because only humans make changes there.
approval.expires_ininteger
approval.idstring
approval.summarystring
approval.urlstring
assurancerequired"none" or "recovering" or "single" or "multi"The minimum assurance the change needs.
beginstringWhere to begin a step-up, when the application set one.
humanbooleanTrue when agents and tokens can't make the change.
purposeobjectSet when only an elevation for this purpose meets the need.
purpose.namestring
purpose.resourcestring
satisfy_withrequiredarray of stringFactors the administrator has that would pass a step-up, strongest first. Empty when none would.
scopesarray of stringScopes that were missing.
within_secondsintegerHow recent the administrator's sign-in must be.

AdminConnection

FieldTypeDescription
client_idrequiredstringThe OAuth client ID, which may be the URL of a client ID metadata document.
created_atrequiredstring (date-time)
expires_atrequiredstring (date-time)
idrequiredAdminIDThe grant's root session. Revoke the connection by revoking this session.
last_used_atrequiredstring (date-time)The latest use of any token in the grant.
resourcerequiredstringThe resource the tokens are for.
scopesrequiredarray of string

AdminConnectionList

FieldTypeDescription
connectionsrequiredarray of AdminConnection

AdminCursor

An opaque cursor for the next page. Absent on the last page. Pass it back unchanged to the same route.

Type: string

AdminError

An error response: RFC 9457 problem details, served as application/problem+json.

FieldTypeDescription
challengeAdminChallenge
coderequiredAdminErrorCode
detailstringWhat went wrong, for people. It may change.
fixstringWhat to do next, for people. It may change.
retry_afterintegerSeconds to wait before retrying, for throttled.
statusrequiredintegerThe HTTP status code.
titlerequiredstringA short summary for people. It may change.
typerequiredstringurn:tensile:auth:problem: followed by the code.

AdminErrorCode

A machine-readable error code. The set is fixed within /v1. The codes step_up_required, stronger_factor_required, and human_required come with a challenge.

Type: "forbidden" or "human_required" or "invalid_cursor" or "invalid_request" or "method_not_allowed" or "not_found" or "precondition_required" or "step_up_required" or "stronger_factor_required" or "throttled" or "unauthenticated" or "unavailable" or "version_conflict"

AdminEvent

An audit event. It never includes a token.

FieldTypeDescription
actionstringThe attempted operation, for failure events.
actorAdminActor
agent_idAdminID
atrequiredstring (date-time)
clientstringThe client key the application recorded, such as an IP address.
countintegerSessions affected by a revocation, or attempts a failure event stands for. At least 1.
factorstringThe credential or factor involved.
kindrequiredstringWhat happened, for example session_revoked. The set is open: accept values you don't know.
methodsarray of string
parent_idAdminID
reasonstringWhy an attempt failed.
seqrequiredintegerAt least 1.
session_idAdminID
sourcestringFor token_leaked, where a secret scanner found the token. Show it as text; don't follow it automatically.
untilstring (date-time)Set only on a summary of failed attempts: the last attempt it counts. at is the first.
user_idAdminID

AdminEventList

FieldTypeDescription
eventsrequiredarray of AdminEvent
next_cursorAdminCursor

AdminID

An opaque ID. Percent-encode it in paths.

Type: string

AdminMe

The caller's own session.

FieldTypeDescription
agent_idAdminIDAbsent for human sessions.
authenticated_atrequiredstring (date-time)When the human last proved who they are.
changes_untilstring (date-time)Until when the caller can make changes without a step-up. Absent when a change needs a step-up now, and always for agents.
depthrequiredinteger0 for a human session, 1 for an agent delegated by a human, and so on. At least 0.
expires_atrequiredstring (date-time)The absolute expiry of the session.
kindrequiredstringhuman, agent, pat, oauth, or oauth_refresh. Clients must accept other values.
methodsrequiredarray of stringHow the human proved who they are, sorted.
multi_factorrequiredbooleanWhether the human used a passkey, or TOTP with another factor.
profileAdminProfile
scopesrequiredarray of string
session_idrequiredAdminID
signup_changes_untilstring (date-time)The same for the signup settings, which also need more than one factor.
user_idAdminIDThe responsible human. Absent for an agent that no human has claimed.

AdminProfile

What the application's user directory says about a user. Present only when the application passes authadmin.WithDirectory and the directory knows the user.

FieldTypeDescription
adminrequiredbooleanWhether the application treats the user as an administrator.
disabledrequiredbooleanWhether the application has disabled the account.
emailstring
namestringThe name to show, from the application's user directory.

AdminSession

A session. It never includes the token.

FieldTypeDescription
agent_idAdminID
authenticated_atrequiredstring (date-time)
client_idstringThe OAuth client an OAuth token was issued to.
created_atrequiredstring (date-time)
depthrequiredinteger0 for a human session, 1 for an agent delegated by a human, and so on. At least 0.
expires_atrequiredstring (date-time)
idrequiredAdminID
idle_timeout_secondsrequiredintegerAt least 0.
kindrequired"human" or "agent" or "pat" or "oauth" or "oauth_refresh"human for a sign-in, agent for a delegated agent session, pat for a personal access token, oauth for an OAuth access token, and oauth_refresh for an OAuth refresh token.
last_seen_atrequiredstring (date-time)
methodsrequiredarray of stringHow the human proved who they are, for example passkey.
namestringThe name of a personal access token.
parent_idAdminIDThe session this one was delegated from. Absent for a session started by a sign-in.
resourcestringThe resource (RFC 8707) an OAuth token is for, such as an MCP server's URI. Absent for tokens without one.
revoked_atstring (date-time)Absent while the session isn't revoked.
scopesrequiredarray of string
staterequiredstringlive, idle, expired, or revoked. The set is open: accept values you don't know.
user_idrequiredAdminID

AdminSessionList

FieldTypeDescription
sessionsrequiredarray of AdminSession

AdminSessionTree

FieldTypeDescription
descendantsrequiredarray of AdminSession
sessionrequiredAdminSession

AdminSignupHooks

Which signup hooks the application set. Hooks are code, so only their presence is shown.

FieldTypeDescription
admitrequiredbooleanA final per-request admission hook is set.
verifierrequiredbooleanA vendor attestation verifier is set.
work_checkrequiredbooleanA proof-of-work check is set.

AdminSignupOverride

Narrows the code policy. It can't turn signup on or widen anything: values past the code ceiling are refused.

FieldTypeDescription
claim_window_secondsrequiredintegerA shorter claim window for new agents, at least 60 seconds. 0 keeps the code value. At least 0.
deny_typesrequiredarray of stringAgent types to deny, on top of the code list.
max_unclaimedrequiredintegerA lower unclaimed-agent quota. 0 keeps the code value. At least 0.
pausedrequiredbooleanStops new signups. Agents already signed up keep working.
require_verified_typerequiredbooleanTrue requires verified agent types even when the code policy doesn't.
scopesrequiredarray of string or nullnull keeps the code sandbox. A list replaces it with these scopes, which must be in the code sandbox; an empty list empties it.

AdminSignupPolicy

A signup policy, with defaults filled in.

FieldTypeDescription
allow_typesrequiredarray of stringWhen not empty, only these agent types may sign up. Types are unverified labels unless require_verified_type is true.
claim_window_secondsrequiredintegerHow long an unclaimed agent lives before it and its sessions are deleted. At least 0.
deny_typesrequiredarray of stringAgent types that may not sign up.
enabledrequiredbooleanFalse when the application doesn't turn on agent self-signup. Then every other field is empty or zero.
hooksrequiredAdminSignupHooks
max_unclaimedrequiredintegerThe most unclaimed agents the store holds. At least 0.
pausedrequiredbooleanTrue when an override paused new signups, or the server hasn't loaded the override yet. Agents already signed up keep working.
require_verified_typerequiredbooleanTrue when an agent's type must be verified by the vendor attestation hook.
scopesrequiredarray of stringThe sandbox: the most any session of an unclaimed agent can hold.
session_idle_secondsrequiredintegerHow long an unclaimed agent's signup session lasts without use. At least 0.

AdminSignupSettings

The signup policy in effect. With overrides on, it also has the code ceiling, the stored override, and its version, which the ETag header carries too.

FieldTypeDescription
allow_typesrequiredarray of stringWhen not empty, only these agent types may sign up. Types are unverified labels unless require_verified_type is true.
claim_window_secondsrequiredintegerHow long an unclaimed agent lives before it and its sessions are deleted. At least 0.
codeAdminSignupPolicyThe policy set in code: the most an override can allow.
deny_typesrequiredarray of stringAgent types that may not sign up.
enabledrequiredbooleanFalse when the application doesn't turn on agent self-signup. Then every other field is empty or zero.
hooksrequiredAdminSignupHooks
max_unclaimedrequiredintegerThe most unclaimed agents the store holds. At least 0.
overrideAdminSignupOverride
pausedrequiredbooleanTrue when an override paused new signups, or the server hasn't loaded the override yet. Agents already signed up keep working.
require_verified_typerequiredbooleanTrue when an agent's type must be verified by the vendor attestation hook.
scopesrequiredarray of stringThe sandbox: the most any session of an unclaimed agent can hold.
session_idle_secondsrequiredintegerHow long an unclaimed agent's signup session lasts without use. At least 0.
sourcerequiredstringcode, or code_and_override when the application turned overrides on. The set is open.
versionintegerThe override's version. Send it as If-Match to change the override. At least 0.

AdminStats

Totals for an overview.

FieldTypeDescription
agentsrequiredAdminAgentCounts
events_last_24hrequiredintegerAudit events in the last 24 hours. At least 0.
live_sessionsrequiredintegerSessions, human and agent, that are not revoked or past their absolute expiry. At least 0.
usersrequiredintegerUsers who have a stored session or own an agent. At least 0.

AdminUser

A user the library knows through their sessions and agents.

FieldTypeDescription
active_agentsrequiredintegerEnabled agents the user owns. At least 0.
idrequiredAdminID
last_seen_atstring (date-time)The latest use of any stored session. Absent when the user has none.
live_sessionsrequiredintegerSessions, human and agent, that aren't revoked or past their absolute expiry. Idle sessions count until they're used. At least 0.
profileAdminProfile

AdminUserBody

FieldTypeDescription
userrequiredAdminUser

AdminUserList

FieldTypeDescription
next_cursorAdminCursor
usersrequiredarray of AdminUser