Deprecated

DEPRECATED - Will be removed on 2025-06-30. Use POST /v2/files/upload instead.

Migration Guide

Replace calls to this endpoint with uploadFileV2:

v1 Parameterv2 ParameterNotes
file_entity_idfile_entity_idNo change

The v2 response includes the same fields with improved structure.


Create pre-signed S3 URL to upload a file to keep temporarily (one week).

Use the saveFile operation to store file file permanently.

post/v1/files/upload

Request

  • Base URL
    https://file.sls.epilot.io
  • URL
    https://file.sls.epilot.io/v1/files/upload
  • Auth
    • HTTP bearer
    • or API key in cookie token

Query parameters

string

Empty string (used when file ID not yet assigned)

OR
string uuid

Valid UUID v4

file entity id

Request body

filenamestring required
mime_typestring

MIME type of file

index_tagstring

Used to index the file at the storage layer, which helps when browsing for this file

metadataobject

Allows passing in custom metadata for the file, expects key-value pairs of string type

Example request

{
  "filename": "document.pdf",
  "mime_type": "application/pdf",
  "index_tag": "2f6a377c8e78",
  "metadata": {
    "color": "blue"
  }
}

Response

Pre-signed URL for POST / PUT upload

upload_urlstring url
public_urlstring url

Returned only if file is permanent i.e. file_entity_id is passed

Example response

{
  "s3ref": {
    "bucket": "epilot-prod-user-content",
    "key": "123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
  },
  "upload_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/temp/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf?AWSParams=123",
  "public_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
}

Changes