API
In a standalone server environment, set the environment variable ASPNETCORE_ENVIRONMENT to Development before running the server, or open the server in the desktop client and enable diagnostic mode in settings. Then visit http://ip:port/swagger/index.html to access the API description page.
APIs that do not start with /api/ are WebDAV-compatible APIs. When implementing clients, calling these APIs can support clipboard synchronization based on both WebDAV servers and official SyncClipboard servers. The key APIs are described below.
Get Clipboard
shell
GET /SyncClipboard.json
GET /file/dataName # optionalUpload Clipboard
shell
PUT /file/dataName # optional
PUT /SyncClipboard.jsonSyncClipboard.json
jsonc
{
"type": "Text", // or Image/File/Group, required
"hash": "string", // optional, empty string is treated as null
"text": "string", // required
"hasData": true, // or false, required
"dataName": "string", // if hasData is true, required
"transferDataHash": "string", // optional
"size": 0, // optional
"syncedAt": "2026-10-09T15:30:00+08:00" // optional
}- All API fields are case-sensitive
textstores the clipboard preview string, or the complete content of Text type clipboardhasDataindicates whether an additional file is used to store the complete clipboard information- For Image/File/Group types,
hasDatais always true - For Text type, depending on the original string length, you can optionally use an additional UTF8-encoded
.txtfile to store the complete string. If so, thetextfield only stores the beginning part of the complete string
- For Image/File/Group types,
hashvalue is a unique identifier of the clipboard content. For the calculation method, please refer to Hash calculation- The sender should provide
hashinformation whenever possible - When the
hashvalue exists, the receiver should verify the consistency between thehashinformation and the clipboard content, and execute the error handling process when inconsistent - When
hashis empty, or in an environment wherehashcannot be calculated, you can use the combination oftype/textto simply determine the equality of clipboard content
- The sender should provide
transferDataHashis the SHA-256 of the complete byte stream of the actual transfer file, encoded as 64 uppercase hexadecimal characters, and is used to verify transfer file integrity- Use it only when
hasDataistrue
- Use it only when
sizeindicates the total byte size of the copied file, or the length of the complete string for Text type clipboardsyncedAtrecords when the current remote clipboard was submitted, as an ISO 8601 timestamp with a UTC offset- When the official server receives a clipboard upload, it uses the server's time and ignores the time provided by the client
- For WebDAV/S3, the client sets this field when uploading
- Client clocks may differ, so this field should not be used to determine concurrent write ordering
S3 Sync Protocol Specification
For protocol and data format specifications when using S3-compatible object storage as sync backend, please refer to S3 protocol specification.