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

export class EmailAddress
{
    public Name: string;
    public Email: string;

    public constructor(init?: Partial<EmailAddress>) { (Object as any).assign(this, init); }
}

export class Personalization
{
    public Tos: EmailAddress[];
    public Ccs: EmailAddress[];
    public Bccs: EmailAddress[];
    public From: EmailAddress;
    public Subject: string;
    public Headers: { [index:string]: string; };
    public Substitutions: { [index:string]: string; };
    public CustomArgs: { [index:string]: string; };
    public SendAt?: number;
    public TemplateData: Object;

    public constructor(init?: Partial<Personalization>) { (Object as any).assign(this, init); }
}

export class SendGridMailTemplateRequest
{
    public From: EmailAddress;
    public Subject: string;
    public TemplatesId: string;
    public APIKey: string;
    public Personalizations: Personalization[];

    public constructor(init?: Partial<SendGridMailTemplateRequest>) { (Object as any).assign(this, init); }
}

TypeScript SendGridMailTemplateRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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/jsv
Content-Type: text/jsv
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/jsv
Content-Length: length

{
	
}