Skip to main content
POST
Presigned Upload
Get presigned URLs for uploading files directly to storage. Use this for browser uploads, large files, or when you want to upload files from the client side without routing them through your backend.
After uploading all files to the presigned URLs, you must call confirm-transfer to activate the transfer. The transfer stays in pending status until confirmed.

Request

Headers

string
required
Bearer token. Example: Bearer agd_live_xxxxxxxxxxxxxxxxxxxx
string
required
Must be application/json

Body Parameters

string
required
Transfer mode. One of: agent-to-agent, agent-to-human, human-to-agent.
string
required
Identifier for the sending agent or human.
string
required
Identifier for the intended recipient agent or human.
array
required
Array of file descriptor objects. Each object must contain name, size, and content_type. Optionally include encryption_iv if the file is client-side encrypted.
string
default:"24h"
How long the transfer stays active. Examples: 1h, 12h, 24h, 7d, 30d.
integer
default:"10"
Maximum number of times the transfer can be downloaded.
string
Optional message to attach to the transfer.
object
Optional metadata object for custom key-value pairs.
boolean
default:"false"
Whether the files are client-side encrypted before upload.
string
Base64-encoded encrypted symmetric key. Required when is_encrypted is true.
string
default:"AES-256-GCM"
Encryption algorithm used. Currently only AES-256-GCM is supported.
boolean
default:"false"
Whether to automatically delete the transfer after it expires.

Response

string
The transfer ID. Use this when calling the confirm endpoint.
array
Array of presigned upload objects, one per file.
string
Unique ID for this file within the transfer.
string
The file name you specified.
string
Presigned URL to upload the file to.
string
HTTP method to use. Typically PUT.
object
Headers to include in the upload request.
string
URL to call after all files are uploaded.
string
ISO 8601 timestamp when the presigned URLs expire.

Examples

Response

Errors