POST /messages
/api/store/[slug]/messagesSends a new secure portal message from the authenticated storefront customer to the business, creating an admin notification and email alert.
Path parameters
slugstringrequiredBusiness (store) slug the message is sent to
Body parameters
subjectstringoptionalOptional message subject, trimmed, 1-150 chars.
messagestringrequiredMessage body, trimmed, 1-4000 chars.
Responses
The resource was created.
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
201 with { success: true, data: { message: { id, direction, source, message_subject, message_body, status, created_at } } }. Errors: { success: false, error } with 400/401/403/404/500/503 (503 when the messaging migration is not applied). CORS-enabled; OPTIONS preflight supported.