Generate URLs for Uploading Files

Generates presigned S3 URLs for uploading files to an existing SFDRIVE library.

Resource

1/einstein/data-libraries/libraryId/file-upload-urls

The libraryId is the 18 character library ID that has a prefix of 1JD.

HTTP Methods

POST

Request body

Required. FileUploadUrlsInputRepresentation

Property Type Description Required Available Version
files array List of FileInfoInputRepresentation objects. Yes 66.0

Each FileInfoInputRepresentation:

Property Type Description Required Available Version
fileName string File name with extension (max 195 characters). Yes 66.0
Response body

HTTP 200 — FileUploadUrlsCollectionOutputRepresentation

Property Type Description Available Version
libraryId string Library ID. 66.0
uploadUrls array FileUploadUrlOutputRepresentation items. 66.0

Each FileUploadUrlOutputRepresentation:

Property Type Description Available Version
fileName string File name. 66.0
uploadUrl string Presigned S3 PUT URL. Contains raw & separators (not HTML-encoded); use this URL directly for PUT upload (no decoding needed). 66.0
filePath string S3 file path (example: $agentforce_data_library$/1JDSG000007IbWX4A0/user_manual.pdf). 66.0
headers object String map with the required headers for the upload (for example, BYOK encryption). 66.0

HTTP 400—Invalid request. For example:

  • The library is not an SFDRIVE library (ADL_UNSUPPORTED_SOURCE_TYPE).
  • The library's UDLO is not ACTIVE yet (ADL_UPLOAD_NOT_READY). Poll upload-readiness until ready=true before retrying.
  • You can upload a maximum of 1000 files to a library.

HTTP 404—Library not found.