Hi Ramesh,
May I know your use case for this scenario of uploading a document outside of the workflow? Is this a case where you have already started a process and the user might have forgotten to add an attachment. Then you would like to add an attachment from outside your process? If it is such a use case, I don't think any of the existing REST APIs can do this. This is because, the related content is linked to a form field when you submit a form from UI. However there are ways to work around this by using the Java APIs. So, please let me know your use case for me to suggest a solution.
Regards,
Ciju