Skip to main content
GET
/
api
/
v1
/
customer
Get Customer Data
curl --request GET \
  --url https://api.cravejs.com/api/v1/customer \
  --header 'X-API-Key: <api-key>'
{
  "id": "687a1eac1907e7930c347c81",
  "profilePicture": "https://example.com/profile/customer-photo.jpg",
  "customerEmail": "customer@example.com",
  "customerName": "John Smith",
  "phoneNumber": "+1234567890"
}

Headers

Authorization
string
required
Bearer token from OTP verification
Format: Bearer {jwt_token}
X-API-Key
string
required
Storefront API key for authentication
{
  "id": "687a1eac1907e7930c347c81",
  "profilePicture": "https://example.com/profile/customer-photo.jpg",
  "customerEmail": "customer@example.com",
  "customerName": "John Smith",
  "phoneNumber": "+1234567890"
}
This endpoint returns the customer profile information associated with the authenticated session. The JWT token is validated using Stytch’s session authentication, and the customer data is retrieved from the database using the customer ID stored in the token’s custom claims.The phoneNumber field is only included in the response if the customer has a phone number on file. The profilePicture field may be an empty string if no profile picture is set.

Authorizations

X-API-Key
string
header
required

Response

Customer data retrieved successfully.

id
string
required

The customer's unique database ID

profilePicture
string
required

URL or path to the customer's profile picture (may be empty string)

customerEmail
string
required

The customer's email address

customerName
string
required

The customer's full name

phoneNumber
string

The customer's phone number (optional, may not be present)