> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.

# Start Bulk Sync Execution

POST https://app.polytomic.com/api/bulk/syncs/{id}/executions
Content-Type: application/json

Starts a new execution of a bulk sync.

This endpoint returns the execution record immediately after the run is queued
or started. Use the execution ID with the bulk-sync execution endpoints if you
need to monitor progress in detail.

## Execution modes

- Set `test=true` to validate the sync without writing to the destination.
- Use `resync_mode` for destructive or full-refresh style reruns.
- `test` and `resync_mode` are mutually exclusive.

The legacy `resync` boolean is no longer accepted on this v5 endpoint. Send
`resync_mode` instead.

If another execution is already running, the endpoint returns `409 Conflict`.

Reference: https://apidocs.polytomic.com/api-reference/bulk-sync/start

## Authentication

- `Authorization` header (basic auth, required) — This is the Polytomic deployment key (on-premises only)
- `Authorization` header (bearer token, required) — This is the Polytomic API key

## Request

### Path parameters

- `id` (string, required) — Unique identifier of the bulk sync.

### Body (application/json)

This endpoint expects a V3StartBulkSyncRequest.

- `fetch_mode` (enum, optional) — How the data is fetched. 'none' is normal operation for Polytomic. 'incremental' and 'full' apply to syncs from Salesforce. 'incremental' indicates the data is synced incrementally using record modification time. 'full' is necessary to catch up to the latest values for formula fields and rollup fields whose updates don't show up in incremental runs due to limitations in Salesforce.
  - Allowed values: `none`, `incremental`, `full`
- `resync_mode` (enum, optional)
  - Allowed values: `refetch`, `resync`, `rebuild`
- `schemas` (list of string, optional, nullable) — Optional list of schema IDs to include in this execution. If empty, all enabled schemas are included.
- `test` (boolean, optional) — When true, runs a test execution that validates the configuration without writing to the destination. Mutually exclusive with resync and resync_mode.
- `resync` (boolean, optional, deprecated) — Deprecated: use resync_mode instead. Equivalent to resync_mode=rebuild.

## Response

### 200

OK

- `data` (V3BulkSyncExecution, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 401 Unauthorized Error

Unauthorized

- `code` (integer, optional) — Application-specific error code.
- `context` (map from string to any, optional) — Application context.
- `error` (string, optional) — Error message.
- `status` (string, optional) — Status text.

### 409 Conflict Error

Conflict

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

## Types

### V3BulkSyncExecution

- `completed_at` (string, optional, nullable)
- `created_at` (string, optional)
- `error_count` (long, optional)
- `fetch_mode` (enum, optional) — How the data is fetched. 'none' is normal operation for Polytomic. 'incremental' and 'full' apply to syncs from Salesforce. 'incremental' indicates the data is synced incrementally using record modification time. 'full' is necessary to catch up to the latest values for formula fields and rollup fields whose updates don't show up in incremental runs due to limitations in Salesforce.
  - Allowed values: `none`, `incremental`, `full`
- `id` (string, optional)
- `is_partial` (boolean, optional)
- `is_resync` (boolean, optional)
- `is_test` (boolean, optional)
- `output_disposition` (enum, optional)
  - Allowed values: `retain`, `truncate`, `rebuild`
- `record_count` (long, optional)
- `schemas` (list of V3BulkSyncSchemaExecution, optional, nullable)
- `started_at` (string, optional, nullable)
- `status` (enum, optional)
  - Allowed values: `created`, `scheduled`, `running`, `exporting`, `canceling`, `canceled`, `completed`, `failed`, `processing`, `errors`, `interrupted`
- `status_message` (string, optional)
- `type` (string, optional)
- `updated_at` (string, optional)
- `version` (string, optional) — Polytomic version which last ran this execution.
- `warning_count` (long, optional)

### V3BulkSyncSchemaExecution

- `completed_at` (string, optional, nullable)
- `created_at` (string, optional)
- `error_count` (long, optional)
- `output_name` (string, optional)
- `record_count` (long, optional)
- `schema` (string, optional)
- `started_at` (string, optional, nullable)
- `status` (enum, optional)
  - Allowed values: `created`, `scheduled`, `running`, `exporting`, `canceled`, `completed`, `failed`, `interrupted`, `processing`
- `status_message` (string, optional)
- `updated_at` (string, optional)
- `version` (string, optional) — Polytomic version which last ran this schema execution.
- `warning_count` (long, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": {
    "completed_at": "2023-04-25T12:00:00Z",
    "created_at": "2023-04-25T12:00:00Z",
    "error_count": 0,
    "fetch_mode": "none",
    "id": "248df4b7-aa70-47b8-a036-33ac447e668d",
    "is_partial": false,
    "is_resync": false,
    "is_test": false,
    "output_disposition": "retain",
    "record_count": 1000,
    "schemas": [
      {
        "completed_at": "2023-04-25T12:00:00Z",
        "created_at": "2023-04-25T12:00:00Z",
        "error_count": 0,
        "output_name": "contact",
        "record_count": 1000,
        "schema": "contact",
        "started_at": "2023-04-25T12:00:00Z",
        "status": "created",
        "status_message": "string",
        "updated_at": "2023-04-25T12:00:00Z",
        "version": "rel2026.08.05.06~1a2b3c4",
        "warning_count": 0
      }
    ],
    "started_at": "2023-04-25T12:00:00Z",
    "status": "created",
    "status_message": "string",
    "type": "scheduled",
    "updated_at": "2023-04-25T12:00:00Z",
    "version": "rel2026.08.05.06~1a2b3c4",
    "warning_count": 0
  }
}
```

**SDK Code**

```python
import requests

url = "https://app.polytomic.com/api/bulk/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions"

payload = {}
headers = {
    "X-Polytomic-Version": "X-Polytomic-Version"
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://app.polytomic.com/api/bulk/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    'X-Polytomic-Version': 'X-Polytomic-Version',
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.polytomic.com/api/bulk/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Polytomic-Version", "X-Polytomic-Version")
	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.polytomic.com/api/bulk/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Polytomic-Version"] = 'X-Polytomic-Version'
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.polytomic.com/api/bulk/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions")
  .header("X-Polytomic-Version", "X-Polytomic-Version")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.polytomic.com/api/bulk/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Polytomic-Version' => 'X-Polytomic-Version',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://app.polytomic.com/api/bulk/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Polytomic-Version", "X-Polytomic-Version");

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "X-Polytomic-Version": "X-Polytomic-Version",
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.polytomic.com/api/bulk/syncs/248df4b7-aa70-47b8-a036-33ac447e668d/executions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```