Create a upload session
POST
/v1/upload-sessionscurl -X POST 'https://api.embodiflow.io/v1/upload-sessions' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"uploadBatchId": "00000000-0000-0000-0000-000000000000",
"storageBucketId": "00000000-0000-0000-0000-000000000000",
"files": [
{
"role": "calibration",
"deviceMeta": {},
"originalFilename": "string",
"relativePath": "string",
"contentType": "string",
"sizeBytes": 0,
"checksumExpected": "string"
}
]
}'Authorization
Send a personal access token with every request.
- Authorization: Bearer PAT
Header parameters
- x-embodiflow-clientstring
Optional CLI hint (`cli`). Write STS is issued only to PAT principals; cookie sessions keep putUrl / part-urls even if this header is sent.
- Idempotency-Keystring
Optional idempotency key, at most 255 characters (UUIDv4 recommended). A repeated key returns the first response byte-for-byte, including a 5xx. The same key with a different body, or a second in-flight request, returns 409 IDEMPOTENCY_CONFLICT. Keys are unique per tenant and retained for 24 hours.
Request body
Content-Typeapplication/json
- uploadBatchIdstring (uuid)required
- storageBucketIdstring (uuid) | null
- filesarray<CreateUploadSessionFileBodyDto>required
- rolestring | nullAllowed valuescalibrationmappingmedia
- deviceMetaobject | null
- originalFilenamestringrequired
- relativePathstringrequired
- contentTypestring | null
- sizeBytesnumberrequired
- checksumExpectedstring | null
Responses
Success
- dataobjectrequired
- sessionsarray<UploadSessionSummarySwaggerDto>required
Response example
{
"data": {
"sessions": [
{
"id": "00000000-0000-0000-0000-000000000000",
"uploadBatchId": "00000000-0000-0000-0000-000000000000",
"storageBucketId": "00000000-0000-0000-0000-000000000000",
"objectKey": "string",
"originalFilename": "string",
"uploadMode": "single",
"status": "string",
"expiresAt": "2026-01-01T00:00:00Z",
"putUrl": "string",
"providerUploadId": "string",
"writeCredentials": {
"accessKeyId": "string",
"secretAccessKey": "string",
"sessionToken": "string",
"expiresAt": "2026-01-01T00:00:00Z",
"bucketName": "string",
"region": "string",
"provider": "string",
"endpoint": "string",
"objectKey": "string",
"prefix": "string",
"forcePathStyle": true
},
"partSizeBytes": 0
}
]
}
}Servershttps://api.embodiflow.io/v1https://api.embodiflow.dev/v1