Build a static site from an allow-listed repository
post/hosting/sites/{id}/builds
Build a static site from an allow-listed repository. The build runs in a sandbox with no network and no secrets; the result is a preview to promote.
Before you call
- Credential
Authorization: Bearer $KEY- Scope
hosting:write- Mcp
rivier_hosting_build_start- Graphql
Mutation.hostingBuildStart- Sdk
hosting.build.start- Cli
hosting build start- Events
hosting.build.started
Parameters
- idstring (uuid)requiredIn the path
Request bodyapplication/json, required
- repoobjectrequired
- urlstringrequiredAt most 300 characters.
- refstringAt most 100 characters.
- urlstringrequired
- outDirstringAt most 130 characters.
- installboolean
- buildboolean
- previewboolean
Responses
- 201application/jsonSuccess
- idstring (uuid)required
- projectIdstringrequired
- sourceobjectrequired
- typestringrequiredOne of: upload, repo.
- urlstring
- refstring
- bundleShastring
- typestringrequired
- outDirstringrequired
- installbooleanrequired
- buildbooleanrequired
- previewbooleanrequired
- statestringrequiredOne of: queued, running, succeeded, failed, timeout, cancelled.
- logstringrequired
- errorstring or nullrequired
- deploymentIdstring or nullrequired
- secondsnumberrequired
- createdAtstringrequired
- startedAtstring or nullrequired
- finishedAtstring or nullrequired
- 400application/jsonThe request was malformed
- errorstringrequired
- messagestring
- 401application/jsonNo valid credential
- errorstringrequired
- messagestring
- 403application/jsonThe credential lacks the scope, origin or address
- errorstringrequired
- messagestring
- 429application/jsonOver the key's rate limit; see Retry-After
- errorstringrequired
- messagestring