Upload a source bundle
The bytes of the app’s generated JavaScript, as application/octet-stream. At most 8 MiB, non-empty, valid
UTF-8, and sha256 must be the lowercase hex SHA-256 of exactly these bytes (else 400 digest mismatch).
Idempotent. Not tied to an app until a build names it. The source belongs to the uploading team: another team’s
build cannot name it. New bytes count against the team’s 24-hour budget (429 quota-upload), and uploads are
rate-limited per team (429 upload-rate). A source no build used is deleted after a grace period of at least 48 hours.
/v1/sources/{sha256}AuthorizationBearer token · headerrequiredA team API key, sbk_..., from Settings, API keys.
x-api-keyAPI key · headerrequiredThe same key, in a header of its own.
sha256Sha256requiredLowercase hex SHA-256 of the exact bytes of the body.
application/octet-streamstring<binary>Stored.
sha256Sha256requiredsizeintegerrequiredstoredbooleanrequiredFalse when the Cloud already had these bytes.
The request is malformed. path names the field when one is at fault; some refusals (a digest mismatch, a body that is not JSON) carry a message only.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredinvaliderrorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerNo key, or an invalid, expired or revoked key (unknown or missing API token, invalid, expired or revoked API key). No reason.
errorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerThe key lacks a grant (reason: forbidden, need: "<resource>:<action>").
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredforbiddenneedstringrequiredThe grant, as <resource>:<action>, for example app:write.
The body is over the limit for this route (reason: too-large; some refusals carry a message only).
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredtoo-largeerrorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerThe key is rate-limited (key-rate-limited), the team uploads too fast (upload-rate), or it is over its 24-hour budget of new source bytes (quota-upload). Honor Retry-After.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredkey-rate-limitedretry_after_sintegerrequiredSeconds to wait; also the Retry-After header.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredupload-rateretry_afterintegerrequiredSeconds to wait; also the Retry-After header.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredquota-uploadkeystringrequiredWhich budget.
source_mb_per_dayasset_mb_per_daylimitintegerrequiredMiB per 24 hours.
used_mbintegerrequiredMiB uploaded in the last 24 hours.
retry_after_sintegerrequiredAlso the Retry-After header.