POST example/api/MailMessage

https://app.bwz.se/bedrock/example/api/MailMessage

Creates a MailMessage.

Request Information

URI Parameters

None.

Body Parameters

Preheader text of the MailMessage

CreateMailMessageArgs
NameDescriptionTypeAdditional information
Name

Sets the name.

string

Required

Valid name with max 256 characters

Description

Sets the description.

string

None.

PublicationId

Sets the Publication the MailMessage belongs to.

integer

Required

SenderName

Sets the name of the sender.

string

None.

SenderEmail

Sets the e-mail address of the sender.

string

Empty or a valid email adress

ReplyTo

Sets the reply-to address.

string

Empty or a valid email adress

Subject

Sets the subject.

string

None.

UseStatistics

Determines wether the statistics should be gathered for the MailMessage.

boolean

None.

ScheduledSendDate

Sets date and time when the MailMessage will be sent.

date

None.

HtmlContentId

Sets the HTML Content ID of the MailMessage.

integer

None.

TextContentId

Sets the text Content ID of the MailMessage.

integer

None.

EventInviteModel

A model contining information about the EventInvite

EventInviteModel

None.

MailTemplateId

Id of the MailTemplate to use

integer

None.

Preheader

Preheader text of the MailMessage

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "Description": "sample string 2",
  "PublicationId": 3,
  "SenderName": "sample string 4",
  "SenderEmail": "sample string 5",
  "ReplyTo": "sample string 6",
  "Subject": "sample string 7",
  "UseStatistics": true,
  "ScheduledSendDate": "2024-11-24T00:10:48.0723745+01:00",
  "HtmlContentId": 1,
  "TextContentId": 1,
  "EventInviteModel": {
    "EventId": 1
  },
  "MailTemplateId": 1,
  "Preheader": "sample string 9"
}

application/xml, text/xml

Sample:
<CreateMailMessageArgs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.MailMessage">
  <Description>sample string 2</Description>
  <EventInviteModel>
    <EventId>1</EventId>
  </EventInviteModel>
  <HtmlContentId>1</HtmlContentId>
  <MailTemplateId>1</MailTemplateId>
  <Name>sample string 1</Name>
  <Preheader>sample string 9</Preheader>
  <PublicationId>3</PublicationId>
  <ReplyTo>sample string 6</ReplyTo>
  <ScheduledSendDate>2024-11-24T00:10:48.0723745+01:00</ScheduledSendDate>
  <SenderEmail>sample string 5</SenderEmail>
  <SenderName>sample string 4</SenderName>
  <Subject>sample string 7</Subject>
  <TextContentId>1</TextContentId>
  <UseStatistics>true</UseStatistics>
</CreateMailMessageArgs>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The MailMessageModel that has been created.

MailMessageModel
NameDescriptionTypeAdditional information
Id

Id of the MailMessage.

integer

None.

Name

Name of the MailMessage.

string

None.

CreatedByUserId

Id of the User creating the MailMessage.

integer

None.

MessageStatus

The MessageStatus of the MailMessage.

MessageStatus

None.

CreationDate

Date and time when the MailMessage was created.

date

None.

ModifiedDate

Date and time when the MailMessage was last modified.

date

None.

PublicationId

Id the of Publication the MailMessage belongs to.

integer

None.

Description

Description of the MailMessage.

string

None.

SenderName

Sender name of the MailMessage.

string

None.

SenderEmail

Email address of the sender of the MailMessage.

string

None.

ReplyTo

Reply-to address of the MailMessage.

string

None.

Subject

Subject of the MailMessage.

string

None.

UseStatistics

A flag indicating if the MailMessage will gather statistics when sent.

boolean

None.

HtmlContentId

Id of the Content holding the HTML content of the MailMessage.

integer

None.

TextContentId

Id of the Content holding the text content of the MailMessage.

integer

None.

ScheduledSendDate

Date and time when the MailMessage will be sent.

date

None.

MailTemplateId

Id of the MailTemplate used for the MailMessage

integer

None.

Preheader

Preheader text of the MailMessage

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Name": "sample string 2",
  "CreatedByUserId": 3,
  "MessageStatus": 0,
  "CreationDate": "2024-11-24T00:10:48.0879988+01:00",
  "ModifiedDate": "2024-11-24T00:10:48.0879988+01:00",
  "PublicationId": 6,
  "Description": "sample string 7",
  "SenderName": "sample string 8",
  "SenderEmail": "sample string 9",
  "ReplyTo": "sample string 10",
  "Subject": "sample string 11",
  "UseStatistics": true,
  "HtmlContentId": 1,
  "TextContentId": 1,
  "ScheduledSendDate": "2024-11-24T00:10:48.0879988+01:00",
  "MailTemplateId": 1,
  "Preheader": "sample string 13"
}

application/xml, text/xml

Sample:
<MailMessageModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.MailMessage">
  <CreatedByUserId>3</CreatedByUserId>
  <CreationDate>2024-11-24T00:10:48.0879988+01:00</CreationDate>
  <Description>sample string 7</Description>
  <HtmlContentId>1</HtmlContentId>
  <Id>1</Id>
  <MailTemplateId>1</MailTemplateId>
  <MessageStatus>NotReadyToSend</MessageStatus>
  <ModifiedDate>2024-11-24T00:10:48.0879988+01:00</ModifiedDate>
  <Name>sample string 2</Name>
  <Preheader>sample string 13</Preheader>
  <PublicationId>6</PublicationId>
  <ReplyTo>sample string 10</ReplyTo>
  <ScheduledSendDate>2024-11-24T00:10:48.0879988+01:00</ScheduledSendDate>
  <SenderEmail>sample string 9</SenderEmail>
  <SenderName>sample string 8</SenderName>
  <Subject>sample string 11</Subject>
  <TextContentId>1</TextContentId>
  <UseStatistics>true</UseStatistics>
</MailMessageModel>