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.
Pfadparameter
app_idstringerforderlichBeispiel:
app_seller
Body application/json
emailstring (email)erforderlichnamestringcountrystringerforderlichISO 3166-1 alpha-2. Decides the data region.
Beispiel:
TRlabelsLabelspasswordstringOptional. Omit to create a passwordless account.
email_verifiedbooleanStandard:
false
Antworten
201CreatedUser
Created
idstringregionstringMore regions will be added; clients must accept unknown values.
Werte:
EUTRemailstringemail_verifiedbooleanphonestringNot available yet.
namestringcountrystringlabelsLabelsstatusstringWerte:
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
errorobjecterforderlich5 Felder
codestringerforderlichStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Beispiel:
region_unavailablemessagestringerforderlichPlain English, for developers
regionstringnullableRegion that produced the error, if any
Werte:
EUTRretryablebooleanerforderlichdetailsobject
409ConflictError
email_exists: the email already belongs to a user of this application.errorobjecterforderlich5 Felder
codestringerforderlichStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Beispiel:
region_unavailablemessagestringerforderlichPlain English, for developers
regionstringnullableRegion that produced the error, if any
Werte:
EUTRretryablebooleanerforderlichdetailsobject
422Unprocessable ContentError
country_not_allowed: the application only accepts users from the countries listed incountry_restriction.countries.errorobjecterforderlich5 Felder
codestringerforderlichStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Beispiel:
region_unavailablemessagestringerforderlichPlain English, for developers
regionstringnullableRegion that produced the error, if any
Werte:
EUTRretryablebooleanerforderlichdetailsobject
503Service UnavailableError
region_unavailable: the user's region cannot answer right now. Retry afterRetry-Afterseconds.errorobjecterforderlich5 Felder
codestringerforderlichStable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable
Beispiel:
region_unavailablemessagestringerforderlichPlain English, for developers
regionstringnullableRegion that produced the error, if any
Werte:
EUTRretryablebooleanerforderlichdetailsobject