Add a username
POST/resources/v3alpha/users/:id/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.
Query Parameters
- application/json
- application/grpc
- application/grpc-web+proto
Body
required
Set the user's new username.
- gigi-giraffe@zitadel.com (unique across organizations)
- gigi-giraffe (unique only inside the ZITADEL organization)
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
Set the user's new username.
- gigi-giraffe@zitadel.com (unique across organizations)
- gigi-giraffe (unique only inside the ZITADEL organization)
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
Set the user's new username.
- gigi-giraffe@zitadel.com (unique across organizations)
- gigi-giraffe (unique only inside the ZITADEL organization)
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
the timestamp of the first event applied to the object.
the timestamp of the last event applied to the object.
owner
object
the parent object representing the returned objects context.
Possible values: [OWNER_TYPE_UNSPECIFIED
, OWNER_TYPE_SYSTEM
, OWNER_TYPE_INSTANCE
, OWNER_TYPE_ORG
]
Default value: OWNER_TYPE_UNSPECIFIED
unique identifier of the username.
{
"details": {
"id": "69629012906488334",
"created": "2024-11-22T16:27:05.681Z",
"changed": "2024-11-22T16:27:05.681Z",
"owner": "69629023906488334"
},
"usernameId": "69629023906488334"
}
- Schema
- Example (from schema)
Schema
details
object
the timestamp of the first event applied to the object.
the timestamp of the last event applied to the object.
owner
object
the parent object representing the returned objects context.
Possible values: [OWNER_TYPE_UNSPECIFIED
, OWNER_TYPE_SYSTEM
, OWNER_TYPE_INSTANCE
, OWNER_TYPE_ORG
]
Default value: OWNER_TYPE_UNSPECIFIED
unique identifier of the username.
{
"details": {
"id": "69629012906488334",
"created": "2024-11-22T16:27:05.681Z",
"changed": "2024-11-22T16:27:05.681Z",
"owner": "69629023906488334"
},
"usernameId": "69629023906488334"
}
- Schema
- Example (from schema)
Schema
details
object
the timestamp of the first event applied to the object.
the timestamp of the last event applied to the object.
owner
object
the parent object representing the returned objects context.
Possible values: [OWNER_TYPE_UNSPECIFIED
, OWNER_TYPE_SYSTEM
, OWNER_TYPE_INSTANCE
, OWNER_TYPE_ORG
]
Default value: OWNER_TYPE_UNSPECIFIED
unique identifier of the username.
{
"details": {
"id": "69629012906488334",
"created": "2024-11-22T16:27:05.682Z",
"changed": "2024-11-22T16:27:05.682Z",
"owner": "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"
}
]
}