Auth API reference

Auth API · Tenant-Api-Keys

get/v1/apps/{app_id}/tenant-api-keysAuth

List the app's tenant API keys

Every tenant of the app, newest first, cursor-paginated (20 per page, max 100). Secrets are never returned. Each key names its creator (`created_by`), and its `status` is `orphaned` when it is neither revoked nor expired but its creator left the tenant or the tenant is not active (introspection refuses it). Requires `auth.read` on the app.

Path parameters

app_id*string

App UUID (or slug).

Query parameters

tenant_idstring

Only this tenant: UUID or `tnt_…` display id.

statusenum (4)

Only keys in this state. `active` excludes `orphaned` keys.

limitinteger

Page size. Defaults to 20, clamped to 100.

cursorstring

`next_cursor` from the previous page.

Response · 200 A page of keys.

data*array

The tenant API key items on this page.

pagination*object
next_cursor*string

Opaque cursor for the next page. `null` when no more pages are available.

Example: "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNS0wMVQwMDowMDowMFoifQ"

has_more*boolean

True iff another page exists; if true, pass `next_cursor` on the next request.

Example: false

Example

Request

GET https://api.auth.productcraft.co/v1/apps/{app_id}/tenant-api-keys
Authorization: Bearer YOUR_TOKEN

Response

{
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "display_id": "tak_3a9f2b1c0d4e",
      "tenant_id": "00000000-0000-0000-0000-000000000000",
      "tenant_display_id": "tnt_3a9f2b1c0d4e",
      "name": "CI e2e",
      "key_prefix": "pctk_live_4fQ2aZ",
      "last4": "x9Qb",
      "scopes": [
        "disputes.read"
      ],
      "created_by_account_id": "00000000-0000-0000-0000-000000000000",
      "created_at": "2026-01-01T00:00:00.000Z",
      "expires_at": "2026-01-01T00:00:00.000Z",
      "last_used_at": "2026-01-01T00:00:00.000Z",
      "revoked_at": "2026-01-01T00:00:00.000Z",
      "revoke_reason": {},
      "rotated_from": "00000000-0000-0000-0000-000000000000",
      "status": {},
      "created_by": {}
    }
  ],
  "pagination": {
    "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNS0wMVQwMDowMDowMFoifQ",
    "has_more": false
  }
}