digitaluapi

<back to all web services

SendGridSingleMailRequest

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
Content-Type: application/json
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: application/json
Content-Length: length

{}