Skip to Content

Initialize User

Initialize a new user account with profile data.

This endpoint is for admins to add new users to the system.

POST /api/user/init

Request Body

{ "email": "user@example.com", "password": null, "roles": ["DEV_USER"], "profile": { "firstName": "first", "lastName": "last" } }
PropertyTypeRequiredDescription
emailstringyesThe email address of the user.
passwordstringnoThe password of the user.
rolesarrayyesThe roles of the user.
profileobjectyesThe profile of the user.

The profile object is customizable; define any fields you want to include in a user’s profile. This allows you to tailor user data storage to your application’s specific requirements.

Response

{ "data": [ { "userId": "user-123", "email": "user@example.com", "roles": ["DEV_USER"], "profile": { "firstName": "first", "lastName": "last" } } ], "status": "OK", "code": 200, "timestamp": 1234567890, "meta": {} }

User initialization creates a new user account with the specified profile data and roles. The system will send and email to the user to notify him.