Skip to main content
POST
/
file-upload
/
prepare
Prepare session for file upload
curl --request POST \
  --url https://api.datalinks.com/api/v1/file-upload/prepare \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filesToUpload": [
    {
      "filename": "<string>",
      "size": 123
    }
  ]
}
'
{
  "sessionId": "24b49ba0-6b5c-4950-94c1-1622939cc481",
  "files": [
    {
      "fileId": "311fe2cb-1c85-46a4-a8d9-f63a88da44fd",
      "uploadId": "<string>",
      "key": "<string>",
      "filename": "<string>",
      "partSize": 123,
      "presignedUrls": [
        {
          "url": "<string>",
          "partSize": 123
        }
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.datalinks.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use a Bearer token for authentication. Submit the token using the Authorization header: Authorization: Bearer <token>.

Body

application/json

A request contaning list of pairs of file names and their sizes.

filesToUpload
object[]
required

Response

Returns the file upload session details.

A response containing the upload ID and key for the multipart upload.

sessionId
string<uuid>
required

Unique identifier for the upload session.

Example:

"24b49ba0-6b5c-4950-94c1-1622939cc481"

files
object[]
required