Using the GitHub API, I can create a tree containing all the modified files for a commit, specify a base_tree that will be updated with this tree of changes and then commit it.
But, as the documentation says, the new tree can contain only paths for files with the modes
100644for file (blob),100755for executable (blob),040000for subdirectory (tree),160000for submodule (commit), or120000for a blob that specifies the path of a symlink.
It doesn't say what should I do if I want to mark some path as deleted, as with git rm <path>.