Problem Deleting Campaign

Hi,

I have been successfully adding lists, campaigns, etc. Everything had gone very smooth until I needed to delete a campaign. Following this: http://www.campaignmonitor.com/api/campaigns/#deleting_a_campaign returns an error: 102 Invalid ClientID, I have tried multiple variations but nothing seems to work. From what I can see I am not even passing ClientID, only API Key and Campaign ID. Any help would be very much appreciated.

Thanks,
Masha

jamesd jamesd, 5 years ago

Hey Masha,

How are you making your request to http://api.createsend.com/api/v3/campaigns/{campaignid}.{xml|json}? Keep in mind that you need to use the DELETE HTTP verb, as per the documentation.

If you're not already doing so, you might find using one of our API Wrappers useful. These give you an abstraction above the details of the actual HTTP requests being made to our API servers.

masha, 5 years ago

I am working in ColdFusion. Thanks for the tip, I wasn't passing the 'delete' method. It works now. Here is the code:

<!--- Sending request --->
    <cfhttp url="http://api.createsend.com/api/v3/campaigns/#arguments.CM_ID#.xml" method="delete" result="httpResult" port="80">
    <cfhttpparam type="header" name="Authorization" value="#BasicAuthorization#" />
    <cfhttpparam type="header" name="accept-encoding" value="no-compression"  />
    <cfhttpparam type="xml" value="" />       
    </cfhttp>

Thanks!
Masha

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098