PCDDocObjectClass of DM API has a few methods to work with a document's trustees - the list of users or groups who have access to the document: FetchTrustees, GetTrustees, SetTrustees, UpdateTrustees, etc. eDOCS DM 5.3.1 DM API Reference Guide.pdf includes corresponding code samples.
Before you can upload a file into an eDOCS DM library, you need to create a document profile. Profile is metadata of your document. Technically speaking, it's a record in the PROFILE table in the DM database. Of course, we are not going to insert a data record directly into the database. We will be using DM API to let the DOCSFusion application server to execute all necessary business logic (which we do not know much about). However, we are not going to use DM API directly for the reasons explained earlier, but will create a method in our DMApiHelpers library.