Storefront Subscriptions
Manage newsletter and marketing email subscriptions on BigCommerce-hosted storefronts. To work with headless storefronts, use the GraphQL Storefront API.
The REST Storefront API uses CORS (opens in a new tab) headers for authentication, and therefore has no required scopes. You do not need to send any BigCommerce-specific tokens with your requests to these endpoints.
For info about authenticating BigCommerce APIs, see Authentication and Example Requests.
Resources
- Collecting Newsletter Subscriptions (opens in a new tab) (support.bigcommerce.com)
- Customers Overview
- Working with Storefront APIs
Create a Subscription
POST https://yourstore.example.com/api/storefront/subscriptionsRequest
Creates or updates an email subscription.
By default, customers receive abandoned cart emails as soon as they provide their email address in the checkout flow. They can opt out using this endpoint.
However, if Store Settings > Miscellaneous > Require Consent is enabled, Abandoned Cart Emails are not sent by default, and the customer should opt-in.
Parameters
- store_domain in path - string
Body
emailstring
Email of subscriberacceptsMarketingNewsletterboolean
Describes whether subscriber has consented to receive Marketing emails.acceptsAbandonedCartEmailsboolean
Describes whether subscriber has consented to receive Abandoned Cart emails.
example
Response
Body
idinteger
The unique numeric ID of the subscriber; increments sequentially.
emailstring
The email of the subscriber. Must be unique.
firstNamestring
>= 0 characters<= 255 charactersThe first name of the subscriber.
lastNamestring
>= 0 characters<= 255 charactersThe last name of the subscriber.
sourcestring
>= 0 characters<= 255 charactersThe source of the subscriber. Values are:
storefront
,order
, orcustom
.orderIdinteger or null
The ID of the source order, if source was an order.
Min: 1Max: 2147483647
example
See something you can improve? Edit this file on GitHub