# Create a campaign

> POST /campaigns. HeyRik API parameters and documented request and response examples.

Source: https://www.heyrik.com/docs/api-reference/campaigns/post-campaigns-create-a-campaign

POST https://server.heyrik.com/api/v1/campaigns

## Headers

Authorization: Bearer $HEYRIK_API_KEY (required). Keep your key on your server.

## Parameters

- agency_id (string, required): Agent that makes the calls.
- trunk_id (string, required): Number to dial FROM (a phone-number id).
- name (string): Label.
- file (multipart file): CSV/XLSX of leads. Optional — leads can be pushed later.
- phone_column (string): Which column holds the number. Default "phone".
- concurrency (number): Calls in flight at once. Default 1.
- schedule_at (string): ISO time to start automatically.

## Request example

```sh
curl -X POST https://server.heyrik.com/api/v1/campaigns \
  -H "Authorization: Bearer $HEYRIK_API_KEY" \
  -F "name=July outreach" \
  -F "agency_id=agc_9f2a1c30" \
  -F "trunk_id=sip_45723ca5" \
  -F "phone_column=phone" \
  -F "file=@leads.csv"
```

## Response example

```json
{
  "data": { "id": "cmp_4a19", "name": "July outreach", "status": "draft", "total": 250 }
}
```
