Skip to content

User Data Exports

These endpoints require the user_data_export.create right. A user can read only the exports they started. A user can have one export in running status at a time. Finished exports are discarded 7 days after they were created.

List of valid attributes:

Attribute Description Specifics
export_scope Users included in the export Required. Must be all, teams, or users
field_scope Fields included in the export Optional. Must be all or fields. Omit to export no fields
export_entity_ids User or team IDs included in the export Required for the users and teams scopes
field_ids Field IDs included in the export Required when field_scope is fields
file_format Format of the exported user data file Required. Must be json or csv
document_label_scope Document labels included in the export Optional. Must be all or labels. Omit to export no documents
document_label_ids Account label IDs used to select documents Required when document_label_scope is labels unless include_unlabelled_documents is true
include_unlabelled_documents Include documents with no labels Optional. Only used when document_label_scope is labels. Defaults to false
include_profile_history Include the profile audit log Optional. Boolean. Defaults to false

Meta data: Download URL

Parameter Allowed values Description
download_url true/false When passing true on the show endpoint, it generates a temporary URL to use for downloading the zip

Example request:

{
"data": {
"type": "user_data_export",
"attributes": {
"export_scope": "users",
"field_scope": "fields",
"export_entity_ids": ["c8b6859f-fc3d-4f6a-bf26-81993f087f37"],
"field_ids": ["6d9a20ad-75c6-4875-9671-c77463904380"],
"file_format": "csv",
"document_label_scope": "labels",
"document_label_ids": ["e7c1a9b2-3d4e-4f5a-8b6c-1d2e3f4a5b6c"],
"include_unlabelled_documents": true,
"include_profile_history": true
}
}
}

Example response:

{
"data": {
"id": "baf9c6a1-4e8b-492e-a972-a03bd0fd52ef",
"type": "user_data_export",
"attributes": {
...
}
}
}

This endpoint records the export and builds the archive in a background job. The response is the new export with status running. Starting another export while one is still running returns 409 Conflict. The error title includes the creation time of the running export.

For the users scope, export_entity_ids contains user IDs. For the teams scope, it contains team IDs. The IDs are ignored when export_scope is all.

The field_ids are ignored when field_scope is all. When field_scope is omitted, no field file is exported.

The document_label_ids and include_unlabelled_documents are ignored when document_label_scope is all. When document_label_scope is omitted, no documents or mapping file are exported. all includes every readable document, including unlabelled ones. labels includes documents that have at least one of the selected labels. When include_unlabelled_documents is true, unlabelled documents are also included (and may be selected on their own without document_label_ids). At least one of field_scope or document_label_scope must be provided.

When include_profile_history is true, the archive contains the profile audit log of each included employee. Only entries the requesting user may read are exported. Employees whose profile audit log the user cannot read get no file.

When the job finishes, status becomes ready and export_name is set, or status becomes failed. A ready export is emailed to the requester with a link to /employees?user_data_export=open.

A successful export creates one user_data_export_log and a profile_view per included employee and area. The areas are master_data, master_data_sensitive, documents, documents_sensitive and, with include_profile_history, profile_history. A refused export of an employee the actor cannot read still creates the log and a denied profile view.

POST /api/v1/user_data_exports

Example response:

{
"data": [
{
"id": "baf9c6a1-4e8b-492e-a972-a03bd0fd52ef",
"type": "user_data_export",
"attributes": {
...
}
},
{
...
}
]
}

This endpoint returns the exports the current user started. Sort with sort=-created_at to list the newest first. status is running, ready, or failed. Finished exports are discarded 7 days after created_at.

GET /api/v1/user_data_exports

Parameter Description
sort Sort the exports. Use -created_at for newest first.

Example: GET /api/v1/user_data_exports?sort=-created_at

Example response:

{
"data": {
"id": "baf9c6a1-4e8b-492e-a972-a03bd0fd52ef",
"type": "user_data_export",
"attributes": {
...
},
"meta": {
...
}
}
}

This endpoint returns one export belonging to the current user.

Pass meta[download_url]=true to include meta.download_url when status is ready. The URL is a presigned download for the zip and expires after 10 minutes. Running and failed exports omit download_url.

GET /api/v1/user_data_exports/:user_data_export_id

Parameter Description
user_data_export_id The ID of the export to return
Parameter Description
meta[download_url] When true and the export is ready, includes a presigned download URL.

Example: GET /api/v1/user_data_exports/:user_data_export_id?meta[download_url]=true

The background job writes a zip named {datetime}_Stammdatenexport.zip. The datetime is expressed in UTC.

The archive contains a root folder with the same name. Each exported employee has a numbered folder. When fields are exported, the folder contains a file whose extension matches file_format (json or csv). When documents are requested, the folder also contains the selected files and a UTF-8 CSV mapping file:

2026-09-01_15-05-00_Stammdatenexport/
└── 01_Dominik_Muster/
├── Dominik_Muster.csv
├── Dominik_Muster_audit_log.csv
├── Immatrikulationsbescheinigung_2025.pdf
├── payroll_09_2026.pdf
└── mapping.csv

Document files keep their original names ({name}.{extension}). The mapping CSV uses locale-specific headers: File, Description, and Person in English, or Datei, Beschreibung, and Person in German. File is the exported file name, Description is the document description, and Person is the employee name.

The JSON object groups readable field values by field group and field name. Values retain their JSON type, and readable fields without a value are included as null. Fields that the requesting user is not permitted to read are omitted.

CSV files are UTF-8 with BOM, use a comma delimiter, " as the quote character, and CRLF line endings. Each file has a header row and one row per field with the columns field_group, field_name, and value. Empty field values are written as empty cells. Fields that the requesting user is not permitted to read are omitted.

Only documents the requesting user is permitted to read are exported. Sensitive documents require document_sensitive.read.

When include_profile_history is true, each employee folder also contains {name}_audit_log.csv with the same entries and columns as the profile audit log on screen, oldest first: Actor, Actor email, Field, Group, Date (ISO 8601, UTC) and Action. Headers and labels are translated into the language of the requesting user. The file is UTF-8 with BOM and uses CRLF line endings. Names of sensitive fields and documents are masked as ******** when the requesting user may not reveal them.