ZITADEL Docs
APIsCore ResourcesV2User

CreateInviteCode

Create an invite code for a user

Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. If an invite code has been created previously, it's url template and application name will be used as defaults for the new code. The new code will overwrite the previous one and make it invalid. Note: It is possible to reissue a new code only when the previous code has expired, or when the user provides a wrong code three or more times during verification.

POST
/v2/users/{user_id}/invite_code

Path Parameters

user_id*string

Response Body

application/json

application/json

curl -X POST "https://loading/v2/users/string/invite_code"
{
  "details": {
    "sequence": 0,
    "changeDate": "1s",
    "resourceOwner": "string",
    "creationDate": "1s"
  },
  "inviteCode": "string"
}
{
  "code": "not_found",
  "message": "string",
  "detail": {
    "type": "string",
    "value": "string",
    "debug": {}
  }
}

Was this page helpful?