General information


ZeroCDN implements API access as REST resources. The following resources are currently available:

Attention! By default, the user cannot upload more than 5 files per minute. To remove this restriction, you must contact the administration.

Working with zones

By default, when uploading through the api at the URL , the file will be automatically uploaded to the zone closest to you.

To control this behavior, you need to use the zone-specific URL.

The following zones are currently available:

Russia Moscow
Belarus Minsk
Russia Krasnoyarsk
Belarus Minsk2
USA Reston
Belarus Minsk3
Russia Moscow2
Russia Ryazan
Russia Rostov-na-Donu
Russia Tver
Russia Krasnodar
Ukraine Kiev
USA Miami

Authorization methods


curl --user USERNAME:PASSWORD ""


curl ""

Working with files

Adding a file::

curl -v -H "Content-Type: multipart/form-data" -F file=@/path/to/file -F folder="FOLDER_ID" -X POST

Adding by link:

curl -v -H "Content-Type: application/json" -X POST --data '{"url" : "URL://TO/FILE", "name": "", "fail_url": "URL://IF/FAILED", "success_url": "URL://IF/SUCCESS", "is_hidden": true, "is_viewable": true, "autodownload": false}' ""

Attention! Profiles are not applied to the file loaded by the API, all necessary parameters must be explicitly set.

folder ID of the folder where the file will be loaded (example: 999)
success_url url will be called in case of successful file upload
fail_url url will be called in case of problems with loading
fail_email Email for notification in case of problems with download
autodownload Skip intermediate page before downloading
is_viewable Don't send Content-Disposition: attachment header
is_hidden The file can only be accessed by a signed link. For authorized users who own the file, this restriction does not apply.
public_urlPublic link
direct_urlDirect link
max_speed Speed limit for one connection
max_speed_after Enabling speed limit for one connection after sending the specified amount of traffic in bytes
content_type«Content-type» passed to the client when downloading
force Delete old file in case of name conflict instead of renaming the new one
areas List of names of zones in which to place the file (example: [''] or ['', ''])

Getting file data:

curl -v ""

Changing file parameters:

curl -v -H "Content-Type: application/json" -X PATCH --data '{"name": "NEW_NAME"}' ""

Deleting a file:

curl -v -X DELETE ""

List of files:

curl -v ""

Filter by nameФильтр по имени:

curl -v ""

A selection of files larger than 10 bytes:

curl -v ""

Sort by size in reverse order:

curl -v ""

Working with folders

Create a folder:

curl -v -H "Content-Type: application/json" -X POST --data '{"name": "folder-name"}' ""

Create subfolder:

curl -v -H "Content-Type: application/json" -X POST --data '{"name": "sub-folder-name", "folder": "PARENT_FOLDER_ID"}' ""

Folder list:

curl -v ""

Getting a folder by ID:

curl -v ""

Rename folder:

curl -v -H "Content-Type: application/json" -X PATCH --data '{"name": "new-folder-name"}' ""

Delete folder:

curl -v -X DELETE ""

List of subfolders in the folder:

curl -v ""

List of subfolders in the root folder:

curl -v ""

Move file to folder:

curl -v -H "Content-Type: application/json" -X PATCH --data '{"folder": "FOLDER_ID"}' ""

Upload file to folder:

curl -v -H "Content-Type: application/json" -X POST --data '{"url" : "URL://TO/FILE", "name": "", "folder": "FOLDER_ID"}' ""