Body
Required
The user to create
Responses
-
200 application/json
User successfully created
-
400 application/json
- 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:
-
409 application/json
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":"2025-05-04T09:42:00Z"},"password":"string","enabled":true,"security_realm":{"type":"native","id":"string"}},"metadata":{"created_by":"string","created_at":"2025-05-04T09:42:00Z","updated_by":"string","updated_at":"2025-05-04T09:42:00Z","first_login_at":"2025-05-04T09:42:00Z","last_login_at":"2025-05-04T09:42:00Z"},"full_name":"string","email":"string","builtin":true}'
Request examples
{
"user_name": "string",
"security": {
"roles": [
"string"
],
"permissions": [
"string"
],
"elevated_permissions": {
"enabled": true,
"expires_at": "2025-05-04T09:42:00Z"
},
"password": "string",
"enabled": true,
"security_realm": {
"type": "native",
"id": "string"
}
},
"metadata": {
"created_by": "string",
"created_at": "2025-05-04T09:42:00Z",
"updated_by": "string",
"updated_at": "2025-05-04T09:42:00Z",
"first_login_at": "2025-05-04T09:42:00Z",
"last_login_at": "2025-05-04T09:42:00Z"
},
"full_name": "string",
"email": "string",
"builtin": true
}
Response examples (200)
{
"user_name": "string",
"security": {
"roles": [
"string"
],
"permissions": [
"string"
],
"elevated_permissions": {
"enabled": true,
"expires_at": "2025-05-04T09:42:00Z"
},
"password": "string",
"enabled": true,
"security_realm": {
"type": "native",
"id": "string"
}
},
"metadata": {
"created_by": "string",
"created_at": "2025-05-04T09:42:00Z",
"updated_by": "string",
"updated_at": "2025-05-04T09:42:00Z",
"first_login_at": "2025-05-04T09:42:00Z",
"last_login_at": "2025-05-04T09:42:00Z"
},
"full_name": "string",
"email": "string",
"builtin": true
}
Response examples (400)
# Headers
x-cloud-error-codes: user.user_name.invalid
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (409)
# Headers
x-cloud-error-codes: user.user_name.conflict
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}