I currently have this code, based on this example :
$api_token = 'xxxxxxxx';
$company_domain = 'xxxxxx';
$pipedrive_url = 'https://'.$company_domain.'.pipedrive.com/v1/deals?api_token=' . $api_token;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $pipedrive_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
$deal = array(
'title' => 'title',
'stage_id' => '1'
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $deal);
echo 'Sending request...' . PHP_EOL;
$output = curl_exec($ch);
curl_close($ch);
$result = json_decode($output, true);
if (!empty($result['data']['id'])) {
echo 'Deal was added successfully!' . PHP_EOL;
}
This correctly creates a new deal with a title. I want to pass the message value to the deal details. In the API docs I do not see what fields I need to pass to create a details field.
Can you guys give me any guidance?