Skip to content

Generate download URL for existing file
Stable

Request

Generate a pre-signed download URL for an existing file in REMOTE_FILE_MANAGER bucket

Security
apiKey
Path
enterprise_idstringrequired

A UUID string identifying this enterprise.

Bodyapplication/jsonrequired
file_keystringrequired

The storage key of the file to download

Example:"123/files/document_abc123.pdf"
expires_ininteger, [ 60 .. 86400 ]

URL expiration time in seconds (optional, default 3600)

Default:3600
cURL
curl -i -X POST \
  'https://develop-api.esper.io/_mock/openapi/v0/enterprise/{enterprise_id}/content/remote-file/generate_download_url/' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "file_key": "123/files/document_abc123.pdf",
    "expires_in": 3600
  }'

Responses

Download URL generated successfully

Bodyapplication/json
file_keystring

The storage key of the file

Example:"123/files/document_abc123.pdf"
download_urlstring

Pre-signed URL for downloading the file

Example:"https://s3.amazonaws.com/REMOTE_FILE_MANAGER/123/files/document_abc123.pdf?AWSAccessKeyId=..."
expires_ininteger

URL expiration time in seconds

Example:3600
Response
{ "file_key": "123/files/document_abc123.pdf", "download_url": "https://s3.amazonaws.com/REMOTE_FILE_MANAGER/123/files/document_abc123.pdf?AWSAccessKeyId=...", "expires_in": 3600 }