How to delete an AWS Pinpoint Endpoint via Amplify JS?

0

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?

asked 2 years ago93 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions