<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.thena.ai/v1/accounts/activities/{activityId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Meeting with John Doe',
'description' => 'Meeting with John Doe',
'activityTimestamp' => '2024-01-01T00:00:00Z',
'duration' => 60,
'location' => 'New York, NY',
'type' => 'T123',
'status' => 'S123',
'participants' => [
'U123',
'U124'
],
'attachmentUrls' => [
'https://example.com/attachment1.jpg',
'https://example.com/attachment2.jpg'
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}