Go Headless

/

REST
Articles
Get Started
Use the Wix MCP
What's New

App Management
OAuth 2
App Billing
App Instance
App Permissions
Embedded Scripts
BI Event
Editor Deep Link
Site Plugins

Business Solutions
eCommerce
Stores
Bookings
CMS
Events
Restaurants
Blog
Forum
Pricing Plans
Portfolio
Benefit Programs

Assets
Media
HTTP Functions
Pro Gallery

CRM
Members & Contacts
Forms
Community
Communication
Loyalty Program
CRM

Business Management
AI Site-Chat
Analytics
App Installation
Async Job
Automations
Calendar
Captcha
Categories
Cookie Consent Policy
Custom Embeds
Data Extension Schema
Dashboard
FAQ App
Get Paid
Headless Authentication
Locations
Marketing
Introduction
Coupons
Email Marketing
Marketing Consent
Introduction
Sample Flows
Sort and Filter
Marketing Consent Object
G
Get Marketing Consent
D
Delete Marketing Consent
G
Get Marketing Consent By Identifier
P
Create Marketing Consent
P
Update Marketing Consent
P
Remove Marketing Consent
P
Query Marketing Consent
P
Upsert Marketing Consent
P
Bulk Upsert Marketing Consent
Marketing Consent Created
Marketing Consent Deleted
Marketing Consent Updated
Marketing Tags
TXT File server
Referral Program
Sender Emails
Sender Details
Service Plugins
Multilingual
Notifications
Payments
Site Search
Secrets
Site Properties
Site URLs
Tags

Account Level
About Account Level APIs
Sites
Resellers
Domains
B2B Site Management
User Management

Wix Backoffice
Chat V1
POST

Upsert Marketing Consent


Creates or updates a marketing consent. Required fields:

  • details.type.
  • details.email OR details.phone.
  • state.

When a marketing consent's state is PENDING or CONFIRMED, the info.lastConfirmationActivity field is required. When a marketing consent's state is REVOKED, the info.lastRevokeActivity field is required.

Note: For existing marketing consents with {"type": "EMAIL"}, you can't update the state to UNKNOWN_STATE. Trying to do so maintains the current state. However, you can create a new marketing consent and set the state to UNKNOWN_STATE. Note that you can't create more than a single consent per email or phone number.

Authentication

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

Permissions
Manage Marketing Consents
Manage Stores
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/marketing-consent/v1/marketing-consent/upsert

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:
Marketing Consent Created
Marketing Consent Updated
Did this help?