# Update an email batch

Updates batch metadata and email template options. To submit a Draft or Invalid batch, send State Submitted and a future UTC ScheduledDate in the same request. To return a Submitted or Scheduled batch to editable state, send State Draft. Omitted or empty AcceptReasons and RejectReasons clear the stored lists. Before submission, the batch needs a body and at least one recipient, plus Subject, a permitted From, TimeToLive greater than 0, OnlineRetentionPeriod from 1 to 20 years, CommitmentOptions, and CertificationLevel. New batches have no defaults for these fields.

Endpoint: PATCH /v2/EviMail/Batches/{BatchId}
Version: 1.0
Security: basicAuth

## Security:

  - `basicAuth` (unknown)
    http basic

## Path parameters:

  - `BatchId` (string, required)

## Request fields (application/json):

  - `IssuerName` (string)

  - `Subject` (string)
    Subject line of the email. (The body is set with the Body endpoint.)

  - `ScheduledDate` (string)
    Future execution date and time in UTC. Required when submitting a Draft or Invalid batch.

  - `State` (string)
    Set Submitted to submit an editable batch or Draft to return a Submitted or Scheduled batch to editing.
    Enum: "Draft", "Submitted"

  - `Description` (string)

  - `From` (string)

  - `DisableSenderHeader` (boolean)

  - `ReplyTo` (string)

  - `TimeToLive` (integer)

  - `CostCentre` (string)

  - `CertificationLevel` (string)
    Enum: "Standard", "Advanced", "Standard_CO", "Standard_CR", "Standard_EC", "Standard_EU", "Standard_MX", "Standard_PE", "Advanced_CO", "Advanced_CR", "Advanced_EC", "Advanced_EU", "Advanced_MX", "Advanced_PE"

  - `AffidavitKinds` (array)

  - `Language` (string)

  - `AffidavitLanguage` (string)

  - `OnlineRetentionPeriod` (integer)

  - `LtaStorage` (boolean)
    Enables post-close LTA storage for every email generated from the batch. Each email is stored after its own tracking reaches `Closed`. Requires LTA to be enabled for the site.

  - `PushNotificationUrl` (string)
    Push notification URL propagated to every email generated from the batch — it becomes each email's own callback URL for the normal per-email lifecycle callbacks. Alias of `BatchPushNotificationUrl` (both set the same value; if both are supplied, this one is applied last). The batch itself has no separate lifecycle callback — track batch progress with `GET .../{BatchId}`.

  - `PushNotificationFilter` (array)

  - `PushNotificationExtraData` (string)

  - `CommitmentOptions` (string)
    Enum: "Disabled", "Accept", "Reject", "AcceptOrReject"

  - `CommitmentCommentsAllowed` (boolean)

  - `RejectReasons` (array)

  - `AcceptReasons` (array)

  - `RequireRejectReason` (boolean)

  - `RequireAcceptReason` (boolean)

  - `DeliveryAppearance` (string)
    Enum: "Certified", "AsIs"

  - `BatchPushNotificationUrl` (string)
    Alias of `PushNotificationUrl` — both set the same value. It is propagated to every email generated from the batch as that email's own callback URL; the batch has no separate lifecycle callback. Track batch progress with `GET .../{BatchId}`.

  - `OwnerNotificationTemplate` (string)

## Response 200:

  - `200` (unknown)
    Batch updated.

## Response 400:

  - `400` (unknown)
    Invalid update, insufficient credit, or incompatible voucher tier.

## Response 401:

  - `401` (unknown)
    Authentication failed

## Response 403:

  - `403` (unknown)
    The user lacks permission to send batches, or the site does not use by-submission billing.

## Response 404:

  - `404` (unknown)
    No batch with the given BatchId was found.

