Emailsubscription Email Subscription Changed


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Permissions
Manage Email Subscriptions
Learn more about app permissions.
Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
subscriptionSubscription

subscription

Event Body

The data payload will include the following as an encoded JWT:

JSON
{ "data": { "eventType": "com.wixpress.emailsubscriptions.v1.EmailSubscriptionChanged", "instanceId": "<app-instance-id>", "data": "<stringified-JSON>", // The identity field is sent as a stringified JSON "identity": { "identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP "anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR "memberId": "<memberId>", // in case of MEMBER "wixUserId": "<wixUserId>", // in case of WIX_USER "appId": "<appId>" // in case of APP } } }

Email Subscription Changed
JSON
{ "subscription": { "id": "9c130f52-31c4-11ed-a261-0242ac120002", "email": "someone-else@theircompany.com", "subscriptionStatus": "UNSUBSCRIBED", "deliverabilityStatus": "VALID", "createdDate": "2019-10-30T17:22:10.299Z", "updatedDate": "2019-11-13T20:14:49.458Z" } }
Did this help?