---
title: "Create a campaign"
method: POST
path: "/api/v1/campaigns"
tags: ["Campaigns"]
---

# Create a campaign

`POST /api/v1/campaigns`

## Request

- Base URL: `https://api.misar.io/mail`
- URL: `https://api.misar.io/mail/api/v1/campaigns`
- Auth: HTTP bearer

## Request body

- CreateCampaignRequest
  - `name` string, required
  - `description` string
  - `subject` string, required
  - `fromName` string, required
  - `fromEmail` string, email, required
  - `replyTo` string, email
  - `bodyHtml` string
  - `bodyText` string
  - `templateId` string, uuid
  - `segmentId` string, uuid
  - `scheduledAt` string, date-time

## Response `201`

Campaign created

- object
  - `success` boolean
  - `data` Campaign
    - `id` string, uuid
    - `name` string
    - `subject` string
    - `status` 'draft' | 'scheduled' | 'sending' | 'sent' | 'paused' | 'cancelled'
    - `from_email` string, email
    - `from_name` string
    - `total_recipients` integer
    - `total_sent` integer
    - `total_opened` integer
    - `total_clicked` integer
    - `total_bounced` integer
    - `total_complained` integer
    - `total_unsubscribed` integer
    - `scheduled_at` string, date-time, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400`: Validation error

---

[API](https://skmtc.dev/misar/apis/misarmail-api.md) · [All operations](https://skmtc.dev/misar/apis/misarmail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/misar/apis/misarmail-api/revisions/1141238bc092?raw)
