| 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: sfgboxapi.dev.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
{
}