BigCommerce
Storefront API
Subscriptions

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

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

object | application/json
  • email
    string

    Email of subscriber

  • acceptsMarketingNewsletter
    boolean

    Describes whether subscriber has consented to receive Marketing emails.

  • acceptsAbandonedCartEmails
    boolean

    Describes whether subscriber has consented to receive Abandoned Cart emails.

example

Response

Body

object | application/json

Subscription properties.

  • id
    integer

    The unique numeric ID of the subscriber; increments sequentially.

  • email
    string

    The email of the subscriber. Must be unique.

  • firstName
    string

    The first name of the subscriber.

    >= 0 characters<= 255 characters
  • lastName
    string

    The last name of the subscriber.

    >= 0 characters<= 255 characters
  • source
    string

    The source of the subscriber. Values are: storefront, order, or custom.

    >= 0 characters<= 255 characters
  • orderId
    integer or null

    The ID of the source order, if source was an order.

  • consents
    array[]

    The collection of consents the shopper is subscribing to.

example

Did you find what you were looking for?