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

# Monitor sync executions

After a consumer completes a sync setup, Chift runs its flows on their triggers. This page shows how to confirm the setup, list the executions, and trigger a run from your backend.

New to the model? Read [Building with Syncs](/developer-guides/syncs/overview) first.

## Confirm the setup

Read the sync status for a consumer. The status shows whether the setup is complete and which flows are enabled.

```bash theme={null}
curl "https://api.chift.eu/consumers/{consumerid}/syncs/{syncid}" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

| Field            | Meaning                                                               |
| ---------------- | --------------------------------------------------------------------- |
| `status`         | `active` once the consumer completes the setup. `inactive` otherwise. |
| `status_details` | Extra information when the status is `inactive`.                      |
| `enabled_flows`  | The flows the consumer has enabled, each with its `id` and trigger.   |
| `link_metadata`  | The metadata you passed when you created the link.                    |

[API reference: Get sync information for one consumer ↗](/api-reference/endpoints/consumers/get-sync-information-for-one-consumer)

## List executions

Each flow run is an **execution**. List the executions of one flow for one consumer.

```bash theme={null}
curl "https://api.chift.eu/consumers/{consumerid}/syncs/{syncid}/flows/{flowid}/executions" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

Use the optional `date_from` and `date_to` query parameters to filter by date. Each entry returns the execution `id`, `start`, `end`, and `status`.

<Note>
  Get the `flowid` values from [Get sync](/api-reference/endpoints/syncs/get-sync), or from `enabled_flows` in the sync status above.
</Note>

[API reference: Get executions information for one consumer/flow/sync ↗](/api-reference/endpoints/consumers/get-executions-information-for-one-consumerflowsync)

## Execution statuses

Each execution has a status. The status shows its state or outcome:

| Status                  | Meaning                                                                                                                       |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `IN PROGRESS`           | The execution is running. Logs and results may be incomplete.                                                                 |
| `FINISHED`              | The execution completed with no errors. No action is required.                                                                |
| `FINISHED` with warning | The execution completed with non-fatal issues, such as validation errors or partial rejections. Review the execution details. |
| `ERROR`                 | The execution failed on a fatal error, such as an authentication or connectivity issue. Resolve the cause. Then retry.        |
| `CANCELED`              | A user stopped the execution before completion.                                                                               |

For the full description of each status, see [Trigger an execution](/syncs/self-service#execution-statuses).

## Trigger a run

Chift runs each flow on its trigger. To start a run yourself, send a custom event to the flow.

```bash theme={null}
curl -X POST https://api.chift.eu/syncs/{syncid}/flows/{flowid}/event \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "consumers": ["your-consumer-id"],
    "data": {
      "import_mode": "missing"
    }
  }'
```

The `data` object accepts run options: `start_date`, `end_date`, `force_from_date`, `import_mode`, and `force_restart`. Use them to re-run a specific period.

<Warning>
  Re-importing a synced period can duplicate data in the target software. First confirm with the end-user that a re-import is safe.
</Warning>

You can also trigger a run from the consumer page in the platform. See [Trigger an execution](/syncs/self-service).

[API reference: Send a custom event for a specific flow ↗](/api-reference/endpoints/syncs/send-a-custom-event-for-a-specific-flow)

## Enable a flow from your backend

By default, your end-user enables the flows on the Chift-hosted page. You can also enable a flow from your backend.

```bash theme={null}
curl -X POST https://api.chift.eu/consumers/{consumerid}/syncs/{syncid}/flows/{flowid}/enable \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationids": ["42"],
    "data": {}
  }'
```

| Field            | Required | Notes                                           |
| ---------------- | -------- | ----------------------------------------------- |
| `integrationids` | No       | The connections used to enable the flow.        |
| `triggerid`      | No       | The trigger to attach. Defaults to `trigger-1`. |
| `cronschedule`   | No       | A cron schedule for the flow.                   |
| `data`           | No       | The flow configuration for this consumer.       |

[API reference: Enable a flow for a specific consumer ↗](/api-reference/endpoints/syncs/enable-a-flow-for-a-specific-consumer)

## Related

* [Activating a sync](/developer-guides/syncs/how-to-activate)
* [Activation links & redirects](/developer-guides/syncs/activation-and-redirects)
* [Webhooks](/developer-guides/webhooks)
