Skip to main content
Static websites are frontend applications that Springwinter builds from your GitHub repository and serves globally via Amazon S3 and CloudFront — all inside your own AWS account. Springwinter handles the build pipeline, S3 bucket configuration, CloudFront distribution, cache invalidation on each deploy, and optional branch preview URLs. This approach gives you the performance of a global CDN with the data sovereignty and cost visibility of your own infrastructure. All requests require a valid Authorization: Bearer <token> header or an active cookie session with a CSRF token.

Launch a Static Website

Creates and deploys a new static website. Springwinter clones the repository, runs your build command, uploads the output to S3, and creates a CloudFront distribution pointing at the bucket.

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

Returns the current configuration and deployment status of 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

Updates one or more mutable settings on a static website. Changing build settings or the source branch triggers an automatic rebuild and redeploy.

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

Tears down the CloudFront distribution, empties and deletes the S3 bucket, and removes all other AWS resources associated with this site. This operation is irreversible.

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

Triggers an immediate rebuild and redeploy from the current branch, regardless of whether any new commits exist. Springwinter runs the build command, syncs the output to S3, and issues a CloudFront cache invalidation.

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

Returns log lines from the most recent build run for this static website. Build logs capture the output of your 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

Returns CloudFront and S3 metrics for the static website including request count, bytes transferred, and error rate.

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

Returns the estimated spend to date this month and the projected monthly run rate for this static website based on CloudFront data transfer, S3 storage, and request counts.

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

Returns the build-time environment variables injected into the static website’s build command.
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

Replaces the complete set of build-time environment variables for this static website and triggers a 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.

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.
This endpoint performs a full replacement, not a merge. Any environment variable you omit from the request body will be permanently deleted. Fetch the current environment with GET .../environment first, merge your changes, and then submit the complete list. Because these variables are build-time only, a new deployment is triggered automatically after each successful PUT.

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.
Response — 201 Created

Get a Preview

Returns the preview object including its URL, source branch, and current status.

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

Empties the preview S3 bucket, removes the CloudFront distribution, and clears all DNS records for the preview URL.

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.
Springwinter can automatically delete previews when their source branch is merged or deleted in GitHub. Enable this in your project’s GitHub settings to keep your AWS account free of stale CloudFront distributions.

Preview Build Logs

Returns build log lines for the preview deployment in the same format as the main site logs endpoint.

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

Returns CloudFront request and error metrics for the preview deployment.

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

Returns the build-time environment variables used when the preview was last built. These are the values that were baked into the preview’s static assets at build time.

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