POST
/v1/write-syncs/{writeSyncId}/previewbetaapiKeyworkspace
When to use
Capture proposed changes without writing to the destination.
For agents
Poll getRun until previewComplete or previewError, then inspect every page before approval. Preview remains read-only on enabled syncs. Direct connector sources use their last read sync.
Example
import { PermuteClient } from '@permute/sdk';
const orgClient = new PermuteClient({
apiKey: process.env.PERMUTE_API_KEY!,
});
const client = orgClient.withWorkspace(process.env.PERMUTE_WORKSPACE_ID!);
const result = await client.writeSyncs.preview('wsyn_contacts123');Response
{
"data": {
"id": "wsrn_abcdefghijklmnopqrstuvwx",
"writeSyncId": "wsyn_contacts123",
"definitionVersion": 1,
"definitionRevisionId": "rvsn_sync123",
"sourceOperation": {
"runId": "oprn_contacts123",
"revisionId": "rvsn_contacts123"
},
"previewComplete": false,
"recordCount": 0,
"page": 0,
"pageCount": 0,
"records": []
}
}