v1 · OpenAPI 3.1Panel

API referansı İngilizcedir.

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.

Gereken yetki
users:write
Kimlik doğrulama
Secret key · Organization API key

Yol parametreleri

  • app_idstringzorunlu

    Örnek: app_seller

Gövde application/json

  • emailstring (email)zorunlu

  • namestring

  • countrystringzorunlu

    ISO 3166-1 alpha-2. Decides the data region.

    Örnek: TR

  • labelsLabels

  • passwordstring

    Optional. Omit to create a passwordless account.

  • email_verifiedboolean

    Varsayılan: false

Yanıtlar

  • 201CreatedUser

    Created

    • idstring

    • regionstring

      More regions will be added; clients must accept unknown values.

      Değerler: EU TR

    • emailstring

    • email_verifiedboolean

    • phonestring

      Not available yet.

    • namestring

    • countrystring

    • labelsLabels

    • statusstring

      Değerler: active locked banned invited

    • created_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).

    • metadataobject

      Not available yet (planned expand=metadata).

    • consentsobject[]

      Not available yet (planned expand=consents).

  • 400Bad RequestError

    Invalid request

    • errorobjectzorunlu

      5 alan
      • codestringzorunlu

        Stable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable

        Örnek: region_unavailable

      • messagestringzorunlu

        Plain English, for developers

      • regionstringboş olabilir

        Region that produced the error, if any

        Değerler: EU TR

      • retryablebooleanzorunlu

      • detailsobject

  • 409ConflictError

    email_exists: the email already belongs to a user of this application.

    • errorobjectzorunlu

      5 alan
      • codestringzorunlu

        Stable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable

        Örnek: region_unavailable

      • messagestringzorunlu

        Plain English, for developers

      • regionstringboş olabilir

        Region that produced the error, if any

        Değerler: EU TR

      • retryablebooleanzorunlu

      • detailsobject

  • 422Unprocessable ContentError

    country_not_allowed: the application only accepts users from the countries listed in country_restriction.countries.

    • errorobjectzorunlu

      5 alan
      • codestringzorunlu

        Stable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable

        Örnek: region_unavailable

      • messagestringzorunlu

        Plain English, for developers

      • regionstringboş olabilir

        Region that produced the error, if any

        Değerler: EU TR

      • retryablebooleanzorunlu

      • detailsobject

  • 503Service UnavailableError

    region_unavailable: the user's region cannot answer right now. Retry after Retry-After seconds.

    • errorobjectzorunlu

      5 alan
      • codestringzorunlu

        Stable machine code, e.g. email_exists, country_not_allowed, user_moved, method_not_available, region_unavailable

        Örnek: region_unavailable

      • messagestringzorunlu

        Plain English, for developers

      • regionstringboş olabilir

        Region that produced the error, if any

        Değerler: EU TR

      • retryablebooleanzorunlu

      • detailsobject