Request to Start Upload
Initiate a build upload flow
This endpoint initiates the build upload process by requesting presigned URLs. The response will indicate whether single-part or multipart upload is possible. Multipart is always required for files larger than 5GB.
The upload request endpoint is the first step in uploading a new build.
It provides all key build information, and returns a presigned URL for direct upload or multipart upload information for larger files.
/upload/requestApp-specific auth token. Bearer authentication header of the form Bearer , where is your auth token.
In: header
Upload request details
Upload structure type. Should use 'file' unless you're including an Android OBB expansion file
"file""file" | "file+expansion""file"Platform identifier. See full list
"generic" | "windows" | "macos" | "android" | "ios" | "quest" | "switch" | "switch2" | "ps5" | "ps4" | "xbox-series" | "vision-pro" | "pico" | "wearos" | "vive" | "homepod" | "apple-tv" | "apple-watch" | "freebsd" | "openbsd" | "linux" | "debian" | "redhat" | "gentoo" | "arch" | "playdate" | "magic-leap" | "zephyr" | "roblox" | "opensuse" | "alpine" | "nixos" | "slackware" | "void" | "mageia" | "kaios""windows"Stream name. Must match exact name setup in your app
"nightlies"Source of the upload. See full list
"web-upload" | "cli-upload" | "ghactions" | "jenkins" | "unity-build" | "gitlab-ci" | "azure-devops" | "circleci" | "travisci" | "appveyor" | "teamcity" | "bitbucket-pipelines" | "bitrise" | "codemagic" | "buildkite" | "google-cloud-build" | "bamboo" | "semaphore" | "aws-codebuild" | "abstruse" | "cirrus-ci" | "drone" | "concourse""ghactions"Expansion files (only include if structure is 'file+expansion')
Semantic versioning: Major version component
1Minor version component
0Patch version component
1Extra version component. Optional pre-release label like such as 'alpha', 'beta', 'rc', etc
"alpha"Version metadata. Optional metadata like such as 'build number', 'commit hash', etc
"2025.07.30"Custom build number (any preferred format)
"398"Labels for the build (will be created if they don't already exist)
[
"signed",
"to-test",
"release"
]Architectures this build supports (the platform must also support the architecture). See full list
[
"x86",
"x64",
"armv7"
]CI pipeline name
"Nightly Build"CI run ID
"38836019427"CI run URL
"https://github.com/buildstash/example/actions/runs/38836019427"CI build duration
"00:05:00"Version control host type. See full list
"git" | "svn" | "hg" | "perforce" | "bzr" | "fossil" | "darcs" | "cvs" | "monotone" | "diversion" | "unity-vc""git"Version control host. See full list
"github" | "gitlab" | "gitlab-self" | "perforce" | "bitbucket" | "gitea" | "forgejo" | "gogs" | "codeberg" | "sourceforge" | "sourcehut" | "rhodecode" | "unity-vc" | "aws-codecommit" | "azure-repos" | "beanstalk" | "assembla" | "codebase" | "bonobo-git" | "phabricator" | "launchpad" | "onedev" | "diversion""github"Repository name
"buildstash/example"Repository URL
"https://github.com/buildstash/example"Branch name
"main"Commit SHA
"1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6"Commit URL
"https://github.com/buildstash/example/commit/1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6"Additional notes
"Example build notes here."Response Body
application/json
application/json
application/json
curl -X POST "https://app.buildstash.com/api/v1/upload/request" \ -H "Content-Type: application/json" \ -d '{ "structure": "file", "platform": "windows", "stream": "nightlies", "source": "ghactions", "primary_file": { "filename": "example.exe", "size_bytes": 52428800 }, "version_component_1_major": 1, "version_component_2_minor": 0, "version_component_3_patch": 1 }'{
"message": "Upload request successful",
"pending_upload_id": "string",
"primary_file": {
"filename": "example.exe",
"chunked_upload": true,
"chunked_number_parts": 14,
"chunked_part_size_mb": 52428800,
"presigned_data": {
"url": "string",
"headers": {
"Content-Type": "application/x-msdownload",
"Content-Length": "734003200",
"Content-Disposition": "attachment; filename=\"example.exe\""
}
}
},
"expansion_files": [
{
"filename": "expansion.obb",
"chunked_upload": false,
"chunked_number_parts": "",
"chunked_part_size_mb": "",
"presigned_data": {
"url": "string",
"headers": {
"Content-Type": "application/octet-stream",
"Content-Length": "734003200",
"Content-Disposition": "attachment; filename=\"expansion.obb\""
}
}
}
]
}{
"message": "Error message explaining why the upload failed"
}{
"message": "Unauthorized"
}