Subscribe an email to the store's newsletter
Capture a storefront newsletter signup. Email is the identity — this works for anonymous visitors and signed-in shoppers alike (a signed-in storefront simply prefills the email field). When the store has connected a marketing tool, the new subscriber is automatically synced to the merchant’s chosen list.
Auth: accepts both publishable (tybrite_pk_*) and secret (tybrite_sk_*) API keys, so
it can be called directly from the storefront. No customer session required.
Idempotent: re-subscribing the same email is safe — it returns 200 with
already_subscribed: true and never creates a duplicate. A fresh signup returns 201.
Authorizations
API Key Authentication
Use your API key in the Authorization header:
Key Types:
Secret Keys (Server-Side Only):
- Format:
tybrite_sk_live_*(production) ortybrite_sk_test_*(sandbox) - Full read/write access to all endpoints
- ⚠️ NEVER expose in client-side code or public repositories
- Required for: write operations, authentication, payment verification, AI recommendations
Publishable Keys (Client-Safe):
- Format:
tybrite_pk_live_*(production) ortybrite_pk_test_*(sandbox) - Read-only access (GET requests only, plus POST semantic search)
- ✅ Safe for client-side JavaScript, mobile apps, and public code
- Allowed for: browsing products, search, CMS content, pricing queries
Endpoint-Specific Requirements:
- Authentication endpoints (
/v1/auth/*): Secret key required - Payment verification (
POST /v1/payments/verify): Secret key required - AI Recommendations (
POST /v1/recommendations): Secret key required - Semantic Search (
POST /v1/search): Both key types allowed (read-only operation) - All write operations: Secret key required
- All read operations: Both key types allowed
Using a publishable key for restricted operations returns 403 Forbidden.
Body
The subscriber's email address.
"shopper@example.com"
Optional free-text label for where the signup happened (e.g. a blog post or lookbook slug, or footer). Surfaced to the merchant and forwarded as an event property.
"post:summer-style-guide"

