Export audit log
Send aGET request to /api/v1/compliance/audit-export with the required from and to query parameters. The response is a streaming NDJSON body: one JSON object per line, one line per audit record.
Query parameters
Use
type=HUMAN to export only records generated by human operators (console or direct API key usage), and type=AGENT to isolate automated agent activity. This is especially useful when your compliance team needs to audit human approvals separately from programmatic operations.
NDJSON format
The response body is a stream of newline-delimited JSON. Each line is a self-contained JSON object representing one audit record. There is no wrapping array — process the stream line by line. A single audit record looks like this:Processing NDJSON
Because each line is independent JSON, you can pipe the response directly intojq to filter or transform records on the fly:
Required scope
Your API key must have the COMPLIANCE_EXPORT scope to call this endpoint. Requests from keys without this scope receive a403 Forbidden response. This scope should be granted only to keys used by compliance systems or authorized administrators, not to general-purpose service accounts.
For tenants with high transaction volumes, requesting large time windows in a single export can produce very large response streams. As a best practice, export in shorter windows — daily or weekly — rather than requesting months of data in one call. This keeps response sizes manageable, reduces the risk of a network interruption mid-stream, and makes it easier to parallelize ingestion into your downstream systems.