Herald
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
/api/users

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
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
email*string
nickname?string|null
password*string
roleIds*array<>
status?|
Formatint32

Response Body

User created

application/json
  1. response
createdAt*string
email*string
id*string
Formatuuid
nickname?string|null
realmId*string
status*integer
Formatint32
Example Request
curl -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
}