Skip to main content
The audit log records configuration changes in your Aampe account (who made each one, when, and for most kinds of item the values before and after), and you can read it with three endpoints on the public API.

Authentication

Send your Aampe API key in the X-API-KEY header on every request (see Authentication). All endpoints are read-only GET requests under https://composer.api.aampe.com/api, and the key’s user needs read access to the account.
Each request only ever returns your own account’s history. Times are UTC, in ISO 8601 format.

What’s Recorded

Each change is one entry: who made it, when, what changed and, for most kinds of item, the values before and after. Entries are never edited or removed after they’re written.
Some changes are recorded without values for now: their data is null, so an entry says who changed which item and when, but not what changed. This covers every Formula, FormulaLabel, FormulaAudience, Variant and LabelVariantType entry, and a label’s creation. Tag changes and edits to an alternate’s text aren’t recorded yet.
In every entry: before is null for a creation. Use verb to tell a deletion or archive apart: most items are kept when deleted or archived, so after holds the item with deleted_at or archived_at set, and after is null only when the item is removed outright. Ids of events and of audience-filter attributes and operators come with their names alongside, for example event_id with event_name and event_code. Snapshots in the examples on this page are excerpts. Older entries, from before the audit log launched, can have a simpler data shape without before and after.

Account Log

Returns every change in your account, newest first, one page at a time. All parameters are optional and combine with AND. For example, the changes Ana made in September:
The response wraps the entries with paging details:

Combined Saves

Settings are often saved several times in quick succession, so the log combines a person’s back-to-back saves of the same item into one entry. Saves are combined when they are by the same person, on the same item, and each within 10 minutes of the one before. Another person’s save in between starts a new entry. A combined entry shows the net change:
  • data.before is the item before the first save, data.after is the item after the last.
  • changed_fields lists only fields that end up different. A field edited and then put back isn’t listed, so an entry can show []: no net change.
  • save_count is how many saves it combines; first_activity_id and first_created_at are the first save’s. id and created_at are the last save’s.
  • A single save has save_count 1, and its first_* fields equal its own.
Only changes to existing items combine. A creation, deletion or archive is always its own entry, and message changes aren’t combined yet. Combining never crosses the edges of a start/end range, and never changes what’s stored: add ungrouped=true to see every save on its own.

One Item’s History

Returns every change to one item and to everything filed under it, oldest first, as a plain list with no paging. It uses the same entries and combined saves as the account log.
For large histories, prefer the account log with target_model and target_id, which pages and can be filtered by date and person.

Who Made Changes

Lists everyone who has changed your account, for filtering the log by user_id. It includes people who have since left or been deactivated, and Aampe staff who changed your configuration on your behalf.
user_name is the name on the person’s latest change, or their current name if that change has none. email is null when their user account no longer exists. The list is sorted by name.

Errors

Errors return a JSON body with a detail message.