Skip to main content

Audit Logs

The audit log endpoints give read-only access to the record of actions performed on the OutThink platform. They are intended for compliance reviews and for feeding a SIEM or archive.

All requests also need the authentication headers described in Authentication. Examples on this page use {baseUrl} as a placeholder for the base URL of your region, defined next.

Base URL by region​

{baseUrl} is the base address of the OutThink Analytics API for the region where your data is hosted.

For customers with a data hosting location in the United States:

https://api.outthink.app/analytics/v1

For customers with a data hosting location in the European Union, and for any region not listed here:

https://api.outthink.io/analytics/v1

For customers with a data hosting location in Canada:

https://api.ca.outthink.app/analytics/v1

For customers with a data hosting location in the United Arab Emirates:

https://outthink-publicapi-uae.azure-api.net/analytics/v1

If you are unsure which region applies to your tenant, ask your OutThink contact.

Who can call​

The endpoints require an API key that is either tenant-level or covers the tenant's top-level organization, and that has the auditlogs scope. Keys with a wildcard scope pass the scope check. Passing organizationId values outside the coverage of your key is refused.

Authentication, the Correlation-Id header and the 10 requests per second limit apply as on every other endpoint. See Rate Limiting.

Default time window​

On the list endpoint, createdTo defaults to now, and createdFrom defaults to 30 days before the effective createdTo. If you send neither, you get the last 30 days. To read older entries, send createdFrom (alone, which reads from that time up to now) or both bounds. The export endpoint requires both and has no defaults.

On the list endpoint, an end before the start is refused with 400 invalid_parameter on field createdTo. This includes a createdFrom that is later than the default end (now), when you send no createdTo.

OutThink support staff actions​

Actions performed by OutThink support staff are excluded by default. Set includeOutThinkSupport=true to include them (the default is false).

Staff actions are always masked. They appear with the actor name support@outthink.io, no user ID (actor.userId is null) and actor.isOutThinkSupport: true.

Event keys and display wording​

eventKey is a stable identifier for the type of event. Use it for filters, alerts and integrations. The display wording in actionType and resource may change over time, so do not match on those values in code. Use filter options to list the current actionTypes and resources.

Pulling entries on a schedule​

createdAt is the time the action happened, not the time the entry became visible through the API. An entry can therefore appear with a createdAt that is earlier than the latest entry you have already read. A pull that starts exactly where the previous one ended can miss such entries.

To reduce the risk of missing late-arriving entries:

  1. Keep the latest createdAt you have processed, and the set of entry id values you have stored.
  2. On each run, set createdFrom to that timestamp minus an overlap, and createdTo to now. The overlap should exceed the ingestion delay you expect; 24 hours is only an example.
  3. Page through the window with skip and take, using sort=createdAt:asc. Ascending order makes paging more predictable, but entries with the same createdAt are not guaranteed a particular order.
  4. Discard every entry whose id you already stored, and store the rest.
  5. Advance your timestamp to the latest createdAt you processed.
GET {baseUrl}/auditLogs?createdFrom=2025-01-14T00:00:00Z&createdTo=2025-01-15T00:00:00Z&sort=createdAt:asc&take=100

Reading deep history​

The total is returned on every page. skip and take are best suited to shallow reads. For deep history, split the period into date windows with createdFrom and createdTo, or use the export endpoint.

Parameter rules​

These rules apply to the list and export endpoints. A value that breaks one is refused with 400 invalid_parameter, and the field names the parameter.

  • UUIDs: organizationId, campaignId, groupId and id must each be a valid UUID. In responses, id, campaignId, groupId and target.id are UUIDs (the last three can be null). targetId is a free-text contains filter and is not validated as a UUID.
  • Status: status accepts only Success or Failure, in any letter case.
  • List filters: actionType, resource and eventKey can be repeated. Each value is at most 256 characters and cannot contain a comma; repeat the parameter instead of joining values.
  • Free-text filters: search, targetName and targetId are at most 256 characters (they can contain commas).
  • Single-valued parameters: createdFrom, createdTo, search, targetName, targetId, sort, includeOutThinkSupport, includeDetails and, on the list endpoint, skip and take can be sent only once. Sending one of them more than once is refused. Blank values are ignored.
  • Paging (list endpoint only): skip and take must be integers; a value that is not an integer is refused with 400 invalid_parameter on field skip or take. A negative skip is treated as 0. take defaults to 10 and is clamped to the range 1 to 100. The export endpoint is not paged and ignores both.
  • Unknown parameters: a parameter that an endpoint does not define is ignored, not refused, on all three endpoints. The filter options endpoint defines no parameters, so anything sent to it is ignored.

Export​

The export endpoint streams a UTF-8 CSV that opens correctly in Excel and Google Sheets (with a byte-order mark and CRLF line endings). It accepts the same filters as the list endpoint, apart from paging. A Details column is added when includeDetails=true.

Limits, all checked before any CSV content is sent:

  • createdFrom and createdTo are mandatory.
  • The end must not be before the start.
  • The range must not exceed 366 days.
  • No more than 100,000 rows may match. Narrow the filters or split the period.

Errors​

Errors use the standard body with code, field and reason. The filter options endpoint takes no parameters and can only return the first two 403 errors below. The list and export endpoints check in this order (items 1 to 4 apply to both):

  1. 403 invalid_apiKey_level: the key is neither tenant-level nor covers the top-level organization.
  2. 403 missing_required_scope: the key lacks the auditlogs scope.
  3. 403 organization_access_exception: an organizationId is outside the coverage of the key.
  4. 400 unsupported_sort: sorting on actionType or resource is not supported. The field names the sort field.
  5. 400 invalid_parameter (list and export): the field names the parameter. See Parameter rules. An end before the start is reported on field createdTo.
  6. 400 missing_parameter (export only): createdFrom or createdTo is missing. The list endpoint has no required parameters and never returns this code.
  7. 400 invalid_parameter (export only), on field createdTo: a range over 366 days, or more than 100,000 matching rows.

Items 1 to 4 are checked in that order. The validation errors in items 5 to 7 are different: the request is checked parameter by parameter (organizationId, createdFrom, createdTo, the date window checks, then skip and take on the list endpoint, then the remaining filters) and only the first problem found is reported. The 100,000-row limit on export is checked last, after all parameters are valid. A request therefore returns one error, and which one it is may not follow the order of this list. For example, on export a missing createdFrom can be reported before a later invalid parameter, and an invalid organizationId before a missing date.

See also Data Validation Errors.