Create User

POST /v1/auth/users/create

Creates a user in an App that requires authentication. Each user will have a default wallet created for the wallet_type sent in.

HTTP Request

POST /v1/auth/users/create

Returns

A successful response returns a User object with email_id and phone_number_id properties.

application/json

Body

  • email string

    Required if phone_number not present Email that uniquely identifies the user.

    Minimum length is 1.

  • phone_number string

    Required if email not present E.164 formatted mobile phone number that uniquely identifies the user.

    Minimum length is 1.

  • first_name string

    First name of the user.

    Minimum length is 1.

  • middle_name string

    Middle name of the user.

  • last_name string

    Middle name of the user.

    Minimum length is 0.

  • requires_verification boolean

    Determines if verification for the authentication method (email, phone_number) is required before marking the user as active.

  • wallet_type string

    Determines what type of wallet login. If the user does not have a default wallet of the same wallet_type, a new default wallet will be created for the user. If left blank, the default will be ETH. Possible values: ETH, SOL, BTC, DOT, XLM (more wallets coming soon).

  • include_user boolean

    Determines if the full user object should be returned. Defaults to false.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • user_id string Required

      Minimum length is 1.

    • status string Required
    • email_id string Required

      Minimum length is 1.

    • phone_number_id string Required

      Minimum length is 1.

    • user object
      Hide user attributes Show user attributes object
      • user_id string Required

        Minimum length is 1.

      • first_name string Required

        Minimum length is 0.

      • middle_name string Required
      • last_name string Required

        Minimum length is 0.

      • active boolean Required
      • updated_at number Required
      • created_at number Required
      • emails array[object] Required

        At least 0 elements.

        Hide emails attributes Show emails attributes object
        • id string Required

          Minimum length is 1.

        • verified boolean Required
        • email string Required

          Minimum length is 1.

        • updated_at number Required
        • created_at number Required
      • phone_numbers array[object] Required

        At least 10 elements.

        Hide phone_numbers attributes Show phone_numbers attributes object
        • id string Required

          Minimum length is 1.

        • verified boolean Required
        • phone_number string Required

          Minimum length is 1.

        • updated_at number Required
        • created_at number Required
      • wallets array[object] Required

        At least 0 elements.

        Hide wallets attributes Show wallets attributes object
        • id string Required

          Minimum length is 1.

        • app_id string Required

          Minimum length is 1.

        • user_id string Required

          Minimum length is 1.

        • public_address string Required

          Minimum length is 1.

        • wallet_type string Required

          Minimum length is 1.

        • is_default boolean Required
        • updated_at number Required
        • created_at number Required
      • idp_providers array[object]

        At least 10 elements.

        Hide idp_providers attributes Show idp_providers attributes object
        • id string Required

          Minimum length is 1.

        • provider string Required

          Minimum length is 1.

        • provider_subject string Required

          Minimum length is 1.

        • idp_type string Required

          Minimum length is 1.

        • method_id string Required

          Minimum length is 1.

        • method_type string Required

          Minimum length is 1.

        • updated_at number Required
        • created_at number Required
      • totps array[object]

        At least 0 elements.

        Hide totps attributes Show totps attributes object
        • id string Required

          Minimum length is 1.

        • verified boolean Required
        • updated_at number Required
        • created_at number Required
POST /v1/auth/users/create
curl \
 --request POST 'https://api.streambird.io/v1/auth/users/create' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"email":"sandbox@streambird.io","last_name":"Smith","first_name":"John","phone_number":"+14152222222","requires_verification":true}'
Request example
{
  "email": "sandbox@streambird.io",
  "last_name": "Smith",
  "first_name": "John",
  "phone_number": "+14152222222",
  "requires_verification": true
}
Response examples (200)
{
  "status": "pending",
  "user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
  "email_id": "email_24oXBL3PufzHkH1Jzyjc2EXYeo7",
  "phone_number_id": "pn_24oXBLRv6BoHXbNZoTAZkAFlRsy"
}