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

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

Query parameters

ParameterTypeRequiredDescription
limitintegerNoHow many deploys to return, 1 to 1000. Defaults to 1000.
offsetintegerNoHow 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:

FieldTypeDescription
idstringBuild ID.
statusstringrunning, 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.
errorMessagestringA generic failure notice. Only on failed builds.
triggeredBystringapi, manual, or promotion. Treat it as an open set and branch only on the values you care about.
triggeredByNamestringThe API token or dashboard user that triggered the deploy. Omitted when unknown.
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.
changesSnapshotobjectWhat 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.