storefront-site-api
Newsletter Subscribe API
Subscribe
Adds an email to the tenant's newsletter. Single opt-in: the address is active immediately and no confirmation email is sent. The tenant is resolved from the subdomain; the key must authorize that tenant.
POST https://app.orbiocloud.com/api/public/newsletter?subdomain=your-subdomain
Headers: X-API-Key: your_api_key, Content-Type: application/jsonBody
email - required, validated
first_name, last_name - optional
source - optional label (e.g. footer, popup)
curl -X POST 'https://app.orbiocloud.com/api/public/newsletter?subdomain=your-subdomain' \
-H 'X-API-Key: your_api_key' -H 'Content-Type: application/json' \
-d '{"email":"[email protected]"}'Responses
200 OK (new or re-subscribed)
{ "success": true, "data": { "status": "subscribed" } }200 OK (already active)
{ "success": true, "data": { "status": "already_subscribed" } }400 Bad Request
{ "error": "Invalid email format" }Unsubscribe
curl -X POST 'https://app.orbiocloud.com/api/public/newsletter/unsubscribe?subdomain=your-subdomain' \
-H 'X-API-Key: your_api_key' -H 'Content-Type: application/json' \
-d '{"email":"[email protected]"}'Subscribers are tenant-isolated and appear in the Website hub under Subscribers, where they can be searched, exported, and unsubscribed.