Users > Users > usersCreate
Commerce APIUsersUsersusersCreate
usersCreate
POST:users.json

Description

Effectively register a completely new user. After successful registeration, user will be returned with a token field being a valid JWT token. This saves a roundtrip for new users, you don't need to login after registering.

Note that in order to register, you have to set tos_agree to true, which implies you agree with Lana TOS.

While we don't enforce various weird rules on passwords. Please, provide a reasonably secure password or better enable 2FA (TODO: link to 2FA) shortly after creating a user.

Topic: Users

Arguments

data: [UserCreate!]!

Main argument for mutations.


shop_id: String

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

bio_raw_content: String

Raw content with user's bio

Example: "{}"

Valid when: bio_raw_content's length doesn't exceed 100000 characters


display_name: String

Display name of the user (customers will see it)

Example: "Jane S."

Valid when: display_name's length doesn't exceed 250 characters


email: String

Email of the user

Example: "no+spam@mail.com"

Valid when: email is not empty

Valid when: email's length doesn't exceed 250 characters


language: String


name: String

Name of the user

Example: "Jane Smith"

Valid when: name's length doesn't exceed 250 characters


oauth_code: String

OAuth2 authorization code provided by the provider


oauth_provider: OAuth2Provider

OAuth2 provider used for registering this account


password: String

The user's password

Example: "34hb5kj3h45k3"


timezone: String

Name of the time zone the user is in

Example: "(GMT-05:00) Eastern Time"

Valid when: timezone's length doesn't exceed 50 characters


timezone_hint: String

Timezone hint. When provided it overrides timezone field, but only if it's correct. If it's incorrect, the value is ignored.

Example: "(GMT-05:00) Eastern Time"

Valid when: timezone_hint's length doesn't exceed 50 characters


tos_agree: Boolean!

It has to be set to true and signifies that you agree with Lana TOS

Example: true


Result

[User!]

Preview (typescript)

Loading module