Hello,
I am using Amplify to created AWS Pinpoint endpoints which I use further for segments, campaigns, journeys etc.
Creating the endpoint works fine for me by doing something like this:
let endpoint = {
address: this.email,
attributes: {
eventStatusUpdate: [true],
wantsToUnsubscribe : [false],
},
channelType: 'EMAIL',
optOut: 'NONE',
userId: this.email,
userAttributes: {
email: [this.email]
}
}
Analytics.updateEndpoint(endpoint).then((event) => {
console.log("ENDPOINT EVENT", event)
});
To delete the endpoint, in an email that users receive I have a button that redirects them to a Unsubscribe Page where I have another endpoint that gets the email of the user but I am not sure what to do from that point.
I have multiple endpoints for the same user with the same email but apparently all those endpoints get different ID's.
I have no idea how to delete the specific endpoint I want so that the user can be unsubscribed and not receive emails anymore.
I hope you can help me with that?