PUT
/v1/write-syncs/{writeSyncId}betaapiKeyworkspace
When to use
Replace the complete definition of a paused sync.
For agents
Read the latest numeric version and pass expectedVersion. Saving creates a definition revision and invalidates previous previews; review a new preview before publishing through revisions.publish with its runId and the version token from revisions.list.
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.update('wsyn_contacts123', {
"definition": {
"source": {
"resourceId": "oper_contacts123",
"object": "contacts",
"scope": ""
},
"destination": {
"resourceId": "conn_quo123",
"object": "contacts",
"scope": ""
},
"input": {
"type": "operation",
"operationId": "oper_contacts123",
"revisionId": "rvsn_contacts123",
"table": "contacts"
},
"keyColumn": "email",
"fields": {
"emails": "email",
"firstName": "first_name",
"lastName": "last_name"
}
},
"expectedVersion": 1
});Request body
{
"definition": {
"source": {
"resourceId": "oper_contacts123",
"object": "contacts",
"scope": ""
},
"destination": {
"resourceId": "conn_quo123",
"object": "contacts",
"scope": ""
},
"input": {
"type": "operation",
"operationId": "oper_contacts123",
"revisionId": "rvsn_contacts123",
"table": "contacts"
},
"keyColumn": "email",
"fields": {
"emails": "email",
"firstName": "first_name",
"lastName": "last_name"
}
},
"expectedVersion": 1
}Response
{
"data": {
"id": "wsyn_contacts123",
"name": "Contacts → Quo contacts",
"definition": {
"source": {
"resourceId": "oper_contacts123",
"object": "contacts",
"scope": ""
},
"destination": {
"resourceId": "conn_quo123",
"object": "contacts",
"scope": ""
},
"input": {
"type": "operation",
"operationId": "oper_contacts123",
"revisionId": "rvsn_contacts123",
"table": "contacts"
},
"keyColumn": "email",
"fields": {
"emails": "email",
"firstName": "first_name",
"lastName": "last_name"
}
},
"version": 2,
"isEnabled": false,
"createdAt": "2026-09-30T12:00:00.000Z",
"updatedAt": "2026-09-30T12:00:00.000Z"
}
}