Skip to content
Coursey CreativeSign in

POST /messages

/api/store/[slug]/messages

Sends a new secure portal message from the authenticated storefront customer to the business, creating an admin notification and email alert.

Customer bearer token requiredHow authentication works

Path parameters

slugstringrequired

Business (store) slug the message is sent to

Body parameters

subjectstringoptional

Optional message subject, trimmed, 1-150 chars.

messagestringrequired

Message body, trimmed, 1-4000 chars.

Responses

201

The resource was created.

400

A field failed validation. The response names the fields that failed, not just the first.

401

The key or customer token is missing, malformed, or no longer valid.

403

The credential is valid but is not allowed to do this.

404

No such store, or no such record inside it.

500

Something failed on our side. The response carries no detail; retry is safe on a GET.

503

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.