API Reference
Log In
API Reference

Bulk import departments and primary memberships from CSV

Accepts multipart/form-data with a file field named 'file'. Header: email,department_path[,is_primary] (org_unit_path is accepted as a silent back-compat alias for department_path). department_path is slash-separated unit names from root (e.g. Engineering/Platform/Payments); missing units are created. Emails are matched to people in your directory (a new person is added when none matches); no Revenium user is created. A row with an empty department_path is not an error: that person counts as not in the file. dryRun=true runs full validation with zero writes. By default an import only adds and moves people; removeMissing=true also ends the assignment of everyone not in the file. rewriteHistory=true corrects the past instead: each listed person's history is rewritten from rewriteFrom, and absent decides what happens to people not in the file. Any row error rejects the whole file: nothing is saved and applied is false. Apply a correction with the previewVersion of its dry run; a stale one is refused with 409.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

ID of the team that owns this data.

boolean
Defaults to false

When true, validates and reports without writing any data

boolean
Defaults to false

When true, the file is the full list: everyone with an open CSV or manual assignment who is not in the file has it ended. Their earlier usage stays on their department; nobody is deleted. Skipped when any row fails. Not used with rewriteHistory, which takes absent instead

boolean
Defaults to false

When true, the file corrects the past: each listed person's department history is rewritten from rewriteFrom (or from the beginning)

date

With rewriteHistory: the date the correction applies from (UTC, inclusive), today or earlier. Omit to correct from the beginning

string
enum

With rewriteHistory: what happens to people who hold a department but are not in the file. LEAVE changes nothing for them, END ends their department now and keeps their history, ERASE retires their whole CSV and manual history so their usage goes to Unassigned

Allowed:
string

The previewVersion of the dry run this run applies. Required to apply a correction (rewriteHistory with dryRun=false). When sent, the run is refused with 409 if departments changed since that preview

Body Params
file
required
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*