See what restoring a saved version would change in the pipe as it is now, before you restore it.
BETA - This API is currently in beta testing. If you encounter issues or have feedback, contact our support team.
Before You Begin
🔗 Use the GraphQL Playground to execute the queries in this guide.
➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.
Prerequisites
- Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
- Permissions: Your token must have
Admin(manage) permission on the pipe. A token that does not returnsPERMISSION_DENIED. - An uploaded version: The version must be
UPLOADED. List the pipe's versions with Read a Pipe's Snapshots and Operations to find itsversionId.
Read the Preview
restorePreview compares the version with the pipe as it is now and returns, as one JSON value, what Restore a pipe to a snapshot would change. Nothing is restored and nothing is saved.
query {
pipe(id: 123) {
snapshot(versionId: "8f6c1d52-7c1e-4f4b-9a57-0b5d3f1e2a90") {
restorePreview(filter: TOUCHED)
}
}
}
Input Explanation:
pipe.id(required): The pipe the version belongs to.versionId(required here): The version to preview. Without it,snapshotreturns the latest uploaded version.filter(optional):ALLreturns every row and property, including unchanged ones.TOUCHEDreturns only the changed rows, plus the unchanged rows needed to place them. Omitting the argument and passing an explicitnullboth behave asALL.
Sample Response (TOUCHED: a phase was renamed from "Review" to "Second look" after the version, so restoring renames it back):
{
"data": {
"pipe": {
"snapshot": {
"restorePreview": {
"summary": { "created": 0, "updated": 1, "deleted": 0, "total": 1 },
"categories": [
{
"key": "phases_and_fields",
"changes": 1,
"rows": [
{
"entity": "phases",
"id": "344166802",
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "Review",
"status": "updated",
"properties": [
{ "key": "phases.name", "status": "updated", "from": "Second look", "to": "Review" }
]
}
]
}
],
"references": {
"production": { "repos": { "123": { "name": "Purchase requests" } } },
"sandbox": { "repos": { "123": { "name": "Purchase requests" } } }
}
}
}
}
}
}
Response Fields
The response has the same shape as Compare a Pipe Sandbox to Production: summary, categories and references, with the same rows, properties and collection items. Only the sides change:
fromandproduction: the pipe as it is now.toandsandbox: the pipe after the restore, as the version recorded it.created: a row the restore brings back.deleted: a row the restore removes, because it was added after the version.
Key Notes
- What the restore writes: the preview follows the restore, not a Sandbox publish. So it also compares the pipe name, its public identifiers (
repos.slug,repos.email_inbox_name) and the start form's public slug, which a restore writes back. HTTP request automations are compared as they are: a restore does not switch them off as publishing does. - What the restore skips: phase assignments of users who are no longer pipe members, assignments to phases of other pipes, and phase jumps into phases the version does not have are left out, as the restore leaves them out. AI agents and webhooks are never part of versions.
- Credentials are never returned: webhook headers and automation credentials are removed from both sides.
- One version per request: a request can preview one version. Once a preview succeeds, every further
restorePreviewin the same request, throughsnapshotsor through anothersnapshot(versionId:), returnsPIPEFY_RUNTIME. A preview that fails, such as one of aPENDINGversion, does not count. - Version not ready: a
PENDINGorFAILEDversion, or one whose stored file cannot be read, returnsPIPEFY_RUNTIME. Handle errors by code, not by message: the message is translated to the caller's locale. - Admin only: only pipe admins can preview a restore. A token without
Admin(manage) permission on the pipe receivesPERMISSION_DENIED. - Paid plans only: like the restore, the preview is not available on the free plan. For a pipe whose organization is on the free plan,
snapshotreturnsFEATURE_NOT_ALLOWED_BY_ORGANIZATION_PLAN. - A snapshot of now: the preview reads the pipe when the request runs. A change made after it is not in the preview, and the restore applies the version to the pipe as it is when the restore runs.
- Related operations: Restore a pipe to a snapshot and Read a Pipe's Snapshots and Operations.

