Read a preview
Read one preview: its URL, visibility, expiry, and status, which is one of building, ready, failed, promoted, or expired.
GET https://sitepaste.com/api/v1/public/sites/{siteId}/previews/{previewId}
Requires the deploy scope.
Usage
curl "https://sitepaste.com/api/v1/public/sites/default/previews/pv7k3q9r2m4x" \
-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
200 OK with the preview.
{
"id": "pv7k3q9r2m4x",
"visibility": "public",
"hasPassword": false,
"status": "ready",
"hasBeenBuilt": true,
"url": "https://preview-pv7k3q9r2m4x.sitepaste.com",
"expiresAt": "2026-02-15T12:00:00Z",
"createdAt": "2026-02-08T12:00:00Z",
"createdByName": "ci-token"
}
Fields are as list previews describes them; here status can also be failed, promoted, or expired.
Two fields the list never carries can appear here, each omitted when absent: errorMessage, a generic failure notice on a failed preview, and promotedAt, RFC 3339, on a preview that was promoted to live.
400 when {previewId} is malformed. 404 when it is well formed but names no preview on this site. A preview belonging to a different site of the same workspace is a 404 here too.