File ManagementAPI ReferenceUpload File

Upload File

POST/

Upload a file as a binary stream via multipart/form-data to obtain a FileId for contract creation or other operations.

  • Returns FileId upon success

Request Parameters

AuthorizationRequiredstring
Bearer <access_token>
X-TC-ActionRequiredstring
API action name, fixed value: `CreateUploadFile`
X-TC-TimestampRequiredstring
Current UNIX timestamp in seconds, e.g. `1605024000`
X-TC-LanguageRequiredstring
Response language, required. Supported values: zh-CN / zh-TW / en-US / vi-VN / th-TH / ms-MY / id-ID
multipart/form-data
BusinessTypestring
Business type enum: - `TEMPLATE` — Template - `FLOW` — Contract - `SEAL` — Seal - `DOCUMENT` — Document attachment - `USER` — User file - `TEMP` — Temporary data
FileNamestring
File name, e.g. `test.pdf`
Filefile
File to upload (binary stream)

Response Parameters

ResponseOptionalobject
Sub-properties
RequestIdOptionalstring
Request ID for tracking and debugging
ErrorOptionalobject
Error information (null on success)
Sub-properties
CodeOptionalstring
Error code. Common codes: `INVALID_REQUEST` / `UNAUTHORIZED` / `FORBIDDEN` / `NOT_FOUND` / `INTERNAL_ERROR`. Endpoints may also return business-specific codes such as `VALIDATION.*`, `ENVELOPE.*`, `SIGNING.*`, `OPENAPI.*`. See individual endpoint documentation for details
MessageOptionalstring
Error description
FileIdOptionalstring
File ID after upload, used to initiate contracts or other operations

Response Example

{
  "Response": {
    "RequestId": "d9892984-589a-461d-a5f5-0d6a9577b63b",
    "FileId": "yD3J7UUckpxdeq66UIGGOhyp7CSx3NCG"
  }
}