Search code examples
phpsendgridsendgrid-api-v3

Get Message ID in response of send mail - SendGrid API v3


I am getting this response when I submit an email, as I am working on the API of SendGrid I need to grab the stats of each mail i sent.. for that purpose I want the Message-ID in response so I could save that in db.. I have looked over the docs but unable to make any progress.. Thanks in Advance

But i want to get email activity by passing message ID Note: Currently mail response give "X-Message-ID" but i want Message ID

https://sendgrid.api-docs.io/v3.0/email-activity/filter-messages-by-message-id

Thanks...


Solution

  • The X- prefix in a header means that it is a custom header and not part of the standard. This has become less favoured over time, but it is still found in use across the internet. X-Message-Id is what you're looking for.