Unidy Docs

Change history

Read the recorded changes to a customer record or configuration, with field visibility and audit permissions.

Use a resource's GET …/history operation to find when a value changed, where the change came from and which fields were saved together. For example, to investigate a user's profile change, take the user ID from the data API and request one page of events.

bash
curl "https://YOUR_BRAND_HOST/api/v2/data/users/${USER_ID}/history?page=1&per_page=25" \
  -H "Authorization: Bearer ${UNIDY_API_KEY}"

Use the same host or brand selection as for the user record. For brand configuration, select the brand in the path, for example GET /api/v2/brands/current/config/history. For shared settings, use GET /api/v2/tenant/settings/history with a credential that has no brand restriction.

Read the response

The records array lists change events newest first. Each event groups the field changes saved at the same timestamp. Use page and per_page to page by whole events. The result includes meta.pagination.

FieldHow to use it
changed_atTime of the save, when known.
sources, authorsDistinct sources and actors recorded for the event. An empty list means the value was unavailable.
request_ids, trace_idsIdentifiers associated with this save. Include the relevant ID when investigating a specific change.
changesOne entry per field, including attribute, object_type, change_type, old_value, new_value and redacted. Document settings can also include the field's group. The object type can identify a child whose change was recorded on its parent.

Access requires read permission for the resource and for the audit logs of its category. For example, loyalty configuration history uses the relevant settings permission and the settings audit-log permission. For newsletter preferences and their groups, history also requires settings audit-log read access. MCP only lists a history tool for principals with the required permissions. For a settings document, the response includes only fields for which you have the matching access. A user's history also respects the visibility of individual profile fields.

For a masked field, both values are null and redacted is true. Some sensitive values require manage access to the resource. Write-only values stay protected. Check the flag before interpreting null as an empty or cleared value.

Find the right history route

Look for History on the record or singleton in your instance's API reference. Coverage includes the following groups.

AreaResources with history
Brand settings and presentationGeneral configuration, captcha, custom styles, CSS blocks, menus, legal links, email delivery pauses, template assets, components and templates.
Brand registration and accessRegistration newsletter selections and query fields, profile sections and fields, Internal Matching configuration, and brand roles.
Tenant configurationSettings, feature flags, attribute policies and rules, custom definitions and select values, login providers, OAuth apps and claims, SAML configs, SDK clients and their captcha, roles, webhook registrations and subscriptions.
Customer dataUsers, person groups and members, newsletters and their preferences, preference groups and subscriptions.
Commerce and loyaltyTicket, subscription and transaction categories and records, ticket transfers, transaction line items, and loyalty programs, actions, rules, levels and seasons.

A 403 can indicate a missing category audit-log permission even when you can read the underlying record. A 404 can mean the record is missing, outside the selected brand, or a singleton such as a custom style has never been created. An empty page can mean there are no visible events for that record. For a legal link, append /history to the link key, for example GET /api/v2/brands/current/legal_links/imprint/history. Look for preference and preference-group changes on their newsletter, and select-value or custom validation changes on their custom attribute definition. Integration mapping, matching-field and plugin settings changes can also appear on the owning plugin. A deleted record can no longer be addressed at its history URL. For supported child records, check the parent's history for changes made before deletion.

To review the same kinds of saves in the dashboard, see Save, reset, preview, and history.

Was this page helpful?