Audit events scoped to this workspace
const url = 'https://your-org.evershell.ai/v1/workspaces/example/audit?order=asc&limit=100';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://your-org.evershell.ai/v1/workspaces/example/audit?order=asc&limit=100' \ --header 'Authorization: Bearer <token>'GET /audit pinned to one workspace. The same per-scope
visibility decides which rows the caller sees, then a
workspace_id filter narrows to this workspace.
Permissions: any of audit:read, audit:read:own,
workspace:read, workspace:read:own. The grants union:
audit scopes surface this workspace’s audit-category rows
(audit:read → all; audit:read:own → rows on a workspace
the caller created), workspace scopes surface its
activity-category rows (workspace:read → all;
workspace:read:own → rows on a workspace the caller
created). The route is not gated on workspace ownership — an
audit:read holder reads any workspace’s audit here, exactly
as via /audit. A workspace in another org is 404.
Same response shape as GET /audit. Filter columns,
time bounds, limit, cursor, and order query params behave
identically.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Query Parameters
Section titled “Query Parameters ”Opaque resume pointer. See /audit for semantics.
Responses
Section titled “ Responses ”One page of events.
object
object
Real WorkOS user id for session-authenticated requests and
proxy-emitted events; "system" for API-key-authenticated
and WorkOS-webhook-driven events.
Per-producer monotonic sequence used as the tiebreaker on equal
timestamps. Order events by (timestamp, source_seq, id) to match
the server’s ordering. Always present.
Closed-enum — see Audit events for the catalog
Role name; populated only on workspace-scoped events.
Provider name; populated only on workspace-scoped events.
object
object
Per-counter snapshot at commit point (proxy allows).
object
Per-counter “ceiling applied” reasons (proxy allows).
object
Per-transform failure reasons.
object
Credential names whose mint succeeded on the request.
Per-credential mint failure reasons.
object
Example
{ "events": [ { "category": "audit", "actor": "control-plane", "decision": "allow", "phase": "request_headers", "policy_type": "http" } ]}Malformed cursor.
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}Resource not found in the caller’s org
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}