---
title: "/campaigns"
method: POST
path: "/campaigns"
---

# /campaigns

`POST /campaigns`

Create campaign where you will use your custom HTML template [Rate limited]

## Request body

- object
  - `type` string, required — Type of campaign. Available values: regular, ab.
  - `name` string, required — The internal name for the campaign
  - `groups` integer[], required — IDs of groups. Required if segments are not specified.
  - `segments` integer[], required — IDs of segments. Required if groups are not specified. If specified, groups are ignored. If you're using legacy subscriber management, this parameter will be ignored.
  - `subject` string — Mail subject. Required if campaign type is regular.
  - `from` string — Email of sender
  - `from_name` string — Name of sender
  - `language` string — Available languages and its code's: https://developers-classic.mailerlite.com/reference#language
  - `ab_settings` object — Required if campaign type is ab. More details are below.

## Response `200`

200

- object
  - `campaign_type` string
  - `date` string
  - `account_id` integer
  - `id` integer
  - `mail_id` integer
  - `options` object
    - `current_step` string
    - `send_type` string
    - `campaign_type` string
    - `date` string

## Other responses

- `400` — 400

---

[API](https://skmtc.net/mailerlite/apis/v2-production.md) · [All operations](https://skmtc.net/mailerlite/apis/v2-production/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mailerlite/v2-production/versions/69f06eb37b28/schema)
