Skip to content
bynhDocs

Export the audit log as CSV

GET/workspaces/{workspace}/audit-events/export

Downloads the whole filtered audit log as CSV, newest first, streamed so long histories work.

Authentication

Send an API token as a bearer token. This endpoint needs a read token, made by an admin or owner. Create one in My account → API tokens; see scopes and roles.

Authorization: Bearer 42|bynh_pat_•••••••Header

Path parameters

  • workspacestringRequired

    Your workspace slug, e.g. dokan.

Query parameters

  • categoryenum

    Prefix filter. One of auth, workspace, member, certificate, document, access_request.

  • actionstring

    Exact action (max 64).

Response

200 OK

text/csv; charset=UTF-8 (no BOM), filename bynh-audit-log-{slug}-YYYY-MM-DD.csv. Columns: time_utc, who, email, action, what_happened, ip_address, user_agent, event_id. who and what_happened follow the reader’s language. Formula-leading cells are escaped.

Rate limits

This endpoint counts toward your general limit of 120 requests a minute. When you go over, wait for the number of seconds in Retry-After.

Errors

401The token is missing, wrong, revoked or expired.
403“Only owners and admins can read the audit log.”
404The token belongs to another workspace, or its owner is no longer a member.
422Bad category or action.

Every error is JSON with a message. See Errors.

Next →Get trust center visitors
curl -OJ "https://api.bynh.io/api/v1/workspaces/dokan/audit-events/export?category=access_request" \
  -H "Authorization: Bearer $BYNH_TOKEN" \
  -H "Accept: application/json"

Response200 OK

File

The file itself, with its name in Content-Disposition.

Examples use Dokan, a sample workspace. Responses are shortened where lists are long.