Announcing our brand new Campaign Builder!

Server error while I am trying to create new list using V3 API using curl

Campaign Contributor
0 Votes

Hello sir


I am integrating the V3 API with our website, I with the V3 API I received the access token successfully. But when I try to create new list using curl it give me error "{"error_key":"server_error","error_message": "Internal server error"}". Following is my code:


$url = '';

$ch = curl_init();


$data = array(
"name" => "Multiple Countries",
"favorite" => true,
"description" => "List mulitple countries"
$jsonDataEncoded = json_encode($data);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonObj);

// Set HTTP Header for POST request
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'accept' => 'application/json',
'authorization' => 'Bearer '.$access_token,
'cache-control' => 'no-cache',
'content-type' => 'application/json'
// Submit the POST request
$result = curl_exec($ch);
$err = curl_error($ch);

// Close cURL session handle
if ($err) {
echo "cURL Error #:" . $err;
} else {


0 Votes

Hello MrRoyo,


Thank you for reaching out to Constant Contact API Developer Support, and for your patience. My team is here to assist outside software developers with questions about building into Constant Contact's API.


It looks like we're working with you directly via email regarding your inquiry, but I wanted to close the loop here as well. If you haven't received our reply, please let us know via email at, and reference case number 28232085.


Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Developer Portal

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

Visit Page


API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up

How confident are you about the effectiveness of your current marketing strategy?

Top Choice: Not confident at all (76%)