Make sure you have followed the documentation closely and added also the runAllManagedModulesForAllRequests="true"
attribute to the web.config file.
Then, I was able to "register" the media file in the system using this REST API call:
http://mydomain.com/rest/media.file?format=json
and the POST request body was:
{
"FileDescription":"Filedescription",
"FileExtension":".pdf",
"FileLibraryID":1,
"FileMimeType":"application/pdf",
"FileName":"filename",
"FilePath":"some/path/file.pdf",
"FileSiteID":1,
"FileSize":1024,
"FileTitle":"filename.pdf"
}
Keep in mind that this just registers the file in the Kentico DB. You need to place the physical file, the binary data to given disk location using FTP or some file system sync software.