---
title: "Create a new mailing"
method: POST
path: "/mailings"
tags: ["Mailings"]
---

# Create a new mailing

`POST /mailings`

Create a new mailing scheduled to be sent.

## Request body

- MailingInput
  - `subject` string, required
  - `language` string, required — en_ca or fr_ca
  - `groups` string, required — CSV list of group IDs to send the mailing to
  - `sendAt` string, required — Date and time to start sending. Format: yyyy-mm-dd HH:mm:ss
  - `replyTo` string
  - `fromName` string
  - `mailFrom` string — The email address to put as From: for the mailing. This must be a [validated sender email address](https://faq.cyberimpact.com/en/articles/126) in your account.
  - `bodyHtml` string — HTML body. At least one of bodyHtml or bodyText is required.
  - `bodyText` string — Plain text body. At least one of bodyHtml or bodyText is required.
  - `googleAnalytics` boolean
  - `googleAnalyticsCampaign` string
  - `mailingStatistics` 'detailed' | 'anonymized' — 'detailed' (default) or 'anonymized' to anonymize click/open statistics
  - `updateProfileForm` number — Update profile form ID to include at the bottom of the mailing

## Response `201`

The mailing representation

- MailingDetail
  - `id` integer
  - `subject` string
  - `language` string
  - `startedOn` string, nullable
  - `scheduledOn` string, nullable
  - `replyTo` string
  - `bodyHtml` string
  - `bodyText` string
  - `recipientsCount` integer
  - `emailsSent` integer
  - `emailsDelivered` integer
  - `emailsStopped` integer
  - `views` integer
  - `clicks` integer
  - `sentToFriend` integer
  - `incorrectAddresses` integer
  - `technicalProblems` integer
  - `deliveryRate` number
  - `clickRate` number
  - `viewRate` number
  - `status` string
  - `mailFrom` string
  - `fromName` string
  - `mailingStatistics` string
  - `links` object[]
    - `id` integer
    - `url` string
    - `clicksUnique` integer
    - `clicksTotal` integer
  - `recipientGroups` object[]
    - `id` integer
    - `title` string
  - `viewOnlineURL` string

## Other responses

- `400` — Bad request
- `401` — Unauthorized

---

[API](https://skmtc.net/cyberimpact/apis/cyberimpact-api.md) · [All operations](https://skmtc.net/cyberimpact/apis/cyberimpact-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cyberimpact/cyberimpact-api/revisions/bf0b51ee8e8a/schema)
