| Requires any of the roles: | Client, Admin, Partner |
| All Verbs | /sendmail/sendgridtemplate |
|---|
namespace digitaluapi.ServiceInterface
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type EmailAddress() =
member val Name:String = null with get,set
member val Email:String = null with get,set
[<AllowNullLiteral>]
type Personalization() =
member val Tos:ResizeArray<EmailAddress> = null with get,set
member val Ccs:ResizeArray<EmailAddress> = null with get,set
member val Bccs:ResizeArray<EmailAddress> = null with get,set
member val From:EmailAddress = null with get,set
member val Subject:String = null with get,set
member val Headers:Dictionary<String, String> = null with get,set
member val Substitutions:Dictionary<String, String> = null with get,set
member val CustomArgs:Dictionary<String, String> = null with get,set
member val SendAt:Nullable<Int64> = new Nullable<Int64>() with get,set
member val TemplateData:Object = null with get,set
[<AllowNullLiteral>]
type SendGridMailTemplateRequest() =
member val From:EmailAddress = null with get,set
member val Subject:String = null with get,set
member val TemplatesId:String = null with get,set
member val APIKey:String = null with get,set
member val Personalizations:ResizeArray<Personalization> = null with get,set
F# SendGridMailTemplateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /sendmail/sendgridtemplate HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SendGridMailTemplateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceInterface">
<APIKey>String</APIKey>
<From xmlns:d2p1="http://schemas.datacontract.org/2004/07/SendGrid.Helpers.Mail">
<d2p1:Email>String</d2p1:Email>
<d2p1:Name>String</d2p1:Name>
</From>
<Personalizations xmlns:d2p1="http://schemas.datacontract.org/2004/07/SendGrid.Helpers.Mail">
<d2p1:Personalization>
<d2p1:Bccs>
<d2p1:EmailAddress>
<d2p1:Email>String</d2p1:Email>
<d2p1:Name>String</d2p1:Name>
</d2p1:EmailAddress>
</d2p1:Bccs>
<d2p1:Ccs>
<d2p1:EmailAddress>
<d2p1:Email>String</d2p1:Email>
<d2p1:Name>String</d2p1:Name>
</d2p1:EmailAddress>
</d2p1:Ccs>
<d2p1:CustomArgs xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</d2p1:CustomArgs>
<d2p1:From>
<d2p1:Email>String</d2p1:Email>
<d2p1:Name>String</d2p1:Name>
</d2p1:From>
<d2p1:Headers xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</d2p1:Headers>
<d2p1:SendAt>0</d2p1:SendAt>
<d2p1:Subject>String</d2p1:Subject>
<d2p1:Substitutions xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</d2p1:Substitutions>
<d2p1:TemplateData />
<d2p1:Tos>
<d2p1:EmailAddress>
<d2p1:Email>String</d2p1:Email>
<d2p1:Name>String</d2p1:Name>
</d2p1:EmailAddress>
</d2p1:Tos>
</d2p1:Personalization>
</Personalizations>
<Subject>String</Subject>
<TemplatesId>String</TemplatesId>
</SendGridMailTemplateRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />