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
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer 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"
}
| Field | Type | Description |
|---|---|---|
| id | string | Build ID. While the deploy is still queued this is a placeholder. The build’s own id appears once it starts. |
| status | string | One 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. |
| errorMessage | string | A generic failure notice. The specific reason is not returned. Only on failed builds. |
| triggeredBy | string | What 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. |
| durationMs | number | Build time in milliseconds. Only once the build has finished. |
| previewId | string | Only on builds of the draft preview site. |
| startedAt | string | RFC 3339. Only once the build has started. |
| completedAt | string | RFC 3339. Only once the build has finished. |
| createdAt | string | RFC 3339. When the build was queued. |
| brokenLinks | number | How 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.