curl ENDPOINT \ -H "Authorization: Bearer ACCESS_TOKEN" -X POST \ -F attributes='{"name":"test.txt", "parent":{"id":"0"}}' \ -F file=@test.txt #### 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' . );