SendGrid API Reference
The public API procedures may call the internal procedures which should not be used directly as they can be changed without any explicit notification in the newer versions of the connector. Internal procedures can be recognized by the internal_ prefix in their names. Public API procedures do not have such prefixes in their names.
EmailActivities
Email Activities
Parameter
<query> (optional): Use the query syntax to filter your email activity
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
msg_id | string | Message id |
last_event_time | timestamp | Last event time |
from_email | string | Message was sent from email |
to_email | string | Message was sent to email |
subject | string | Email's subject |
status | string | Quick summary of the status of a message |
opens_count | integer | Total number of times your users opened emails |
clicks_count | integer | Total number of times your users have clicked on the various links within your emails |
EmailActivitiesEvents
Details of the Email Activities
Parameter
<message_id> (optional): Message id
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
events_processed | timestamp | Date of when event occurred |
events_event_name | string | Name of event, one of: 'bounced', 'opened', 'clicked', 'processed', 'dropped', 'delivered', 'deferred', 'spam_report', 'unsubscribe', 'group_unsubscribe', 'group_resubscribe' |
events_attempt_num | integer | Used with "deferred" events to indicate the attempt number out of 10. One "deferred" entry will exists under events array for each time a message was deferred with error message from the server |
events_bounce_type | string | Use to distinguish between types of bounces |
events_url | string | Used with "clicked" event to indicate which url the user clicked |
events_reason | string | Explanation of what caused "bounced", "deferred", or "blocked". Usually contains error message from the server - e.g. message from gmail why mail was deferred |
events_mx_server | string | For example mx.gmail.com |
events_http_user_agent | string | Client recipient used to click or open message |
msg_id | string | Message id |
from_email | string | Message was sent from email |
to_email | string | Message was sent to email |
subject | string | Email's subject |
status | string | Quick summary of the status of a message |
api_key_id | string | API Key id |
asm_group_id | long | The ID of the unsubscribe group the recipient's email address is included in. ASM IDs correspond to the ID that is returned when you create an unsubscribe group |
categories | string | Categories users associated to the message |
marketing_campaign_id | long | Marketing campaign id |
marketing_campaign_name | string | Marketing campaign string |
marketing_campaign_split_id | long | Marketing campaign split id |
marketing_campaign_version | string | Marketing campaign version |
originating_ip | string | Originating id |
outbound_ip | string | IP used to send to the remote MTA. Used by UI to display IP in detailed view |
outbound_ip_type | string | Whether or not the outbound IP is dedicated vs shared |
teammate | string | Teammate's username |
template_id | string | Template id |
unique_args | string | JSON hash of arbitrary key-value pairs |