It is certainly possible to upload a file directly to a collaboration site using the same API you are already familiar with. Take a look at your repository. In the repository you will see a folder called "Sites". Within that folder you will find folders for each of your collaboration sites. Each individual site folder will contain a "documentLibrary" folder. This is where your collaboration sites store content that is in the document library for each site. If you upload a file to that location, it will be available in the site doc library.