API Reference›Uploads
API Reference

Uploads

Upload files, then load them into a table by upload ID. You PUT the bytes straight to the URLs Hotdata returns, not through this API.

Upload flow

  1. POST /v1/uploads returns a one-time finalize_token and either one url (mode: single) or part_urls (mode: multipart). If you omit declared_size_bytes, you get mode: multipart with a part_size but no part_urls; get them from POST /v1/uploads/{upload_id}/parts as you go.
  2. PUT the whole file to url, or each part to its URL. Keep each part's ETag.
  3. POST /v1/uploads/{upload_id}/finalize with the token and, for multipart, the part ETags.

To upload many files, POST /v1/uploads/batch creates up to 100 sessions in one call. Large files get a multipart upload, which you can send in parallel.

Create upload session

POST/v1/uploads

Start an upload. You PUT the file straight to the URLs in the response, not through this API. The response has a one-time finalize_token and one of three shapes:

  • mode: single: PUT the whole file to url.
  • mode: multipart with part_urls: split the file into part_size-byte parts (the last one is smaller) and PUT part i to part_urls[i - 1]. Keep each part's ETag.
  • mode: multipart with no part_urls, when you omit declared_size_bytes: get part URLs as you go from POST /v1/uploads/{upload_id}/parts.

Then call POST /v1/uploads/{upload_id}/finalize, and load the upload into a table by its ID.

An upload can be at most 16 GiB by default. With declared_size_bytes, a larger file is refused here; without it, at finalize. To load more into one table, split the data and load each upload with mode: append. A 501 PRESIGN_UNSUPPORTED means upload URLs are not available; send the data inline on the load endpoint.

Request body

NameTypeDescription
checksum_algostringChecksum algorithm for checksum_value. Only sha256 is accepted.
checksum_valuestringChecksum of the file. Stored with the upload but not verified.
content_encodingstringContent encoding, such as gzip, kept with the upload.
content_typestringMIME type of the file. A load uses it to detect the file format when format is not set.
declared_size_bytesintegerExact file size in bytes, checked again when you finalize. Omit it to stream a file of unknown size and get part URLs from POST /v1/uploads/{upload_id}/parts as you go.
filenamestringFile name, kept for your reference. It does not affect the upload or load.
part_sizeintegerPreferred part size in bytes for a multi-part upload. Hotdata adjusts it to the allowed range; the size it uses is returned as part_size.
Example request
{
  "checksum_algo": "sha256",
  "checksum_value": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "content_type": "application/vnd.apache.parquet",
  "declared_size_bytes": 10485760,
  "filename": "orders.parquet",
  "part_size": 8388608
}

Response 201 — Upload session created

NameTypeDescription
finalize_token (required)stringToken to send in the X-Upload-Finalize-Token header when you request part URLs or finalize. Returned only once.
headers (required)objectHeaders to send with each PUT. Currently always empty.
mode (required)stringsingle: PUT the whole file to url. multipart: PUT each part to its own URL.
part_sizeintegerFor a multipart upload, the size of every part except the last, in bytes. Split the file by this size, not evenly by part count, or a part may fall under the 5 MiB minimum and finalize fails.
part_urlsstring[]For a multipart upload of known size, one URL per part, in order: PUT part i to part_urls[i - 1] and keep each response's ETag for finalize. Absent for a streaming upload.
upload_id (required)stringID of the upload. Use it to finalize the upload and then to load it.
urlstringURL to PUT the file to, for a single upload. Expires soon.
Example response
{
  "finalize_token": "string",
  "headers": {},
  "mode": "string",
  "part_size": 0,
  "part_urls": [
    "string"
  ],
  "upload_id": "string",
  "url": "string"
}

Errors

StatusDescription
400Invalid request, such as a file that is too large or an unsupported checksum algorithm
501This deployment cannot issue upload URLs

Create upload sessions in bulk

POST/v1/uploads/batch

Create upload sessions for up to 100 files in one request. Sessions come back in the order of the request. Upload and finalize each one on its own.

The 16 GiB size limit applies to each file. If any file is refused, no sessions are created; retry the whole request. A 501 PRESIGN_UNSUPPORTED means upload URLs are not available.

Request body

NameTypeDescription
uploads (required)CreateUploadRequest[]
Fields of uploads
NameTypeDescription
uploads[].checksum_algostringChecksum algorithm for checksum_value. Only sha256 is accepted.
uploads[].checksum_valuestringChecksum of the file. Stored with the upload but not verified.
uploads[].content_encodingstringContent encoding, such as gzip, kept with the upload.
uploads[].content_typestringMIME type of the file. A load uses it to detect the file format when format is not set.
uploads[].declared_size_bytesintegerExact file size in bytes, checked again when you finalize. Omit it to stream a file of unknown size and get part URLs from POST /v1/uploads/{upload_id}/parts as you go.
uploads[].filenamestringFile name, kept for your reference. It does not affect the upload or load.
uploads[].part_sizeintegerPreferred part size in bytes for a multi-part upload. Hotdata adjusts it to the allowed range; the size it uses is returned as part_size.
Example request
{
  "uploads": [
    {
      "filename": "orders.csv",
      "declared_size_bytes": 4096,
      "content_type": "text/csv"
    },
    {
      "filename": "customers.csv",
      "declared_size_bytes": 2048,
      "content_type": "text/csv"
    }
  ]
}

Response 201 — Upload sessions created

NameTypeDescription
uploads (required)UploadSessionResponse[]
Fields of uploads
NameTypeDescription
uploads[].finalize_token (required)stringToken to send in the X-Upload-Finalize-Token header when you request part URLs or finalize. Returned only once.
uploads[].headers (required)objectHeaders to send with each PUT. Currently always empty.
uploads[].mode (required)stringsingle: PUT the whole file to url. multipart: PUT each part to its own URL.
uploads[].part_sizeintegerFor a multipart upload, the size of every part except the last, in bytes. Split the file by this size, not evenly by part count, or a part may fall under the 5 MiB minimum and finalize fails.
uploads[].part_urlsstring[]For a multipart upload of known size, one URL per part, in order: PUT part i to part_urls[i - 1] and keep each response's ETag for finalize. Absent for a streaming upload.
uploads[].upload_id (required)stringID of the upload. Use it to finalize the upload and then to load it.
uploads[].urlstringURL to PUT the file to, for a single upload. Expires soon.
Example response
{
  "uploads": [
    {
      "finalize_token": "string",
      "headers": {},
      "mode": "string",
      "part_size": 0,
      "part_urls": [
        "string"
      ],
      "upload_id": "string",
      "url": "string"
    }
  ]
}

Errors

StatusDescription
400Invalid request, such as a file that is too large or an unsupported checksum algorithm
501This deployment cannot issue upload URLs

Finalize upload

POST/v1/uploads/{upload_id}/finalize

Confirm that a file is uploaded, so it can be loaded into a table. Send the finalize_token in the X-Upload-Finalize-Token header. For a multipart upload, send the {part_number, e_tag} list.

If you declared a size, the file must match it. An upload without a declared size must not be empty and must be at most 16 GiB by default. You can finalize an upload only once. Load it within 7 days (by default), or it is deleted.

Path parameters

NameTypeDescription
upload_id (required)stringUpload ID

Headers

NameTypeDescription
X-Upload-Finalize-Token (required)stringThe finalize_token from the create response

Request body

NameTypeDescription
partsFinalizeUploadPart[]Every uploaded part, for a multipart upload.
Fields of parts
NameTypeDescription
parts[].e_tag (required)stringETag header returned by the part's PUT.
parts[].part_number (required)integerPart number, starting at 1.
Example request
{
  "parts": [
    {
      "e_tag": "\"9f8c1e5b7a2d4f60b3c8e1a9d7f4b206\"",
      "part_number": 1
    }
  ]
}

Response 200 — Upload finalized

NameTypeDescription
content_typestring
created_at (required)string
size_bytes (required)integerSize of the uploaded file in bytes.
status (required)string
upload_id (required)string
Example response
{
  "content_type": "string",
  "created_at": "2026-01-01T00:00:00Z",
  "size_bytes": 0,
  "status": "string",
  "upload_id": "string"
}

Errors

StatusDescription
400Missing token header, a size that does not match, no uploaded file, or an upload that cannot be finalized (for example, already finalized)
404Upload not found, or the token does not match it

Mint upload part URLs

POST/v1/uploads/{upload_id}/parts

Get upload URLs for parts of a multipart upload. You need this for an upload created without declared_size_bytes. You can also use it to get a new URL for a part whose URL expired.

Send the finalize_token in the X-Upload-Finalize-Token header and the part numbers (starting at 1), up to 100 per request. PUT each part to its URL, keep its ETag, and pass the list to finalize.

Path parameters

NameTypeDescription
upload_id (required)stringUpload ID

Headers

NameTypeDescription
X-Upload-Finalize-Token (required)stringThe finalize_token from the create response

Request body

NameTypeDescription
part_numbers (required)integer[]Part numbers, from 1 to 10000, at most 100 per request.
Example request
{
  "part_numbers": [
    1,
    2,
    3
  ]
}

Response 200 — Minted part URLs

NameTypeDescription
parts (required)MintedUploadPartResponse[]One URL per requested part, by part number.
Fields of parts
NameTypeDescription
parts[].part_number (required)integerPart number, starting at 1.
parts[].url (required)stringURL to PUT the part to. Expires soon. Keep the response's ETag for finalize.
Example response
{
  "parts": [
    {
      "part_number": 0,
      "url": "string"
    }
  ]
}

Errors

StatusDescription
400Missing token header, invalid part numbers, more than 100 parts, or not a multipart upload
404Upload not found, or the token does not match it
501This deployment cannot issue upload URLs