/v1/apps/{app_id}/tenant-api-keysAuthList 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*stringApp UUID (or slug).
Query parameters
tenant_idstringOnly this tenant: UUID or `tnt_…` display id.
statusenum (4)Only keys in this state. `active` excludes `orphaned` keys.
limitintegerPage size. Defaults to 20, clamped to 100.
cursorstring`next_cursor` from the previous page.
Response · 200 A page of keys.
data*arrayThe tenant API key items on this page.
pagination*objectnext_cursor*stringOpaque cursor for the next page. `null` when no more pages are available.
Example: "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNS0wMVQwMDowMDowMFoifQ"
has_more*booleanTrue 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_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
for await (const tenantApiKey of auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").tenantApiKeys.list()) {
console.log(tenantApiKey);
}
const page = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").tenantApiKeys.list({}, { timeout: 5_000 });auth.admin.app(…).tenantApiKeys.list(params?, options?): PagePromise<Auth.PlatformTenantApiKey>
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
}
}