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.
- List audit log entries:
GET {baseUrl}/auditLogs - List audit log filter options:
GET {baseUrl}/auditLogs/filterOptions - Export audit log entries:
GET {baseUrl}/auditLogs/export
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:
- Keep the latest
createdAtyou have processed, and the set of entryidvalues you have stored. - On each run, set
createdFromto that timestamp minus an overlap, andcreatedToto now. The overlap should exceed the ingestion delay you expect; 24 hours is only an example. - Page through the window with
skipandtake, usingsort=createdAt:asc. Ascending order makes paging more predictable, but entries with the samecreatedAtare not guaranteed a particular order. - Discard every entry whose
idyou already stored, and store the rest. - Advance your timestamp to the latest
createdAtyou 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,groupIdandidmust each be a valid UUID. In responses,id,campaignId,groupIdandtarget.idare UUIDs (the last three can benull).targetIdis a free-text contains filter and is not validated as a UUID. - Status:
statusaccepts onlySuccessorFailure, in any letter case. - List filters:
actionType,resourceandeventKeycan 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,targetNameandtargetIdare at most 256 characters (they can contain commas). - Single-valued parameters:
createdFrom,createdTo,search,targetName,targetId,sort,includeOutThinkSupport,includeDetailsand, on the list endpoint,skipandtakecan be sent only once. Sending one of them more than once is refused. Blank values are ignored. - Paging (list endpoint only):
skipandtakemust be integers; a value that is not an integer is refused with400 invalid_parameteron fieldskiportake. A negativeskipis treated as 0.takedefaults 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:
createdFromandcreatedToare 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):
403 invalid_apiKey_level: the key is neither tenant-level nor covers the top-level organization.403 missing_required_scope: the key lacks theauditlogsscope.403 organization_access_exception: anorganizationIdis outside the coverage of the key.400 unsupported_sort: sorting onactionTypeorresourceis not supported. Thefieldnames the sort field.400 invalid_parameter(list and export): thefieldnames the parameter. See Parameter rules. An end before the start is reported on fieldcreatedTo.400 missing_parameter(export only):createdFromorcreatedTois missing. The list endpoint has no required parameters and never returns this code.400 invalid_parameter(export only), on fieldcreatedTo: 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.