The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Opting contacts back in

Highlighted
Occasional Advisor

Opting contacts back in

Should be easy; I read the documentation

 

- API is PUT with /contact/contactid

 

- Action_by is ACTION_BY_VISITOR

 

I think only two additonal field are required to opt the contact back in; the list ID, and the email. But no luck!

 

An example json string is:

{
"email_addresses": [{"email_address": "test@test.com"}],
"lists": [{"id":"1814554569"}]
}

 

I get a 200ok response, but the status is still OPTOUT. What did I do wrong?

1 REPLY 1
Highlighted
Moderator

Re: Opting contacts back in

Hello,

 

Thank you for reaching out to Constant Contact's API Support.

 

The only thing I could see is in your endpoint and that was missing an s. It should be /contacts/{contactID}. I assume that was just a typo when writing your post.

 

Here is the code I used to submit and it worked fine for me. This is basically the exact same thing you submitted since the order and line spacing does not matter. At this point I suggest you email us at webservices@constantcontact.com so you can include some private details so we can take a closer look. Please include your API key, the email address, contact ID, and the list ID.

 

{
        "lists": [
        {
            "id": "111111"
        }
    ],
    "email_addresses": [
        {
            "email_address": "test@test.com"
        }
    ]
}

Regards,
Jimmy D.
Tier II API Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured