Open an upload session
- Scope
- files:uploads:add Admin-issued keys only.
- Idempotency
- Requires an
Idempotency-Keyheader. Reusing the key within 24 hours returns the original response instead of creating a second record.
Request bodyapplication/json
| Field | Type | Description |
|---|---|---|
| hash | string | matches ^[0-9a-f]{64}$ |
| sizerequired | integer | 1 to 34359738368 |
| filenamerequired | string | 1 to 255 characters |
Request body of addUpload
- hash
- Type
- string
- Description
- matches ^[0-9a-f]{64}$
- sizerequired
- Type
- integer
- Description
- 1 to 34359738368
- filenamerequired
- Type
- string
- Description
- 1 to 255 characters
Response 200Upload session opened, or the blob already existed
| Field | Type | Description |
|---|---|---|
| datarequired | UploadSession | |
| idrequired | string, uuid | |
| hashrequired | string, or null | matches ^[0-9a-f]{64}$ |
| moderequired | UploadMode | one of "single", "multipart" |
| statusrequired | string | one of "open", "done", "aborted" |
| dedupedrequired | boolean | |
| partSizerequired | integer, or null | at least 5242880 |
| partCountrequired | integer | at least 1 |
| completedPartsrequired | array of integer | |
| grantsrequired | array of UploadGrant | |
| expiresAtrequired | string, date-time |
Response of addUpload
- datarequired
- Type
- UploadSession
- Description
- idrequired
- Type
- string, uuid
- Description
- hashrequired
- Type
- string, or null
- Description
- matches ^[0-9a-f]{64}$
- moderequired
- Type
- UploadMode
- Description
- one of "single", "multipart"
- statusrequired
- Type
- string
- Description
- one of "open", "done", "aborted"
- dedupedrequired
- Type
- boolean
- Description
- partSizerequired
- Type
- integer, or null
- Description
- at least 5242880
- partCountrequired
- Type
- integer
- Description
- at least 1
- completedPartsrequired
- Type
- array of integer
- Description
- grantsrequired
- Type
- array of UploadGrant
- Description
- expiresAtrequired
- Type
- string, date-time
- Description
Example
curl -X POST https://api.rsx.group/files/v1/uploads/add \
-H "Authorization: Bearer rsx_live_..." \
-H "Idempotency-Key: 5b8f2d1a-0c7e-4b1f-9a6d-3e2f1c0b9a8d" \
-H "Content-Type: application/json" \
-d '{
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"size": 284913,
"filename": "render-final.png"
}'{
"data": {
"id": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d",
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"mode": "single",
"status": "open",
"deduped": true,
"partSize": 5242880,
"partCount": 1,
"completedParts": [
1
],
"grants": [
{
"partNumber": 1,
"url": "https://example.com/",
"method": "PUT",
"headers": {
"key": "string"
}
}
],
"expiresAt": "2026-10-10T12:00:00.000Z"
}
}