Skip to main content

Set contact phone

PUT 

/v3alpha/users/:userId/phone

Add or update the contact phone number of a user. If the phone is not passed as verified, a verification code will be generated, which can be either returned or will be sent to the user by SMS.

Request​

Path Parameters

    userId stringrequired

    unique identifier of the user.

Body

required

    phone

    object

    Set the user's contact phone and it's verification state.

    number stringrequired

    Possible values: non-empty and <= 20 characters

    Set the user's phone number.

    sendCode object

    Let ZITADEL send the link to the user via SMS.

    returnCode object

    Get the code back to provide it to the user in your preferred mechanism.

    isVerified boolean

    Set the phone as already verified.

Responses​

Contact phone successfully set

Schema

    details

    object

    sequence uint64

    on read: the sequence of the last event reduced by the projection

    on manipulation: the timestamp of the event(s) added by the manipulation

    changeDate date-time

    on read: the timestamp of the last event reduced by the projection

    on manipulation: the timestamp of the event(s) added by the manipulation

    resourceOwner resource_owner is the organization or instance_id an object belongs to (string)
    emailCode string

    The phone verification code will be set if a contact phone was set with a return_code verification option.

Loading...