LMS Collaborator knowledge base

Home/Technical requirements/API/API - Batch import of users (in CSV format)

API – Batch import of users (in CSV format)

  • To batch import users in CSV format, you need to send POST request to URI /api/v2/users-import/csv
  • The request must be accompanied by a file in the format described in Synchronization users using CSV.
  • The request must contain the headings Authorization: Bearer xxxxxxx.

Request example:

curl 'https://your-domain.davintoo.com/api/v2/users-import/csv' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: multipart/form-data' -F 'file=@/path/to/users.csv'


Answer

  • In case of successful request (HTTP response code - 200), will reply in JSON format with information about the number of processed records:
    {"created_count":1,"updated_count":0,"blocked_count":0,"unblocked_count":0}

  • In case of error (HTTP response code - 400) it returns JSON object with error information

Still have questions?
Our technical support team is always happy to help!
Write to us at technical support [email protected]. If you are registered on our Helpdesk - send request button below.
Send request