Create Site User
POST /sites/{site_id}/adduser
Creates a new site user, which may include creating a new core user account if the email is not already associated with an existing user.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
site_id |
string | Yes | ID of the site where the user will be added |
Request Body
Identify the user
| Field | Type | Required | Description |
|---|---|---|---|
email |
string | Conditional | Email address for adding or inviting a user. |
user_id |
string | Conditional | Existing QReserve user ID. |
Optional Fields
| Field | Type | Required | Description |
|---|---|---|---|
role |
string | No | user (default), moderator, or administrator. Assignment is subject to caller permissions. |
display_name |
string | No | Display name of the user |
givennames |
string | No | Given names of the user |
lastname |
string | No | Surname of the user |
usergroups |
array of integers | No | List of usergroup IDs to add the user to |
notify_user |
boolean | No | Whether to notify the user |
notify_user_admin |
boolean | No | Whether to notify the site owner if enabled in the site |
message |
string | No | Message to include in user notification |
Response
Success Response (200 OK)
data contains the resulting SiteUser object including is_new, which indicates whether QReserve created the core user account. The caller generally needs site user management permission.
Error Responses
400 Bad Request: Invalid request or validation error401 Unauthorized: Authentication failed403 Forbidden: User does not have permission to add users to this site
See the Site Users API overview for related endpoints and shared data structures.