# Bulk users import
You can import your users from CSV files using REST API. The CSV file requires the usage of standardized attribute names for the header row, or you can use column mapping to map your custom column names. You can check the progress of your import with a GET request.
Maximum file size: 200MB
Example CSV file: example_users_import.csv that should be added within Content-Type: multipart/form-data
header
POST
/users/import/
# Parameters
Parameter | Description |
---|---|
separator | Allows to choose separator type in CSV file during import. Available options: comma (default), tab , semicolon . Example usage: ?separator=semicolon |
trigger_automations | The parameter allowing triggering automations for imported users. Possible values are: 1 / 0 / True / true / False / false |
Attributes | Type | Required | Description |
---|---|---|---|
input_file | file | yes | A valid CSV file |
tags | string | no | The key allowing to add tags to all imported users. Each tag has to be in one string and separated by comma. |
lists | string | no | The key allowing to add lists to all imported users. Each list has to be in one string and separated by comma. |
column_mapping | json | no | Optional parameter to map CSV column names to different field names during import. Example: {"Email address": "email", "Phone": "phone_number"} |
# Request
- CURL
- JavaScript
- PHP
- Python
curl --location --request POST 'https://<your_app_subdomain>.user.com/api/public/users/import/?trigger_automations=true' \
--header "Authorization: Token <your_64_char_api_key>" \
--header 'Accept: */*; version=2"' \
--form 'input_file=@"path/to/file.csv"' \
--form 'tags="tag1,tag2,tag3"' \
--form 'lists="list1,list2"' \
--form 'column_mapping="{\"Email address\": \"email\", \"Phone\": \"phone_number\"}"'
# Response
{
"success": true,
"data": {
"import_id": "8fb65489-eb7c-4393-a2c4-d8886c4b4142"
}
}