Trigger a deploy

A build (a deploy, in dashboard terms) publishes your saved pages as a static site. Trigger one with this endpoint, or as part of a create or update pages request with "build": true. The response arrives as soon as the deploy is queued. Poll get deploy status to know when it finished.

POST https://sitepaste.com/api/v1/public/builds

Usage

curl -X POST https://sitepaste.com/api/v1/public/builds \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"siteId": "optional-site-uuid"}'

Authorizations

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token (Authorization: Bearer sp_...). Created in the dashboard under Account > Tokens. See authentication.

Body

The body is optional; without it, the deploy targets your default site.

FieldTypeRequiredDescription
siteIdstringNoTarget site. Unlike the other endpoints, this one accepts only the site’s UUID, not the short ID.

Response

{
  "status": "queued",
  "deployUrl": "https://yourusername.sitepaste.com",
  "message": "build queued successfully"
}
FieldTypeDescription
statusstringqueued. The deploy has been accepted but not finished. Poll get deploy status for the outcome.
deployUrlstringThe site’s sitepaste.com address. Always the workspace subdomain, even when a custom domain is connected.
messagestringHuman-readable confirmation. Not intended for parsing.

Quotas and cooldown

The Pro plan includes 1,000 deploys per month. There is a 30-second cooldown between deploys.

Errors

Quota exceeded returns 402:

{
  "error": "build quota exceeded",
  "message": "Monthly build limit of 1000 reached. Upgrade your plan or wait for the next billing cycle."
}

Cooldown active returns 429:

{
  "error": "build cooldown active",
  "message": "Please wait 20 seconds before triggering another build."
}

A 402 with {"error": "invalid plan"} means the workspace’s subscription does not allow API deploys.

Deploy via the pages endpoint

Setting "build": true on a pages request queues a deploy once the page changes have been saved. If the deploy cannot start because the quota is exceeded or the cooldown is active, the pages are still saved, and the error comes back in the response’s build field:

{
  "pages": [...],
  "build": {
    "error": "build quota exceeded",
    "message": "Monthly build limit of 1000 reached."
  }
}