List a team's API keys
Returns the team’s API keys with previews and policies. Full secrets are returned only once at creation.
/v1/api-keysAuthorizationBearer token · headerrequiredBetter Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.
AuthorizationOAuth2 access token · headerrequiredOAuth 2.0 with explicit Spacefast capability scopes. Use the authorization-code flow for people and client credentials for machines.
teams:readlimitintegerPage size.
cursorstringOpaque cursor from the previous page's nextCursor.
teamIdstringOwning team whose keys to list. Defaults to the caller's own team; any team the credential policy reaches is allowed.
Response for status 200
$schemastring<uri>Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
dataobject[]requiredShow propertiesHide properties
objectidstringrequiredAPI key id.
namestring | nullrequiredHuman-readable key name.
subjectobject | nullrequiredSubject the key acts as.
Show propertiesHide properties
typestringrequiredSubject kind the key acts as in audit records.
userteamexternalsystemidstringrequiredStable subject id.
nullownerPrincipalobject | nullrequiredOwning principal (ownership metadata, never the authorization gate).
Show propertiesHide properties
typestringrequiredPrincipal type that owns this key.
teamexternalidstringrequiredStable principal id (Better Auth team id, or external id).
nullcreatedByUserIdstring | nullrequiredUser who created the key, or null for automation. Tenant-key creators are recorded for audit and do not own the key's authority.
collectionstringrequiredDisjoint resource collection this key addresses.
teamtenantpresetstring | nullrequiredPreset the policy was compiled from, if any.
Show propertiesHide properties
stringnullteamScopeobject | nullrequiredMembership-following team scope for a device-login key, or null for legacy keys.
Show propertiesHide properties
objectteamIdsstring[]requiredobjectnullpolicyobject | nullrequiredEffective access policy. A key authorizes by policy only.
Show propertiesHide properties
versionstringrequiredMust be the current platform policy version.
statementsobject[]requiredEvaluation order: explicit deny wins, explicit allow permits, otherwise implicit deny.
Show propertiesHide properties
objecteffectstringrequiredExplicit deny always wins over allow.
allowdenyactionsstring[]requiredActions this statement covers.
resourcesstring[]requiredResource URIs this statement covers (wildcards cover subtrees).
conditionsobjectAND condition attributes. Unresolvable attributes fail closed: no match for allow, and match for deny.
Show propertiesHide properties
request.clientstringRestricts the statement to one resolved request client.
dashboardcliapiworkernullmetadataobjectrequiredCaller-supplied metadata.
secretPreviewstringrequiredMasked secret preview (prefix and last characters).
notBeforestring<date-time> | nullrequiredKey is rejected before this instant.
Show propertiesHide properties
string<date-time>nullexpiresAtstring<date-time> | nullrequiredKey is rejected from this instant.
Show propertiesHide properties
string<date-time>nullipAllowliststring[] | nullrequiredCIDR/IP allowlist. Requests from other addresses are rejected.
Show propertiesHide properties
stringstringnullrevokedAtstring<date-time> | nullrequiredRevocation instant.
Show propertiesHide properties
string<date-time>nullenabledbooleanrequiredWhether the key currently authenticates.
createdAtstring<date-time>requiredCreation instant.
updatedAtstring<date-time>requiredLast update instant.
lastRequestAtstring<date-time> | nullrequiredLast authenticated request instant.
Show propertiesHide properties
string<date-time>nullpaginationobjectrequiredShow propertiesHide properties
nextCursorstring | nullrequiredOpaque cursor for the next page; null when there are no more results.
hasMorebooleanrequiredWhether another page exists after this one.
Problem details (RFC 9457). Any 4xx/5xx response is one application/problem+json document.
$schemastring<uri>Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
typestringrequiredProblem type URI resolving to the error docs page. The server derives it mechanically from code against the docs origin.
titlestringrequiredShort human-readable summary of the problem type. The server derives it mechanically from code.
statusintegerrequiredHTTP status code of this response, repeated in the body.
detailstringrequiredHuman-readable failure explanation for this occurrence.
codestringrequiredStable snake_case error code naming the failed public contract.
pointerstringRFC 6901 JSON Pointer into the failing request field, for example "/files/37/path", on validation failures.
detailsobjectMachine-readable context for the error code.
fixstringOne sentence on what to do about this error code, the same text as the type page. Read it before retrying.
suggestionsstring[]Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.
nextstring[]Copy-pasteable commands or API requests an agent can run next.
requestIdstringrequiredThe request id to quote when contacting support.