Skip to main content

Audit Log API

The audit log provides a tamper-evident record of all changes in your organization.

List Audit Entries

GET /v1/audit?limit=50&offset=0

Auth: JWT (All roles)

Query Parameters

ParameterDefaultMaxDescription
limit50100Number of entries to return
offset0Pagination offset

Response 200 OK

[
{
"id": "uuid",
"org_id": "uuid",
"actor_id": "user-uuid",
"actor_type": "user",
"action": "flag.created",
"resource_type": "flag",
"resource_id": "flag-uuid",
"before_state": null,
"after_state": {"key": "new-flag", "name": "New Flag", "flag_type": "boolean"},
"metadata": {"project_id": "project-uuid"},
"created_at": "2026-04-01T12:00:00Z"
},
{
"id": "uuid",
"org_id": "uuid",
"actor_id": "system",
"actor_type": "system",
"action": "flag.scheduled_toggle",
"resource_type": "flag_state",
"resource_id": "state-uuid",
"before_state": {"enabled": false},
"after_state": {"enabled": true},
"created_at": "2026-04-01T09:00:00Z"
}
]

Audit Entry Fields

FieldDescription
idUnique entry identifier
org_idOrganization ID
actor_idUser ID or "system" for automated actions
actor_typeuser or system
actionWhat happened (see actions below)
resource_typeType of resource changed
resource_idID of the affected resource
before_stateState before the change (JSON, nullable)
after_stateState after the change (JSON, nullable)
metadataAdditional context (JSON, nullable)
created_atTimestamp of the event

Audit Actions

ActionDescription
flag.createdNew flag created
flag.updatedFlag metadata changed
flag.deletedFlag deleted
flag.killedKill switch activated
flag.promotedFlag config promoted between environments
flag.scheduled_toggleScheduled enable/disable executed by system
flag.approved_change_appliedApproved change applied

Before/After States

The before_state and after_state fields capture the resource state before and after the change, enabling:

  • Change diffing — see exactly what changed
  • Compliance — full audit trail for regulatory requirements
  • Debugging — understand why a flag behaves a certain way