> For the complete documentation index, see [llms.txt](https://developer.kizen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.kizen.com/docs/concepts/smartconnectors/smartconnector-apis/start-smartconnector-flow-api.md).

# Start SmartConnector Flow API

{% hint style="success" %}
**Audience**: Developers, Integrators

**Purpose**: Documents the endpoint used to trigger a SmartConnector run programmatically, including how to upload an input file, specify dry run vs. live run mode, and monitor the resulting execution.
{% endhint %}

## Overview

Use the Start <code class="expression">space.vars.smartconnector</code> Flow API to trigger a <code class="expression">space.vars.smartconnector</code> run programmatically. <mark style="color:$warning;">This</mark> is the primary programmatic entry point for <code class="expression">space.vars.smartconnector</code> execution. It accepts an input file, initiates either a dry run or a live run against the specified <code class="expression">space.vars.smartconnector</code>, and returns an execution ID you can use to monitor progress while the run processes in the background.

### Why Use This API?

You can use the Start <code class="expression">space.vars.smartconnector</code> Flow API when you need to:

* Trigger a <code class="expression">space.vars.smartconnector</code> run as part of an automated workflow, for example when a file lands in a storage bucket, a CI/CD job completes, or an external system generates a new data export
* Replace a manual file upload workflow with a programmatic one for recurring imports that follow a predictable schedule or are triggered by external events
* Run a dry run programmatically to validate data before committing a live run. Use the `is_dry_run` flag to process the file and produce full output without writing any <code class="expression">space.vars.entities</code> to <code class="expression">space.vars.Kizen\_company\_name</code>

### Start SmartConnector Flow API Behavior

{% hint style="info" %}
**Note:** Live runs require an active <code class="expression">space.vars.smartconnector</code>. Dry runs are permitted regardless of status. Unlike Webhook <code class="expression">space.vars.smartconnectors</code>, which queue incoming executions while inactive, all other <code class="expression">space.vars.smartconnector</code> types do not queue runs while inactive. A run submitted against an inactive non-webhook <code class="expression">space.vars.smartconnector</code> <mark style="color:$warning;">will</mark> return an error rather than waiting to process.
{% endhint %}

<table data-search="false"><thead><tr><th>Behavior</th><th>Detail</th></tr></thead><tbody><tr><td><strong>Accepted File Types</strong></td><td>CSV and Excel files. XLSX is recommended. Most Excel file types are accepted</td></tr><tr><td><strong>Run Mode</strong></td><td>Controlled by the <code>is_dry_run</code> flag in the request body. Set to <code>true</code> for a dry run, <code>false</code> for a live run</td></tr><tr><td><strong>Execution Model</strong></td><td>Returns immediately with an execution ID. The run processes asynchronously in the background</td></tr><tr><td><strong>Diff Checking</strong></td><td>Enabled by default. Pass <code>disable_diff_check: true</code> to force a full re-ingestion</td></tr><tr><td><strong>SQL Parameters</strong></td><td>Pass runtime parameter values via the <code>sql_parameters</code> <code class="expression">space.vars.object</code> for connectors that use parameterized SQL</td></tr><tr><td><strong>Trigger Type</strong></td><td>Use <code>trigger_type</code> to identify how the run was initiated. Use the value that matches your <code class="expression">space.vars.smartconnector</code> type: <code>fileupload</code>, <code>webhook</code>, <code>activity</code>, <code>schedule</code>, or <code>bulkaction</code></td></tr><tr><td></td><td></td></tr></tbody></table>

**Error Conditions**

The following conditions return an error response:

* Attempting a live run on an inactive <code class="expression">space.vars.smartconnector</code>
* Attempting to run a <code class="expression">space.vars.smartconnector</code> that has not been fully configured. The API returns a specific error identifying which configuration step is incomplete
* Invalid file format
* Insufficient permissions to run the <code class="expression">space.vars.smartconnector</code>

***

## Input File

Triggering a SmartConnector run programmatically does not require uploading an input file beforehand. If no file is passed, the run defaults to the SmartConnector's sample file. To run against a new file, first upload it to Kizen's file storage and pass the returned file reference as `source_file_id` in the request body.&#x20;

For the full upload workflow and code examples, see [Upload Files for SmartConnector Runs](/docs/concepts/smartconnectors/smartconnector-apis/upload-files-for-smartconnector-runs.md).

***

## Start SmartConnector Flow Endpoints

Want to try the API out? Visit our [Swagger](https://app.go.kizen.com/api/docs/public/swagger#/smart-connectors/smart_connectors_start_connector_flow_create) docs.

## POST /api/smart-connectors/{connector\_identifier}/start-connector-flow

> Start the smart connector flow. For bulk action connectors, pass entity\_records\_set\_key from a bulk action summary to run on selected records.

```json
{"openapi":"3.0.3","info":{"title":"Kizen API","version":"1.0.0"},"security":[{"businessId":[],"userId":[],"apiKey":[]}],"components":{"securitySchemes":{"businessId":{"type":"apiKey","in":"header","name":"X-BUSINESS-ID"}},"schemas":{"SmartConnectorFlowStartRunRequest":{"type":"object","properties":{"source_file_id":{"type":"string","format":"uuid","writeOnly":true,"nullable":true,"description":"UUID of the uploaded input file (S3 object) to run the connector against. Upload a CSV or XLSX file via the presigned upload flow with source=smart_connector_import and pass the returned s3object_id here. If omitted, the connector's reference input file is used."},"reprocess_execution_id":{"type":"string","format":"uuid","writeOnly":true,"nullable":true,"description":"UUID of a previous execution to reprocess. When provided, the connector reruns using that execution's input file and metadata, and source_file_id is ignored."},"is_dry_run":{"type":"boolean","default":false,"description":"When true, validates the input file without committing changes (dry run). When false, performs a live run that writes records."},"disable_diff_check":{"type":"boolean","default":false,"description":"When true, skips the connector's diff-check validation."},"trigger_type":{"allOf":[{"$ref":"#/components/schemas/TriggerTypeEnum"}],"default":"fileupload","description":"How the run was triggered. Defaults to fileupload for programmatic file-based runs.\n\n* `fileupload` - File Upload\n* `webhook` - Webhook\n* `activity` - Activity\n* `schedule` - Schedule\n* `bulkaction` - Bulk Action"},"sql_parameters":{"description":"Parameters passed to the connector's SQL script, merged over the connector's configured defaults."},"entity_records_set_key":{"type":"string","nullable":true,"minLength":1,"description":"Cache key from bulk action summary containing selected record IDs. Only for bulk action connectors."}}},"TriggerTypeEnum":{"enum":["fileupload","webhook","activity","schedule","bulkaction"],"type":"string","description":"* `fileupload` - File Upload\n* `webhook` - Webhook\n* `activity` - Activity\n* `schedule` - Schedule\n* `bulkaction` - Bulk Action"},"SmartConnectorFlowStartRun":{"type":"object","properties":{"is_dry_run":{"type":"boolean","default":false,"description":"When true, validates the input file without committing changes (dry run). When false, performs a live run that writes records."},"disable_diff_check":{"type":"boolean","default":false,"description":"When true, skips the connector's diff-check validation."},"trigger_type":{"allOf":[{"$ref":"#/components/schemas/TriggerTypeEnum"}],"default":"fileupload","description":"How the run was triggered. Defaults to fileupload for programmatic file-based runs.\n\n* `fileupload` - File Upload\n* `webhook` - Webhook\n* `activity` - Activity\n* `schedule` - Schedule\n* `bulkaction` - Bulk Action"},"sql_parameters":{"description":"Parameters passed to the connector's SQL script, merged over the connector's configured defaults."},"entity_records_set_key":{"type":"string","nullable":true,"description":"Cache key from bulk action summary containing selected record IDs. Only for bulk action connectors."},"execution_id":{"type":"string","format":"uuid","readOnly":true,"description":"ID of the created execution. Use it to monitor progress via the Execution Status API or to cancel the run via the Cancel Execution API."}},"required":["execution_id"]}}},"paths":{"/api/smart-connectors/{connector_identifier}/start-connector-flow":{"post":{"operationId":"smart_connectors_start_connector_flow_create","description":"Start the smart connector flow. For bulk action connectors, pass entity_records_set_key from a bulk action summary to run on selected records.","parameters":[{"in":"path","name":"connector_identifier","schema":{"type":"string"},"required":true},{"in":"query","name":"ordering","schema":{"type":"string","enum":["connector_type","created_at","custom_object__name","last_used_at","name","stats__used_count","status"]},"description":"Which field to use when ordering the results. Prepend with '-' for descending order."}],"tags":["smart-connectors"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartConnectorFlowStartRunRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartConnectorFlowStartRun"}}},"description":""}}}}}}
```

### Start SmartConnector Schemas

## The SmartConnectorFlowStartRun object

```json
{"openapi":"3.0.3","info":{"title":"Kizen API","version":"1.0.0"},"components":{"schemas":{"SmartConnectorFlowStartRun":{"type":"object","properties":{"is_dry_run":{"type":"boolean","default":false,"description":"When true, validates the input file without committing changes (dry run). When false, performs a live run that writes records."},"disable_diff_check":{"type":"boolean","default":false,"description":"When true, skips the connector's diff-check validation."},"trigger_type":{"allOf":[{"$ref":"#/components/schemas/TriggerTypeEnum"}],"default":"fileupload","description":"How the run was triggered. Defaults to fileupload for programmatic file-based runs.\n\n* `fileupload` - File Upload\n* `webhook` - Webhook\n* `activity` - Activity\n* `schedule` - Schedule\n* `bulkaction` - Bulk Action"},"sql_parameters":{"description":"Parameters passed to the connector's SQL script, merged over the connector's configured defaults."},"entity_records_set_key":{"type":"string","nullable":true,"description":"Cache key from bulk action summary containing selected record IDs. Only for bulk action connectors."},"execution_id":{"type":"string","format":"uuid","readOnly":true,"description":"ID of the created execution. Use it to monitor progress via the Execution Status API or to cancel the run via the Cancel Execution API."}},"required":["execution_id"]},"TriggerTypeEnum":{"enum":["fileupload","webhook","activity","schedule","bulkaction"],"type":"string","description":"* `fileupload` - File Upload\n* `webhook` - Webhook\n* `activity` - Activity\n* `schedule` - Schedule\n* `bulkaction` - Bulk Action"}}}}
```

## The SmartConnectorFlowStartRunRequest object

```json
{"openapi":"3.0.3","info":{"title":"Kizen API","version":"1.0.0"},"components":{"schemas":{"SmartConnectorFlowStartRunRequest":{"type":"object","properties":{"source_file_id":{"type":"string","format":"uuid","writeOnly":true,"nullable":true,"description":"UUID of the uploaded input file (S3 object) to run the connector against. Upload a CSV or XLSX file via the presigned upload flow with source=smart_connector_import and pass the returned s3object_id here. If omitted, the connector's reference input file is used."},"reprocess_execution_id":{"type":"string","format":"uuid","writeOnly":true,"nullable":true,"description":"UUID of a previous execution to reprocess. When provided, the connector reruns using that execution's input file and metadata, and source_file_id is ignored."},"is_dry_run":{"type":"boolean","default":false,"description":"When true, validates the input file without committing changes (dry run). When false, performs a live run that writes records."},"disable_diff_check":{"type":"boolean","default":false,"description":"When true, skips the connector's diff-check validation."},"trigger_type":{"allOf":[{"$ref":"#/components/schemas/TriggerTypeEnum"}],"default":"fileupload","description":"How the run was triggered. Defaults to fileupload for programmatic file-based runs.\n\n* `fileupload` - File Upload\n* `webhook` - Webhook\n* `activity` - Activity\n* `schedule` - Schedule\n* `bulkaction` - Bulk Action"},"sql_parameters":{"description":"Parameters passed to the connector's SQL script, merged over the connector's configured defaults."},"entity_records_set_key":{"type":"string","nullable":true,"minLength":1,"description":"Cache key from bulk action summary containing selected record IDs. Only for bulk action connectors."}}},"TriggerTypeEnum":{"enum":["fileupload","webhook","activity","schedule","bulkaction"],"type":"string","description":"* `fileupload` - File Upload\n* `webhook` - Webhook\n* `activity` - Activity\n* `schedule` - Schedule\n* `bulkaction` - Bulk Action"}}}}
```

***

## What's Next?

Continue with the [SmartConnector Webhook Trigger API](/docs/concepts/smartconnectors/smartconnector-apis/smartconnector-webhook-trigger-api.md) to learn how to trigger a Webhook SmartConnector by delivering inbound webhook payloads to its endpoint, the equivalent entry point for webhook-triggered <mark style="color:$warning;">connectors</mark>.

<details>

<summary>Related Topics</summary>

* [SmartConnector APIs](/docs/concepts/smartconnectors/smartconnector-apis.md)
* [Running a SmartConnector](/docs/concepts/smartconnectors/running-a-smartconnector.md)
* Building with SmartConnectors (**Topic Coming Soon**)

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.kizen.com/docs/concepts/smartconnectors/smartconnector-apis/start-smartconnector-flow-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
