About the APIs: Developing my own Outlook Add-in - #2 by tflidd
However, what you want to do sounds more like you want to add a functionality to Nextcloud. And that would rather be through an app. Perhaps it starts like sharing, you can send a user a file, if the user accepts the file, it is copied into their own storage (without permanent link to your file, and you will perhaps want to delete the file after it was received).
There is an option to transfer ownership of files via occ-command:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#transfer
So you could transfer files to a folder of an upload user and then transfer the ownership of this folder to the user you want.