CPU.Notifications

<back to all web services

SendGridEvents

Requires Authentication
The following routes are available for this service:
POST/sendgridevents
// @ts-nocheck

export class SendGridEvent
{
    // @DataMember(Name="sg_event_id")
    public sg_event_id?: string;

    // @DataMember(Name="sg_message_id")
    public sg_message_id?: string;

    public email?: string;
    public timestamp: number;
    // @DataMember(Name="smtp-id")
    public smtp_id?: string;

    public event?: string;
    public type?: string;
    public category?: string[];
    public reason?: string;
    public status?: string;
    public userAgent?: string;
    public ip?: string;
    public url?: string;
    // @DataMember(Name="url_offset")
    public url_offset?: string;

    // @DataMember(Name="sg_machine_open")
    public sg_machine_open: boolean;

    public tls?: string;
    // @DataMember(Name="unique_args")
    public unique_args?: { [index:string]: string; };

    // @DataMember(Name="custom_args")
    public custom_args?: { [index:string]: string; };

    // @DataMember(Name="marketing_campaign_id")
    public marketing_campaign_id?: string;

    // @DataMember(Name="marketing_campaign_name")
    public marketing_campaign_name?: string;

    // @DataMember(Name="singlesend_id")
    public singlesend_id?: string;

    // @DataMember(Name="singlesend_name")
    public singlesend_name?: string;

    // @DataMember(Name="bounce_classification")
    public bounce_classification?: string;

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

export class SendGridEvents extends Array<SendGridEvent>
{

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

TypeScript SendGridEvents 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 /sendgridevents HTTP/1.1 
Host: cpmwebservices-t.clarkpud.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

[]
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

(string)