Add Email Address to Opt-In List
This page explains how to subscribe users to email notifications sent by the Bazaarvoice platform.
Introduction
Subscribing users is a two step process involving:
- Create an email authentication token
- Add the token to an opt-in list.
Continue reading to learn how to perform step #2.
Refer to the Tools page to view Open API specs and Postman collections that help you interact with the Notifications Subscriptions API.
Request
POST /notifications/<client-name>/subscriptions/subscribe?passkey=<your-api-key>&userToken=<email-auth-token>&emailType=<email-type> HTTP/1.1
HOST: [stg.]api.bazaarvoice.com
Content-Type: application/json
Use this request to add an encrypted email address to the opt-in list for a particular email type. This will subscribe that email address to the email type and remove the email address from the corresponding opt-out list for that email type.
Parameters
All parameters are required, unless otherwise noted.
Name | Description |
---|---|
Path | |
[stg.] | Optional. Use to make request in a non-production context. Refer to Environments to learn more. |
<client-name> | Lower case customer name associated with your API key. Look this up in Bazaarvoice Portal. |
Query String | |
passkey | Your public API key. Look this up in Bazaarvoice Portal. |
userToken | See Create Email Authentication Token. |
emailType | Capitalized email type. See Notification Types. |
Headers | |
Content-Type | application/json |
Accept | Optional. If included must be application/json . |
Response body
Response will be a JSON object. The following demonstrates a typical response:
{
"client": "apitestcustomer",
"emailAddress": "12c9736cf20452e5198e9bea7b539323c19107672bf958bd3072fa06e0c87bc0",
"subscriptionType": "OPT_IN",
"emailType": "PIE",
"time": "2014-01-24T00:12:46.178Z",
"emailAddressHash": "de7061b71475c6f62274b0ff561ac01c5e1507b9869598ac6de82ec6b0752060",
"_id": "52e1ad4145631c82e6b158a7"
}
The emailAddress
value can be decrypted following the process described at Decrypting Email Addresses.
Updated 11 months ago