Overview
Newsletters let visitors subscribe an email address to a site, independent of having a customer account. These endpoints manage newsletter subscriptions and their optional name, source, and consent details. All are public.
How It Works
- Subscribe - Create a newsletter entry for an email address.
- Manage - Retrieve or update the entry (name, source, consent).
- Unsubscribe - Delete the entry.
Example: A footer signup form subscribes an email with source: "footer"; later the recipient unsubscribes.
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v1/sdk/newsletter | Create newsletter |
GET | /api/v1/sdk/newsletter/{email} | Get newsletter |
PUT | /api/v1/sdk/newsletter/{email} | Update newsletter |
DELETE | /api/v1/sdk/newsletter/{email} | Delete newsletter |
Important Behaviors
- Public: No authentication is required.
- Unique per site: An email can be subscribed once per site; creating a duplicate returns
400. - Update requires existence: Updating an email that is not subscribed returns
400. - Consent capture: Optional
consent_url,consent_text,consent_type, andconsent_ipfields record consent.
