- Site
- Session
- User
- Callback
- Workflow
- File
- Permission
- Upload
- Pin
- Version
- Direct Link
- List filesGET
- List file activitiesGET
- Get file infoGET
- Get thumbnail URLGET
- Update file contentPUT
- Create viewer sessionPUT
- Create filePOST
- Rename filePOST
- Move or copy filesPOST
- Create download URLPOST
- Restore from trash binPOST
- Delete fileDELETE
- Force unlockDELETE
- Patch metadataPATCH
- Mount storage policyPATCH
- Update view settingPATCH
- Share
- VAS
- Group
- WebDAV
Create download URL
POST
/file/url
Auth: JWT Optional
Request
Authorization
Add the parameter
Authorization
to Headers,whose value is to concatenate the Token after the Bearer.Example:
Authorization: Bearer ********************
Header Params
X-Cr-Context-Hint
string <uuid>
optional
Example:
b832b998-7ece-4ffd-ba6b-afb64530ca70
X-Cr-Purchase-Ticket
string
optional
Example:
1f63aa26-edc0-40ce-950a-cb4d4323158e
Body Params application/json
download
boolean | null
optional
For supported storage policy, browser will download file instead of previewing it directly if this field is set to
true
.redirect
boolean | null
optional
uris
.If set to
true
, the HTTP response will use 302 status code to redirect to target URL instead of returning result in JSON response.entity
string | null
optional
uris
and archive
is false
. Specify preferred ID of the file blob.By default, latest version blob will be selected.
Example:
aO8j
use_primary_site_url
boolean | null
optional
Host
that the client site requesting the API (If the Host
is presented in primary/secondary site URL setting in dashboard). If you wish to force using primary site URL, please set this to true
.skip_error
boolean | null
optional
false
or omited, the whole request will fail if errors occurs for any items in uris
.archive
boolean | null
optional
If set to
true
, only one URl will be returned for multiple target files. This URL will trigger server-side archving for target files, resulting in one .zip
file containing all target files.no_cache
boolean | null
optional
Examples
{
"uris": [
"cloudreve://my/The%20Man.mp3",
"cloudreve://my/Taylor%20Swift%20-%20Untouchable%20(Taylor%E2%80%99s%20Version).mp3",
"cloudreve://my/%E9%81%A0%E9%87%8E%E3%81%B2%E3%81%8B%E3%82%8B%20-%20LOVE%202000.mp3",
"cloudreve://my/Taylor%20Swift%20-%20Guilty%20as%20Sin.mp3"
],
"archive": true
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST '/file/url' \
--header 'X-Cr-Context-Hint: b832b998-7ece-4ffd-ba6b-afb64530ca70' \
--header 'X-Cr-Purchase-Ticket: 1f63aa26-edc0-40ce-950a-cb4d4323158e' \
--header 'Content-Type: application/json' \
--data-raw '{
"uris": [
"cloudreve://my/The%20Man.mp3",
"cloudreve://my/Taylor%20Swift%20-%20Untouchable%20(Taylor%E2%80%99s%20Version).mp3",
"cloudreve://my/%E9%81%A0%E9%87%8E%E3%81%B2%E3%81%8B%E3%82%8B%20-%20LOVE%202000.mp3",
"cloudreve://my/Taylor%20Swift%20-%20Guilty%20as%20Sin.mp3"
],
"archive": true
}'
Responses
🟢200Success
application/json
Body
data
object
required
urls
array [object {2}]
required
expires
string <date-time>
required
urls
.Example:
2025-06-10T12:06:55.011624+08:00
code
integer
required
0
- Success.Default:
0
Example:
0
msg
string
optional
error
string | null
optional
aggregated_error
object | null
optional
Response
.Additional properties
object (Response)
optional
correlation_id
string <uuid> | null
optional
Example:
b4351ecc-ee1a-4455-bc94-2c3dbcc58538
Examples
{
"code": 0,
"data": {
"urls": [
{
"url": "http://localhost:5173/api/v4/file/archive/56bb8329-3afa-4137-9ebb-2a07b6ea19b9/archive.zip?sign=1CgU15Is0ezKeTVKE_OAu2tJJoB6lN5s_DvRXTcP7GQ%3D%3A1749525301"
}
],
"expires": "2025-06-10T11:15:01.186053+08:00"
},
"msg": ""
}
Modified at 2025-06-10 08:30:54