Client.GetCampaigns returning empty

I'm just trying to get a list of defined campaigns via the api.
I have tried using the .Net wrapper (return code = 0, empty list in returnObject).
Source code:
var getListsResult = Client.GetCampaigns(_apiKey, _clientId);
if (getListsResult.Code != 0)
  throw new Exception(string.Format("Can't get campaigns: Error {0} - {1}", getListsResult.Code, getListsResult.Message));
return getListsResult.ReturnObject;
This returns an empty array,

I tried just hitting the api url (i.e. http://api.createsend.com/api/api.asmx/Client.GetCampaigns?ApiKey=myApiKey1234f&ClientID=myClientId1234)
This returns effectively an empty arrray:
<anyType d1p1:type="ArrayOfCampaign" xmlns:d1p1="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://api.createsend.com/api/" />

I definitely have created several campaigns.
I can get lists via the API (i.e. changing that code above to GetLists works fine), So it seems to be a server / api issue.

joshka, 6 years ago

bump

davidh, 6 years ago

I have replied to your support request by email. I think the problem is that Client.GetCampaigns only returns sent campaigns, not drafts. If you send a test campaign it should work for you.

joshka, 6 years ago

Thanks David. I haven't received that email yet. Nothing in my Junk mail either.
Is there an alternate method that allows access to draft campaigns via the API?

joshka, 6 years ago

bump

hansef, 6 years ago

David,

Adding to joshka's question here - I know there's nothing in the API currently to support retrieval of draft campaigns, but is this a roadmapped item? We're currently working on a product that provides close integration with several email gateways, including Campaign Monitor. MailChimp, Vertical Response and Constant Contact all allow us to retrieve ALL campaigns, with a sent/unsent flag set on the returned record. Is there a specific reason this functionality is not currently supported?

Thanks,
Hans

jamesd jamesd, 6 years ago

Hey guys,

Sorry about the inconvenience of only returning sent campaigns from Client.GetCampaigns. We've had a few requests to include drafts, so I've added your votes to our existing feature request. We obviously receive a huge amount of feature requests and only have a finite amount of time and resources to fulfil them, so I can't promise when this will be implemented and released. We'll be sure to let you know here when it has though.

If you've emailed support and don't appear to have received a response, please email again. It is very unusual not to have received a response though, as we make a point of replying to every legitimate support request we receive.

Thanks once again for the suggestion.

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