post https://app.campaignrefinery.com/rest/contacts/subscribe
Log in to see full request history
Subscribe a new contact.
Responses
Subscribe a new contact.
xxxxxxxxxx
29<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://app.campaignrefinery.com/rest/contacts/subscribe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "key=$key&email=$email&first_name=$first_name&last_name=$last_name",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: application/x-www-form-urlencoded",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Try It!
to start a request and see the response here! Or choose an example: