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.

Bulk Import Malformed CSV

Highlighted
Occasional Participant

Bulk Import Malformed CSV

Hi, I am trying to use the v3 endpoint for importing a CSV and keep getting an error 400 saying "Validation Failed: Malformed CSV".  Here is my CSV:

 

email,first_name,last_name
bob@smith.com,Bob,Smith

 

I also tried putting quotes around the headers and the data and that doesn't seem to help either.

7 REPLIES 7
Highlighted
Moderator

Re: Bulk Import Malformed CSV

Hello,

Thank you for reaching out to Constant Contact API Support.

Which endpoint specifically are you using (e.g. /activities/contacts_file_import or /activities/contacts_json_import)?

Is this an example of the contents of a CSV file you are trying to upload or are you submitting this text itself as the data in your call?

Sincerely,
David B.
Tier II API Support Engineer

Highlighted
Occasional Participant

Re: Bulk Import Malformed CSV

I am using /activities/contacts_file_import.  Also, I am actually using the testing tool directly from your API Reference Guide (https://v3.developer.constantcontact.com/api_reference/index.html#!/Bulk_Activities/post_activities_...), this is the CSV file I am trying to upload.

 

~ Mischa

Highlighted
Moderator

Re: Bulk Import Malformed CSV

Hi @MischaG3,

 

If you have not already done so please send us an email at webservices@constantcontact.com with your csv file. I have been able to successfully import using our tester page and Postman so I would like to try with your file next.


Regards,
Jimmy D.
Tier II API Support Engineer
Highlighted
Occasional Participant

Re: Bulk Import Malformed CSV

Okay, I just gave it a try.  Something that would be helpful is if you could post an example of a CSV that works.

Highlighted
Moderator

Re: Bulk Import Malformed CSV

Hi @MischaG3,

 

I used this file to import with our tester page and it worked successfully.

 

 


Regards,
Jimmy D.
Tier II API Support Engineer
Highlighted
Occasional Participant

Re: Bulk Import Malformed CSV

Hi,

 

So I copied the contents of your file INTO my CSV and then when I upload, I get an error missing file headers, even though the header row is there.  I'm thinking there must be something about the file or the file attributes it doesn't like?  

 

~ Mischa

Highlighted
Moderator

Re: Bulk Import Malformed CSV

Hi @MischaG3,

 

I used Excel to create that file. Are you using Excel, or some other program such as Numbers, or some proprietary program?


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