# Update a campaign

> All fields optional: send only what you want to change.

Source: https://warmerly.com/docs/campaigns/update-a-campaign

```text
PATCH /campaigns/{id}
```

All fields optional: send only what you want to change.

| Field | Type |
| --- | --- |
| `name` | string (1-200 chars) |
| `status` | `"draft" \\| "active" \\| "paused" \\| "completed" \\| "archived"` |
| `dailyLimit` | integer (1-50000) |
| `stopOnReply` | boolean |
| `stopOnAutoReply` | boolean |
| `trackOpens` | boolean |
| `trackClicks` | boolean |
| `plainTextOnly` | boolean |
| `sendingDays` | integer[] (0-6, 0 = Sunday) |
| `sendingHourStart` | integer (0-23) |
| `sendingHourEnd` | integer (0-23) |
| `timezone` | valid IANA timezone string |
| `recipientWindowHourStart` / `recipientWindowHourEnd` | integer (0-23) |
| `minWaitMinutes` | integer (0-1440) |
| `rampEnabled` | boolean |
| `rampStartPerSender` | integer (1-500) |
| `rampMaxPerSender` | integer (1-500) |
| `rampStepPerDay` | integer (1-100) |
| `assignedToUserId` | UUID or `null` |
| `targetReplies` | integer (0-1000000) or `null` |
| `targetLeads` | integer (0-1000000) or `null` |
| `brief` | `{ senderContext, offer, icp, tone? }` (strings, up to 2000 characters each, `tone` up to 200) or `null` |

Fields not in this table are ignored without an error. A body that fails validation returns `400 bad_request` with a message naming the field.

`status: "paused"` and `status: "active"` behave exactly like [pause](https://warmerly.com/docs/campaigns/update-a-campaign#pause-a-campaign) and [resume](https://warmerly.com/docs/campaigns/update-a-campaign#resume-a-campaign): only an active campaign can be paused and only a paused one resumed (otherwise `409 conflict`), and they must be sent without other fields (otherwise `400 bad_request`). Setting `"draft"`, `"completed"` or `"archived"` is a plain write. To launch a draft, completed or archived campaign, use `POST /campaigns/{id}/start`.

```bash
curl -X PATCH https://app.warmerly.com/api/v1/campaigns/b6a1e7b0-2f2b-4b7a-8e2a-1a2b3c4d5e6f \
  -H "X-Api-Key: wmv_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ "dailyLimit": 75, "sendingHourStart": 8, "sendingHourEnd": 18 }'
```

```json
{ "campaign": { "id": "b6a1e7b0-2f2b-4b7a-8e2a-1a2b3c4d5e6f", "dailyLimit": 75, "sendingHourStart": 8, "sendingHourEnd": 18, "...": "..." } }
```

To change `status` directly, use `PATCH` with `{ "status": "..." }`, or prefer the dedicated [`start`](https://warmerly.com/docs/campaigns/update-a-campaign#start-a-campaign), [`pause`](https://warmerly.com/docs/campaigns/update-a-campaign#pause-a-campaign), and [`resume`](https://warmerly.com/docs/campaigns/update-a-campaign#resume-a-campaign) actions below, which also validate that the campaign is actually ready to send.

## More from Campaigns

- [Get a campaign](https://warmerly.com/docs/campaigns/get-a-campaign): Returns 404 notfound if the campaign doesn't exist and 403 forbidden if it belongs to a workspace you are…
- [Delete a campaign](https://warmerly.com/docs/campaigns/delete-a-campaign): Deletes the campaign and cascades to its steps, senders, leads, and send history. This cannot be undone.
- [Start a campaign](https://warmerly.com/docs/campaigns/start-a-campaign): Validates the campaign is ready, then flips it to active and sets startedAt (on first start only, later…
