> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update email campaign

> Update email campaign through the Brevo API.

`brevo.updateEmailCampaign` update email campaign through the Brevo API.

## Example

```ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { brevo } from "automate.ax/brevo"

export default automation("Update email campaign", () => {
  onDashboardRun({ title: "Update email campaign" })

  brevo.updateEmailCampaign({ campaignId: 42, subject: "Updated launch" })
})
```

## Inputs and output

Inputs:

```ts theme={null}
{
  campaignId: number
  recurring?: boolean
  name?: string
  sender?: { id: number; name?: string } | { email: string; name?: string }
  subject?: string
  htmlContent?: string
  htmlUrl?: string
  templateId?: number
  recipients?: {
    listIds?: number[]
    segmentIds?: number[]
    exclusionListIds?: number[]
    exclusionSegmentIds?: number[]
  }
  scheduledAt?: string
  abTesting?: boolean
  subjectA?: string
  subjectB?: string
  splitRule?: number
  winnerCriteria?: "open" | "click"
  winnerDelay?: number
  sendAtBestTime?: boolean
  ipWarmupEnable?: boolean
  initialQuota?: number
  increaseRate?: number
  emailExpirationDate?: { duration: number; unit: "days" | "weeks" | "months" }
  attachmentUrl?: string
  footer?: string
  header?: string
  inlineImageActivation?: boolean
  mirrorActive?: boolean
  params?: Record<string, unknown>
  previewText?: string
  replyTo?: string
  tag?: string
  toField?: string
  unsubscriptionPageId?: string
  updateFormId?: string
  utmCampaign?: string
  utmContent?: string
  utmTerm?: string
}
```

`campaignId` and other IDs are positive integers; `scheduledAt` is an ISO 8601 timestamp with an offset; email and URL fields must be valid. `splitRule` is 1–50, `winnerDelay` is 1–168 hours, `initialQuota` is at least 2, and `increaseRate` is 0–100. Expiration is limited to 3,600 days, 480 weeks, or 120 months. Optional fields have no implicit default.

Completes without a value. Provide `campaignId` and the fields to change. Content sources remain mutually exclusive. A/B testing can't use best-time sending and follows the same subject, split, and winner requirements as creation. `recurring` controls repeat delivery for trigger campaigns. IP warmup requires both `initialQuota` and `increaseRate`. Pass `{ account }` as the second argument to select a named Brevo account binding.
