POST
/
auth
/
login
/
email
Login with email
curl --request POST \
  --url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/auth/login/email \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "jsmith@example.com",
  "register_if_not_exists": true
}'
{
  "message": "<string>",
  "success": true,
  "content": {
    "otp_token": "<string>",
    "otp_action": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Access token

Body

application/json
email
string<email>
required

User's email address.

register_if_not_exists
boolean

This is used to send OTP to unregistered phone. By default it sends OTP to registered phone only. To send OTP to unregistered phone it should be pass with true value like this, "register_if_not_exists": true

Response

OK

message
string
required

A descriptive message confirming the success or failure of the Login process.

success
boolean
required

Indicates whether the request was successful or failure (true for success, false for failure).

content
object
required

An object containing the response content.