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.
This method may require higher-level permissions than the caller has, based on their identity and roles and permissions. In these cases, you can ensure the method is called with the required level of authorization by using one of the following:
Marketing consent ID.
Field options. The following fields must be passed: details.type, the relevant email OR phone, and state.
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.