Platform API reference

Platform API · Workspace-Audit-Logs

get/v1/workspaces/{workspace_slug}/audit-logs/exportAuth

Stream the workspace audit log as NDJSON or CSV, applying the same `?action=` / `?actor_id=` / `?since=` / `?until=` filters as the list. Newest first. Reading the export is itself audited.

The response is streamed: rows are walked in keyset batches and written as they are read, so neither the service nor the client holds the whole log. This is the SOC 2 / GDPR export the platform docs promise. Hard cap of 1,000,000 rows per call; a wider request is refused with 413 before any body is written, so a truncated file can never masquerade as a complete one.

Path parameters

workspace_slug*string

Slug of the workspace. Platform routes name the workspace by slug, positionally in the SDK (`platform.workspaces.retrieve("acme")`); the product APIs bind `workspace_id` instead.

Query parameters

formatenum (2)

Defaults to `ndjson`.

actionstring

Exact-match filter on the action identifier, same rules as the list. Mail, Waitlist, Social and Auth actions are reported under the product name (`mail.domain.verified`); the older internal spellings (`envoi.*`, `rally.*`, `agora.*`, `heimdall.*`) are still accepted here and match the same rows.

actor_idstring · uuid

Exact-match filter on the acting account UUID, same rules as the list.

sincestring · date-time

Inclusive lower bound on `created_at`, same formats as the list.

untilstring · date-time

Inclusive upper bound on `created_at`, same formats as the list.

Response · 200

Streamed export. `application/x-ndjson` (one JSON object per line) or `text/csv` (RFC 4180, header row first).

Example

Request

GET https://api.platform-auth.productcraft.co/v1/workspaces/{workspace_slug}/audit-logs/export
Authorization: Bearer YOUR_TOKEN