Passer au contenu

Update an email batch

Requête

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.

Sécurité
basicAuth
Chemin
BatchIdstring, (uuid)obligatoire
Corpsapplication/jsonobligatoire
IssuerNamestring
Subjectstring

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

ScheduledDatestring, (date-time)

Future execution date and time in UTC. Required when submitting a Draft or Invalid batch.

Statestring

Set Submitted to submit an editable batch or Draft to return a Submitted or Scheduled batch to editing.

Enum:"Draft""Submitted"
Descriptionstring, <= 255 characters
Fromstring
DisableSenderHeaderboolean
ReplyTostring
TimeToLiveinteger
CostCentrestring
CertificationLevelstring(EviMailBatchCertificationLevelValue)
Enum:"Standard""Advanced""Standard_CO""Standard_CR""Standard_EC""Standard_EU""Standard_MX""Standard_PE""Advanced_CO""Advanced_CR"
AffidavitKindsArray of strings(EviMailBatchAffidavitKindValue)
Items Enum:"Submitted""SubmittedAdvanced""TransmissionResult""DeliveryResult""Read""Committed""CommittedAdvanced""Closed""ClosedAdvanced""Complete"
Languagestring
AffidavitLanguagestring
OnlineRetentionPeriodinteger
LtaStorageboolean

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.

PushNotificationUrlstring, (uri)

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}.

PushNotificationFilterArray of strings(EviMailBatchPushNotificationValue)
Items Enum:"Ready""Sent""Dispatched""Delivered""Read""Replied""Closed""Failed""AffidavitPublished"
PushNotificationExtraDatastring
CommitmentOptionsstring
Enum:"Disabled""Accept""Reject""AcceptOrReject"
CommitmentCommentsAllowedboolean
RejectReasonsArray of strings
AcceptReasonsArray of strings
RequireRejectReasonboolean
RequireAcceptReasonboolean
DeliveryAppearancestring
Enum:"Certified""AsIs"
BatchPushNotificationUrlstring, (uri)

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}.

OwnerNotificationTemplatestring
curl -i -X PATCH \
  -u '<username>:<password>' \
  'https://api.evicertia.com/v2/EviMail/Batches/{BatchId}' \
  -H 'Content-Type: application/json' \
  -d '{
    "Subject": "Your March statement",
    "From": "sender@example.com",
    "TimeToLive": 1440,
    "OnlineRetentionPeriod": 1,
    "CommitmentOptions": "Disabled",
    "IssuerName": "Sender Corp.",
    "CertificationLevel": "Advanced_EU",
    "Language": "en",
    "State": "Submitted",
    "ScheduledDate": "2030-04-01T09:00:00Z"
  }'

Réponses

Batch updated.