zazzy
API reference

List the authenticated organization's audit events

Returns the authenticated organization's audit events — newest first — paginated with the shared cursor envelope: pass `?limit=` (default 50, max 100) and the `nextCursor` from a previous response as `?cursor=` to page forward. `nextCursor` is `null` on the last page. Narrow the result with `?action=` (exact action name), `?actorId=` (exact acting user id), and the inclusive `?from=`/`?to=` ISO 8601 date range. Requires the `read` scope.

GET
/audit-log
AuthorizationBearer <token>

A bearer API key minted in Account settings → API keys. Send it as Authorization: Bearer <token>. The scheme match is case-insensitive; the token is taken verbatim. A missing, malformed, unknown, revoked, or expired key is rejected with an indistinguishable 401.

In: header

Query Parameters

cursor?string

An opaque cursor from a previous response's nextCursor. Omit for the first page.

limit?integer

Page size. Clamped to [1, 100] (values outside the range are clamped, not rejected); defaults to 50 when omitted.

Range1 <= value <= 100
action?string

Exact-match on the dot-namespaced action name (e.g. member.role_changed).

actorId?string

Exact-match on the acting user's id.

from?string

Inclusive lower bound on the event time, as an ISO 8601 date-time. A malformed value is rejected with a 400.

to?string

Inclusive upper bound on the event time, as an ISO 8601 date-time. A malformed value is rejected with a 400.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/audit-log"
{  "data": [    {      "id": "audit_01HZY1QG4T",      "action": "member.role_changed",      "actorType": "user",      "actorId": "user_01HZY0M4A1",      "apiKeyId": null,      "targetType": "member",      "targetId": "mem_01HZY0M7B2",      "metadata": {        "from": "member",        "to": "admin"      },      "ip": "203.0.113.7",      "createdAt": "2026-02-11T14:03:00.000Z"    },    {      "id": "audit_01HZY0M4A1",      "action": "file.deleted",      "actorType": "api-key",      "actorId": null,      "apiKeyId": "key_01HZY0M9C3",      "targetType": "file",      "targetId": "file_01HZY0M8D4",      "metadata": {        "name": "invoice.pdf",        "purpose": "attachment"      },      "ip": null,      "createdAt": "2026-01-04T09:12:00.000Z"    }  ],  "nextCursor": "YXVkaXRfMDFIWlkwTTRBMQ"}
{  "error": {    "code": "VALIDATION",    "message": "Invalid pagination cursor."  }}
{  "error": {    "code": "UNAUTHORIZED",    "message": "Invalid API key."  }}
{  "error": {    "code": "FORBIDDEN",    "message": "This API key lacks the required 'read' scope."  }}
{  "error": {    "code": "RATE_LIMITED",    "message": "API rate limit exceeded. Retry after the window resets."  }}
{  "error": {    "code": "INTERNAL",    "message": "An unexpected error occurred."  }}