# Trigger a workflow (/api/triggerWorkflow)

Answers with a report — how many workflows were triggered and how many
contacts were enrolled — not with the workflow. One call can start
more than one workflow, because the trigger matches on conditions.

Endpoint: POST /api/v1/workflows/{id}/trigger
Full URL: https://app.sendkuy.com/api/v1/workflows/{id}/trigger
- path parameter id (required): string — The prefixed id of the object.
- header parameter Idempotency-Key (optional): string — Any unique string, one per logical request. Retrying with the same key returns the first answer instead of doing the work twice, and answers with `Idempotent…
Success status: 200

cURL:

```bash
curl -X POST https://app.sendkuy.com/api/v1/workflows/wfl_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3/trigger \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"
```

Node.js:

```ts
import { SendKuy } from 'sendkuy';

const sendkuy = new SendKuy('sk_live_YOUR_API_KEY');

const result = await sendkuy.workflows.trigger('wfl_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3');
```

PHP:

```php
<?php

use SendKuy\SendKuy;

$sendkuy = new SendKuy('sk_live_YOUR_API_KEY');

$result = $sendkuy->workflows()->trigger('wfl_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3');
```

Python:

```python
import requests

response = requests.request(
    "POST",
    "https://app.sendkuy.com/api/v1/workflows/wfl_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3/trigger",
    headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
)

data = response.json()["data"]
```