Tech Blog

How to create a user via an API in your institution in 5 easy steps.

This blog will focus on creating a user via an API in your institution.
The developer network already discusses how to create a user using an API. See for example Create User.

Additionally, the developer network provides a generic sample input file for the Create User API in both XML and JSON format.

However, this blog focuses on your institution and not a generic sample, so that you will have an example with, for example, your user group, job category, user identifier types, etc.


Make sure you have an API key for read/write for user records. If you do not have one then log into the developer network and create one.
Set to sandbox or production as desired.


Identify an existing user in Alma similar to the one you want to create.  This user will be used as a “template” for the new user.
Be sure to use sandbox or production depending on API key you will use.
In the example here we will use:
User Mary Bell, Primary Identifier MaryB613.  She has user group “Undergraduate Student” and roles “Patron” and “Trial Participant”.


Do a GET on the user and save the XML in a local file for editing.
Here is the syntax (of course replace “01234567890” with your real API key):


Edit the output from the GET above as follows to use as input for the POST to create the new user.

  • Change the Primary ID to one that does not already exist
  • Change the first name, middle, last name and full name
  • Change the values of the user identifiers to ones that do not already exist


Do a POST as follows:

In the Body choose application/xml and put in the edited output from the GET above.
Get response which will include the new user

See the new user in Alma and see that it was created from the API and has all of the values you sent.

Leave a Reply