function uploadAttachment($candidateId, $fileAttachment) {
$header = [
'Authorization: Zoho-oauthtoken '.$token->access_token,
'Content-Type: multipart/form-data',
];
$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_HTTPHEADER, $header );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $fileAttachment);
$json_response = curl_exec( $ch );
curl_getinfo( $ch, CURLINFO_HTTP_CODE );
curl_close( $ch );
$response = json_decode( $json_response );
return $response;
}