Newsletter

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

  1. Subscribe - Create a newsletter entry for an email address.
  2. Manage - Retrieve or update the entry (name, source, consent).
  3. Unsubscribe - Delete the entry.

Example: A footer signup form subscribes an email with source: "footer"; later the recipient unsubscribes.


API Endpoints

MethodEndpointDescription
POST/api/v1/sdk/newsletterCreate 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, and consent_ip fields record consent.