v1 · OpenAPI 3.1Dashboard

Die API-Referenz ist auf Englisch.

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.

Benötigter Scope
users:write
Authentifizierung
Secret key · Organization API key

Pfadparameter

  • app_idstringerforderlich

    Beispiel: app_seller

Body application/json

  • emailstring (email)erforderlich

  • namestring

  • countrystringerforderlich

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

    Beispiel: TR

  • labelsLabels

  • passwordstring

    Optional. Omit to create a passwordless account.

  • email_verifiedboolean

    Standard: false

Antworten

  • 201CreatedUser

    Created

    • idstring

    • regionstring

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

      Werte: EU TR

    • emailstring

    • email_verifiedboolean

    • phonestring

      Not available yet.

    • namestring

    • countrystring

    • labelsLabels

    • statusstring

      Werte: 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

    • errorobjecterforderlich

      5 Felder
      • codestringerforderlich

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

        Beispiel: region_unavailable

      • messagestringerforderlich

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Werte: EU TR

      • retryablebooleanerforderlich

      • detailsobject

  • 409ConflictError

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

    • errorobjecterforderlich

      5 Felder
      • codestringerforderlich

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

        Beispiel: region_unavailable

      • messagestringerforderlich

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Werte: EU TR

      • retryablebooleanerforderlich

      • detailsobject

  • 422Unprocessable ContentError

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

    • errorobjecterforderlich

      5 Felder
      • codestringerforderlich

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

        Beispiel: region_unavailable

      • messagestringerforderlich

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Werte: EU TR

      • retryablebooleanerforderlich

      • detailsobject

  • 503Service UnavailableError

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

    • errorobjecterforderlich

      5 Felder
      • codestringerforderlich

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

        Beispiel: region_unavailable

      • messagestringerforderlich

        Plain English, for developers

      • regionstringnullable

        Region that produced the error, if any

        Werte: EU TR

      • retryablebooleanerforderlich

      • detailsobject