Skip to content

Audit Log Query

This page describes how to query account-level audit logs through the API, with support for filtering by time range and operator. It is intended for troubleshooting and compliance review.

URI

GET /audit_logs

Permission and Rate Limit

The API key must have the Audit_Log_Query permission. This endpoint can be requested up to 60 times per hour per API key.

Query Parameters

ParameterTypeRequiredDefaultDescription
auditTypeStringNoExact-match filter by audit type, for example PLATFORM_API_KEY_CREATED.
operatorStringNoFilter by operator. Accepted values: system (system operations), owner email, subuser email, or a 16-character alphanumeric appKey.
startTimeStringNoQuery start time in YYYY-MM-DD HH:MM:SS format. Cannot be earlier than 90 days ago (midnight UTC).
endTimeStringNoQuery end time in YYYY-MM-DD HH:MM:SS format. Must not be later than the current time.
_pageIntegerNo1Page number. Minimum value: 1.
_limitIntegerNo20Number of items per page. Minimum value: 1.
_sortStringNoauditTimeSort field.
_orderStringNodescSort order. Accepted values: asc, desc.

Time Range Limit

startTime cannot be earlier than midnight UTC 90 days ago. Requests with an earlier startTime will return 400.

Request Example

Use the API key as the username and the API secret as the password for Basic Auth.

bash
curl -u key:secret -X GET "{api}/audit_logs?startTime=2026-04-15%2016:00:00&endTime=2026-04-22%2016:00:00&operator=system&_page=1&_limit=20"

Response Example

json
{
  "items": [
    {
      "auditTime": "2026-04-30 10:30:00",
      "auditType": "PLATFORM_API_KEY_CREATED",
      "ip": "203.0.113.8",
      "description": "Created Platform API Key: xxx.",
      "userType": "api",
      "appKey": "app_k_xxx",
      "subuserID": null,
      "userID": "user_xxx",
      "operator": "app_k_xxx"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "count": 37
  }
}

Response Fields

FieldTypeDescription
auditTimeStringTime of the audit event in YYYY-MM-DD HH:MM:SS format.
auditTypeStringAudit event type.
ipStringIP address of the operation source.
descriptionStringDescription of the operation.
userTypeStringOperator type. Enum: system, user (owner), subuser, api (API key).
appKeyStringThe API key used for the operation. Only present when userType is api.
subuserIDStringSubuser ID. Only present when userType is subuser; otherwise null.
userIDStringAccount ID.
operatorStringResolved display value of the operator: owner email, subuser email, system, or appKey.

Error Responses

HTTP StatusDescription
400Invalid parameters, for example an invalid time format or a range over 90 days.
401Unauthorized. The API key is missing or invalid.
403Forbidden. The API key does not have the Audit_Log_Query permission.
429Too many requests. Exceeded the rate limit of 60 requests per hour per API key.