Skip to content
Esc
↑↓navigate↵open⌘Jpreview

List partner tenant API keys

Returns tenant-owned credentials and masked previews. Requires tokens:read. Full secrets are never readable after creation.

GET/v1/tenants/{tenantId}/api-keys
Authorization
AuthorizationBearer token · headerrequired

Better Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.

Path parameters
tenantIdstringrequired

Tenant id. Must be the credential's own tenant.

min length 1
Query parameters
limitinteger

Page size.

min 1 · max 100 · default: 20
cursorstring

Opaque cursor from the previous page's nextCursor.

min length 1 · max length 4096
Responses
200

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[]required
Show properties
Array of object
idstringrequired

API key id.

namestring | nullrequired

Human-readable key name.

tenantIdstring | nullrequired

Tenant the key belongs to.

modestringrequired

test when the key belongs to a linked test tenant, live otherwise.

Allowed:livetest
subjectobject | nullrequired

Subject the key acts as.

Show properties
Any of:
object
typestringrequired

Subject kind the key acts as in audit records.

Allowed:userteamexternalsystem
idstringrequired

Stable subject id.

min length 1
null
null
ownerPrincipalobject | nullrequired

Owning principal (ownership metadata, never the authorization gate).

Show properties
Any of:
object
typestringrequired

Principal type that owns this key.

Allowed:teamexternal
idstringrequired

Stable principal id (Better Auth team id, or external id).

min length 1
null
null
createdByUserIdstring | nullrequired

User who created the key, or null for automation. Tenant-key creators are recorded for audit and do not own the key's authority.

collectionstringrequired

Disjoint resource collection this key addresses.

Allowed:teamtenant
presetstring | nullrequired

Preset the policy was compiled from, if any.

Show properties
Any of:
string
string
null
null
teamScopeobject | nullrequired

Membership-following team scope for a device-login key, or null for legacy keys.

Show properties
Any of:
object
One of:
object
modestringrequired
object
modestringrequired
teamIdsstring[]required
min items 1 · max items 100
object
modestringrequired
null
null
policyobject | nullrequired

Effective access policy. A key authorizes by policy only.

Show properties
Any of:
object
versionstringrequired

Must be the current platform policy version.

statementsobject[]required

Evaluation order: explicit deny wins, explicit allow permits, otherwise implicit deny.

min items 1
Show properties
Array of object
effectstringrequired

Explicit deny always wins over allow.

Allowed:allowdeny
actionsstring[]required

Actions this statement covers.

min items 1
resourcesstring[]required

Resource URIs this statement covers (wildcards cover subtrees).

min items 1
conditionsobject

AND condition attributes. Unresolvable attributes fail closed: no match for allow, and match for deny.

Show properties
request.clientstring

Restricts the statement to one resolved request client.

Allowed:dashboardcliapiworker
null
null
metadataobjectrequired

Caller-supplied metadata.

secretPreviewstringrequired

Masked secret preview (prefix and last characters).

notBeforestring<date-time> | nullrequired

Key is rejected before this instant.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
expiresAtstring<date-time> | nullrequired

Key is rejected from this instant.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
ipAllowliststring[] | nullrequired

CIDR/IP allowlist. Requests from other addresses are rejected.

Show properties
Any of:
string[]
Array of string
string
null
null
revokedAtstring<date-time> | nullrequired

Revocation instant.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
enabledbooleanrequired

Whether the key currently authenticates.

createdAtstring<date-time>required

Creation instant.

matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
updatedAtstring<date-time>required

Last update instant.

matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
lastRequestAtstring<date-time> | nullrequired

Last authenticated request instant.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
paginationobjectrequired
Show properties
nextCursorstring | nullrequired

Opaque cursor for the next page; null when there are no more results.

hasMorebooleanrequired

Whether another page exists after this one.

default

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.

typestringrequired

Problem type URI resolving to the error docs page. The server derives it mechanically from code against the docs origin.

titlestringrequired

Short human-readable summary of the problem type. The server derives it mechanically from code.

statusintegerrequired

HTTP status code of this response, repeated in the body.

min -9007199254740991 · max 9007199254740991
detailstringrequired

Human-readable failure explanation for this occurrence.

codestringrequired

Stable snake_case error code naming the failed public contract.

pointerstring

RFC 6901 JSON Pointer into the failing request field, for example "/files/37/path", on validation failures.

detailsobject

Machine-readable context for the error code.

fixstring

One 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.

requestIdstringrequired

The request id to quote when contacting support.

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.spacefast.com/v1/tenants/string/api-keys' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "$schema": "http://example.com",
  "data": [
    {
      "id": "string",
      "name": "string",
      "tenantId": "string",
      "mode": "live",
      "subject": {
        "type": "user",
        "id": "string"
      },
      "ownerPrincipal": {
        "type": "team",
        "id": "string"
      },
      "createdByUserId": "string",
      "collection": "team",
      "preset": "ci_deploy",
      "teamScope": {
        "mode": "all"
      },
      "policy": {
        "version": "2026-06-09",
        "statements": [
          {
            "effect": "allow",
            "actions": [
              "spaces:read"
            ],
            "resources": [
              "string"
            ],
            "conditions": {
              "request.client": "dashboard"
            }
          }
        ]
      },
      "metadata": {
        "property1": null,
        "property2": null
      },
      "secretPreview": "string",
      "notBefore": "2019-08-24T14:15:22Z",
      "expiresAt": "2019-08-24T14:15:22Z",
      "ipAllowlist": [
        "string"
      ],
      "revokedAt": "2019-08-24T14:15:22Z",
      "enabled": true,
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "lastRequestAt": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "nextCursor": "string",
    "hasMore": true
  }
}

Was this page helpful?