Add a username
POST/v3alpha/users/:userId/username
Add a new unique username to a user. The username will be used to identify the user on authentication.
Request​
Path Parameters
unique identifier of the user.
- application/json
- application/grpc
- application/grpc-web+proto
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.:
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.:
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.:
Responses​
- 200
- 403
- 404
- default
Username successfully added
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
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-25T13:35:39.180Z",
"resourceOwner": "69629023906488334"
},
"usernameId": "69629023906488334"
}
- Schema
- Example (from schema)
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-25T13:35:39.180Z",
"resourceOwner": "69629023906488334"
},
"usernameId": "69629023906488334"
}
- Schema
- Example (from schema)
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-25T13:35:39.180Z",
"resourceOwner": "69629023906488334"
},
"usernameId": "69629023906488334"
}
Returned when the user does not have permission to access the resource.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Returned when the resource does not exist.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}