$params = array(
'email' => $email,
'campaign' => array('campaignId' => 'aa6em'),
'name' => $firstName.' '.$lastName,
);
$data = json_encode($params);
$headers = array();
$headers[] = "X-Auth-Token: api-key fafsfsfvxcvzdzfghjhd5";
$headers[] = "Content-Type: application/json";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
$error = curl_errno($ch);
curl_close($ch);
Вопрос решил почти сам. И решил оставить готовое решение для getResponse API