Storefront Subscriptions
Manage newsletter and marketing email subscriptions on the storefront.
For info about API accounts, see our Guide to API Accounts.
For info about authenticating BigCommerce APIs, see Authentication and Example Requests.
Additional Information
- Collecting Newsletter Subscriptions (opens in a new tab) (support.bigcommerce.com)
- Customers Overview
- Working with Storefront APIs
Create a Subscription
POST /subscriptions
Request
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.
Note
- Substitute your storefront domain for
yourstore.example.com
. - The Send a Test Request feature is not currently supported for this endpoint.
Parameters
- store_domain in path - string
Body
emailstring
Email of subscriber
acceptsMarketingNewsletterboolean
Describes whether subscriber has consented to receive Marketing emails.
acceptsAbandonedCartEmailsboolean
Describes whether subscriber has consented to receive Abandoned Cart emails.
example
{ "email": "string", "acceptsMarketingNewsletter": true, "acceptsAbandonedCartEmails": true }
Response
Body
Subscription properties.
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
The ID of the source order, if source was an order.
consentsarray[]
The collection of consents the shopper is subscribing to.
example
{ "id": 0, "email": "string", "firstName": "string", "lastName": "string", "source": "string", "orderId": 1, "consents": [ null ] }