Verify a customer email with a token
POST
/auth/verify-email
Public, tenant-resolved (falls back to default account). Consumes a single-use verification token (validated for existence, unexpired, unused), sets the customer's email as verified, links any prior guest orders placed with that email, and returns a fresh 7-day customer JWT so the storefront can sign the user straight in. Returns 400 on an invalid, expired or already-used token.
Auth: Public (no authentication).
Request Body
application/json
JSON "token": "string"
{
}
Responses
Email verified and customer signed in
application/json
JSON "ok": true, "data": { "token": "string", "refreshToken": "string", "expiresIn": 604800, "customer": { "customerId": "string", "email": "user@example.com", "firstName": "string", "lastName": "string", "phone": "string", "emailVerified": true, "createdAt": "2024-01-01T00:00:00Z" } }
{
}