Showing results for 
Search instead for 
Did you mean: 

Schedule Email Campaign

Occasional Contributor

Schedule Email Campaign

I need a serious help.
Need help on scheduling campaign using 
I have already configured my constant contact account to use api and I was success on using other api such as:

1. Retrieve Contact

2. AddContact

3. Read/Write ContactList


I was trying to schedule campaign and to do that I used HttpClient. I know have correct json data to post it. But when I make api call it always return Error:400, BadRequest.
My code looks like as below:


String jsonData = "{\"scheduled_date\":" + "\"2017-12-09T12:34:59Z\"}";
string requestPath = "emailmarketing/campaigns/"+id+"/schedules" + api;
string jsonContact = jsonData;
StringContent content = new StringContent(jsonContact, UnicodeEncoding.UTF8, "application/json");
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");

HttpClient client = new HttpClient();
client.BaseAddress = new Uri(baseAddress); //baseAddress =
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", bearerToken);
var response = client.PostAsync(requestPath, content).Result;


I am not sure whats going wrong in the code it always sends Error:400. Is there any other alternative to achieve it.


Thanks in advance.


Re: Schedule Email Campaign



There are a few different things that can cause a 400 error. What is the error response message that is being returned with the error code 400? For example, "Property was found but is not permitted at this location" or "Unable to parse JSON payload"


These will be key to determining why your call is being rejected.


David B.
Tier II API Support Engineer

Occasional Contributor

Re: Schedule Email Campaign

Thanks for the response. I was able to fix the error.