Request to Start Upload
Initiate a build upload flow
This endpoint initiates the build upload process by requesting presigned URLs. Requires builds:create scope. 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.
When using a Workspace API key, the application_id field is required to specify which application the build belongs to. Application-level keys target their app automatically.
You can optionally attach labels, specify architectures, provide CI/CD pipeline metadata (pipeline name, run ID, URL, duration), and version control details (host, repo, branch, commit) to enrich the build record.
/upload/requestAuthorization
bearerAuth API key. Bearer authentication header of the form Bearer <token>, where <token> is your Workspace or Application API key.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Initiate a build file upload.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.comupload/request" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d @- <<'EOF'{ "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}EOF{ "message": "Upload request successful.", "pending_upload_id": "550e8400-e29b-41d4-a716-446655440000", "primary_file": { "filename": "example.exe", "presigned_data": { "url": "https://buildstash.s3.amazonaws.com/aBc1234/xYz9876/example.exe?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAEXAMPLE%2F20250615%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250615T143000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=abc123", "headers": { "Content-Type": "application/octet-stream" } }, "chunked_upload": false, "chunked_number_parts": null, "chunked_part_size_mb": null }, "expansion_files": []}{ "message": "Unauthorized"}{ "message": "string", "errors": { "property1": [ "string" ], "property2": [ "string" ] }}