Authorization: Bearer <token> header or an active cookie session with a CSRF token.
Launch a Static Website
Path Parameters
string
required
The ID of the project that will own this static website.
Body Parameters
string
required
Display name for the static website. Used in the dashboard and to derive the CloudFront subdomain.
string
required
GitHub repository full name in
owner/repo format (e.g. acme/marketing-site). The Springwinter GitHub App must already be installed on this repository.string
required
Git branch to build and deploy (e.g.
main).string
required
Shell command Springwinter runs to produce the static output (e.g.
npm run build or hugo).string
required
Directory that contains the built output files to upload to S3 (e.g.
dist, out, public).boolean
default:"false"
When
true, Springwinter automatically rebuilds and deploys the site on every push to the configured branch.Response — 201 Created
Get a Static Website
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
Response
Update a Static Website
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website to update.
Body Parameters
string
Switch deployments to a different Git branch.
string
Updated build command.
string
Updated publish directory.
boolean
Enable or disable automatic deployments on push.
Response
Returns the updated static website object with"status": "deploying" if a rebuild was triggered.
Delete a Static Website
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website to delete.
Response — 204 No Content
An empty body on success.
Redeploy a Static Website
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
Response — 202 Accepted
Get Build Logs
build_command and Springwinter’s S3 upload step.
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
Response
Get Metrics
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
Response
Get Cost Estimate
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
Response
Get Environment Variables
Environment variables for static websites are build-time only. They are available during
build_command execution (e.g. as VITE_ or NEXT_PUBLIC_ prefixed variables that get inlined into your bundle), but they are not injected at runtime into the served files. Changing environment variables triggers a full rebuild so the new values are baked into the next deployment.Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
Response
Replace Environment Variables
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
Body Parameters
array
required
Array of
{ "name": string, "value": string } objects. This list fully replaces the existing build environment — any variable not included in the request is removed.Response — 202 Accepted
Previews
Static website previews let you deploy every branch to its own CloudFront distribution with a unique URL. This is ideal for design review, stakeholder sign-off, and end-to-end testing before merging into the production branch.Create a Preview
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
Body Parameters
string
required
The Git branch to build and deploy as a preview site.
201 Created
Get a Preview
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
string
required
The unique ID of the preview deployment.
Response
Delete a Preview
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
string
required
The unique ID of the preview deployment to delete.
Response — 204 No Content
An empty body on success.
Preview Build Logs
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
string
required
The unique ID of the preview deployment.
Response
Preview Metrics
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
string
required
The unique ID of the preview deployment.
Response
Preview Environment Variables
Path Parameters
string
required
The ID of the project that owns the static website.
string
required
The unique ID of the static website.
string
required
The unique ID of the preview deployment.