Users
Create a user
POST/v1/applications/{app_id}/users
The user is stored in the region of country. country is required.
MVP rule: applications are single-region. Users from any country are
stored in the application's region, and the tenant is responsible for
accepting users from countries whose data rules require something else.
If the application has country_restriction.mode: only_listed, a
country that is not listed returns 422 country_not_allowed. An email
that already exists in
the application returns 409 email_exists with the existing user's
ID in error.details.user_id. There is no phone field and no
invite email; set a password directly or leave the account
passwordless.
Yol parametreleri
app_idstringzorunluÖrnek:
app_seller
Gövde application/json
emailstring (email)zorunlunamestringcountrystringzorunluISO 3166-1 alpha-2. Decides the data region.
Örnek:
TRlabelsLabelspasswordstringOptional. Omit to create a passwordless account.
email_verifiedbooleanVarsayılan:
false
Yanıtlar
201CreatedUser
Created
idstringregionstringMore regions will be added; clients must accept unknown values.
Değerler:
EUTRemailstringemail_verifiedbooleanphonestringNot available yet.
namestringcountrystringlabelsLabelsstatusstringDeğerler:
activelockedbannedinvitedcreated_atstring (date-time)last_sign_in_atstring (date-time)sessionsobject[]Not available yet (planned expand=sessions).
mfa_factorsstring[]Not available yet (planned expand=mfa_factors).
sign_in_historyobject[]Not available yet (planned expand=sign_in_history).
metadataobjectNot available yet (planned expand=metadata).
consentsobject[]Not available yet (planned expand=consents).
400Bad RequestError
Invalid request
errorobjectzorunlu5 alan
codestringzorunluStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Örnek:
region_unavailablemessagestringzorunluPlain English, for developers
regionstringboş olabilirRegion that produced the error, if any
Değerler:
EUTRretryablebooleanzorunludetailsobject
409ConflictError
email_exists: the email already belongs to a user of this application.errorobjectzorunlu5 alan
codestringzorunluStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Örnek:
region_unavailablemessagestringzorunluPlain English, for developers
regionstringboş olabilirRegion that produced the error, if any
Değerler:
EUTRretryablebooleanzorunludetailsobject
422Unprocessable ContentError
country_not_allowed: the application only accepts users from the countries listed incountry_restriction.countries.errorobjectzorunlu5 alan
codestringzorunluStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Örnek:
region_unavailablemessagestringzorunluPlain English, for developers
regionstringboş olabilirRegion that produced the error, if any
Değerler:
EUTRretryablebooleanzorunludetailsobject
503Service UnavailableError
region_unavailable: the user's region cannot answer right now. Retry afterRetry-Afterseconds.errorobjectzorunlu5 alan
codestringzorunluStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Örnek:
region_unavailablemessagestringzorunluPlain English, for developers
regionstringboş olabilirRegion that produced the error, if any
Değerler:
EUTRretryablebooleanzorunludetailsobject