Register a new user or create a user by admin
Authentication
Register a new user or create a user by admin
Allows for user self-registration or user creation by an administrator.
- If called without an admin token, a new user with the ‘user’ role is created and requires email confirmation. The ‘role’ field is ignored.
- If called with an admin token, a new user (e.g., a manager) is created immediately with the specified role.
POST
Register a new user or create a user by admin
Body
application/json
Schema for user registration. Can be used by anonymous users or administrators.
User's phone number, preferably in international E.164 format (e.g., +375291234567).
Example:
"+375291234567"
For admins only. The role to assign to the new user. If omitted, defaults to 'user'
Available options:
user, manager Response
Registration successful. For self-registration, a confirmation email has been sent. For admin creation, the user is created directly
Example:
"Registration successful. Please check your email to verify your account"