Add a username​
Add a new unique username to a user. The username will be used to identify the user on authentication.
Path Parameters
unique identifier of the user.
Request Body required
- gigi-giraffe@zitadel.com (unique across organizations)
- gigi-giraffe (unique only inside the ZITADEL organization)
username object
Set the user's new username.
Possible values: non-empty
and <= 200 characters
Set the user's username. This will be used for identification during authentication.
By default username must be unique across all organizations in an instance. This option allow to restrict the uniqueness to the user's own organization. As a result, this username can only be used if the authentication is limited to the corresponding organization.
This can be useful if you provide multiple usernames for a single user, where one if specific to your organization, e.g.:
Request Body required
- gigi-giraffe@zitadel.com (unique across organizations)
- gigi-giraffe (unique only inside the ZITADEL organization)
username object
Set the user's new username.
Possible values: non-empty
and <= 200 characters
Set the user's username. This will be used for identification during authentication.
By default username must be unique across all organizations in an instance. This option allow to restrict the uniqueness to the user's own organization. As a result, this username can only be used if the authentication is limited to the corresponding organization.
This can be useful if you provide multiple usernames for a single user, where one if specific to your organization, e.g.:
Request Body required
- gigi-giraffe@zitadel.com (unique across organizations)
- gigi-giraffe (unique only inside the ZITADEL organization)
username object
Set the user's new username.
Possible values: non-empty
and <= 200 characters
Set the user's username. This will be used for identification during authentication.
By default username must be unique across all organizations in an instance. This option allow to restrict the uniqueness to the user's own organization. As a result, this username can only be used if the authentication is limited to the corresponding organization.
This can be useful if you provide multiple usernames for a single user, where one if specific to your organization, e.g.:
- 200
- 403
- 404
- default
Username successfully added
Schema
details object
on read: the sequence of the last event reduced by the projection
on manipulation: the timestamp of the event(s) added by the manipulation
on read: the timestamp of the last event reduced by the projection
on manipulation: the timestamp of the event(s) added by the manipulation
unique identifier of the username.
{
"details": {
"sequence": "2",
"changeDate": "2024-06-13T12:33:10.746Z",
"resourceOwner": "69629023906488334"
},
"usernameId": "69629023906488334"
}
Schema
details object
on read: the sequence of the last event reduced by the projection
on manipulation: the timestamp of the event(s) added by the manipulation
on read: the timestamp of the last event reduced by the projection
on manipulation: the timestamp of the event(s) added by the manipulation
unique identifier of the username.
{
"details": {
"sequence": "2",
"changeDate": "2024-06-13T12:33:10.746Z",
"resourceOwner": "69629023906488334"
},
"usernameId": "69629023906488334"
}
Schema
details object
on read: the sequence of the last event reduced by the projection
on manipulation: the timestamp of the event(s) added by the manipulation
on read: the timestamp of the last event reduced by the projection
on manipulation: the timestamp of the event(s) added by the manipulation
unique identifier of the username.
{
"details": {
"sequence": "2",
"changeDate": "2024-06-13T12:33:10.746Z",
"resourceOwner": "69629023906488334"
},
"usernameId": "69629023906488334"
}
Returned when the user does not have permission to access the resource.
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Returned when the resource does not exist.
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}