Responses
-
User successfully created
-
- The provided user name is invalid. Check that it is not empty and it does not contain special characters. (code:
user.user_name.invalid) - Some of the provided roles are invalid. (code:
user.roles.invalid) - Some of the provided roles are forbidden. (code:
user.roles.forbidden) - Trying to set a restricted field. (code:
user.restricted_field)
- The provided user name is invalid. Check that it is not empty and it does not contain special characters. (code:
-
The username is already in use. (code:
user.user_name.conflict)
POST
/users
curl \
--request POST 'https://{{hostname}}/api/v1/users' \
--user "username:password" \
--header "Content-Type: application/json" \
--data '{
"user_name": "string",
"security": {
"roles": [
"string"
],
"permissions": [
"string"
],
"elevated_permissions": {
"enabled": true,
"expires_at": "2026-05-04T09:42:00Z"
},
"password": "string",
"enabled": true,
"security_realm": {
"type": "native",
"id": "string"
}
},
"metadata": {
"created_by": "string",
"created_at": "2026-05-04T09:42:00Z",
"updated_by": "string",
"updated_at": "2026-05-04T09:42:00Z",
"first_login_at": "2026-05-04T09:42:00Z",
"last_login_at": "2026-05-04T09:42:00Z"
},
"full_name": "string",
"email": "string",
"builtin": true
}'