# Import user data

Imports user data from a CSV format file to the Login project.


{% html name="div" attrs={"class": "notice"} %}
Notice

Rate limits for server-side methods are applied to this method.
{% /html %}

Endpoint: POST /projects/{project_id}/user_import
Version: v1
Security: Server

## Path parameters:

  - `project_id` (string, required)
    Login project ID from Publisher Account.

## Request fields (multipart/form-data):

  - `users` (string, required)
    CSV file containing user data. Maximum file size: 64 MB.
 
 Phone format: [E.123](https://en.wikipedia.org/wiki/E.123).

  - `mapping` (string, required)
    A JSON object mapping CSV column indexes (starting from 0) to user field names.

Allowed keys:
  - email
  - email_verified
  - user_id
  - is_active
  - is_banned
  - username
  - birth_date
  - gender
  - full_name
  - last_name
  - first_name
  - nickname
  - picture
  - password_hash
  - phone_number
  - server_custom_id
  - last_login_date
  - provider|{provider_name}

Allowed provider names:
  - steam

Example:
json
{
  "username": 0,
  "email": 1,
  "is_active": 2,
  "is_banned": 3,
  "email_verified": 4,
  "birth_date": 5,
  "gender": 6,
  "full_name": 7,
  "last_name": 8,
  "first_name": 9,
  "nickname": 10,
  "picture": 11,
  "phone_number": 12,
  "server_custom_id": 13,
  "provider|steam": 14,
  "last_login_date": 15
}

  - `email` (string, required)
    Email to send a report to.

  - `comma` (string)
    CSV separator.

## Response 400 fields (application/json):

  - `error` (object, required)

  - `error.code` (string, required)
    Error code.
    Example: "003-061"

  - `error.description` (string, required)
    Error description.
    Example: "Object not found."

  - `error.details` (object)
    Additional information.

## Response 403 fields (application/json):

  - `error` (object, required)

  - `error.code` (string, required)
    Error code.
    Example: "003-061"

  - `error.description` (string, required)
    Error description.
    Example: "Object not found."

  - `error.details` (object)
    Additional information.

## Response 404 fields (application/json):

  - `error` (object, required)

  - `error.code` (string, required)
    Error code.
    Example: "003-061"

  - `error.description` (string, required)
    Error description.
    Example: "Object not found."

  - `error.details` (object)
    Additional information.


## Response 204 fields
