Envelope Signing (eSign)API ReferenceCreate File Conversion Task

Create File Conversion Task

POST/openapi/v1/files/convert-tasks

Asynchronously convert a non-PDF file (xlsx / docx / html, etc.) to PDF.

Workflow:

  1. Call Upload File to obtain the source FileId.
  2. Call this endpoint to submit a conversion task and receive a TaskId.
  3. Poll Query File Conversion Tasks until TaskStatus=success, then read ConvertedFileId.
  4. Use ConvertedFileId as Documents[].FileId in Quick Create Envelope.

Supported source formats: doc / docx / xls / xlsx / html / jpg / jpeg / png / bmp / txt

Not supported: pdf (already the target format; use it directly).

Conversion typically takes 2–10 seconds; polling every 1–2 seconds is recommended.


Request Parameters

AuthorizationRequiredstring
Bearer <access_token>
X-Operator-User-IdOptionalstring
Operator user ID. Not required in Authorization Code mode (the authorized user is used automatically). Optional in Client Credentials mode — omit to use the system user ID.
application/json
FileIdRequiredstring
Source file ID (required), returned by the UploadFile endpoint. Source file type must be one of doc / docx / xls / xlsx / html / jpg / jpeg / png / bmp / txt

Request Example

{
  "FileId": "SGf1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6"
}

Response Parameters

TaskIdOptionalstring
Conversion task ID; clients poll status via QueryFileConvertTasks

Response Example

{
  "Response": {
    "RequestId": "req-abc123",
    "Error": null,
    "Data": {
      "TaskId": "20260709175117139808"
    }
  }
}

Error Codes

Error CodeDescription
INVALID_REQUESTInvalid parameters (FileId is empty, the source file is already a PDF, source file type is not in the supported list, FileId does not belong to the current space, etc.)
OPENAPI.OPERATOR_USER_NOT_FOUNDThe X-Operator-User-Id is not a member of this space
INTERNAL_ERRORInternal service error (upstream conversion service unavailable, etc.)