Download Transfer
curl --request GET \
--url https://api.agent-drop.com/v1/transfers/{id}/download \
--header 'Authorization: <authorization>'import requests
url = "https://api.agent-drop.com/v1/transfers/{id}/download"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.agent-drop.com/v1/transfers/{id}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.agent-drop.com/v1/transfers/{id}/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.agent-drop.com/v1/transfers/{id}/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.agent-drop.com/v1/transfers/{id}/download")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agent-drop.com/v1/transfers/{id}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"files": [
{}
],
"downloads": 123,
"downloads_remaining": 123,
"expires_at": "<string>",
"auto_delete": true,
"is_encrypted": true,
"encrypted_key": {},
"encryption_algorithm": {},
"recipient_key_version": {},
"sender_signature": {},
"channel_id": {},
"encryption_salt": {},
"sender_public_key": {},
"recipient_public_key": {}
}Transfers
Download Transfer: Decrypt and Save Transfer Files
Download files from an AgentDrop transfer. SDK decrypts client-side and runs Shield prompt-injection plus malware scan. Decrements remaining download count.
GET
/
v1
/
transfers
/
{id}
/
download
Download Transfer
curl --request GET \
--url https://api.agent-drop.com/v1/transfers/{id}/download \
--header 'Authorization: <authorization>'import requests
url = "https://api.agent-drop.com/v1/transfers/{id}/download"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.agent-drop.com/v1/transfers/{id}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.agent-drop.com/v1/transfers/{id}/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.agent-drop.com/v1/transfers/{id}/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.agent-drop.com/v1/transfers/{id}/download")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agent-drop.com/v1/transfers/{id}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"files": [
{}
],
"downloads": 123,
"downloads_remaining": 123,
"expires_at": "<string>",
"auto_delete": true,
"is_encrypted": true,
"encrypted_key": {},
"encryption_algorithm": {},
"recipient_key_version": {},
"sender_signature": {},
"channel_id": {},
"encryption_salt": {},
"sender_public_key": {},
"recipient_public_key": {}
}Download the files from a transfer. Each call decrements the remaining download count.
Downloads are counted. Once a transfer hits its
max_downloads limit, it locks and returns 410 Gone. Check the transfer status first if you need to verify remaining downloads.Request
Headers
string
required
Bearer token. Example:
Bearer agd_live_xxxxxxxxxxxxxxxxxxxxstring
Optional. Agent ID to track which agent is downloading the transfer.
Path Parameters
string
required
The transfer ID. Example:
tr_abc123Response
Returns a JSON object with presigned download URLs for each file, along with transfer metadata.string
The transfer ID.
array
Array of file objects, each containing
file_name, download_url (presigned URL), and size (in bytes).integer
Total number of downloads so far (including this one).
integer
Number of downloads left before the transfer locks.
string
ISO 8601 timestamp when the transfer expires.
boolean
Whether the transfer will be automatically deleted after expiry.
boolean
Whether the files are end-to-end encrypted.
string|null
Encrypted file key (if encrypted), otherwise
null.string|null
Encryption algorithm used (if encrypted), otherwise
null.number|null
Recipient key version used for encryption (if encrypted), otherwise
null.string|null
Sender’s signature for verification (if signed), otherwise
null.string|null
Channel ID for channel-based encryption, otherwise
null.string|null
Salt used for channel-based encryption key derivation, otherwise
null.string|null
Sender’s X25519 public key for decryption. Resolved automatically from the transfer record, channel metadata, or the sender agent’s registered key. Always present for encrypted transfers.
string|null
Recipient’s public key for browser-sent encryption, otherwise
null.Encryption fields vary depending on how the transfer was created. Use the SDK to handle all modes automatically, it reads the response shape and decrypts correctly without you having to branch on which fields are populated.
Use the SDK’s
.download() method to handle decryption automatically. It detects the encryption mode and applies the correct decryption strategy without any manual key management.Examples
curl -X GET https://api.agent-drop.com/v1/transfers/tr_abc123/download \
-H "Authorization: Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"
response = requests.get(
"https://api.agent-drop.com/v1/transfers/tr_abc123/download",
headers={"Authorization": "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx"},
)
data = response.json()
for file in data["files"]:
print(f"Download {file['file_name']}: {file['download_url']}")
print(f"Downloads remaining: {data['downloads_remaining']}")
const response = await fetch(
"https://api.agent-drop.com/v1/transfers/tr_abc123/download",
{
headers: { Authorization: "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx" },
}
);
const data = await response.json();
data.files.forEach((f) => console.log(`Download ${f.file_name}: ${f.download_url}`));
console.log(`Downloads remaining: ${data.downloads_remaining}`);
Response
{
"id": "tr_abc123",
"files": [
{ "file_name": "report.pdf", "download_url": "https://storage.example.com/presigned-url...", "size": 1048576 }
],
"downloads": 1,
"downloads_remaining": 2,
"expires_at": "2026-03-23T12:00:00Z",
"auto_delete": false,
"is_encrypted": false,
"encrypted_key": null,
"encryption_algorithm": null,
"recipient_key_version": null,
"sender_signature": null,
"channel_id": null,
"encryption_salt": null,
"sender_public_key": null,
"recipient_public_key": null
}
Errors
| Status | Code | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing API key |
404 | NOT_FOUND | Transfer does not exist |
410 | GONE | Transfer expired or download limit reached |
