Document Manage Async
Markdown for LLMsRuns the same file management as documents-document-manage, but asynchronously. Every rule of the synchronous operation applies unchanged; see its description for the request.
This endpoint returns HTTP 200 with an empty body as soon as the request is accepted and queued. That response only acknowledges receipt; it does not mean the operation succeeded.
The result arrives at your callback URL, not in the response to this call. Once the operation finishes, Doctavian sends a POST to the URL formed by joining the iss and dest claims of the X-Client-Authorization token supplied on this request, authenticating itself through the external connector named by that token's connector_id claim.
On success the callback body is the DocumentManageResponse envelope — the same body documents-document-manage returns. On failure it is the ErrorResponse envelope, carrying the failure's own code: unlike the synchronous operation, no …_FUNCTION_FAILED entry is added after it. Correlate a callback with its request through externalContext, which is echoed back unchanged.
A 400 from this endpoint means the request was rejected before being queued, so no callback follows it. Usage limits are checked once the request is processed, so a reached limit arrives at the callback as an ErrorResponse with LIMIT_BREACH, not as an HTTP 403 from this endpoint.
JWT token to authenticate the request.
In: header
API key, sent as a request header.
In: header
Header Parameters
Request Body
application/json
Mandatory. The same body as documents-document-manage.
TypeScript Definitions
Use the request body type in TypeScript.
Request body for documents-document-manage and documents-document-manage-async.
Response Body
application/json
curl -X POST "https://example.com/documents/document/manage/async" \ -H "X-Client-Authorization: eyJhbGciOiJIUzI1NiJ9.example-client-callback-token" \ -H "Content-Type: application/json" \ -d '{ "externalContext": { "id": "req-2026-0007421" }, "sourceDocument": { "urn": "e3b0c442-98fc-4e1a-8a3d-2c1b5f6e9a70", "fileFormat": "docx", "loadMethod": "OneDrive", "remove": "delete", "options": {} }, "targetDocument": { "name": "Q3 Sales Report - Archived", "fileFormat": "pdf", "deliveryMethod": "OneDrive", "path": "", "options": { "onedrive": { "viewAnonymous": false, "editAnonymous": false, "viewOrganization": true, "editOrganization": false, "viewUsers": [ "jane.doe@example.com" ], "editUsers": [] } } }, "data": {} }'{ "error": { "statusCode": 400, "message": "Bad Request", "innerErrors": [ { "code": "X_CLIENT_AUTH_ERROR", "message": "header is missing for async operations", "userMessage": "This request can't be accepted without a callback authorization header." } ], "externalErrors": [] }, "externalContext": { "id": "req-2026-0007421" }, "origin": "POST https://api.doctavian.com/v1/documents/document/manage/async", "dateTime": "2026-07-14T09:30:00.000Z", "userId": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8d", "operationId": "38a1de72cef5aba1c0b26dd712239827"}