Skip to main content
PATCH
/
v2
/
uploads
/
{uploadId}
Upload Chunk
curl --request PATCH \
  --url https://api.tusky.io/v2/uploads/{uploadId} \
  --header 'Content-Type: <content-type>' \
  --header 'Tus-Resumable: <tus-resumable>' \
  --header 'Upload-Offset: <upload-offset>'
{
  "Upload-Offset": {}
}
Upload a chunk of file data to an existing upload session. The Upload-Offset must match the server’s current offset exactly. When the final chunk is received (offset equals Upload-Length), Tusky processes the file — encrypting if applicable, creating the file record, and queuing for Walrus publishing.

Path Parameters

uploadId
string
required
The upload ID from the Location header returned by Create Upload.

Headers

Tus-Resumable
string
required
Must be 1.0.0.
Upload-Offset
number
required
Byte offset where this chunk starts. Must match the server’s current offset.
Content-Type
string
required
Must be application/offset+octet-stream.

Request Body

Raw binary data for this chunk. Max chunk size: 50 MB.

Response

Returns 204 No Content on success.
Upload-Offset
number (header)
New byte offset after this chunk. When equal to Upload-Length, the upload is complete.
When the upload completes (final chunk), the response includes:
{
  "uploadId": "upload_xyz789"
}

Example

curl -X PATCH https://api.tusky.io/v2/uploads/upload_xyz789 \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Tus-Resumable: 1.0.0" \
  -H "Upload-Offset: 0" \
  -H "Content-Type: application/offset+octet-stream" \
  --data-binary @chunk1.bin \
  -D -

Response Headers

HTTP/1.1 204 No Content
Upload-Offset: 5242880
Tus-Resumable: 1.0.0
Upload-Offset must exactly match the server’s current offset. On mismatch the server returns 409 Conflict. Use Get Upload Status to check the current offset before retrying.