Skip to main content

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

    id stringrequired

    unique identifier of the user.

Query Parameters

    instance.id string
    instance.domain string
    organization.orgId string
    organization.orgDomain string

Body

required

Set the user's new username.

    username stringrequired

    Possible values: non-empty and <= 200 characters

    Set the user's username. This will be used for identification during authentication.

    isOrganizationSpecific boolean

    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.:

    • gigi-giraffe@zitadel.com (unique across organizations)
    • gigi-giraffe (unique only inside the ZITADEL organization)

Responses​

Username successfully added

Schema

    details

    object

    id string
    created date-time

    the timestamp of the first event applied to the object.

    changed date-time

    the timestamp of the last event applied to the object.

    owner

    object

    the parent object representing the returned objects context.

    type string

    Possible values: [OWNER_TYPE_UNSPECIFIED, OWNER_TYPE_SYSTEM, OWNER_TYPE_INSTANCE, OWNER_TYPE_ORG]

    Default value: OWNER_TYPE_UNSPECIFIED

    id string
    usernameId string

    unique identifier of the username.

Loading...