Adding note while adding contact in hubspot
Question
I am adding contacts to my hubspot via API. I can add name, email etc via API. But I am stuck on adding notes to the contacts while I add them. Should I pass the notes field in this API call?
This is how I am adding new contacts:
$data = array(
'properties' => array(
array(
'properties' => 'email',
'value' => [u_email]
),
array(
'properties' => 'firstname',
'value' => [u_fullname]
),
array(
'properties' => 'lastname',
'value' => ''
),
array(
'properties' => 'phone',
'value' => [u_phone]
),
)
);
curl_setopt_array(
$curl,
array(
CURLOPT_URL => "https://api.hubapi.com/contacts/v1/contact?hapikey=" . $hubspot_key,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode($data),
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json"
),
)
);
The notes field that I am trying to mention can be seen in the screenshot here – https://prnt.sc/u3miov
Any help would be more than appreciable.
Thank you.
0
api, forms, plugin-development, plugins
3 years
2020-08-21T13:10:19-05:00
2020-08-21T13:10:19-05:00 0 Answers
53 views
0
Leave an answer