The X-Message-ID is a header returned when sending email from SendGrid.
The following image depicts a typical response received after a message has been sent:
The X-Message-ID header is part of this response and can be used to track events that the Event Webhook posts.
When using the Event Webhook, it’s a best practice to store your X-Message-ID. X-Message-ID data helps with deduplications in your webhook data. It can be used to find all corresponding Message-IDs.
SendGrid recommends that users store this data to correlate to their Event Webhook data, and this data is very useful for Support troubleshooting.