• Free Trial
  • Products
    • LMSThe world’s easiest-to-use learning management system.
    • Training ContentA robust library of off-the-shelf learning content.
  • Solutions
    • By Use Case
      • Employee Training
      • Sales Training
      • Customer Training
      • Partner Training
      • Compliance Training
      • View all
    • By Industry
      • Technology
      • Nonprofit
      • Retail
      • Hospitality
      • Healthcare
      • View all
  • Customers
    • Learn more about Litmos customer success stories.
      • Case Studies
      • Video Testimonials
      • I Love Litmos
      • Lenny Awards
    • Featured Customer
      • Sabre, a global travel technology provider, increases revenue by using Litmos to train their sales and technical teams.
  • Pricing
  • Resources
    • Ebooks & Infographics
    • Webinars & Podcasts
    • Events
    • Integrations
    • Blog
  • About
    • Company
    • Partners
    • Awards
    • Careers
    • Sustainability
  • Free Trial
Litmos
Log in
Contact us
Support
Search
  • Free Trial
  • Products
    • LMSThe world’s easiest-to-use learning management system.
    • Training ContentA robust library of off-the-shelf learning content.
  • Solutions
    • By Use Case
      • Employee Training
      • Sales Training
      • Customer Training
      • Partner Training
      • Compliance Training
      • View all
    • By Industry
      • Technology
      • Nonprofit
      • Retail
      • Hospitality
      • Healthcare
      • View all
  • Customers
    • Learn more about Litmos customer success stories.
      • Case Studies
      • Video Testimonials
      • I Love Litmos
      • Lenny Awards
    • Featured Customer
      • Sabre, a global travel technology provider, increases revenue by using Litmos to train their sales and technical teams.
  • Pricing
  • Resources
    • Ebooks & Infographics
    • Webinars & Podcasts
    • Events
    • Integrations
    • Blog
  • About
    • Company
    • Partners
    • Awards
    • Careers
    • Sustainability
  • Free Trial

Litmos Documentation

APIs

Home › Litmos Documentation › Bulk Import Users With API

Bulk Import Users With API

Litmos recommends the User Bulk Import API endpoint for business scenarios that require creating or updating a set of users at once. This endpoint works for creating and updating users, both of which use the POST request method and accept either XML or JSON data formats. The user bulk import API invokes the same import process that an administrator would invoke on the user interface.

Create a new Bulk Import for an organization

Create a new user bulk import job. This API Path can be used to create and update user records in bulk. Username is the unique identifier in the import, the username cannot be changed through the use of the user bulk import job. All other fields can be updated, and the current value of a user field will not be nullified if a value is not specified for the same field in the import.

Request URI

POST /bulkimports?source={source}

Response Body (XML)

<UserBulkImport xmlns:i="http://www.w3.org/2001/XMLSchema-instance">  
    <Id>string</Id>  
    <ImportDate>YYYY-MM-DDTHH:MM:SS</ImportDate>  
    <Status>Waiting</Status>  
    <TotalRecords>integer</TotalRecords>  
    <TotalUsersCreated>integer</TotalUsersCreated>  
    <Failed>integer</Failed>  
    <Duplicate>integer</Duplicate>  
    <InvalidEmail>integer</InvalidEmail>  
    <SendEmails>true/fase</SendEmails>  
    <SkipFirstLogin>true/false</SkipFirstLogin>  
    <IsAPIImport>true/false</IsAPIImport>  
</UserBulkImport>

Response Header

200 Ok

Important Notes:

  • Body size max: 2000KB, which will be equivalent to nearly 2000 users.
  • Required Fields: UserName, FirstName, LastName are required fields.
  • By default, the “Enable notifications for messages” value is set to “Enabled” for all users imported with the bulk feature.
  • Values must be given if InactiveDate and AccessLevel fields are passed in the request body, these fields cannot be passed with a null value. AccessLevel can be ‘L‘ for Learner or ‘TL‘ or ‘TA‘ for Team Leader or Team Admin (they will still need to be promoted within a team), or use number values: ‘2‘ is Account Owner, ‘3‘ is Administrator, ‘4‘ is Team Leader, ‘5‘ is Learner.
  • The CustomFields are based on org setup. If the org has mandatory custom fields, these become required in the import else they’re optional.
  • The <Team> and <Course> fields require the use of the TeamCodeForBulkImport and CourseCodeForBulkImport. These codes can be located in the UI on the Team and Course settings pages, otherwise they are available via the API GET /Teams? and GET /Courses? endpoints. 
  • Manager field accepts both manager Id and manager username.

Query string parameters:

  • &sendmessage=[true/false] set true if you want to send login emails
  • &skipfirstlogin=[true/false] set to true if you want to skipfirstlogin
  • &format=json sets json format

Request Body (XML)

<UserImports>
    <UserImport>
        <Username></Username>
        <Email></Email>
        <FirstName></FirstName>
        <LastName></LastName>
        <Password></Password>
        <Phone></Phone>
        <Mobile></Mobile>
        <Skype></Skype>
        <Title></Title>
        <CompanyName></CompanyName>
        <WebSite></WebSite>
        <Twitter></Twitter>
        <Team1></Team1>
        <Team2></Team2>
        <Team3></Team3>
        <Team4></Team4>
        <Team5></Team5>
        <Course1></Course1>
        <Course2></Course2>
        <Course3></Course3>
        <Address1></Address1>
        <Address2></Address2>
        <City></City>
        <State></State>
        <Zip></Zip>
        <Country></Country>
        <CustomField1></CustomField1>
        <CustomField2></CustomField2>
        <CustomField3></CustomField3>
        <CustomField4></CustomField4>
        <CustomField5></CustomField5>
        <CustomField6></CustomField6>
        <CustomField7></CustomField7>
        <CustomField8></CustomField8>
        <CustomField9></CustomField9>
        <CustomField10></CustomField10>
        <SalesforceId></SalesforceId>
        <SalesforceAccountId></SalesforceAccountId>
        <SalesforceContactId></SalesforceContactId>
        <Active>true/false</Active>
        <InactiveDate></InactiveDate>
        <AccessLevel>L,TA,TL,2,3,4,5</AccessLevel>
        <Brand></Brand>
        <Culture></Culture>
        <Manager></Manager>
        <UserCustomField1></UserCustomField1>
        <UserCustomField2></UserCustomField2>
        <UserCustomField3></UserCustomField3>
        <UserCustomField4></UserCustomField4>
        <UserCustomField5></UserCustomField5>
        <UserCustomField6></UserCustomField6>
        <UserCustomField7></UserCustomField7>
        <UserCustomField8></UserCustomField8>
        <UserCustomField9></UserCustomField9>
        <UserCustomField10></UserCustomField10>
        <UserCustomField11></UserCustomField11>
        <UserCustomField12></UserCustomField12>
        <UserCustomField13></UserCustomField13>
        <UserCustomField14></UserCustomField14>
        <UserCustomField15></UserCustomField15>
        <UserCustomField16></UserCustomField16>
        <UserCustomField17></UserCustomField17>
        <UserCustomField18></UserCustomField18>
        <UserCustomField19></UserCustomField19>
        <UserCustomField20></UserCustomField20>
        <UserCustomField21></UserCustomField21>
        <UserCustomField22></UserCustomField22>
        <UserCustomField23></UserCustomField23>
        <UserCustomField24></UserCustomField24>
        <UserCustomField25></UserCustomField25>
        <JobRole></JobRole>
        <ExternalEmployeeID></ExternalEmployeeID>
        <ProfileType></ProfileType>
    </UserImport>
</UserImports>

Request Body (JSON)

[
  {
    "Id": "",
    "Username": "",
    "Email": "",
    "FirstName": "",
    "LastName": "",
    "Password": "",
    "Phone": "",
    "Mobile": "",
    "Skype": "",
    "Title": "",
    "CompanyName": "",
    "WebSite": "",
    "Twitter": "",
    "Team1": "",
    "Team2": "",
    "Team3": "",
    "Team4": "",
    "Team5": "",
    "Course1": "",
    "Course2": "",
    "Course3": "",
    "Address1": "",
    "Address2": "",
    "City": "",
    "State": "",
    "Zip": "",
    "Country": "",
    "CustomField1": "",
    "CustomField2": "",
    "CustomField3": "",
    "CustomField4": "",
    "CustomField5": "",
    "CustomField6": "",
    "CustomField7": "",
    "CustomField8": "",
    "CustomField9": "",
    "CustomField10": "",
    "SalesforceId": "",
    "SalesforceAccountId": "",
    "SalesforceContactId": "",
    "Active": "true/false",
    "InactiveDate": "",
    "AccessLevel": "L,TA,TL,2,3,4,5",
    "Brand": "",
    "Culture": "",
    "Manager": "",
    "UserCustomField1": "",
    "UserCustomField2": "",
    "UserCustomField3": "",
    "UserCustomField4": "",
    "UserCustomField5": "",
    "UserCustomField6": "",
    "UserCustomField7": "",
    "UserCustomField8": "",
    "UserCustomField9": "",
    "UserCustomField10": "",
    "UserCustomField11": "",
    "UserCustomField12": "",
    "UserCustomField13": "",
    "UserCustomField14": "",
    "UserCustomField15": "",
    "UserCustomField16": "",
    "UserCustomField17": "",
    "UserCustomField18": "",
    "UserCustomField19": "",
    "UserCustomField20": "",
    "UserCustomField21": "",
    "UserCustomField22": "",
    "UserCustomField23": "",
    "UserCustomField24": "",
    "UserCustomField25": "",
    "JobRole": "",
    "ExternalEmployeeID": "",
    "ProfileType": ""
  }
]

Gets the latest Bulk Imports for an organization

Get the most recent user bulk import jobs (1000 max).

Request URI

GET /bulkimports?source={source}

Response Body (XML)

<UserBulkImports> 
    <UserBulkImport>
        <Id>string [max length 50]</Id>
        <ImportDate>YYYY-MM-DDTHH:MM:SS</ImportDate>
        <Status>Waiting/Queued/Completed/Failed</Status>
        <TotalRecords>integer</TotalRecords>
        <TotalUsersCreated>integer</TotalUsersCreated>
        <Failed>integer</Failed>
        <Duplicate>integer</Duplicate>
        <InvalidEmail>integer</InvalidEmail>
        <SendEmails>true/false</SendEmails>
        <SkipFirstLogin>true/false</SkipFirstLogin>
        <IsAPIImport>true/fase</IsAPIImport> 
    </UserBulkImport> 
    <UserBulkImport>
        <Id>string [max length 50]</Id>
        <ImportDate>YYYY-MM-DDTHH:MM:SS</ImportDate>
        <Status>Completed/Failed/Queued</Status>
        <TotalRecords>integer</TotalRecords>
        <TotalUsersCreated>integer</TotalUsersCreated>
        <Failed>integer</Failed>
        <Duplicate>integer</Duplicate>
        <InvalidEmail>integer</InvalidEmail>
        <SendEmails>true/false</SendEmails>
        <SkipFirstLogin>true/false</SkipFirstLogin>
        <IsAPIImport>true/fase</IsAPIImport>
    </UserBulkImport>
</UserBulkImports>

Response Header

200 Ok

Get a specific Bulk Import:

Get the status of a specific user bulk import job.

Request URI

GET /bulkimports/{bulkimportid}?source={source}

Response Body (XML)

<UserBulkImport xmlns:i="http://www.w3.org/2001/XMLSchema-instance">  
    <Id>string [max length 50]</Id>  
    <ImportDate>YYYY-MM-DDTHH:MM:SS</ImportDate>  
    <Status>Waiting/Queued/Completed/Failed</Status>  
    <TotalRecords>integer</TotalRecords>  
    <TotalUsersCreated>integer</TotalUsersCreated>  
    <Failed>integer</Failed>  
    <Duplicate>integer</Duplicate>  
    <InvalidEmail>integer</InvalidEmail>  
    <SendEmails>true/false</SendEmails>  
    <SkipFirstLogin>true/false</SkipFirstLogin>  
    <IsAPIImport>true/false</IsAPIImport>  
</UserBulkImport>

Response Header

200 Ok

Get errors for a User Bulk Import:

Get the import processing errors for user records in a user bulk import job.

Query string parameters:

  • &IsAPI=[false] including this parameter will fetch the list of user import errors for a user import job performed within the application from the user interface. Without this query string parameter, the call will fetch only user import errors for user import jobs performed from the API.

Request URI

GET /bulkimports/{bulkimportid}/usererrors?source={source}

Response Body (XML)

<Users xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <User>
        <Username>string [max length 255]</Username>
        <ImportStatus>Failed - Error Message</ImportStatus>
    </User>
    <User>
        <Username>string [max length 255]</Username>
        <ImportStatus>Failed - Error Message</ImportStatus>
    </User>
    <User>
        <Username>string [max length 255]</Username>
        <ImportStatus>Failed - Error Message</ImportStatus>
    </User>
</Users>

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of Litmos.

The information contained herein may be changed without prior notice. Some software products marketed by Litmos and its distributors contain proprietary software components of other software vendors. National product specifications may vary.

These materials are provided by Litmos for informational purposes only, without representation or warranty of any kind, and Litmos or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for Litmos company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular Litmos or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and Litmos or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be changed by Litmos or its affiliated companies at any time for any reason without notice.

The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they should not be relied upon in making purchasing decisions.

© 2022 Litmos or a Litmos affiliate company. All rights reserved.

Litmos and other Litmos products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Litmos (or a Litmos affiliate company) in the United States and other countries. All other product and service names mentioned are the trademarks of their respective companies.

Match keywords.

Useful Links

  • Release Notes
  • Customer Portal

In this article

Related articles

  1. Users Via API
  2. Instructor Led Training Via API
  3. Date Range Delta Queries Via API

Also of Interest

  • Subscription Management Training
  • Free eLearning Platform
  • Training Management System
  • Corporate LMS
  • Enterprise Learning Management System
  • LMS Platform
  • eLearning Platform
  • What is a learning management system?
  • See Additional Resources

Solutions by Use Case

  • Employee Training
  • Customer Training
  • Compliance Training
  • Sales Training
  • Operations Training
  • Gig Worker Training
  • Contractor Training
  • Supplier Training

Solutions by Industry

  • Technology
  • Nonprofit
  • Retail
  • Hospitality
  • Healthcare

Contact Us

Contact
UK: +44 20 4551 1606
USA: +1 925 490 0401
AUS: +61 3 7066 4851
Email
Support
Address
Contact Us
Litmos Reviews Litmos Reviews
Litmos Careers Careers

© 2023 Litmos US, L.P. and affiliates. All rights reserved.

  • Privacy Statement
  • Terms & Conditions
  • Website Terms