Export audit log as CSV
const url = 'https://example.com/api/v1/orgs/example/audit/export?actorKind=member&category=link';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/orgs/example/audit/export?actorKind=member&category=link' \ --header 'Authorization: Bearer <token>'Streams the organization’s audit log as UTF-8 CSV (columns: at, actor, actor_email, actor_kind, category, verb, target, detail, ip, ua, token_id), newest first. Leading formula characters are escaped for spreadsheet safety. Requires owner or admin role, the audit entitlement, and a session or org-wide API token.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization ID.
Query Parameters
Section titled “Query Parameters”Filter events by actor kind.
Filter events by actor kind.
Filter events by category.
Filter events by category.
Case-insensitive substring search across actor, verb, target, and detail.
Case-insensitive substring search across actor, verb, target, and detail.
Responses
Section titled “Responses”The audit log streamed as CSV
Invalid audit filter query parameter.
Error returned when request input fails schema validation or violates a domain rule.
object
object
Field-level validation failures, present when schema validation fails.
object
Dot-separated field path.
Human-readable error explanation.
Example
{ "code": "BAD_REQUEST"}Authentication required or credentials invalid.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Insufficient role, missing audit entitlement, or bucket-scoped token.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Unexpected server error. Quote data.requestId when you report it.
Error returned when Sendcrate or one of its providers fails (5xx).
object
object
Error chain with stack traces. Present only when the server runs in development mode.
Request reference to quote when you report the error.
Human-readable error explanation.
Example
{ "code": "INTERNAL_SERVER_ERROR"}