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.

Add contacts to list activity

Highlighted
Occasional Contributor

Add contacts to list activity

Hi all:

Right now I want to add multiple email address to a contactlist. 

Here is my post body:

 

data.Append("activityType=SV_ADD");
data.Append("&data=EMAIL+ADDRESS%0A");
data.Append("emailaddress%0A");
data.Append("emailaddress");
data.Append("&lists=http%3A%2F%2Fapi.constantcontact.com%2Fws%2Fcustomers%2Fusername%2Flists%2F5");

 

I wonder what collection URI I should post to, right now I post this body to :

http://api.constantcontact.com/ws/customers/username/lists/5

but I am getting (415)unsupported media error.

 

Where did I do wrong..anybody help me...I did use content type = application/x-www-form-urlencoded

 

 Thank you.

5 REPLIES 5
Highlighted
Employee

Re: Add contacts to list activity

Hi,

 

You should be posting the resultant string to a URI like:

 

https://api.constantcontact.com/ws/customers/<username>/activities

 

Best Regards,

Shannon W.

API Support Specialist

Highlighted
Occasional Contributor

Re: Add contacts to list activity

  Thank you for your answer, after posting to the URI you provided,  I haved added two email to specified list.

But under activity tag, it says that there is a error with add activity, although the emails have been successfully added.

Please see below:

 

Lists:  new

Status:  Complete

Insert Time:  4/2/2013 2:03 PM EDT

Run Start Time:  4/2/2013 2:04 PM EDT

Run Finish Time:  4/2/2013 2:04 PM EDT

Uploaded File Name:  A file was not used for this activity

Number of Contacts:  3

Number of Errors:  1

Invalid Email Addresses:  email address (invalid format)

 

Is my post body right? What is resultant string?

 

Thank you!

Highlighted
Employee

Re: Add contacts to list activity

Hi,

 

I redacted your username and email addresses in your earlier post so that they didn't get scraped, but I didn't see anything obviously wrong with the email addresses.

 

If you used your previous example, you only had 2 email addresses to be added, but the file activity says you had 3.  Is that correct?

 

Best Regards,

Shannon W.

API Support Specialist

Highlighted
Occasional Contributor

Re: Add contacts to list activity

Hi:

 Yes, I only added two email addresses, I don't know why file activity says I had 3, and What is that error? 

and another time, I try to add three email, the file activity says I had 4, but only 2 emails had been added to list. I am so confused..

 

help...

Highlighted
Employee

Re: Add contacts to list activity

Hi Carol,

 

It seems like an extra "%OA" might be getting added to the import string.  Could you post your import string again?  I will try to reproduce it in my account.

 

Best Regards,

Shannon W.

API Support Specialist

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