Dataset
SendGrid email delivery event datasets for AI training
A SendGrid dataset is a collection of one business's SendGrid records: the Event Webhook rows for each message it sent, from processed, delivered and deferred to bounce, open, click and spam report, with the Dynamic Templates and versions behind them, categories, suppression lists and, for marketing mail, Single Sends. SourceX sources it to a buyer's spec from established businesses that run SendGrid and kept their own copy of the event stream. Each dataset is de-identified and licensed for an agreed permitted use.
Dataset manifest
Sourced to your spec- What it is
- One business's SendGrid delivery record: Event Webhook rows per message, joined to templates, categories, suppressions and its own send log
- Typical systems
- Twilio SendGrid Email API with the Event Webhook, Dynamic Templates and Suppressions; Marketing Campaigns and Inbound Parse where used; the database that stored the events
- Typical history
- Specified by the buyer; bounded by when the business began storing webhook events, not by the age of the account
- Modality
- Event rows with SMTP response text; template subjects and bodies as Handlebars HTML and plain text
- Delivery formats
- Agreed per order; JSONL or Parquet of events keyed by sg_message_id, templates as HTML with JSON metadata
- Preparation
- Recipient addresses hashed or removed; IP addresses dropped; query strings stripped from clicked URLs; custom arguments and template test data scrubbed
- Licensing
- Permitted use agreed per license; recipient data handling and the vendor's terms reviewed first
- Availability
- Sourced to your spec from businesses that send through SendGrid; supply is not guaranteed
What a delivery contains
Fields vary by source system and are fixed per order. A typical delivery includes:
| Field | Type | What it holds |
|---|---|---|
| sg_message_id | string | Pseudonymous form of the Event's sg_message_id, shared by every event for one message to one recipient. |
| sg_event_id | string | The Event's own unique ID, used to drop events the webhook posted more than once. |
| event | enum | The Event type: processed, dropped, delivered, deferred, bounce, open, click, spamreport, unsubscribe, group_unsubscribe or group_resubscribe. |
| event_time | timestamp | The Event's timestamp, sent as Unix seconds and converted to ISO 8601. |
| recipient_key | string | Keyed hash of the Event's email field, the same for one address across events and Suppression rows. |
| delivery_response | object | From delivered, deferred, bounce and dropped Events: the receiving server's response or reason, status code, attempt, bounce type and bounce_classification. |
| category | array | The Category strings the application attached at send, which also group the account's Stats. |
| custom_args | object | The custom arguments set at send and echoed on the Event, scrubbed of personal values. |
| engagement | object | From open and click Events: device class from useragent, the clicked url without its query string, url_offset and sg_machine_open. |
| template | object | The Dynamic Template the send used, matched by the Event's sg_template_id where present or by the application's send log, with its Template Version: name, subject, HTML and plain content, active flag and updated_at. |
| unsubscribe_group | object | The Unsubscribe Group named by asm_group_id, as on group_unsubscribe and group_resubscribe Events, with its name and description. |
| suppression | object | Whether the recipient sits on the Bounces, Blocks, Invalid Emails, Spam Reports or Global Unsubscribes list, with the created time and any reason that list holds. |
| single_send | object | For Marketing Campaigns mail, the Single Send behind the event: name, subject, send time and a reference to its list or segment. |
| app_send_ref | object | The sending application's own record of the message, joined through custom arguments or a message ID the application stored at send. |
Field names from the table above; values are masked placeholders.
Example record
{
"sg_message_id": "msg_Qx7b2L4t.recv-0c41-0",
"sg_event_id": "evt_Ym91bmNlLTAwMTQ",
"event": "bounce",
"event_time": "2024-02-06T14:31:52Z",
"recipient_key": "rcp_8e41d0c7",
"delivery_response": {
"type": "bounce",
"status": "5.1.1",
"reason": "550 5.1.1 Recipient address rejected: user unknown",
"bounce_classification": "Invalid Address"
},
"category": [
"password_reset",
"transactional"
],
"custom_args": {
"app_message_id": "ntf_20391",
"locale": "en-US"
},
"engagement": null,
"template": {
"sg_template_id": "d-tmpl_4c2a",
"version_name": "Reset v3, shorter copy",
"subject": "Reset your {{brand_name}} password",
"active": true,
"updated_at": "2023-11-20T09:14:00Z"
},
"unsubscribe_group": null,
"suppression": {
"list": "bounces",
"created": "2024-02-06T14:31:52Z",
"next_event": {
"event": "dropped",
"reason": "Bounced Address",
"event_time": "2024-02-19T08:02:11Z"
}
},
"single_send": null,
"app_send_ref": {
"message_type": "password_reset",
"joined_on": "custom_args.app_message_id",
"rendered_body_kept": false
}
}Synthetic record for illustration. Field names, structure and format are agreed per order.
What AI teams use it for
Bounce and block diagnosis
Receiving servers' response text with status codes and bounce classification trains a model to tell a dead address from a reputation block.
Send pipeline operations agents
Chains of processed, deferred and delivered events with attempt counts show normal retry behavior and what an incident looks like.
Transactional template writing
Template versions with the engagement and complaints that followed each one pair real notification copy with its result.
Complaint and unsubscribe prediction
Spam report and group unsubscribe events by category and recipient history show which mail people reject.
Suppression handling evaluation
Dropped events and their reasons give ground truth for whether an agent should have attempted a send at all.
Use-case guides: Enterprise and computer-use agents, Private evaluation sets, Customer support agents
What makes this data valuable
Raw payload capture
Stored webhook JSON keeps response text, attempts and user agents that a status column loses.
Unbroken monthly counts
Event counts by type with no missing days show the endpoint stayed up.
Joinable custom arguments
An application message ID in custom arguments ties each event to what was sent.
Terminal events present
Processed messages that reach delivered or bounce show the capture is complete.
Machine opens flagged
The sg_machine_open flag on opens separates prefetches from people.
Versioned templates
New versions instead of in-place edits keep the wording each send used.
Document stack
SendGrid dataset
SendGrid holds the outcome, the application holds the message
SendGrid is first a delivery API. The sender's own application composes each message and submits it through the Mail Send API or SMTP relay. Either the application sends finished HTML, or it sends a Dynamic Template ID with a block of dynamic template data and SendGrid merges the two with Handlebars at send time. In both cases the account keeps the template and its versions, each with a subject, HTML and plain text, but not the message one recipient received. An Event carries no subject and no body. It says which address, when and what happened. The rendered message exists only where the application logged what it sent.
What makes events useful is the labeling the application attached at send. Categories are free strings that SendGrid also uses to group its Stats. Custom arguments are key and value pairs echoed on every event for that message, and a business that put its own message or order ID there can join each event to its database. Where it did not, the fallback is the X-Message-Id header returned when the message was submitted, if the application stored it. Ask the owner to show on a sample how that value lines up with sg_message_id. All events for one message to one recipient share an sg_message_id. Above that, transactional mail is grouped only by the categories and arguments the application chose.
The account overwrites more than it keeps. A Template Version can be edited in place, and an event names at most the template, never the wording, so ask whether the team made a new version for each change and whether the version active on a given date can be established. Suppression lists are current state: an address deleted from the Bounces list leaves no trace there, and the history is in the events, a bounce followed by dropped events with a reason such as Bounced Address. Marketing Campaigns is the exception on content, since a Single Send is written inside SendGrid, but its contacts are a subscriber list that should not be delivered. Inbound Parse posts incoming mail to the business's endpoint and is not an archive, so that mail exists only where the business stored it.
The history is whatever the business captured
SendGrid keeps message-level history only briefly. Its Email Activity feed covers a short recent window, longer with a paid add-on, and the Stats endpoints hold daily counts by category with no per-message rows. A delivery record spanning years therefore exists only where the business pointed the Event Webhook at its own endpoint and stored what arrived. That capture is the dataset. Ask for it, and for the date it began, instead of asking how old the SendGrid account is.
Captures differ, and each loses something. The webhook posts JSON arrays of events, retries for a limited time when the endpoint fails and then gives up, so an outage leaves a gap. One event can arrive twice, which sg_event_id exists to catch, and arrival order is not a safe guide to sequence, so sort on the event's timestamp. Each event type is switched on separately in the webhook settings, so a capture built to watch bounces may hold no opens or clicks. Many developers saved only a status column on their own emails table and discarded the response text, the attempt count and the user agent. A table of raw payloads is a different asset from that.
To test a sample, count events by type and month and look for missing days. Check what share of processed messages reach delivered or bounce, and that dropped rows carry a reason. Look for repeated sg_event_id values. Count bounce rows with no sg_message_id: SendGrid's documentation says delayed and asynchronous bounces can arrive without one, and those tie to a send only by recipient and time. Read the url field on click events, which is the full link and in transactional mail can hold a reset token, an order number or the recipient's address in its query string. Check that opens carry the sg_machine_open flag, which marks opens generated by Apple Mail Privacy Protection, and ask how older rows without it should be read. Then search custom arguments and template test data for real names and addresses.
What to check before licensing
- Ask how and since when the business stored Event Webhook posts, whether as raw payloads or selected columns, and which event types were switched on.
- Get event counts by type and month, and ask about the days with none. Webhook outages leave gaps that usually cannot be refilled from SendGrid later.
- Check that recipient addresses are hashed with one key across events, suppression lists and the application's tables, or removed, and that IP addresses are gone.
- Read clicked URLs, custom arguments and categories in the sample for reset tokens, order numbers and addresses.
- Read every Template Version and its saved test data for customer details pasted in, and confirm no Marketing Campaigns contact list is part of the delivery.
- If you need rendered messages, ask whether the application logged bodies or dynamic template data, and treat that log as a separate source with its own scrub.
- Have the buyer and the data owner each check Twilio's terms on exported data and API use with counsel, and what recipients were told about tracking of opens and clicks.
Delivery No files move before a signed license. A listing or a request grants no files by itself.
How licensing works through SourceX
- 1
Define
Send the domain, modality, volume, format, timeline and permitted use you need.
- 2
Source
SourceX identifies businesses that hold matching data and are open to licensing it.
- 3
Qualify
Fit, rights and quality are checked, and you review samples before committing.
- 4
License
Scope, permitted use, exclusivity, price and obligations are agreed in writing.
- 5
Deliver
Approved data is prepared, de-identified where required and transferred securely.
Questions Acquisition Partners ask
Does a SendGrid dataset include the emails themselves?
Usually it includes the templates, not each rendered email. SendGrid delivers what the application submits and does not keep an exportable copy of every body. The account holds Dynamic Templates and their versions, and events record the outcome. A rendered message is available only if the sending application logged it, which you should ask about at the start.
How far back does SendGrid delivery data go?
It goes back to when the business began storing its own webhook events. SendGrid keeps message-level activity for a short period and aggregate statistics for longer, so a long account history does not mean a long event history. Ask for monthly event counts from the business's own store before agreeing a date range.
Can delivery events be tied to what each email was about?
Yes, where the application labeled its sends. Categories give a coarse type such as receipt or password reset, and custom arguments can carry the application's own message ID, which joins an event to an order, ticket or notification row. Without either, events can only be grouped by template, so check the sample for both.
How reliable are open and click events?
Clicks are more reliable than opens, and neither is exact. An open is a tracking image loading, which image blocking hides and privacy prefetching by some mailbox providers inflates. SendGrid marks opens generated by Apple Mail Privacy Protection with sg_machine_open on newer events. Clicks can also be triggered by security scanners that follow links. Treat both as noisy labels and use bounces, complaints and unsubscribes as the firm ones.
Are recipient email addresses delivered?
No, they should be hashed or removed, and the buyer should verify it. Every event carries the recipient's address, and open and click events add an IP address and user agent. Addresses also hide in clicked URLs and custom arguments. Ask for a keyed hash so one recipient's history stays linked, and scan the sample for anything address-shaped.
Is SourceX affiliated with Twilio?
SendGrid is named to identify the system the records come from. That does not imply a partnership with or endorsement by Twilio. The records belong to the business that runs SendGrid, which licenses them under a signed agreement, and a request does not guarantee a matching dataset. Buyers should still confirm with counsel that the vendor's terms allow the intended use of exported data.
Related datasets
- Email marketing campaigns with results
Campaign and flow sends with the message as sent, the segment rule, test variants and aggregate results
- Production logs and distributed traces
Logs, traces and metrics for incident and baseline windows, tied to the change that ended each incident
- Mailchimp email campaign records
Campaigns, templates and automation emails from one Mailchimp account with their reports, plus each audience's members, tags, segments and email activity
- Customer.io triggered messaging records
Campaigns, broadcasts, newsletters and transactional messages from one workspace, with workflow actions, Liquid templates, trigger events, deliveries and metrics
- Twilio call and messaging logs
One business's Twilio traffic: recordings and message threads joined by SID to Call and Message logs, Flex tasks and its own application data
Evaluating this data for procurement?
Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.
Request dataset diligenceTell us what your models need
Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.
Updated 26 November 2026.