This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
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.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
Marketing consent to create or update.