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.

400 status code with update of contact

Occasional Contributor

400 status code with update of contact



We are using the xml V1 of the API, and the C# dot net library linked on your site here


I have seen it work fine before but now we are getting a 400 response from the constant contact server when we send a request. Below is the format of our xml request, the request object's content type is being set as "application/atom+xml", as well as its accept property. Any ideas on what the issue could be?


Example request:

<entry xmlns="">
    <title type="text"></title>
        <name>Constant Contact</name>
    <summary type="text">Contact</summary>
    <content type="application/vnd.ctct+xml">
        <Contact xmlns="" id="{redacted}/contacts/10749">
                <ContactList id="{redacted}/lists/2" />



Re: 400 status code with update of contact

I formatted your response to remove personal information.  Looking at the payload, there doesn't appear to be any errors in the formatting or data.  Can you share the response body that we're returning with the 400 error message? 

Dave Berard
Senior Product Manager, Constant Contact
Occasional Contributor

Re: 400 status code with update of contact

Hi Dave,

Thanks for your quick reply. Here is the response from the server.


"Error 400: Received Bad HttpResponse: 409 Conflict ActiveRecord::JDBCError: Column 'contact_id' cannot be null: INSERT INTO `service_addresses` (`account_id`, `address`, `contact_id`, `create_source`, `created_at`, `deleted_at`, `kind`, `service_address_id`, `sort_order`, `type`, `update_source`, `updated_at`) VALUES (1105491688575, '314-919-1800', NULL, 'A', '2014-03-26 20:23:59', NULL, 'work', x'9028cd10b52411e38141d4ae52a68661', 0, 'PhoneNumber', 'A', '2014-03-26 20:23:59')"


It says the contact id is null, is this not the correct contact id?


We are storing your contactid once we search on an email through the api and get the contact record. That way when we want to access the contact in the future we can just go strait to it using the api, instead of searching for the email using the api which appears to perform slower.


In an unrelated topic is there a way to get the contact id's from you guys when we export data?



Re: 400 status code with update of contact

Thanks, very surprising response there.  That is definitely an internal exception that we shouldn't be sharing out to you.  Will need to look into this on our side.  Will update when we have more to share.

Dave Berard
Senior Product Manager, Constant Contact
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