Overview
Returns a paginated, tamper-evident audit log of all actions taken in your tenant. Includes API calls, user decisions, AI agent actions, and system events. Entries are immutable — they cannot be modified or deleted.
Required role: admin
JWT Bearer token. Format: Bearer <your-jwt>.
Query parameters
Filter by who performed the action. One of: user, ai_agent, system.
Filter by specific action type (e.g. remediation.approved, user.created).
Filter entries related to a specific incident.
ISO 8601 start timestamp (inclusive).
ISO 8601 end timestamp (inclusive).
Maximum results. Default: 50. Maximum: 500.
Pagination cursor from a previous response.
Response
Returns 200 OK.
{
"items": [
{
"auditId": "aud_01HX9VTPQR3KF8MZWBYD5N6JCE",
"timestamp": "2024-04-01T14:36:00Z",
"action": "remediation.approved",
"actorType": "user",
"actorId": "user_01HX9VTPQR3KF8MZWBYD5N6JCE",
"actorEmail": "alice@example.com",
"resourceType": "remediation",
"resourceId": "rem_01HX9VTPQR3KF8MZWBYD5N6JCE",
"incidentId": "inc_EXAMPLE_01JX",
"metadata": {
"notes": "Confirmed with DBA — safe to scale pool.",
"ipAddress": "203.0.113.45"
},
"hash": "sha256:a4b2c3d4e5f6..."
}
],
"total": 1842,
"nextCursor": "eyJsYXN0SWQiOiJhdWRfMDFIWDlWVFBRUjNLRjhNWldCWUQ1TjZKQ0UifQ"
}
| Field | Type | Description |
|---|
auditId | string | Unique audit entry identifier |
timestamp | string | ISO 8601 timestamp of the event |
action | string | Action that was performed |
actorType | string | Who performed the action: user, ai_agent, system |
actorId | string | User or agent ID |
resourceType | string | Type of resource affected |
resourceId | string | ID of the affected resource |
hash | string | SHA-256 hash of this entry for tamper detection — see Verify integrity |
Error responses
| Status | Error code | Description |
|---|
401 | unauthorized | Missing or invalid JWT |
403 | forbidden | Caller lacks admin role |
Examples
curl "https://api.causeflow.ai/v1/audit?action=remediation.approved&limit=20" \
-H "Authorization: Bearer eyJhbGc..."
Verify integrity
Verify the tamper-evidence hash of audit entries
Export audit log
Export audit logs for compliance