Skip to main content

Create an invite code for a user

POST 

/v2/users/:userId/invite_code

Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods.

Request​

Path Parameters

    userId stringrequired

Body

required

    sendCode

    object

    urlTemplate string

    Possible values: non-empty and <= 200 characters

    Optionally set a url_template, which will be used in the invite mail sent by ZITADEL to guide the user to your invitation page. If no template is set, the default ZITADEL url will be used.

    The following placeholders can be used: UserID, OrgID, Code

    applicationName string

    Possible values: non-empty and <= 200 characters

    Optionally set an application name, which will be used in the invite mail sent by ZITADEL. If no application name is set, ZITADEL will be used as default.

    returnCode object

Responses​

OK

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)
    inviteCode string

    The invite code is returned if the verification was set to return_code.

Loading...