$path = storage_path('app/letters/letter.pdf');
$post = 'file=@' . $path;
curl_setopt($ch, CURLOPT_URL, 'https://sign.zoho.com/api/v1/requests');
$authorization = 'Authorization: Zoho-oauthtoken ' . $token;
curl_setopt($ch, CURLOPT_HTTPHEADER, [$authorization]);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$entriesData = ['data' => [
'requests' => [
'request_name' => "NDA ",
'actions' => [
'recipient_name' => 'test',
'recipient_email' => $mail,
'action_type' => 'sign',
'verify_recipient' => false,
],
'is_sequential' => false,
]
]];
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($entriesData));
$output = curl_exec($ch);
Writer is a powerful online word processor, designed for collaborative work.