Skip to content

Verify sign in code

POST/store/v1/customers/sign-in-codes/verify
  • Idempotency-Key supported

Sign in with the code. An address the store does not know yet becomes a new account (201); a new mobile number also needs email (422 email_required until then, the code staying valid). Each code allows five wrong guesses. While the store approves new accounts, a new account waits instead (202), with the address proven, and nobody signs in.

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • codestringrequired

    The six digits. Spaces, dashes and Arabic-Indic digits are accepted.

  • emailstring · or null

    The email the code went to; with phone, the email of a new account.

  • phonestring · or null
  • first_namestring · or null

    For a new account.

  • last_namestring · or null
  • email_marketingboolean

    For a new account: agreed to marketing emails.

  • localestring · or null

    For a new account (BCP 47).

Returns

200 Signed in.

Errors

  • 401unauthenticatedThe account is disabled.
  • 409email_taken (the email belongs to another account), account_pending (the account waits for approval), accounts_off or sign_up_invite_only.
  • 422validation_failedWrong or expired code, or a new account's email is missing.
  • 429rate_limitedToo many attempts.