Create upload
Create a dataset or artifact upload session. Returns 201 Created.
The session expires after 24 hours. Compute the whole-file checksum and size before creating it; the server verifies both during asynchronous completion.
POST
/v1/knowledge-base/uploadsAuthorization
Authorizationstringrequired
Send a Modaic bearer token in the Authorization header.
Parameters
kinddataset | artifactrequired
Datasets are validated JSONL; artifacts are other files.
sha256stringrequired
Whole-file SHA-256, 64 lowercase hex characters.
sizeBytesintegerrequired
Whole-file size: 1–8589934592 bytes (8 GiB) for datasets and artifacts.
namestring
Optional unique identifier: 1–128 lowercase letters/digits/underscores/hyphens, starting with a letter or digit. Names are unique across datasets and artifacts. When omitted, the server generates one.
workspacestring
Optional workspace slug.
Response
idUUID
Upload ID.
namestring
Reserved resource name.
kinddataset | artifact
Resource kind.
sha256string
Whole-file checksum.
sizeBytesinteger
Whole-file size.
statuspending | processing | completed | failed | cancelled | expired
Use only completed uploads with a non-null result.
partSizeBytesinteger
67108864 (64 MiB).
partsarray
partNumber, sha256, sizeBytes, and uploaded for prepared parts.
resultobject | null
On completion: name, kind, path, sha256, sizeBytes, commitSha.
errorobject | null
Failure code and message.
createdAtdatetime
expiresAtdatetime
Was this page helpful?