POST example/api/transactionmail/sendmailmessage

https://app.bwz.se/bedrock/example/api/transactionmail/sendmailmessage

Sends (or schedules) a TransactionMailMessage based on a MailMessage.

Request Information

URI Parameters

None.

Body Parameters

Should the email content be included in the transactionmail.sent webhook payload

SendTransactionMailMessageArgs
NameDescriptionTypeAdditional information
MailMessageId

The mail message that will be sent (as a transaction mail).

integer

Required

RecipientName

Sets the name of the recipient.

string

None.

RecipientEmail

Sets the e-mail address of the recipient.

string

Required

Valid email adress

SenderName

Sets the name of the mail-sender.

string

None.

SenderEmail

Sets the e-mail address of the mail-sender.

string

Valid email adress

FromName

Sets the name of the mail-from.

string

None.

FromEmail

Sets the e-mail address of the mail-from.

string

Valid email adress

ReplyTo

Sets the replyto address of the e-mail.

string

Valid email adress

Subject

Sets the subject line of the e-mail.

string

String length: inclusive between 0 and 512

ScheduledSendDate

Sets the date and time for when the e-mail will be sent.

date

None.

ExternalId

External id for the e-mail message.

string

String length: inclusive between 0 and 100

TransactionMailGroupId

Id of TransactionMailGroup (optional);

integer

None.

Attachments

Attachments to the TransactionMail.

Collection of AttachmentModel

None.

TrackOpenings

Flag to indicate wether to track openings.

boolean

None.

ExcludePublicationOptouts

Will not send to the recipient if he/she is in any publication optout list.

boolean

None.

ExcludeTotaloptouts

Will not send to the recipient if he/she is in total optout list.

boolean

None.

ExcludePreviousBounce

Will not send to the recipient if he/she is in the hard bounce list.

boolean

None.

TrackLinkClicks

Flag to indicate wether to track link clicks.

boolean

None.

LinkBaseUrl

Base-URL of the links.

string

None.

HtmlContentTagModels

Tags/variables to be replace in the html content

Collection of TagModel

None.

TextContentTagModels

Tags/variables to be replace in the text content

Collection of TagModel

None.

Headers

Custom headers to insert into the email MIME

Dictionary of string [key] and string [value]

None.

IncludeEmailDataInWebhookPayload

Should the email content be included in the transactionmail.sent webhook payload

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "MailMessageId": 1,
  "RecipientName": "sample string 2",
  "RecipientEmail": "sample string 3",
  "SenderName": "sample string 4",
  "SenderEmail": "sample string 5",
  "FromName": "sample string 6",
  "FromEmail": "sample string 7",
  "ReplyTo": "sample string 8",
  "Subject": "sample string 9",
  "ScheduledSendDate": "2024-11-21T17:30:32.584376+01:00",
  "ExternalId": "sample string 10",
  "TransactionMailGroupId": 1,
  "Attachments": [
    {
      "FileData": "QEA=",
      "FileNameWithExtension": "sample string 1",
      "MimeType": "sample string 2"
    },
    {
      "FileData": "QEA=",
      "FileNameWithExtension": "sample string 1",
      "MimeType": "sample string 2"
    }
  ],
  "TrackOpenings": true,
  "ExcludePublicationOptouts": true,
  "ExcludeTotaloptouts": true,
  "ExcludePreviousBounce": true,
  "TrackLinkClicks": true,
  "LinkBaseUrl": "sample string 16",
  "HtmlContentTagModels": [
    {
      "Name": "sample string 1",
      "Value": {}
    },
    {
      "Name": "sample string 1",
      "Value": {}
    }
  ],
  "TextContentTagModels": [
    {
      "Name": "sample string 1",
      "Value": {}
    },
    {
      "Name": "sample string 1",
      "Value": {}
    }
  ],
  "Headers": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "IncludeEmailDataInWebhookPayload": true
}

application/xml, text/xml

Sample:
<SendTransactionMailMessageArgs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.TransactionMail">
  <Attachments xmlns:d2p1="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models">
    <d2p1:AttachmentModel>
      <d2p1:FileData>QEA=</d2p1:FileData>
      <d2p1:FileNameWithExtension>sample string 1</d2p1:FileNameWithExtension>
      <d2p1:MimeType>sample string 2</d2p1:MimeType>
    </d2p1:AttachmentModel>
    <d2p1:AttachmentModel>
      <d2p1:FileData>QEA=</d2p1:FileData>
      <d2p1:FileNameWithExtension>sample string 1</d2p1:FileNameWithExtension>
      <d2p1:MimeType>sample string 2</d2p1:MimeType>
    </d2p1:AttachmentModel>
  </Attachments>
  <ExcludePreviousBounce>true</ExcludePreviousBounce>
  <ExcludePublicationOptouts>true</ExcludePublicationOptouts>
  <ExcludeTotaloptouts>true</ExcludeTotaloptouts>
  <ExternalId>sample string 10</ExternalId>
  <FromEmail>sample string 7</FromEmail>
  <FromName>sample string 6</FromName>
  <Headers xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Headers>
  <HtmlContentTagModels>
    <TagModel>
      <Name>sample string 1</Name>
      <Value>System.Object</Value>
    </TagModel>
    <TagModel>
      <Name>sample string 1</Name>
      <Value>System.Object</Value>
    </TagModel>
  </HtmlContentTagModels>
  <IncludeEmailDataInWebhookPayload>true</IncludeEmailDataInWebhookPayload>
  <LinkBaseUrl>sample string 16</LinkBaseUrl>
  <RecipientEmail>sample string 3</RecipientEmail>
  <RecipientName>sample string 2</RecipientName>
  <ReplyTo>sample string 8</ReplyTo>
  <ScheduledSendDate>2024-11-21T17:30:32.584376+01:00</ScheduledSendDate>
  <SenderEmail>sample string 5</SenderEmail>
  <SenderName>sample string 4</SenderName>
  <Subject>sample string 9</Subject>
  <TextContentTagModels>
    <TagModel>
      <Name>sample string 1</Name>
      <Value>System.Object</Value>
    </TagModel>
    <TagModel>
      <Name>sample string 1</Name>
      <Value>System.Object</Value>
    </TagModel>
  </TextContentTagModels>
  <TrackLinkClicks>true</TrackLinkClicks>
  <TrackOpenings>true</TrackOpenings>
  <TransactionMailGroupId>1</TransactionMailGroupId>
  <MailMessageId>1</MailMessageId>
</SendTransactionMailMessageArgs>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The sent (or scheduled) TransactionMailModel.

TransactionMailModel
NameDescriptionTypeAdditional information
TransactionMailId

Internal Id of the transaction mail used to retrieve statistics

integer

None.

RecipientName

Name of the e-mail recipient.

string

None.

RecipientEmail

E-mail address of the e-mail recipient.

string

None.

SenderName

Name of the mail-sender.

string

None.

SenderEmail

E-mail address of the mail-sender.

string

None.

FromName

Name of the mail-from.

string

None.

FromEmail

E-mail address of the mail-from.

string

None.

ReplyTo

Replyto address of the sender.

string

None.

Subject

Subject of the e-mail message.

string

None.

TrackOpenings

Flag that indicates wether openings will be tracked.

boolean

None.

TrackLinkClicks

Flag that indicates wether clicks will be tracked.

boolean

None.

LinkBaseUrl

Base-URL of used the tracking link clicks.

string

None.

ExternalId

External id for the e-mail message.

string

None.

ExcludeTotalOptouts

A flag that indicates wether to send if the recipient has made a total opt-out.

boolean

None.

ExcludePublicationOptouts

A flag that indicates wether to send if the recipient has made a regular opt-out from any publication.

boolean

None.

ExcludePreviousBounce

A flag that indicates wether to send if the recipient e-mail address has bounced.

boolean

None.

IsInternalMail

A flag that indicates wether it is an internal TransactionMail.

boolean

None.

CreationDate

Date and time when the TransactionMail was created.

date

None.

IncludeEmailDataInWebhookPayload

Should the email content be included in the transactionmail.sent webhook payload

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "TransactionMailId": 1,
  "RecipientName": "sample string 2",
  "RecipientEmail": "sample string 3",
  "SenderName": "sample string 4",
  "SenderEmail": "sample string 5",
  "FromName": "sample string 6",
  "FromEmail": "sample string 7",
  "ReplyTo": "sample string 8",
  "Subject": "sample string 9",
  "TrackOpenings": true,
  "TrackLinkClicks": true,
  "LinkBaseUrl": "sample string 12",
  "ExternalId": "sample string 13",
  "ExcludeTotalOptouts": true,
  "ExcludePublicationOptouts": true,
  "ExcludePreviousBounce": true,
  "IsInternalMail": true,
  "CreationDate": "2024-11-21T17:30:32.6000003+01:00",
  "IncludeEmailDataInWebhookPayload": true
}

application/xml, text/xml

Sample:
<TransactionMailModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.TransactionMail">
  <CreationDate>2024-11-21T17:30:32.6000003+01:00</CreationDate>
  <ExcludePreviousBounce>true</ExcludePreviousBounce>
  <ExcludePublicationOptouts>true</ExcludePublicationOptouts>
  <ExcludeTotalOptouts>true</ExcludeTotalOptouts>
  <ExternalId>sample string 13</ExternalId>
  <FromEmail>sample string 7</FromEmail>
  <FromName>sample string 6</FromName>
  <IncludeEmailDataInWebhookPayload>true</IncludeEmailDataInWebhookPayload>
  <IsInternalMail>true</IsInternalMail>
  <LinkBaseUrl>sample string 12</LinkBaseUrl>
  <RecipientEmail>sample string 3</RecipientEmail>
  <RecipientName>sample string 2</RecipientName>
  <ReplyTo>sample string 8</ReplyTo>
  <SenderEmail>sample string 5</SenderEmail>
  <SenderName>sample string 4</SenderName>
  <Subject>sample string 9</Subject>
  <TrackLinkClicks>true</TrackLinkClicks>
  <TrackOpenings>true</TrackOpenings>
  <TransactionMailId>1</TransactionMailId>
</TransactionMailModel>