Skip to main content
POST
Create an upload session in a writable Storage workspace.

Authorizations

Authorization
string
header
required

Bearer JWT token or API Key (sk-*).

Path Parameters

workspaceId
string
required

Body

application/json
retention
object | null

Retention for the finalized file. Duration starts at finalization; null means no expiration.

parentStorageEntryId
string

Parent folder id. Required for create mode when uploading into a folder.

Example:

"00000000-0000-4000-8000-000000000000"

storageProviderConfigId
string

Optional configured storage id for root-level uploads. Omit for managed default storage. Ignored when parentStorageEntryId is provided or when replacing an existing file.

Example:

"00000000-0000-4000-8000-000000000001"

replaceStorageEntryId
string

Existing storage entry id to replace instead of creating a new file.

Example:

"00000000-0000-4000-8000-000000000002"

replaceExpectedVersion
number

Expected current version of the file being replaced. The upload is rejected if the file changed after overwrite confirmation.

Required range: x >= 0
Example:

3

name
string

File name. Required for create mode.

Example:

"contracts.csv"

contentTypeHint
string

Expected content type.

Example:

"text/csv"

sizeHint
number

Expected size in bytes.

Required range: x >= 0
Example:

1048576

tier
enum<string>

Logical storage lifecycle tier. Select only when creating a new file or upload session; existing files keep their tier. HOT: Active files used in live workflows, previews, and frequent downloads. WARM: Completed or less-active business files that are still occasionally accessed. COLD: Compliance snapshots, historic imports, and retained evidence that is rarely opened. FROZEN: Deep archive or legal-hold data kept mainly for audit or recovery obligations.

Available options:
HOT,
WARM,
COLD,
FROZEN
Example:

"HOT"

uploadMode
enum<string>

Byte-transfer mode. Use "direct" when the client sends the complete file to the returned temporary upload target, "chunked" for explicit numbered parts, and "incremental" for server-assigned part numbering by default. Incremental sessions can still re-upload a specific part number when repairing an upload.

Available options:
direct,
chunked,
incremental
Example:

"incremental"

computeStats
enum<string>

Post-finalize compute mode for this upload session. Defaults to sync for XLSX and text/* sessions and none for other binary sessions; an explicit value always overrides the default.

Available options:
none,
sync,
async
Example:

"sync"

schemaPolicy
object

Independent validation and undeclared-column policies for an uploaded XLSX, CSV, or TSV. Defaults to fallback validation with additional columns allowed; strict validation defaults to rejecting additional columns. The raw file is preserved.

writeMode
enum<string>
default:staged

Structured file write mode. Use "direct" for a predeclared CSV/XLSX layout with row-only XLSX parts. Use the default "staged" mode for independent requests that may be retried, replaced, reordered, or use inferred columns, sparse cells, formulas, or dynamic worksheets. For direct XLSX, declare every worksheet and its table.columns before the first append.

Available options:
staged,
direct
Example:

"direct"

csv
object

CSV/TSV dialect used when row payloads are appended or direct uploaded bytes are indexed.

sheets
object[]

Shared tabular layout. XLSX accepts multiple worksheets; CSV/TSV accepts one logical sheet used for column keys, types, and schema diagnostics. In writeMode "direct", configure table.columns for every declared sheet.

metadata
object | null

File metadata. Values may use any JSON type. Maximum 16 KiB and 64 top-level keys. Top-level keys starting with "__" are reserved for backend use.

Example:
ignoreEvent
boolean

Suppress Storage lifecycle events for the finalized file. Omit to preserve the existing setting on replacement; false explicitly enables events.

refId
string

Optional external reference id.

refType
string

Optional external reference type.

refVer
number

Optional external reference version.

restricted
boolean

Whether the finalized entry should be restricted.

groups
string[]

Explicit allowed group ids for the finalized entry.

users
string[]

Explicit allowed user ids for the finalized entry.

Response

200

OK.