I am trying to get contact form 7 data to zoho crm and for it i write custom code..it is working fine on local host but on live it is giving following error

I am trying to get contact form 7 data to zoho crm and for it i write custom code..it is working fine on local host but on live it is giving following error

{"data":[{"code":"INVALID_DATA","details":{"maximum_length":20,"api_name":"Subscribed_Newsletter"},"message":"invalid data","status":"error"}]}

reference code is-

add_action('wpcf7_mail_sent','brainium_cf7_api_sender');
function brainium_cf7_api_sender($contact_form){
    $title = $contact_form->title;

    if( $title === 'Test') {
       $submission = WPCF7_Submission::get_instance();

        if( $submission ){
            $posted_data = $submission->get_posted_data();

            $first_name = $posted_data['first-name'];
            $last_name = $posted_data['last-name'];
            $email = $posted_data['your-email'];
            $phone = $posted_data['Phone-no'];
            $message = $posted_data['your-message'];
            $budget = $posted_data['budget'];
            $checkbox = $posted_data['checkbox-37'][0];
  

            $auth = 'xxxxxxxxxx';
            $refreshToken = "xxxxxxxxxx";
            //get the last date and time of refresh token generation
            
            //get the access token
            $query = "refresh_token=xxxxxxxxxx&client_id=xxxxxxxxxx&client_secret=xxxxxxxxxxx&grant_type=refresh_token";
            
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $url);
            curl_setopt($ch, CURLOPT_TIMEOUT, 30);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
            $result = curl_exec($ch);
            curl_close($ch);
            //get the token from the JSON in result
            $accessToken =  json_decode($result, true);
            //echo ($accessToken['access_token']); 
            //die();        
            
            $data = array("First_Name"=>$first_name, "Last_Name"=>$last_name, "Email"=>$email, "Phone"=>$phone, "Description"=>($message), "Budget"  => $budget, 'Subscribed_Newsletter' => $checkbox, "Lead_Date"=>$zoho_date, '$gclid'=>$zc_gad);
            //$data = json_encode($data);
            
            $encodedData = array();
            $encodedData['data'][0] = $data;
            
            //var_dump($data);
            //echo(json_encode($encodedData));
            //die();
            //che


            $headers = array(
                                'Authorization: Zoho-oauthtoken '.$accessToken['access_token'],
                                'Content-Type:application/json'
                            );

            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $url);
            curl_setopt($ch, CURLOPT_HTTPHEADER,$headers);
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_TIMEOUT, 30);
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($encodedData));
            $result = curl_exec($ch);
            curl_close($ch);
            //echo $result;
            // End zoho CRM
            $success = true;
            $msg = 'Done';
            
            $leadSaving = print_r($result, true);
            $leadSaving = $leadSaving . "\r\n" . $email;
            $leadSaving = $leadSaving . "\r\n" . "request quote";
            file_put_contents("lead-zoho-entry-status.txt", $leadSaving, FILE_APPEND);
            file_put_contents("lead-zoho-entry-status.txt", "\r\n\r\n", FILE_APPEND); 
        }
    } 
}