Audit log
The organization's audit log.
List audit events
/v1/audit_eventsaudit:readNewest first, within your plan's audit retention. Pages forward with starting_after.
Reading the audit log through the API is itself recorded in the audit log.
On an AI team that turned on Protected files, a key that lacks files:protected.read (or whose person lacks it) gets protected in place of every AI Employee or skill name in that team's events: an AI Employee key in details, and on an event that names a file under .claude/agents or .claude/skills, every path in it (resource_id and the paths in details). An event with no team is treated this way when any team hides its AI Employees from the key.
limitintegerHow many objects to return, 1 to 100. Default 20.
starting_afterstringReturn events older than this audit event id.
actionstringOnly events with this action, for example
api_key.created.actorstringOnly events by this email address.
created[gte]string (date-time)Only events at or after this time.
created[lte]string (date-time)Only events at or before this time.
HQ-Versionstring (date)A dated API version. Defaults to the version the key was created with.
HQ-AccountstringAgency keys only: the slug of the client organization this request acts for. Required with an agency key, refused with
400 invalid_requeston any other credential. A slug that is not one of your agency's current clients is404 not_found. An agency key is limited to 600 requests a minute per key on EACH API server (the cap is per replica), plus its own budget per client (limit_scope: agency_client), separate from the client's own keys.
Returns a list of AuditEvent objects.
200A page of audit events.
OtherAn RFC 9457 problem.
Objects
AuditEvent
objectstringidstringactionstringactorobjectresource_typestring or nullresource_idstring or nullteamstring or nulldetailsobject or nullip_addressstring or nullcreated_atstring (date-time)