Creates a new user (if they don't exist) and a user connector to link them to the library or an outlet with a specific role. Optionally sends a verification email to the user.
Creates a new user connector to establish a relationship between a user and either the library or a specific outlet. If a user with the provided email doesn't exist, a new user account will be created automatically.
User Creation Behavior
This endpoint handles two scenarios:
User Doesn't Exist
If no user account exists with the provided email address, the endpoint will:
- Create a new user account with the provided email,
first_name, andlast_name - Create a user connector linking the new user to the library or outlet
- Optionally send a verification email if
send_verification_emailis set totrue
User Already Exists
If a user account already exists with the provided email address, the endpoint will:
- Use the existing user account
- Create a user connector linking the existing user to the library or outlet
- Update the user's
first_nameandlast_nameif provided (if they differ from existing values)
User Connector Types
The type of user connector is determined automatically based on the presence of the outlet field:
- Library User (
L): Created whenoutletis not provided - grants access to the entire library - Outlet User (
O): Created whenoutletis provided - grants access to a specific outlet
Verification Email
When send_verification_email is set to true, the user will receive an email to verify their account and set up their password. This is particularly useful when creating new users.
