PermuteDocs
Go to Permute

Write syncs · writeSyncsExecute

Execute a write sync now

Sends a completed preview captured by this same API key. Requires the current definition to be enabled. Uses captured values, does not refresh the source, and does not change the daily schedule. Poll getRun for results; retrying never resends unconfirmed writes.

POST/v1/write-syncs/{writeSyncId}/runs/{runId}/execute
betaapiKeyworkspace

When to use

Send an completed capture while the current definition is enabled.

For agents

Use the API key that captured the run. Execution sends its captured values without refreshing sources or changing the daily schedule. Poll getRun and inspect every page for outcomes.

Example

typescript
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.execute('wsyn_contacts123', 'wsrn_abcdefghijklmnopqrstuvwx');

Response

json
{
  "data": {
    "runId": "wsrn_abcdefghijklmnopqrstuvwx",
    "queued": true
  }
}