POST
/
api
/
v1
/
login-customer
{
  "identifierString": "customer@example.com",
  "customerName": "John Smith",
  "lastName": "Smith"
}
{
  "stytchUserId": "user-test-12345678-1234-1234-1234-123456789012",
  "created": false,
  "methodId": "email-test-12345678-1234-1234-1234-123456789012"
}

Request Body

profilePicture
string
Customer’s profile picture URL (optional)
identifierString
string
required
Customer’s email address or phone number for authentication
customerName
string
required
Customer’s full name
provider
string
Authentication provider (e.g., “google”, optional)
lastName
string
Customer’s last name (optional)
{
  "identifierString": "customer@example.com",
  "customerName": "John Smith",
  "lastName": "Smith"
}
{
  "stytchUserId": "user-test-12345678-1234-1234-1234-123456789012",
  "created": false,
  "methodId": "email-test-12345678-1234-1234-1234-123456789012"
}
The methodId returned is required for the subsequent OTP verification step. The created field indicates whether this is a new user registration (true) or existing user login (false).

Authorizations

X-API-Key
string
header
required

Body

application/json
identifierString
string
required

Customer's email address or phone number for authentication

customerName
string
required

Customer's full name

profilePicture
string

Customer's profile picture URL (optional)

provider
string

Authentication provider (e.g., 'google', optional)

lastName
string

Customer's last name (optional)

Response

Successful login or registration.

stytchUserId
string
required

The Stytch user ID for the customer

created
boolean
required

Whether this is a new user registration (true) or existing user login (false)

methodId
string
required

The method ID required for subsequent OTP verification