I am trying to write the documents . I use PHP curl request to call the api.
Any help would be much appreciated
$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);