# Create campaign (/api-reference/campaigns/createCampaign)

`POST /campaigns`

Base URL: `https://next-api.useplunk.com`

Create a new email campaign

## Request body

- `name`: string (required) — Campaign name
- `description`: string — Campaign description
- `subject`: string (required) — Email subject line
- `body`: string (required) — HTML email body
- `from`: string (email) (required) — Sender email address (must be from verified domain)
- `fromName`: string — Sender name
- `replyTo`: string (email) — Reply-to email address
- `audienceType`: enum ("ALL" | "SEGMENT" | "FILTERED") (required) — Target audience type
- `segmentId`: string — Segment ID (required if audienceType is SEGMENT)
- `audienceFilter`: object — Filter conditions (required if audienceType is FILTERED)

Example:

```json
{
  "name": "string",
  "subject": "string",
  "body": "string",
  "from": "user@example.com",
  "audienceType": "ALL"
}
```

## Responses

### `200` — Campaign created

- `success`: boolean
- `data`: object
  - `id`: string
  - `name`: string
  - `subject`: string
  - `type`: enum ("ALL" | "SEGMENT" | "FILTERED")
  - `status`: enum ("DRAFT" | "SCHEDULED" | "SENDING" | "SENT")
  - `scheduledAt`: string (date-time)

```json
{
  "success": false,
  "data": {
    "id": "string",
    "name": "string",
    "subject": "string",
    "type": "ALL",
    "status": "DRAFT",
    "scheduledAt": "2026-05-17T18:27:16.082Z"
  }
}
```

## Example request

```bash
curl -X POST 'https://next-api.useplunk.com/campaigns' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"string","subject":"string","body":"string","from":"user@example.com","audienceType":"ALL"}'
```
