Start a build
Validates the request, then either answers from the cache (HTTP 200, a ready build with cached: true) or
queues a build (HTTP 202, state: queued). When the build finishes the Cloud writes the app with the new
module and spec, and sets record_generation on the build; a host then applies it (see GET /v1/apps/{project}).
A newer build of the same project cancels an older queued one.
spec takes the same keys as PUT /v1/apps/{project} except module, secrets and secrets_patch
(400 invalid, path: spec.<key>): it is stored in plain text, so set secrets with PATCH /v1/apps/{project}/secrets after the build is ready. Use hosts_patch rather than hosts to leave an app’s
other routes alone. Route ownership and conflicts are checked up front, and again when the build lands, and so are
the limits the spec asks for against the account’s ceilings (403 quota-*, as for PUT /v1/apps/{project}).
The source must be one this team uploaded (a digest another team holds is 409 source-missing). The build quota
is 429 quota-builds.
build is {"v": 1, "name": "<project>", "cli": {"version": "...", "runtime": "...", "toolchain": "..."}};
name must equal the project. kind must be generated (the only kind that exists). The source must already
be uploaded (409 source-missing).
/v1/apps/{project}/buildsAuthorizationBearer token · headerrequiredA team API key, sbk_..., from Settings, API keys.
x-api-keyAPI key · headerrequiredThe same key, in a header of its own.
projectstringrequiredThe app's name, unique within the team. 3 to 51 characters (or 1), lowercase letters, digits and dashes, not starting or ending with a dash.
application/jsonsource_sha256Sha256requiredkindstringgeneratedbuildobjectrequiredShow propertiesHide properties
vintegerrequirednamestringrequiredMust equal the project in the path.
cliobjectWhat produced the source: {version, runtime?, toolchain?}. Recorded and part of the cache key. Whole build object: at most 16 KiB.
specBuildSpecThe spec of a build request. Same as an app spec, without module, secrets and secrets_patch.
Show propertiesHide properties
activebooleanhostsstring[]The app's whole route list. Exclusive with hosts_patch.
hosts_patchHostsPatchShow propertiesHide properties
addstring[]removestring[]bindingsBinding[]Show propertiesHide properties
Bindingnamestringrequiredkindstringrequiredkvd1r2queuedoaeratelimitassetssecretserviceresource_idstring | nullrequiredconfigobjectrequiredBy kind: do {class_name} (the exported Durable Object class); ratelimit {limit, period}; queue
{queue, retry_delay?}; service {} with the callee in the spec's services; the others {}.
servicesobjectService bindings: binding name to the callee's app_id (from GET /v1/apps). Both apps must belong to the team and the callee cannot be the app itself. The runtime enables service bindings from compatibility date 2026-11-18 (CLI-enforced).
cronsstring[]queue_consumersQueueConsumer[]Show propertiesHide properties
QueueConsumerqueuestringrequiredmax_batch_sizeintegerrequiredmax_batch_timeout_msintegerrequiredmax_retriesintegerrequireddead_letter_queuestring | nullrequiredlimitsLimitsPer-app ceilings. A null or absent value means the platform default. The account's own ceilings (GET /v1/limits) cap what a team may ask for here: a value over one is refused with 403 quota-* (never clamped), and rate_rps: 0 (no limit) is refused too.
Show propertiesHide properties
memory_mbinteger | nullcpu_msinteger | nullwall_msinteger | nullstorage_mbinteger | nullrate_rpsinteger | nullrate_burstinteger | nullNeeds rate_rps.
ops_per_secinteger | nullegress_bytes_per_dayinteger | nullegress_policy_refstring | nullassets_manifest_refstring | nullassets/<sha256 of the uploaded manifest>. The manifest must be uploaded first.
Answered from the cache, or an identical failed build refused again (state: failed, cached: true).
idstring<uuid>requiredprojectstringrequiredstatestringrequiredqueuedbuildingreadyfailedcanceledcachedbooleanTrue when the result came from an identical earlier build.
positioninteger | nullPlace in the queue while queued.
waitingstring | nullWhy a queued build is held back (for example waiting for memory). Not a failure.
supersededbooleanA newer deploy of the project overtook this build; it did not touch the app.
expected_sinteger | nullEstimated seconds to finish. An estimate, not a promise.
estimated_start_sinteger | nullerrorobject | nullSet when failed or canceled. code is one of prepare_failed, prepare_timeout, compile_failed, compile_timeout, abi_rejected, input_invalid, timeout, resource_exceeded, canceled, builder_error, apply_failed, queue_timeout, builder_lost; message is the build output's reason.
Show propertiesHide properties
codestringmessagestringmodule_sha256string | nullThe module this build produced, once ready.
record_generationinteger | nullThe app generation the build wrote, once ready. Wait for this to be applied.
hostsstring[]created_byobject | nullShow propertiesHide properties
namestringviastring | nulltriggerstringWhat started it: cli, git, dashboard or operator.
queued_atstring<date-time>started_atstring<date-time> | nullfinished_atstring<date-time> | nullstatsobjectShow propertiesHide properties
wall_msinteger | nullcpu_msinteger | nullpeak_memory_bytesinteger | nullmemory_cap_bytesinteger | nullmodule_bytesinteger | nullQueued.
idstring<uuid>requiredprojectstringrequiredstatestringrequiredqueuedbuildingreadyfailedcanceledcachedbooleanTrue when the result came from an identical earlier build.
positioninteger | nullPlace in the queue while queued.
waitingstring | nullWhy a queued build is held back (for example waiting for memory). Not a failure.
supersededbooleanA newer deploy of the project overtook this build; it did not touch the app.
expected_sinteger | nullEstimated seconds to finish. An estimate, not a promise.
estimated_start_sinteger | nullerrorobject | nullSet when failed or canceled. code is one of prepare_failed, prepare_timeout, compile_failed, compile_timeout, abi_rejected, input_invalid, timeout, resource_exceeded, canceled, builder_error, apply_failed, queue_timeout, builder_lost; message is the build output's reason.
Show propertiesHide properties
codestringmessagestringmodule_sha256string | nullThe module this build produced, once ready.
record_generationinteger | nullThe app generation the build wrote, once ready. Wait for this to be applied.
hostsstring[]created_byobject | nullShow propertiesHide properties
namestringviastring | nulltriggerstringWhat started it: cli, git, dashboard or operator.
queued_atstring<date-time>started_atstring<date-time> | nullfinished_atstring<date-time> | nullstatsobjectShow propertiesHide properties
wall_msinteger | nullcpu_msinteger | nullpeak_memory_bytesinteger | nullmemory_cap_bytesinteger | nullmodule_bytesinteger | nullThe 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 (forbidden), a route is not the team's to use (host-not-yours), or the spec's limits are over the account's ceilings (quota-memory, quota-storage, quota-cpu, quota-wall, quota-rate, quota-ops).
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredforbiddenneedstringrequiredThe grant, as <resource>:<action>, for example app:write.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredhost-not-yourspathstringrequiredhostserrorstringrequiredA message for people. Do not parse it.
reasonstringrequiredquota-memorylimitintegerrequiredThe ceiling, in MiB.
askedintegerrequiredWhat the spec asked for.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredquota-storagelimitintegerrequiredThe ceiling, in MiB.
askedintegerWhat limits.storage_mb asked for.
would_use_mbintegerThe static assets of the team's apps with this deploy, in MiB.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredquota-cpulimitintegerrequiredThe ceiling, in milliseconds of CPU per request.
askedintegerrequirederrorstringrequiredA message for people. Do not parse it.
reasonstringrequiredquota-walllimitintegerrequiredThe ceiling, in milliseconds of wall time per request.
askedintegerrequirederrorstringrequiredA message for people. Do not parse it.
reasonstringrequiredquota-ratelimitintegerrequiredThe ceiling.
askedintegerrequirederrorstringrequiredA message for people. Do not parse it.
reasonstringrequiredquota-opslimitintegerrequiredThe ceiling, in binding operations per second.
askedintegerrequiredThe source is not uploaded (source-missing), or another app holds a route (route-taken).
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredsource-missingerrorstringrequiredA message for people. Do not parse it.
reasonstringrequiredroute-takenpathstringrequiredhostsThe 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_sintegerteam-queue-full (3 builds already queued or running for the team), team-hourly-limit (20 builds in the last hour), queue-full (platform-wide queue), quota-builds (the free alpha builds per 24 hours) or key-rate-limited. 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.
reasonstringrequiredteam-queue-fullerrorstringrequiredA message for people. Do not parse it.
reasonstringrequiredteam-hourly-limiterrorstringrequiredA message for people. Do not parse it.
reasonstringrequiredquota-buildslimitintegerrequiredusedintegerrequiredretry_after_sintegerrequiredUntil the next slot opens; also the Retry-After header.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredqueue-fullqueue_lengthintegerrequireddrain_sintegerrequiredAbout how long the queue's work takes.
retry_after_sintegerrequiredAbout when a slot frees; also the Retry-After header.
Builds are not available right now: builds-disabled (this Cloud does not build) or no-builder (none is ready; retry in a few minutes).
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredbuilds-disablederrorstringrequiredA message for people. Do not parse it.
reasonstringrequiredno-builder