# Start a campaign (/api/startCampaign)

Legal from `draft` and `scheduled`. An instant campaign builds one dispatch row per eligible contact and moves to `running`; it is refused with `402 insufficient_credits` when the balance does not cover them, and with `403 request_refused` when the plan no longer includes one of its channels. A scheduled or recurring campaign moves to `scheduled`, and its recipients are counted from the group when each run starts. Nothing is sent by this call itself.

Endpoint: POST /api/v1/campaigns/{id}/start
Full URL: https://app.sendkuy.com/api/v1/campaigns/{id}/start
- 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/campaigns/cmp_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3/start \
  -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.campaigns.start('cmp_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3');
```

PHP:

```php
<?php

use SendKuy\SendKuy;

$sendkuy = new SendKuy('sk_live_YOUR_API_KEY');

$result = $sendkuy->campaigns()->start('cmp_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3');
```

Python:

```python
import requests

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

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