Skip to main content
Use these APIs for investigations, compliance exports, and operational tracing.

GET /v1/workspace/audit/events

Returns workspace-scoped audit items.

Query params

  • start_ms, end_ms
  • agent_id
  • action
  • decision
  • trace_id
  • limit (default 50, max 200)
  • cursor (pagination)
curl -sS "https://api.clawb.ai/api/v1/workspace/audit/events?agent_id=agt_123&limit=100" \
  -H "X-Clawb-Api-Key: ck_live_..."

Example response

{
  "ok": true,
  "items": [
    {
      "event_id": "evt_01...",
      "created_at": "2026-02-28T00:00:00Z",
      "agent_id": "agt_123",
      "action": "refund",
      "decision": "deny",
      "trace_id": "trc_abc123",
      "policy_id": "pol_refunds_v2"
    }
  ],
  "next_cursor": "cur_01..."
}

POST /v1/workspace/audit/export

Exports events as JSON or CSV.

Request body

{
  "format": "csv",
  "filters": {
    "start_ms": 1739952000000,
    "end_ms": 1740038399000,
    "decision": "deny"
  },
  "limit": 1000
}

Example response

{
  "ok": true,
  "format": "csv",
  "count": 128,
  "csv": "event_id,created_at,agent_id,action,decision\n..."
}

Errors

  • 401 {"error":"missing_api_key"}
  • 400 {"error":"invalid_format"}
  • 500 {"error":"audit_unavailable"}