<?php
$email = urldecode($_GET['e']);
$sheetId = 5468990293888900;
$rowId = 6276066476724100;

$comment = [];
$comment[0] = new StdClass;
$comment[0]->text = 'My test';

//get discussion using rowId
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.smartsheet.com/2.0/sheets/$sheetId/rows/$rowId/discussions");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer qJc6jnLsHoqznwCbkApNwLMQamt6ITcykpgen", 'Content-Type: application/json', 'Assume-User: '.$email]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"comment": {"text":"This text is the body of the first comment"}}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = json_decode(curl_exec($ch));
curl_close($ch);

echo "<pre>";
print_r($response);
echo "</pre>";