Auth API reference

Auth API · Api-Keys

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

List API keys for an app (no raw secret), newest first. Cursor-paginated: 20/page by default, 100 max.

Path parameters

app_id*string

Id of the app.

Query parameters

limitinteger

Page size. Defaults to 20, clamped to 100. Values that do not parse as a positive integer fall back to the default.

cursorstring

Opaque `next_cursor` from the previous page. Keyed to the `created_at DESC, id DESC` ordering — do not construct one by hand.

Response · 200 Page of API keys (raw secret omitted).

data*array

The 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}/api-keys
Authorization: Bearer YOUR_TOKEN

Response

{
  "data": [
    {
      "id": "string",
      "name": "CI deploy bot",
      "key_prefix": "string",
      "permissions": [
        "user.read",
        "user.list"
      ],
      "last_used_at": "2026-01-01T00:00:00.000Z",
      "status": {},
      "expires_at": "2026-01-01T00:00:00.000Z",
      "revoked_at": "2026-01-01T00:00:00.000Z",
      "revoked_by": "string",
      "rotated_from": "string",
      "created_by": "00000000-0000-0000-0000-000000000000",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNS0wMVQwMDowMDowMFoifQ",
    "has_more": false
  }
}