OpenapiUsers
Create a new user
Create a new user with email, password, and optional roles. Requires `users.manage` permission. Realm-admins can only assign the 'user' role unless they also have `roles.manage` permission.
POST
Create a new user with email, password, and optional roles. Requires users.manage permission. Realm-admins can only assign the 'user' role unless they also have roles.manage permission.
bearer_authheader
AuthorizationBearer <token>application/json- body
email*stringnickname?string|nullpassword*stringroleIds*array<>status?|Format
int32User created
application/json- response
createdAt*stringemail*stringid*stringFormat
uuidnickname?string|nullrealmId*stringstatus*integerFormat
int32curl -X POST 'https://example.com/api/users' \
-H 'Content-Type: application/json' \
-d '{
"email": "string",
"password": "string",
"roleIds": [
"10960216-a894-4481-b8f2-270c1c8fab34"
]
}'Example Response
{
"createdAt": "string",
"email": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"nickname": "string",
"realmId": "string",
"status": 0
}