Skip to content

Upload file to Remote File Manager
Stable

Request

Uploads a file to the Remote File Manager bucket for temporary storage.

Accepts a multipart file upload up to 50MB and returns a file_key, bucket name, size, content type, and a pre-signed download_url. Files uploaded here are automatically deleted after 1 day, so this is intended for short-lived transfers rather than long-term content storage.

About Upload File to Remote File Manager

The Remote File Manager bucket is a temporary staging area distinct from Esper's main Content management system. Because files here are auto-deleted after 1440 minutes (1 day), it's best suited for short-lived use cases such as generating a one-time download link or briefly staging a file for another workflow, rather than for files devices need to reference long-term.

Key Fields / Request Body

file — the file to upload, required, maximum 50MB

filename — an optional custom filename; defaults to the uploaded file's name

content_type — an optional MIME type override, auto-detected if omitted

Common Use Cases

Generating a short-lived, shareable download link for a file

Staging a file temporarily for a downstream automation step

Best Practices

Do not rely on this endpoint for files that need to persist beyond 1 day; use the Content API for anything longer-lived

Capture the file_key immediately, since it is required to generate additional download URLs later

Workflow

POST the file as multipart form data to this endpoint

Capture the returned file_key and download_url

Use the generate_download_url endpoint with the file_key if you need a new pre-signed URL after the original expires

Security
esper_cloud_api_apiKey
Path
enterprise_idstringrequired

A UUID string identifying this enterprise.

Bodymultipart/form-datarequired
filestring, (binary)required

The file to upload (max 50MB)

filenamestring

Custom filename (optional, defaults to uploaded file name)

content_typestring

MIME type of the file (optional, auto-detected)

cURL
curl -i -X POST \
  'https://api.esper.io/_mock/openapi/v0/enterprise/{enterprise_id}/content/remote-file/' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F file=string \
  -F filename=string \
  -F content_type=string

Responses

File uploaded successfully

Bodyapplication/json
file_keystring

Unique storage key for the file

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

Storage bucket name

Example:"REMOTE_FILE_MANAGER"
file_sizeinteger

Size of uploaded file in bytes

Example:1048576
content_typestring

Detected/validated MIME type

Example:"application/pdf"
auto_delete_after_minutesinteger

When file will be auto-deleted

Example:1440
download_urlstring

Pre-signed URL for downloading the file

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

Download URL expiration time in seconds

Example:3600
Response
{ "file_key": "123/files/document_abc123.pdf", "bucket": "REMOTE_FILE_MANAGER", "file_size": 1048576, "content_type": "application/pdf", "auto_delete_after_minutes": 1440, "download_url": "https://s3.amazonaws.com/REMOTE_FILE_MANAGER/123/files/document_abc123.pdf?AWSAccessKeyId=...", "download_expires_in": 3600 }