Deploy history
List a site’s deploys, newest first, with their status, duration, and attribution. A deploy triggered over the API carries the token’s name.
GET https://sitepaste.com/api/v1/public/sites/{siteId}/deployments
Requires the deploy scope.
Usage
curl "https://sitepaste.com/api/v1/public/sites/default/deployments?limit=20" \
-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. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | How many deploys to return, 1 to 1000. Defaults to 1000. |
| offset | integer | No | How many to skip. Defaults to 0. |
Response
{
"deployments": [
{
"id": "8fk20dmc1p3z",
"status": "success",
"triggeredBy": "api",
"triggeredByName": "ci-token",
"durationMs": 14210,
"startedAt": "2026-02-08T12:00:00Z",
"completedAt": "2026-02-08T12:00:14Z",
"createdAt": "2026-02-08T11:59:59Z",
"changesSnapshot": {
"pages": [ { "id": "k3m9x2q7r4pz", "slug": "getting-started", "title": "Getting started", "contentType": "docs", "changeType": "modified" } ],
"authors": [],
"siteChanges": [],
"lastDeploymentAt": "2026-02-07T09:30:00Z"
}
}
],
"total": 128,
"limit": 20,
"offset": 0
}
Each entry is the deploy status record with two additions:
| Field | Type | Description |
|---|---|---|
| id | string | Build ID. |
| status | string | running, success, failed, held, discarded, or undeployed. History holds only builds that have started, so queued never appears here. A held deploy found broken links and is waiting in the dashboard, and a discarded one was replaced while it waited. |
| errorMessage | string | A generic failure notice. Only on failed builds. |
| triggeredBy | string | api, manual, or promotion. Treat it as an open set and branch only on the values you care about. |
| triggeredByName | string | The API token or dashboard user that triggered the deploy. Omitted when unknown. |
| 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. |
| changesSnapshot | object | What the deploy published, in the shape pending changes returns: pages, authors, siteChanges, and lastDeploymentAt. Omitted when no snapshot was recorded. |
total counts every deploy on the site, not only the ones in this response. An undeployed status is a take-offline, which is recorded here like any other deploy.