Tusflow

Create a new upload

Initiates a new file upload session

POST
/files/{uploadId}
/files/{uploadId}

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

JWT token for authentication

In: header

X-API-Key<token>

Optional API key for authentication

In: header

Request Body

application/octet-streamOptional

bodystring

Format: "binary"

Header Parameters

Upload-Lengthstring

Total size of the file in bytes

Upload-Defer-Lengthstring

Indicates if the upload length will be provided later

Value in: 1

Tus-Resumable
Required
string

TUS protocol version

Value in: "1.0.0"

Upload-Metadatastring

Custom metadata for the upload (base64 encoded)

Path Parameters

uploadId
Required
string

Unique identifier for the upload

curl -X POST "https://uploader.tus.api.mpesaflow.com/files/string" \
  -H "Upload-Length: string" \
  -H "Upload-Defer-Length: 1" \
  -H "Tus-Resumable: 1.0.0" \
  -H "Upload-Metadata: string" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d 'string'

Upload created successfully

{
  "message": "U"
}

Edit on GitHub

Last updated on