> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Warehouse Sync

> Change a sync, or pause and resume it

Updates a sync. Send only what changes. Requires `warehouse:write` and `subscribers:write` (plus `events:write` for event syncs).

* `query`, `mapping` and `cursorColumn` are checked against the query's columns. A changed query or cursor reads from the beginning again; unchanged rows are still skipped.
* Other changes save without contacting the warehouse.
* Turning on `triggerAutomations` or `double_opt_in` needs `automations:trigger`. On a sync that already has either on, so does changing `query`, `mapping`, `cursorColumn` or `listIds`.
* Saving makes you the user the sync's imports run as.
* Setting `frequency` to `manual` cancels the next scheduled run.
* A run in progress stops at its next page of rows and runs again with the new settings.

<ParamField path="id" type="string" required>
  Sync ID.
</ParamField>

<ParamField body="name" type="string" />

<ParamField body="query" type="string" />

<ParamField body="mapping" type="object">
  Replaces the mapping. See [Create](/api-reference/warehouse/syncs-create).
</ParamField>

<ParamField body="cursorColumn" type="string | null">
  `null` removes the cursor.
</ParamField>

<ParamField body="frequency" type="string" />

<ParamField body="listIds" type="string[]">
  Lists that contacts the sync creates join. Existing contacts keep theirs.
</ParamField>

<ParamField body="optInMode" type="string" />

<ParamField body="triggerAutomations" type="boolean" />

<ParamField body="isEnabled" type="boolean">
  `false` pauses the sync, `true` resumes it.
</ParamField>

```bash theme={null}
curl -X PATCH "https://api.sequenzy.com/api/v1/warehouse-syncs/wsync_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "frequency": "daily", "isEnabled": false }'
```

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "sync": {
      "id": "wsync_abc123",
      "connectionId": "wconn_abc123",
      "name": "Customers",
      "kind": "subscribers",
      "query": "select email, first_name, plan, updated_at from analytics.customers",
      "mapping": {
        "emailColumn": "EMAIL",
        "firstNameColumn": "FIRST_NAME",
        "attributes": [
          {
            "column": "PLAN",
            "attribute": "plan"
          }
        ]
      },
      "cursorColumn": "UPDATED_AT",
      "cursorValue": "2026-09-30T11:58:02.000Z",
      "listIds": [],
      "optInMode": "confirmed",
      "triggerAutomations": false,
      "frequency": "daily",
      "isEnabled": false,
      "fullResyncRequested": false,
      "status": "idle",
      "nextRunAt": "2026-09-30T13:00:00.000Z",
      "lastRunAt": "2026-09-30T12:00:00.000Z",
      "lastSuccessAt": "2026-09-30T12:00:41.000Z",
      "lastError": null,
      "lastErrorAt": null,
      "consecutiveFailures": 0,
      "latestRun": {
        "id": "wrun_1",
        "syncId": "wsync_abc123",
        "status": "succeeded",
        "isManual": false,
        "isFullResync": false,
        "rowsRead": 1204,
        "rowsUnchanged": 1100,
        "rowsSynced": 98,
        "rowsSkipped": 6,
        "rowsFailed": 0,
        "errorSamples": [
          {
            "row": 17,
            "reason": "Missing email"
          }
        ],
        "subscriberImportIds": [
          "imp_1"
        ],
        "imports": [
          {
            "id": "imp_1",
            "status": "completed",
            "totalRows": 98,
            "processedCount": 98,
            "addedCount": 12,
            "updatedCount": 86,
            "skippedCount": 0,
            "failedCount": 0
          }
        ],
        "error": null,
        "startedAt": "2026-09-30T12:00:00.000Z",
        "finishedAt": "2026-09-30T12:00:41.000Z"
      },
      "createdAt": "2026-09-30T10:00:00.000Z",
      "updatedAt": "2026-09-30T12:00:41.000Z"
    }
  }
  ```

  ```json 403 theme={null}
  {
    "success": false,
    "code": "missing_scope",
    "error": "Starting automations or sending double opt-in emails from a sync requires the automations:trigger permission."
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "code": "not_found",
    "error": "Warehouse sync not found."
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.