Auth API reference

Auth API · App-Audit

get/v1/apps/{app_id}/audit-logsAuth

Append-only audit log for this app, newest first. Filter by `?action=`, `?actor_id=`, and/or the `?since=` / `?until=` date range. 20/page (max 100), cursor-paginated.

Path parameters

app_id*string

Id of the app.

Query parameters

limitinteger

Page size. Defaults to 20, clamped to 100.

cursorstring

Opaque `next_cursor` from the previous page.

actionstring

Only entries with this action (e.g. `user.signin`).

actor_idstring

Only entries this account performed.

sincestring · date-time

Inclusive lower bound on `created_at`. ISO-8601 date (`2026-05-01`, midnight UTC) or date-time (`2026-05-01T09:00:00Z`). Composes with `action` / `actor_id` / `until` and with the cursor.

untilstring · date-time

Inclusive upper bound on `created_at`. Same formats as `since`. Note a bare date resolves to midnight UTC, so `until=2026-05-01` excludes that day's later entries.

Response · 200 Page of audit entries with `next_cursor` and `has_more`.

data*array

The audit log 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}/audit-logs
Authorization: Bearer YOUR_TOKEN

Response

{
  "data": [
    {
      "id": "string",
      "app_id": "string",
      "action": "app.member.removed",
      "resource": "string",
      "resource_id": "string",
      "actor_id": "string",
      "actor_type": "end_user",
      "tenant_id": "00000000-0000-0000-0000-000000000000",
      "ip": "string",
      "metadata": {},
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNS0wMVQwMDowMDowMFoifQ",
    "has_more": false
  }
}