POST

Upsert Email Subscription


Developer Preview

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

Updates or creates an email subscription for the requested email.

An email subscription is always returned in the response, regardless of whether it was updated or created.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Email Subscriptions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/email-marketing/v1/email-subscriptions

Body Params
subscriptionSubscription

Email subscription to update or create.

Response Object
subscriptionSubscription

Updated or created email subscription.

Update or Create an Email Subscription
Request
cURL
curl -X POST \ 'https://www.wixapis.com/email-marketing/v1/email-subscriptions' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \ --data-binary '{ "subscription": { "email": "email@test.com", "subscriptionStatus": "SUBSCRIBED", "deliverabilityStatus": "VALID" } }'
Response
JSON
{ "subscription": { "id": "e50c4534-d0a5-11ea-87d0-0242ac130003", "email": "email1@test.com", "subscriptionStatus": "SUBSCRIBED", "deliverabilityStatus": "VALID", "createdDate": "2019-09-20T17:48:10.299Z", "updatedDate": "2019-11-13T20:14:49.458Z" } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?