cursor and limit do not apply). Dates are written in America/Mexico_City time, and actions use their plain-Spanish label (for example Timbró CFDI) instead of the internal code.
Exporting the log is itself recorded in the log (audit_log.exported).
Limit: up to 50,000 rows per export. If the filters match more, the endpoint returns422with codeAUDIT_EXPORT_TOO_LARGEand no file; narrow the date range or add filters and try again.
Authentication
Accepts either:- An API key (
X-API-Key: sk_...) with theread:audit-logsscope. - A Supabase Bearer session (
Authorization: Bearer <token>) with theX-Organization-Id: <org-id>header — the user must be an owner or admin of that organization.
Example Request
Common Errors
400 Bad Request
Invalid date or filter value.403 Forbidden
Not an owner or admin, or the API key lacks theread:audit-logs scope.
422 Unprocessable Entity
AUDIT_EXPORT_TOO_LARGE: more than 50,000 entries match.