audit_exported
This page is auto-generated from
src/auth/stytch-invite.ts. Do not edit by hand — seedocs/dev/docs-auto-sync.md.
Event string
Section titled “Event string”audit_exported
Emitting helpers
Section titled “Emitting helpers”| Function | Source |
|---|---|
encodeAuditExportedAuditReason | src/auth/stytch-invite.ts:639 |
Context fields
Section titled “Context fields”| Field | Type | Required | Notes |
|---|---|---|---|
by_user_id | string | yes | — |
from_date | string | yes | — |
to_date | string | yes | — |
row_count | number | yes | — |
Documentation
Section titled “Documentation”#408 — Org-scoped audit log UI export envelope.
Emitted by the new dashboard CSV export endpoint (GET /admin/ui/orgs/:slug/audit/export.csv) so the export is itself an auditable action — operators can prove, after the fact, who pulled which window. Same JSON-into-decision_reason shape as the rest of the file.
from_date / to_date are ISO-8601 strings (UTC) for the requested window. row_count is the number of rows actually streamed (post-filter, post-tier-clamp). by_user_id follows the same sentinel-on-admin-token pattern as every other envelope. PII surface: just the operator identity (already on every other envelope) plus the window — nothing per-package.
This envelope is stored in audit_log.decision_reason (varchar(256)) as a JSON object with the shape { event, ...ctx }. The audit_log row carries tenant_id, actor_user_id, and timestamp as columns alongside — those are not duplicated in the envelope.