Skip to content

Audit API Reference ​

GET /audit/ ​

List audit entries

Use for compliance review and incident investigation. Audit rows are append-only while retained; retention defaults to keep forever and an optional team_id filter is supported. Results are ordered by ascending numeric audit ID. The cursor is a non-negative decimal string ID (omit, leave empty, or use 0 for the first page); IDs remain numeric in items. See REST pagination for the shared limit, envelope, and terminal-cursor contract.

Required permission — iam:audit:any

Responses ​

  • 200 — Successful response
json
{
  "items": [
    {
      "action": "user.created",
      "actor_id": "01J8Z3ADMIN000000000000001",
      "at": "2026-01-01T00:00:00Z",
      "diff": {
        "status": "active"
      },
      "id": 1,
      "request_id": "req-01J8Z3",
      "target": "01J8Z3USER000000000000001",
      "team_id": "01J8Z3TEAM000000000000001"
    }
  ],
  "next_cursor": ""
}

Errors ​

StatusCodeDetail
400cursor must be a non-negative integerInvalid Request; Invalid Request
400limit must be a positive integerInvalid Request; Invalid Request
401authentication failedUnauthorized
403insufficient_permissionsForbidden
500authentication service unavailableInternal Server Error

GET /audit/export ​

Export audit entries

Stream matching audit rows as JSON Lines (one row per line, the default) or CSV. The optional team_id filter matches GET /audit; export scans all matching rows and does not use cursor pagination.

Required permission — iam:audit:any

Responses ​

  • 200 — Successful response
json
[
  {
    "action": "user.created",
    "actor_id": "01J8Z3ADMIN000000000000001",
    "at": "2026-01-01T00:00:00Z",
    "diff": {
      "status": "active"
    },
    "id": 1,
    "request_id": "req-01J8Z3",
    "target": "01J8Z3USER000000000000001",
    "team_id": "01J8Z3TEAM000000000000001"
  }
]

Errors ​

StatusCodeDetail
400format must be jsonl or csvInvalid Request
401authentication failedUnauthorized
403insufficient_permissionsForbidden
500authentication service unavailableInternal Server Error