| Requires any of the roles: | Client, Admin, Partner |
| All Verbs | /sendmail/sendgridtemplate |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports digitaluapi.ServiceInterface
Imports SendGrid.Helpers.Mail
Namespace Global
Namespace digitaluapi.ServiceInterface
Public Partial Class SendGridMailTemplateRequest
Public Overridable Property From As EmailAddress
Public Overridable Property Subject As String
Public Overridable Property TemplatesId As String
Public Overridable Property APIKey As String
Public Overridable Property Personalizations As List(Of Personalization)
End Class
End Namespace
Namespace SendGrid.Helpers.Mail
Public Partial Class EmailAddress
Public Overridable Property Name As String
Public Overridable Property Email As String
End Class
Public Partial Class Personalization
Public Overridable Property Tos As List(Of EmailAddress)
Public Overridable Property Ccs As List(Of EmailAddress)
Public Overridable Property Bccs As List(Of EmailAddress)
Public Overridable Property From As EmailAddress
Public Overridable Property Subject As String
Public Overridable Property Headers As Dictionary(Of String, String)
Public Overridable Property Substitutions As Dictionary(Of String, String)
Public Overridable Property CustomArgs As Dictionary(Of String, String)
Public Overridable Property SendAt As Long?
Public Overridable Property TemplateData As Object
End Class
End Namespace
End Namespace
VB.NET SendGridMailTemplateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"From":{"Name":"String","Email":"String"},"Subject":"String","TemplatesId":"String","APIKey":"String","Personalizations":[{"Tos":[{"Name":"String","Email":"String"}],"Ccs":[{"Name":"String","Email":"String"}],"Bccs":[{"Name":"String","Email":"String"}],"From":{"Name":"String","Email":"String"},"Subject":"String","Headers":{"String":"String"},"Substitutions":{"String":"String"},"CustomArgs":{"String":"String"},"SendAt":0,"TemplateData":{}}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{}