Skip to main content
POST
/
login-customer
Login or Register Customer
curl --request POST \
  --url https://api.craveup.com/api/v1/login-customer \
  --header 'Content-Type: application/json' \
  --data '{
  "profilePicture": "https://cdn.example.com/avatar.jpg",
  "identifierString": "user@example.com",
  "customerName": "John Doe",
  "provider": "google",
  "lastName": "Doe"
}'
{
  "stytchUserId": "user-live-123",
  "methodId": "email-live-456",
  "created": true
}

Body

application/json
identifierString
string
required
Example:

"user@example.com"

customerName
string
required
Example:

"John Doe"

profilePicture
string | null
Example:

"https://cdn.example.com/avatar.jpg"

provider
string | null
Example:

"google"

lastName
string | null
Example:

"Doe"

Response

OTP challenge initiated successfully.

Response returned by Stytch when an OTP challenge is initiated. Use methodId when submitting the OTP.

stytchUserId
string
required
Example:

"user-live-123"

methodId
string
required
Example:

"email-live-456"

created
boolean
required
Example:

true

I