Message Opt-out
Reports that a user opted out of receiving messages.
This event is currently available for script implementation only. API implementation is coming soon.
Parameters
- name: Human-readable name, not used to identify an event type
- properties: A container for the event properties as specified in the following table:
Property | Description | Type |
---|---|---|
dyType | Must be "message-optout-v1" | String |
cuidType | Possible values: "email" "external" | String |
hashedEmail Mandatory for cuidType: "he" | SHA256 hash of the plain-text email in lower case. Use either hashedEmail OR externalId, not both. | String |
externalId Mandatory for cuidType: "external" | The external ID used to identify the user. Your ESP must be able to recognize this ID and map it to an email address. Use either hashedEmail OR externalId, not both. Note: The external ID type is supported only by custom ESP and Emarsys integrations (and not by SendGrid or Responsys, for example) | String |
Example: Implementation via script using a hashed email address
DY.API("event", {
name: "Message Opt Out",
properties: {
dyType: "message-optout-v1",
cuidType: "email",
hashedEmail: DYO.dyhash.sha256("[email protected]".toLowerCase()) // SHA256 encoding of the lowercase email.
}
});
Example: Implementation via script using an external ID
DY.API("event", {
name: "Message Opt Out",
properties: {
dyType: "message-optout-v1",
cuidType: "external",
externalId:"852456456"
}
});
Go to the API reference for the Events endpoint to learn more.
Updated 5 months ago