Register a new user
Changed onCreates a new user account. Requires a valid registration JWT (set by registerJWT middleware). Validates email uniqueness, password strength, and required fields. The account takes the invited email, role and organization from the invitation link, which must match the current pending invitation (a resent or re-invited link replaces earlier ones). The invitation is accepted in the same transaction, so a link registers once; a link that was revoked, used or replaced is refused with 403.
Request
- Base URL/api (relative, and the document was published on a file host, not at the API’s origin)
- URL/api/users/register
- Authnone declared
Request body
Example request
{
"name": "John",
"surname": "Doe",
"email": "john@example.com",
"password": "SecurePassword123!",
"roleId": 3,
"organizationId": 1
}Response
User created successfully
Example response
{
"message": "Created",
"data": {
"id": 1,
"name": "John",
"surname": "Doe",
"email": "john@example.com",
"role_id": 1,
"organization_id": 1
}
}Changes
- breaking
the response property
/became nullable for the status - breaking
removed the required property
/from the response with the status - warning
removed the optional property
/from the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the required property
/to the response with the status
- breaking
- info
api operation id
createNewUserwas added - info
the endpoint scheme security
bearerAuthwas removed from the API - info
api tag
Usersadded - info
api tag
Users - Registrationremoved
- info