Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
How to get all analytics from SendGrid for each email?

I would like to get all analytical data from SendGrid for each email using "unique args".

Currently to be able to do this, i would need to:

  1. call SendGrid API to get all emails with "unique arguments"
  2. from response get email ID
  3. call SendGrid again based on email ID to get all "events" (clicks, opens, subscribes, unsubscribes, bounces, blocks,.. etc.)

With this approach i would make twice as much requests as needed to.

Does anyone know a way to skip step 2 and 3, and get all "events" data from just one call?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use Event Webhooks from SendGrid. Events are generated when the email is processed by SendGrid and email service providers. There are 2 types of events - delivery and engagement events.

Delivery events indicate the status of email delivery to the recipient. Engagement events indicate how the recipient is interacting with the email.

 {
    "email": "example@test.com",
    "timestamp": 1513299569,
    "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
    "event": "processed",
    "category": "cat facts",
    "sg_event_id": "sg_event_id",
    "sg_message_id": "sg_message_id"
  },
  {
    "email": "example@test.com",
    "timestamp": 1513299569,
    "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
    "event": "deferred",
    "ip": "168.1.1.1",
    "category": "cat facts",
    "sg_event_id": "sg_event_id",
    "sg_message_id": "sg_message_id",
    "response": "400 try again later",
    "attempt": "5"
  },
  {
    "email": "example@test.com",
    "timestamp": 1513299569,
    "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
    "event": "delivered",
    "ip": "168.1.1.1",
    "category": "cat facts",
    "sg_event_id": "sg_event_id",
    "sg_message_id": "sg_message_id",
    "response": "250 OK"
  },
  {
    "email": "example@test.com",
    "timestamp": 1513299569,
    "smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>",
    "event": "open",
    "category": "cat facts",
    "sg_event_id": "sg_event_id",
    "sg_message_id": "sg_message_id",
    "useragent": "Mozilla/4.0 (compatible; MSIE 6.1; Windows XP; .NET CLR 1.1.4322; .NET CLR 2.0.50727)",
    "ip": "255.255.255.255"
  },

Delivery events include processed, dropped, delivered, deferred, and bounce.

Engagement events include open, click, spam report, unsubscribe, group unsubscribe, and group resubscribe.

I recommend you to check the link for more details.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!