Campain API integration


Campain API integration

Hello, We are using constant contact API for campaign management.

Account credentials:

login - CupomBom

Campaign is not getting added via our script. Can you please let us know if any issue to our account. It will be great if you will send sample PHP code file for integration API.  Below is the add campign sample code we are useing. Please find attached zip,




There should be no issue preventing a campaign from being added to your account through the API. I am taking a look at your code now, but is there a specific error message you were receiving?


Also, we do have PHP library that was recently created that has this functionality already included. If you're intersted in taking a look at this, it is available on our Code Samples page.

David J


I took a look at the zip file you attached, and was not able to replicate the issue you were experiencing while creating a campaign. The only time that I was able to produce an error was by naming a campaign the same thing as a previously existing campaign. If you're still receiving errors with this, I would recommend saving the XML to a text file, or outputting it to the screen so that you we can take a closer look at exactly what is being passed to Constant Contact. This would be $campaignXML that is being set on edit_campaign.php  line 49.

You can attach that XML to this post or send it to our webservices support team and we'll be happy to take a look and see if we can spot the issue from there. Thank you.

David J

Developer Portal

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

Visit Page