---
title: "Schedule a campaign"
method: PATCH
path: "/campaigns/{id}/schedule"
tags: ["campaigns"]
---

# Schedule a campaign

`PATCH /campaigns/{id}/schedule`

Schedule a campaign.

## Request body

- object
  - `scheduled_at` string, date-time, required — The date and time of the start of the campaign.
  - `source` string, required — The source email address that is sending the e-mail campaign.
  - `from_name` string, required — The name of the sender.
  - `segment_ids` integer[], required — Groups of subscribers that we'll send the campaign to. You can choose to send the campaign to multiple groups.
  - `default_template_data` object, required

## Response `200`

OK

- Message
  - `message` string — Response message.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `default` — Unexpected error

## Changes

- **2021-11-27** `75b3657b756c` — 1 breaking, 1 info
  - removed the media type `application/x-www-form-urlencoded` from the request body
  - added the media type `application/json` to the request body
- **2021-06-20** `e9157e76a1b7` — 1 breaking
  - the request property `scheduled_at` became required
- **2021-06-18** `bae0d80cd1ec` — 1 info
  - endpoint added
- **2021-05-18** `c686bd33a4a5` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/mailbadger/apis/mailbadger-api/changes/campaigns/:id/schedule/patch.md)

---

[API](https://skmtc.dev/mailbadger/apis/mailbadger-api.md) · [All operations](https://skmtc.dev/mailbadger/apis/mailbadger-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mailbadger/mailbadger-api/revisions/3a7ef49250a1/schema)
