Inspect

Report pull request preview

Record the deploy status of a named preview for a pull request, typically from CI. The status is applied to every Inspect session currently linked to the pull request; sessions linked later receive the next reported status. Retries are safe: an update whose `occurred_at` is older than the stored status for the same preview is ignored. A `deploying` or `failed` status keeps the last successful URL.

Base URL
PUT
/api/v2/repositories/{owner}/{repo}/pulls/{pull_request_number}/previews/{name}

Record the deploy status of a named preview for a pull request, typically from CI. The status is applied to every Inspect session currently linked to the pull request; sessions linked later receive the next reported status. Retries are safe: an update whose occurred_at is older than the stored status for the same preview is ignored. A deploying or failed status keeps the last successful URL.

Authorization

bearerAuth previews:write
headerAuthorizationBearer <token>

API key authentication. Use your API key as the bearer token.

Scope: previews:write

Path Parameters

owner*string

GitHub repository owner.

Length1 <= length
repo*string

GitHub repository name.

Length1 <= length
pull_request_number*integer

Pull request number.

Formatint64
Range0 < value
name*string

Preview name chosen by the caller, e.g. default or storybook. Lowercase kebab-case where each segment starts with a letter, at most 64 characters. The default preview is the session's primary preview.

Match^[a-z][a-z0-9]*(?:-[a-z][a-z0-9]*)*$
Lengthlength <= 64

Request Body

application/json
  1. body

Unknown properties are rejected.

status*"deploying"
Value in"deploying"
commit_sha?|

Commit the preview was built from. Recommended: Inspect uses it to mark previews of older commits as outdated.

Length1 <= length <= 64
label?|

Display name for the preview. Omit to keep the current label.

Length1 <= length <= 100
embeddable?boolean

Whether the preview can be shown in a frame inside the Inspect UI. Set it to true only when the preview URL allows Inspect as a frame ancestor and loads without a sign-in page that refuses to be framed. Omit to keep the current value; new previews default to false, which shows a link that opens the preview in a new tab.

error?|

Failure details, recorded when status is failed.

Lengthlength <= 2000
occurred_at?string

When the status change occurred. Defaults to receipt time.

Formatdate-time

Response Body

The status was accepted

application/json
  1. response
data*
Example Request
curl -X PUT 'https://app.inspect.com/api/v2/repositories/acme/web/pulls/1234/previews/default' \  -H 'Content-Type: application/json' \  -d '{  "status": "deploying"}'
Example Response
{  "data": {    "name": "default",    "label": "Web app",    "embeddable": false,    "status": "deployed",    "url": "https://web-git-jane-checkout-redesign-acme.vercel.app",    "commit_sha": "8f3c2a1d9e7b6f5a4c3d2e1f0a9b8c7d6e5f4a3b",    "last_succeeded_at": "2026-10-28T15:42:11.204Z",    "error": null,    "occurred_at": "2026-10-28T15:42:11.204Z",    "session_ids": [      "n4b8v2c6x9zq"    ]  }}