DELETE
/
api
/
v1
/
customer
/
logout
Logout Customer from Current Device
curl --request DELETE \
  --url https://api.cravejs.com/api/v1/customer/logout \
  --header 'X-API-Key: <api-key>'
{
  "success": true
}

Headers

Authorization
string
required
Bearer token from OTP verification
Format: Bearer {jwt_token}
X-API-Key
string
required
Storefront API key for authentication
{
  "success": true
}
This endpoint revokes the JWT session through Stytch’s session management. After successful logout, the provided JWT token will be invalidated server-side and cannot be used for future authenticated requests, even if the token hasn’t expired yet. The customer will need to go through the login and OTP verification process again to access protected endpoints.

Authorizations

X-API-Key
string
header
required

Response

200
application/json

Customer logged out successfully.

The response is of type object.