Create or update users in an Anaplan tenant by uploading a CSV file. Users are matched by username (email address).

Each line should contain the full definition of the user, along with one or more licenses for the user. Licenses should be passed inside double quotes and be separated by commas.

PUT

/admin/1/0/users/import

HeaderRequiredDescription
Authorization: AnaplanAuthToken {anaplan_auth_token}

Yes


The Anaplan authentication token.
Content-Type: multipart/form-dataYesThe format of the request. Only multipart/form-data is supported

CURL -X PUT 'https://api.anaplan.com/admin/1/0/users/import' \

-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}' \

-H "Content-Type: multipart/form-data" \

-F "file=@users_chunk1.csv"

If the request is successful, the API returns an HTTP 207 multi-status code.

Success codeResponseDescription
207acceptedNumber of records found in the uploaded file.

createdNumber of records that resulted in users being created.

updatedNumber of records that resulted in users being updated.

errors

An object with the list of errors, with reference to the line number and the reason for the error.
For example:

{
"1": "User email already exists",
"5": "License not found"
}

If the request is unsuccessful, the API returns an error code.

Error codeError messageDescription
400INVALID_PAYLOADExpected payload format is a binary representation of a CSV file.

INVALID_PAYLOADMissing headers in CSV file.

INVALID_PAYLOADMissing headers in CSV file. Expected headers: username,first_name,last_name,licenses

INVALID_PAYLOADCSV must contain at least one data row.

INVALID_PAYLOADInvalid CSV Resource. Maximum number of rows allowed is 500.

INVALID_PAYLOADInvalid CSV resource. Error in row number.

INVALID_PAYLOADInvalid CSV resource. Empty cell in row number.

INVALID_PAYLOADInvalid CSV resource. Duplicate email address in row number.
401UNAUTHORIZEDAuthorization token is missing or invalid.
403FORBIDDENUser is not allowed to perform this operation.

Read about the export endpoint.