Skip to main content

Audit Logs API

Query the audit trail of mutating actions across your organization. Superadmins see every entry; regular users see only entries authored by members of organizations they belong to.

Base path: /audit

Required scope: read.


List Audit Logs

GET /audit/logs

Query Parameters:

ParameterTypeDefaultDescription
actionstring-Filter by action type (e.g. segment.create, user.deactivate)
resource_typestring-Filter by resource type (e.g. segment, user, site)
user_idinteger-Filter by author
from_datedatetime-Lower bound (ISO 8601)
to_datedatetime-Upper bound (ISO 8601)
pageinteger1Page number
page_sizeinteger50Items per page (1-100)

Response:

{
"success": true,
"data": {
"logs": [
{
"id": 12041,
"user_id": 7,
"user_email": "alice@acme.com",
"user_name": "Alice",
"action": "segment.create",
"resource_type": "segment",
"resource_id": "seg_abc123",
"account_id": "acme",
"details": {
"segment_name": "paid-spain",
"filter_count": 2
},
"ip_address": "203.0.113.42",
"created_at": "2025-01-08T14:23:00Z"
}
],
"total": 1248,
"page": 1,
"page_size": 50,
"total_pages": 25
}
}

details is a free-form object whose shape depends on the action type — treat it as opaque JSON when consuming.