Skip to main content
POST
/
v0
/
files
/
{id}
/
presigned-url
curl -X POST https://api.getagentdrive.com/v0/files/file_xyz789/presigned-url \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "expires_in": 7200
  }'
{
  "url": "https://storage.getagentdrive.com/files/file_xyz789?token=eyJhbGci...",
  "token": "eyJhbGci...",
  "expires_at": "2026-03-19T12:00:00Z"
}

Path Parameters

id
string
required
The unique identifier of the file.

Request Body

expires_in
integer
The number of seconds until the presigned URL expires. Defaults to 3600 (1 hour). Maximum is 86400 (24 hours).
curl -X POST https://api.getagentdrive.com/v0/files/file_xyz789/presigned-url \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "expires_in": 7200
  }'
{
  "url": "https://storage.getagentdrive.com/files/file_xyz789?token=eyJhbGci...",
  "token": "eyJhbGci...",
  "expires_at": "2026-03-19T12:00:00Z"
}

Response

url
string
The presigned URL for direct file access. No authentication header is required when using this URL.
token
string
The access token embedded in the URL.
expires_at
string
ISO 8601 timestamp of when the presigned URL expires.