Zum Inhalt springen

User Profile Changes

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Papershift keeps an audit trail of changes made to a user’s master data (e.g. fields on the personnel file). Every time a field value is created or updated, or a relevant resource is deleted, a profile change record is stored with the value before and after the change.

Attribute Description Specifics
user_id The ID of the user to whom the change belongs.
actor_id The ID of the user who performed the change.
actor_email The email of the user who performed the change at that time. Denormalized, does not change
action_type The type of change that occurred. One of: updated, uploaded, deleted
field_group The name of the field group the changed field belongs to.
field_name The name of the changed field.
value The value before and after the change. { "before": ..., "after": ... }
resource_sensitive Whether the linked field or document was sensitive when the change was recorded. Snapshot at change time; does not change if the resource is later updated
created_at When the change was recorded.

Relationships

Relationship Description
user The user to whom the profile change belongs
actor The user who performed the change (if still resolvable)

Example response:

{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "profile_change",
"attributes": {
"user_id": "b7f8d3a9-6c5e-4e5c-9d8f-7b6c96d4e3c2",
"actor_id": "c2d3e4f5-6789-0abc-def1-234567890abc",
"actor_email": "[email protected]",
"action_type": "updated",
"field_group": "Personal Information",
"field_name": "first_name",
"value": {
"before": "Jon",
"after": "John"
},
"resource_sensitive": false,
"created_at": "2026-01-15T10:00:00.000Z"
}
},
{
...
}
]
}

This endpoint returns the profile change history for a user, most recent changes are not sorted by default; use sort = created_at to get the most recent changes first.

When resource_sensitive is true, field_name and value are masked by default. Pass reveal_sensitive=true to include them. This requires the matching sensitive read right for the linked resource type.

For a merged timeline of changes and read-access views with correct pagination, use User Profile Histories instead.

GET /api/v1/users/:user_id/profile_changes

Parameter Description
user_id The ID of the user whose profile change history to return.
Parameter Description
reveal_sensitive When true, includes unmasked field_name and value for sensitive changes. Optional, defaults to false.

Example: GET /api/v1/users/:user_id/profile_changes?reveal_sensitive=true

In addition to the standard filter syntax, this endpoint supports filtering by one or more actor IDs, the changed field, the field group, and a date range:

Filter by the IDs of users who made changes: GET /api/v1/users/:user_id/profile_changes?filter[actor_id]=in:actor-id-1,actor-id-2

Filter by field name: GET /api/v1/users/:user_id/profile_changes?filter[field_name]=eq:first_name

Filter by field group: GET /api/v1/users/:user_id/profile_changes?filter[field_group]=eq:Personal Information

Filter by a date range (combine both bounds as needed): GET /api/v1/users/:user_id/profile_changes?filter[created_at_gteq]=2026-01-01&filter[created_at_lteq]=2026-01-31

This endpoint’s results are also paginated, see the pagination section for details.

Authorization requires the account or team right profile_change.read. If a user has audit_relevant_data.read but not profile_change.read, the list and show endpoints return only the profile changes about fields and documents the account currently marks as audit relevant. All other profile changes are hidden.

Example response:

{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "profile_change",
"attributes": {
"user_id": "b7f8d3a9-6c5e-4e5c-9d8f-7b6c96d4e3c2",
"actor_id": "c2d3e4f5-6789-0abc-def1-234567890abc",
"actor_email": "[email protected]",
"action_type": "updated",
"field_group": "Personal Information",
"field_name": "first_name",
"value": {
"before": "Jon",
"after": "John"
},
"resource_sensitive": false,
"created_at": "2026-01-15T10:00:00.000Z"
}
}
}

This endpoint returns a single profile change. Supports the same reveal_sensitive query parameter as the list endpoint.

GET /api/v1/users/:user_id/profile_changes/:profile_change_id

Parameter Description
user_id The ID of the user
profile_change_id The ID of the profile change to return