| Requires any of the roles: | Client, Admin, Partner |
| All Verbs | /sendmail/sendgrid/single |
|---|
"use strict";
export class EmailAddress {
/** @param {{Name?:string,Email?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Name;
/** @type {string} */
Email;
}
export class SendGridSingleMailRequest {
/** @param {{To?:EmailAddress,Subject?:string,TemplateId?:string,ReplyToEmail?:EmailAddress,FromEmail?:EmailAddress,PlaintText?:string,HtmlText?:string,APIKey?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {EmailAddress} */
To;
/** @type {string} */
Subject;
/** @type {string} */
TemplateId;
/** @type {EmailAddress} */
ReplyToEmail;
/** @type {EmailAddress} */
FromEmail;
/** @type {string} */
PlaintText;
/** @type {string} */
HtmlText;
/** @type {string} */
APIKey;
}
JavaScript SendGridSingleMailRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /sendmail/sendgrid/single HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
To:
{
Name: String,
Email: String
},
Subject: String,
TemplateId: String,
ReplyToEmail:
{
Name: String,
Email: String
},
FromEmail:
{
Name: String,
Email: String
},
PlaintText: String,
HtmlText: String,
APIKey: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
}