| POST | /sendgridevents |
|---|
"use strict";
export class SendGridEvent {
/** @param {{sg_event_id?:string,sg_message_id?:string,email?:string,timestamp?:number,smtp_id?:string,event?:string,type?:string,category?:string[],reason?:string,status?:string,userAgent?:string,ip?:string,url?:string,url_offset?:string,sg_machine_open?:boolean,tls?:string,unique_args?:{ [index:string]: string; },custom_args?:{ [index:string]: string; },marketing_campaign_id?:string,marketing_campaign_name?:string,singlesend_id?:string,singlesend_name?:string,bounce_classification?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
sg_event_id;
/** @type {?string} */
sg_message_id;
/** @type {?string} */
email;
/** @type {number} */
timestamp;
/** @type {?string} */
smtp_id;
/** @type {?string} */
event;
/** @type {?string} */
type;
/** @type {?string[]} */
category;
/** @type {?string} */
reason;
/** @type {?string} */
status;
/** @type {?string} */
userAgent;
/** @type {?string} */
ip;
/** @type {?string} */
url;
/** @type {?string} */
url_offset;
/** @type {boolean} */
sg_machine_open;
/** @type {?string} */
tls;
/** @type {?{ [index:string]: string; }} */
unique_args;
/** @type {?{ [index:string]: string; }} */
custom_args;
/** @type {?string} */
marketing_campaign_id;
/** @type {?string} */
marketing_campaign_name;
/** @type {?string} */
singlesend_id;
/** @type {?string} */
singlesend_name;
/** @type {?string} */
bounce_classification;
}
export class SendGridEvents extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
JavaScript SendGridEvents DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /sendgridevents HTTP/1.1
Host: cpmwebservices-t.clarkpud.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ArrayOfSendGridEvent xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CPU.Notifications.ServiceModel" />
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length (string)