GET /messages
/api/store/[slug]/messagesFetches the authenticated storefront customer's message thread with the business (portal messages, form submissions, and admin replies), oldest first.
Path parameters
slugstringrequiredBusiness (store) slug the conversation belongs to
Query parameters
limitnumberoptionalMaximum number of messages to return; coerced integer between 1 and 200.
Default 100
Responses
The request succeeded.
A field failed validation. The response names the fields that failed, not just the first.
The key or customer token is missing, malformed, or no longer valid.
The credential is valid but is not allowed to do this.
No such store, or no such record inside it.
Something failed on our side. The response carries no detail; retry is safe on a GET.
A service this endpoint depends on is unavailable, usually Stripe.
What comes back
200 with { success: true, data: { customer_email, messages: [...] } }; each message has id, direction ('inbound'|'outbound'), source, message_subject, message_body, status, created_at, sent_by_ccp_account_id, and team_sender_display_name (for outbound admin replies). Errors: { success: false, error } with 400/401/403/404/500/503. CORS-enabled; OPTIONS preflight supported.