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.
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.
Authorization
bearer_auth AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
email*string
nickname?string|null
password*string
roleIds*array<>
status?|
Format
int32Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/users" \ -H "Content-Type: application/json" \ -d '{ "email": "string", "password": "string", "roleIds": [ "10960216-a894-4481-b8f2-270c1c8fab34" ] }'{ "createdAt": "string", "email": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "nickname": "string", "realmId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}