API example with Coldfusion

Does anyone have a Coldfusion example they would be willing to share?

Dave Dave, 8 years ago

Unfortunately our older ColdFusion API wrapper has not been updated to include last year's API upgrade. You might want to get in touch with Ben Nadel, a Campaign Monitor customer and ColdFusion guru who may be able to point you in the right direction.

nateshow, 8 years ago

Through trial and error I have got the following code to work "SORT OF"

<cfhttp url="http://api.createsend.com/api/api.asmx/Subscriber.Add" method="POST" timeout="5" name="test" throwonerror="No">
<cfhttpparam type="FORMFIELD" name="ApiKey" value="myapikeyhere" encoded="no">
<cfhttpparam type="FORMFIELD" name="ListID" value="mylistidhere" encoded="no">
<cfhttpparam type="FORMFIELD" name="Email" value="george@whitehouse.net" encoded="no">
<cfhttpparam type="FORMFIELD" name="Name" value="George Washington" encoded="no">

<h2>Look at what we have here....</h2>

    #cfhttp.filecontent# <br>
    <cfdump var="#cfhttp#">

This DOES work to add the email to the correct list.  However, it also seems to return an error....

It returns "Connection Failure" and an error code of 200 which is not listed in the help.

Does anyone know what this means?

dunkirk, 8 years ago

Have you received any follow-up on this?  Or is anyone from CM working on a ColdFusion API wrapper?


roshodgekiss roshodgekiss, 6 years ago

Apologies for resurrecting this thread, but a ColdFusion library has just been released for the Campaign Monitor API. Thanks to developer Jon Joyce for so keenly developing and documenting the components available for download.

Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
JonJoyce, 6 years ago


The CM CFC wrapper does not require any dll's etc. Its standard ColdFusion and nothing fancy. Will work fine on shared hosts as long as they give you access to 'CreateObject' which most do.


Jonathon Joyce

JonJoyce, 6 years ago

Campaign Monitor CFC has been updated (1.1) to include 6 more functions for dealing with Custom Fields for lists and subscribers, download it here: http://campaignmonitorcfc.riaforge.org/

Jonathon Joyce


200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free