my $json = encode_json {"name" => "test.txt", "parent" => {"id" => 0}}; my $resp = $ua->post( ENDPOINT , {file => <$fh> ,'attributes'=>$json }, 'Authorization' => 'Bearer ' . $token , Content_Type => 'multipart/form-data' . );