Users

Register a new user

Changed on

Creates 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.

post/users/register

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/users/register
  • Auth
    none declared

Request body

namestring required

User's first name

surnamestring required

User's last name

emailstring email required
passwordstring password required

Must be 8+ chars with uppercase, lowercase, and digit

roleIdinteger required

1=Admin, 2=Reviewer, 3=Editor, 4=Auditor

organizationIdinteger required

Organization to assign the user to

Example request

{
  "name": "John",
  "surname": "Doe",
  "email": "john@example.com",
  "password": "SecurePassword123!",
  "roleId": 3,
  "organizationId": 1
}

Response

User created successfully

messagestring

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

    • info

      api operation id createNewUser was added

    • info

      the endpoint scheme security bearerAuth was removed from the API

    • info

      api tag Users added

    • info

      api tag Users - Registration removed