Document Manage
Manages documents across supported platforms (Storage, Salesforce, OneDrive) without modifying their internal content.
- Supported operations include:
- Copy. Duplicate a document from source to target. Requires the same fileFormat for source and target, and source.remove = "none".
- Move. Transfer a document from source to target and delete it from the source. Requires the same fileFormat for source and target, and source.remove = "delete" or "permanentDelete".
- Delete. Remove a document when only the source is provided, with source.remove = "delete" or "permanentDelete" and no target.
- Convert. Change document format while transferring; both source and target are required and fileFormat must differ.
JWT token to authenticate the request.
In: header
API key, sent as a request header.
In: header
Header Parameters
Unique API key used to identify and authorize access to a specific environment
"{{apiKey}}"Value in
- "{{apiKey}}"
Request Body
application/json
externalContext A contextual reference used to link the document generation request to an external system, process, or transaction. Often used for traceability or auditing purposes.
sourceDocument Identifies the input document and its properties, serving as the starting point for file operations like copying to a new location, moving with deletion, deleting outright, or converting to a different format.
sourceDocument.options Fine-tunes the loading process for the source document to meet specific requirements, such as retaining formatting or handling special features during operations like copying or conversion.
targetDocument Defines the properties of the output document resulting from the file operation (e.g., the destination for Copy, Move, or Convert operations). It specifies the document’s metadata, format, delivery method, storage location, and processing options, determining how the processed document is saved and managed. This node is omitted for Delete operations, as no output document is generated.
targetDocument.options.salesforce
Specifies how the document will be stored or associated with records in Salesforce. Includes fields such as fileId, fileType, fileParentId, and ownerId.
targetDocument.options.onedrive Specifies how the document will be shared or stored via Microsoft OneDrive. Includes permission settings like anonymous access, edit/view rights, and user-specific sharing.
Response Body
application/json
application/json
curl -X POST "https://example.com/signatures/document/manage" \ -H "Authorization: Bearer {{authToken}}" \ -H "X-Subscription-Key: {{apiKey}}" \ -H "Content-Type: application/json" \ -d '{ "externalContext": { "id": "12345" }, "sourceDocument": { "urn": "{{uploadedDocument}}", "fileFormat": "pdf", "loadMethod": "Storage", "remove": "none", "options": { "docxLoadOptions": "{}" } }, "targetDocument": { "name": "CopiedTest", "fileFormat": "pdf", "deliveryMethod": "Storage", "path": "root", "options": { "pdfSaveOptions": "{ \\"ConformanceLevel\\": \\"PdfA3a\\", \\"Version\\": \\"PDF_1_7\\", \\"ImageDpi\\": 750 }", "docxSaveOptions": "{}", "salesforce": { "networkId": "", "fileId": "", "fileType": "", //Attachment, File "fileParentId": "", "ownerId": "" }, "onedrive": { "viewAnonymous": true, "editAnonymous": true, "editUsers": [ "user@example.com", "user@example.com" ], "viewUsers": [ "user@example.com", "user@example.com" ] } } }, "data": { "embedded": "" } }'{ "result": { "statusCode": "201", "message": "Created", "data": { "document": { "deliveryMethod": "Storage", "name": "Sales Agreement DOCX", "fileFormat": "pdf", "urn": "20b8feea-a8e6-929d-5beb67a290b8" } } }, "consumption": [ { "dimension": "pages-managed", "value": 5 }, { "dimension": "documents-managed", "value": 1 } ], "origin": "POST https://dev.headless.mavenmule.com/signatures/document/manage", "dateTime": "2025-11-05T11:02:16.0000000+00:00", "userId": "1d8b89c4-0889-0c-9af09ac3bc9b", "operationId": "a9733c420a9e6336ea36ed98f31"}{ "error": { "statusCode": "400", "message": "Bad Request", "innerErrors": [ { "code": "{{errorCode}}", "message": "{{errorMessage}}", "userMessage": "{{message}}", "eventId": "{{eventId}}" } ], "externalErrors": [] }, "externalContext": { "actionRequestId": "{{externalContextId}}" }, "origin": "{{originEnvironment}}", "dateTime": "{{responseTimestamp}}", "userId": "{{userId}}", "operationId": "{{operationId}}"}