传输

GET https://tofile.org/api/transfers/
curl --request GET \
--url 'https://tofile.org/api/transfers/' \
--header 'Authorization: Bearer {api_key}' \
参数 详情 描述
page 可选 整数 您希望获取结果的页码。默认为 1
results_per_page 可选 整数 每页希望显示多少结果。允许值为:10 , 25 , 50 , 100 , 250 , 500 , 1000。默认为 25
{ "data": [ { "id": 1, "user_id": 1, "project_id": 0, "uploader_id": "f528764d624db129b32c21fbca0cb8d6", "pixels_ids": [], "files_ids": [ 1,2,3 ], "name": "Example", "description": "Example", "type": "link", "email_to": null, "url": "example", "settings": { "password": null, "file_encryption_is_enabled": false, "file_preview_is_enabled": true, "is_removed_branding": false, "custom_css": "tester", "custom_js": "" }, "notifications": { "download": [] }, "total_files": 1, "total_size": 999999, "pageviews": 1, "downloads": 1, "downloads_limit": 0, "expiration_datetime": null, "last_datetime": null, "datetime": "2025-04-21 13:50:06" }, ], "meta": { "page": 1, "results_per_page": 25, "total": 1, "total_pages": 1 }, "links": { "first": "https://tofile.org/api/transfers?&page=1", "last": "https://tofile.org/api/transfers?&page=1", "next": null, "prev": null, "self": "https://tofile.org/api/transfers?&page=1" } }
GET https://tofile.org/api/transfers/{transfer_id}
curl --request GET \
--url 'https://tofile.org/api/transfers/{transfer_id}' \
--header 'Authorization: Bearer {api_key}' \
{ "data": { "id": 1, "user_id": 1, "project_id": 0, "uploader_id": "f528764d624db129b32c21fbca0cb8d6", "pixels_ids": [], "files_ids": [ 1,2,3 ], "name": "Example", "description": "Example", "type": "link", "email_to": null, "url": "example", "settings": { "password": null, "file_encryption_is_enabled": false, "file_preview_is_enabled": true, "is_removed_branding": false, "custom_css": "tester", "custom_js": "" }, "notifications": { "download": [] }, "total_files": 1, "total_size": 999999, "pageviews": 1, "downloads": 1, "downloads_limit": 0, "expiration_datetime": null, "last_datetime": null, "datetime": "2025-04-21 13:50:06" } }
POST https://tofile.org/transfer/create_api
参数 详情 描述
uploaded_files 必需 数组 整数 包含所有待附加到此传输的已上传文件 UUID 的数组。
type 可选 字符串 允许值:link , email
email_to 可选 字符串 可用条件:type = email
name 可选 字符串 -
description 可选 字符串 -
url 可选 字符串 -
domain_id 可选 整数 -
project_id 可选 整数 -
pixels_ids 可选 数组 整数 -
download_notification_handlers_ids 可选 数组 整数 -
expiration_datetime 可选 字符串 Y-m-d H:i:s
downloads_limit 可选 整数 -
password 可选 字符串 -
file_encryption_is_enabled 可选 布尔 -
file_preview_is_enabled 可选 布尔 -
is_removed_branding 可选 布尔 -
custom_css 可选 字符串 -
custom_js 可选 字符串 -
curl --request POST \
--url 'https://tofile.org/transfer/create_api' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'uploaded_files[]=de09be56-639f-4213-863b-5ea1aa065970' \
--form 'name=Example name' \
--form 'description=Example description' \
{ "data": { "id": 1, "download_url": "https://tofile.org/transfer-redirect/1", "view_url": "https://tofile.org/transfer/1", } }
POST https://tofile.org/api/transfers/{transfer_id}
参数 详情 描述
name 可选 字符串 -
description 可选 字符串 -
url 可选 字符串 -
domain_id 可选 整数 -
project_id 可选 整数 -
pixels_ids 可选 数组 整数 -
download_notification_handlers_ids 可选 数组 整数 -
expiration_datetime 可选 字符串 Y-m-d H:i:s
downloads_limit 可选 整数 -
file_preview_is_enabled 可选 布尔 -
is_removed_branding 可选 布尔 -
custom_css 可选 字符串 -
custom_js 可选 字符串 -
curl --request POST \
--url 'https://tofile.org/api/transfers/{transfer_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'host=transfer.com' \
{ "data": { "id": 1 } }
DELETE https://tofile.org/api/transfers/{transfer_id}
curl --request DELETE \
--url 'https://tofile.org/api/transfers/{transfer_id}' \
--header 'Authorization: Bearer {api_key}' \