Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

MailingWebservice

Query, create, update, remove or start mailings as well as send emails on demand in Optimizely Campaign.

MethodDescription
cancelCancels a running mailing.
copyCreates a copy of an existing mailing.
createCreates a mailing.
decodeTrackingLinksConverts all links found in the given content back to normal links.
encodeTrackingLinksConverts all links found in the given content to tracking links.
getAttachmentIdsQueries the IDs of one or more attachments of a mailing.
getCharsetQueries the character set for the content (subject + body) of a mailing.
getColumnNamesQueries the column names of each mailing.
getContentQueries the content of a mailing of a specific MIME type.
getCountCounts mailings of a specific type.
getCreatedDateQueries the creation date of a mailing.
getDataSetQueries the data of each mailing.
getDataSetFlatQueries the values of each mailing.
getDescriptionQueries the description of a mailing.
getFailedRecipientCountCounts the recipients that have been skipped during dispatch.
getFromEmailPrefixQueries the email prefix of the sender of a mailing.
getFromNameQueries the name (not the email address) of the sender of a mailing.
getHeaderQueries the header value of a mailing.
getIdsQueries the IDs of all mailings of a specific type.
getIdsInStatusQueries the IDs of all mailings of a specific type and status.
getMaxMailsPerHourQueries the maximum sending rate (emails per hour) of a mailing.
getMaxRecipientsQueries the value of the option Maximum number of recipients.
getMimeTypeQueries the MIME type of a mailing.
getNameQueries the name of a mailing.
getOverallRecipientCountCounts the recipients to whom a mailing was sent or tried to send.
getPredictedRecipientCountCounts the recipients that will receive a mailing once it is started.
getPropertyQueries the value of a specific mailing property.
getRecipientFilterIdsQueries the target group IDs of a mailing.
getRecipientListIdsQueries the IDs of the recipient lists of a mailing.
getScheduleDateQueries the sending date of a mailing.
getSendingFinishedDateQueries the date at which the sending of a mailing finished.
getSendingStartedDateQueries the date at which a mailing was started.
getSendingStatusQueries the sending status of a mailing to a specific recipient.
getSentRecipientCountCounts the recipients to whom a mailing was successfully sent.
getStatusQueries the status of a mailing.
isClickTrackingEnabledQueries whether click tracking is activated for a mailing.
isDefaultRecipientFilterEnabledQueries whether the default target group is used for a mailing.
isMaxRecipientsPercentageQueries whether the maximum number of recipients is given as a percentaged value.
isMaxRecipientsRandomOrderQueries whether the recipients should be selected on a random basis.
isOpenTrackingEnabledQueries whether open tracking is activated for a mailing.
pausePauses a mailing that is in the status SENDING.
removeDeletes a mailing.
restartResends a mailing.
resumeResumes a paused mailing.
sendMailSends a mailing to a recipient.
sendMailsSends a mailing to multiple recipients.
sendTestMailSends a test email to a recipient.
sendTestMail2Sends a test email to a recipient.
sendTestMailsSends test emails to multiple recipients.
sendTestMailToAllSends test emails to all recipients of a specific recipient list.
setAttachmentIdsDefines the IDs for one or more attachments of a mailing.
setCharsetDefines the character set for the content (subject + body) of a mailing.
setClickTrackingEnabledActivates or deactivates click tracking for a mailing of a specific MIME type (click tracking is set separately for the two MIME types).
setContentDefines the content for a mailing of a specific MIME type.
setDefaultRecipientFilterEnabledActivates or deactivates the default target group.
setDescriptionDefines the description of a mailing.
setFromDefines the sender identification of a mailing.
setHeaderDefines a RFC822-compliant header value.
setMaxMailsPerHourDefines the maximum sending rate (emails per hour) for a mailing.
setMaxRecipientsActivates or deactivates the options Maximum number of recipients and Random order and sets absolute values for them.
setMaxRecipientsPercentageActivates or deactivates the options Maximum number of recipients and Random order and sets absolute percentaged values for them (a float from 0 to 1).
setMimeTypeDefines the MIME type of a mailing.
setNameDefines the name of a mailing.
setOpenTrackingEnabledActivates or deactivates open tracking for a mailing.
setPropertyDefines the value of a specific mailing property.
setRecipientFilterIdsDefines target group IDs for a mailing.
setRecipientListIdsDefines the IDs of the recipient lists to be used for a mailing.
setReplyToAddressDefines the the reply to address for a mailing.
setReplyToNameDefines the displayed name for the reply address (reply to).
setSubjectDefines the subject of a mailing.
startStarts a mailing.
validateContentValidates the content of a mailing.

Deprecated methods

MethodDescription
getRecipientFilterIdUse getRecipientFilterIds.
setRecipientFilterIdUse setRecipientFilterIds.

Mailing type

The following mailing types are supported:

  • regular: This is a regular mailing.
  • event: This mailing type is used for trigger emails. After the mailing has been started you can send mails to any recipient.
  • confirmation: Used for opt-in processes only, see OptinProcessWebservice.
  • template: Can only be copied. Cannot be started and no emails can be sent.
  • campaign: All mailings of a campaign (not the campaign itself).
  • split: This is a split mailing of an A/B test.

MIME types

The following MIME types are supported:

  • text/plain: Text emails
  • text/html: HTML emails
  • multipart/alternative: Text and HTML emails
  • text/optivosms: SMS messages

Next