POST /auth/send-code
/api/store/[slug]/auth/send-codeSends an 8-digit one-time passcode to the customer's email so they can sign in to the storefront customer portal.
Public - no auth neededRate limit STOREFRONT_OTP_SEND: 5 requests per 15 minutes pHow authentication works
Path parameters
slugstringrequiredBusiness store slug; 404 if no business matches.
Body parameters
emailstringrequiredCustomer email address. Trimmed and lowercased, must be a valid email, max 255 characters.
Responses
200
The request succeeded.
400
A field failed validation. The response names the fields that failed, not just the first.
404
No such store, or no such record inside it.
429
Too many requests. Back off and retry after the window in the response.
500
Something failed on our side. The response carries no detail; retry is safe on a GET.
What comes back
200: { success: true, message } on send. Errors: { success: false, error } with 400 (validation), 404 (business not found), 429 (OTP rate limit, message may include seconds to wait), 500.