Skip to content

Customer-facing audit log: every mutating API request on the account with its actor (user session, M2M client, API key, or impersonating staff), newest first. Reads are capped to the last 90 days. Super admin, admin, or auditor role required, since the log exposes other members' actions and request IPs; audit read is the whole point of the auditor role (Datadog's Audit Trail Read is the precedent).

GET
/account/audit_log
curl --request GET \
--url 'https://api.siteqwality.com/account/audit_log?actor_type=session' \
--header 'Authorization: Bearer <token>'
actor_user_id
string format: uuid

Only entries performed by this user.

actor_api_key_id
string format: uuid

Only entries performed by this API key.

actor_type

Who performed an audited action. Mirrors customer_audit_log.actor_type.

string
Allowed values: session m2m api_key impersonated_staff system

Only entries with this actor type.

action
string

Action name, matched exactly or as a dot-prefix: http.job also matches http.job.regions, but never http.jobs.

target_kind
string

Only entries targeting this resource kind (first path segment).

target_id
string format: uuid

Only entries targeting this resource id.

since
string format: date-time

RFC3339; clamped to the read window.

until
string format: date-time

RFC3339; inclusive upper bound.

limit
integer format: int64

Row cap, clamped to 1..=1000 (default 100).

Audit log entries (last 90 days)

Media type application/json
object
entries
required
Array<object>

One row in the customer audit-log list response. request_ip is stringified for JSON transport (Postgres INET round-trips as IpNetwork).

object
id
required
string format: uuid
occurred_at
required
string format: date-time
actor_type
required
string
actor_user_id
string | null format: uuid
actor_api_key_id

The API key that acted, when actor_type is api_key. Null on rows written before attribution landed (2026-08-06).

string | null format: uuid
actor_api_key_name

The key’s friendly name at read time (keys are revoked, never deleted, so this resolves for historical rows too).

string | null
actor_m2m_client_id
string | null
impersonated_by

Staff user id when the action was performed under impersonation.

string | null format: uuid
action
required
string
target_kind
string | null
target_id
string | null format: uuid
http_method
required
string
http_path
required
string
http_status
integer | null format: int32
request_ip
string | null
user_agent
string | null
read_window_days
required

Days of history the endpoint serves; older rows are not returned.

integer format: int64
Example generated
{
"entries": [
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"occurred_at": "2026-04-15T12:00:00Z",
"actor_type": "example",
"actor_user_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"actor_api_key_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"actor_api_key_name": "example",
"actor_m2m_client_id": "example",
"impersonated_by": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"action": "example",
"target_kind": "example",
"target_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"http_method": "example",
"http_path": "example",
"http_status": 1,
"request_ip": "example",
"user_agent": "example"
}
],
"read_window_days": 1
}

Missing or invalid authentication

Caller lacks a role able to read the audit log (super admin, admin, or auditor)

Internal server error