Get deploy status

Get the most recent deploy’s status for a site. Use it to poll after triggering a deploy, which points at this endpoint in its Location header.

Poll it with the ETag it returns: send the tag back as If-None-Match and an unchanged status answers 304 with no body, so waiting on a deploy costs almost nothing. See conditional reads.

GET https://sitepaste.com/api/v1/public/sites/{siteId}/deployments/latest

Requires the deploy scope.

Usage

curl https://sitepaste.com/api/v1/public/sites/default/deployments/latest \
  -H "Authorization: Bearer $TOKEN"

Authorizations

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

Response

{
  "id": "8fk20dmc1p3z",
  "status": "success",
  "triggeredBy": "api",
  "durationMs": 4523,
  "startedAt": "2026-02-08T12:00:01Z",
  "completedAt": "2026-02-08T12:00:05Z",
  "createdAt": "2026-02-08T12:00:00Z"
}
FieldTypeDescription
idstringBuild ID. While the deploy is still queued this is a placeholder. The build’s own id appears once it starts.
statusstringOne of queued, running, success, failed, held, discarded, or undeployed (the most recent action was taking the site down). held is a deploy started in the dashboard that found broken links and is waiting for someone to fix them or publish it there. It has not changed the live site. discarded is a held deploy that was replaced before it went live. Deploys you start through the API are never held. Treat the list as an open set.
errorMessagestringA generic failure notice. The specific reason is not returned. Only on failed builds.
triggeredBystringWhat started the build: api, manual (dashboard), or promotion (preview promoted to live). Treat it as an open set and branch only on the values you care about.
durationMsnumberBuild time in milliseconds. Only once the build has finished.
previewIdstringOnly on builds of the draft preview site.
startedAtstringRFC 3339. Only once the build has started.
completedAtstringRFC 3339. Only once the build has finished.
createdAtstringRFC 3339. When the build was queued.
brokenLinksnumberHow many broken links a held deploy is waiting on. Only on held deploys.

A queued response carries only id, status, triggeredBy, and createdAt. It is never a preview’s build, only the site’s own.

Returns 404 when no builds exist for the site.