digitaluapi

<back to all web services

SendGridMailTemplateRequest

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
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 .other suffix or ?format=other

HTTP + 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

{}