Events API
- Table of Contents
- Overview
- Attributes
- Get a page of events
- Filters and Event Types
- Event Summaries
- Errors
This feature is only available on GreenArrow CloudMTA. On other installations, this API gives the
feature_not_enabled error.
Overview
This API gives the events that GreenArrow stores for its statistics: delivery attempts, bounces, spam complaints, clicks, opens, unsubscribes and more. Each request gives one page of events, newest first. Filters choose the time range, the event types, the recipient, the RFC5321.MailFrom domain, the IP address or relay server, and the throttle.
The Event History page of the web interface reads its events from this API.
With HTTP basic authentication, the Engine user’s API permission must be full access or read-only. From a session of the web interface, the user’s UI permission must be full access or read-only. Users with stats-only or no permission cannot use this API.
Attributes
Each event has the fields that GreenArrow stores for its event type, and these derived fields:
event_time (in ISO 8601 format, in place of the stored Unix time), summary, email (for the
event types that have a recipient) and throttle (for delivery_attempt events). A field of the
event type that has no value is null. The fields of each event type are those that the Event
Notification System sends for it (see
Types of Events).
The stored fields have the names and meanings that Types of Events gives, with the differences below. The most useful fields are these:
|
event
hash
|
|||||||||||||||||||||||||||||||||||||
Get a page of events
GET /ga/api/v3/eng/events
Parameters
Give the parameters in the query string. A blank parameter is the same as one that is not
given. Each parameter other than event_type[] takes one value.
|
start_ string /optional |
Give only the events at or after this time. An ISO 8601 time, such as In a query string, a The default is 24 hours before |
|
end_ string /optional |
Give only the events before this time. An event at exactly The same format as The default is the time of the request. |
|
event_ array of strings /optional |
Give only the events of these types. To give more than one type, repeat the parameter:
The default is every type, but with an Some filters can never match some event types, because those types do not store the field that the filter tests. See Filters and Event Types. If you give an event type and a filter that cannot match it, the API gives no events of that type. |
|
recipient
string /optional |
Give only the events of this recipient. A value with an |
|
mailfrom_ string /optional |
Give only the events whose RFC5321.MailFrom domain is this domain, exactly. Case is ignored. This must be a domain, not an email address. |
|
outmta_ integer /optional |
Give only the events of the IP address or relay server with this ID. With no
It also matches a deleted IP address or relay server. |
|
outmta_ string /optional |
Give only the events of the IP addresses and relay servers with this name. With no
You cannot give both |
|
throttle_ integer /optional |
Give only the delivery attempts that used the throttle with this ID. It also matches a deleted throttle. |
|
throttle_ string /optional |
Give only the delivery attempts that used a throttle whose domains include this domain. Case is ignored. Each IP address has its own throttles, so a domain can match one throttle on each IP
address. With It matches only the throttles that exist now. To find the events of a deleted
throttle, use You cannot give both |
|
click_ string /optional |
Give only the events with this click tracking ID, which are the events of one message when each message has its own click tracking ID. It matches exactly: case matters. A blank value gives no filter. |
|
per_ integer /optional |
The number of events on each page, from 1 to 500. The default is |
|
page_ string /optional |
The Give the same filters with it as with the first page. The token holds the first page’s
The pages are not a snapshot. GreenArrow can store an event some time after it occurs. An event stored while you get the pages shows on a later page only if it is older than the last event of the previous page. To be sure that you have every event of a time range, ask for the range again after GreenArrow has stored its events. |
If outmta_name matches no IP address or relay server, or throttle_domain matches no
throttle, the response has no events. This is not an error.
Examples:
GET /ga/api/v3/eng/events
GET /ga/api/v3/eng/[email protected]
GET /ga/api/v3/eng/events?recipient=example.com&event_type[]=delivery_attempt&event_type[]=bounce_all
GET /ga/api/v3/eng/events?start_time=2026-11-01T00:00:00&end_time=2026-11-02T00:00:00&outmta_name=ipaddr-1
GET /ga/api/v3/eng/events?throttle_domain=gmail.com&per_page=500
Response
|
events
array |
The events of this page, newest first, as defined above. |
|
per_ integer |
The number of events on each page. |
|
next_ string |
The token that gets the next page. Give it as
|
There is no count of the events that match.
Example
GET /ga/api/v3/eng/events?per_page=2&recipient=example.com
HTTP/1.1 200 OK
{
"success": true,
"data": {
"events": [
{
"id": "01a1ab5d-9780-7000-8000-000000000003",
"event_type": "engine_click",
"event_time": "2026-11-05T06:00:00-05:00",
"server_id": null,
"email_localpart": "fred",
"email_domain": "example.com",
"sendid": null,
"listid": null,
"click_url": "https://sender.example/offer?id=12",
"click_tracking_id": null,
"engine_ip": "203.0.113.7",
"user_agent": "Mozilla/5.0",
"linkid": null,
"mailclass": null,
"instanceid": null,
"email": "[email protected]",
"summary": "click: https://sender.example/offer?id=12"
},
{
"id": "01a1ab26-a900-7000-8000-000000000002",
"event_type": "delivery_attempt",
"event_time": "2026-11-05T05:00:00-05:00",
"server_id": null,
"email_localpart": "Jane",
"email_domain": "example.com",
"sendid": null,
"listid": null,
"bounce_code": null,
"click_tracking_id": null,
"timestamp": null,
"channel": "remote",
"status": "deferral",
"is_retry": 1,
"msguid": null,
"sender": "[email protected]",
"mtaid": null,
"mtaid_id": null,
"mtaid_name": null,
"injected_time": null,
"message": "198.51.100.25 does not like recipient./Remote host said: 452 4.2.2 Mailbox full",
"outmtaid": 24,
"outmtaid_name": "ipaddr-1",
"outmtaid_ip": "192.0.2.10",
"outmtaid_hostname": "mta1.sender.example",
"sendsliceid": null,
"throttleid": 42,
"mx_hostname": "mx.example.com",
"mx_ip": "198.51.100.25",
"from_address": null,
"headers": null,
"message_size": null,
"smtp_timing": null,
"source_ip": null,
"mailclass": null,
"instanceid": null,
"attempt_number": 2,
"email": "[email protected]",
"summary": "remote delivery deferral (retry): 198.51.100.25 does not like recipient./Remote host said: 452 4.2.2 Mailbox full",
"throttle": {
"id": 42,
"name": "Throttle Rule for example.com, example.net, example.org…",
"deleted": false
}
}
],
"per_page": 2,
"next_page_token": "gYxIWZ1ETO4YTN9BDM2MTO3MTO3EjOiUWbpR3X0JXY0NnIsIiMwADMwADMwADMwATLwADM40CMwAzNtADM5EWL2IjYhFTYxAjI6ICZpJye"
},
"error_code": null,
"error_messages": null
}
Filters and Event Types
Some event types do not store the field that a filter tests, so the filter can never match
them. With no event_type[], the outmta_* and throttle_* filters, which are about delivery,
give delivery_attempt events only. With event_type[], the outmta_* filters also match the
bounces and spam complaints that store the IP address or relay server:
| Event type | recipient |
mailfrom_domain |
outmta_* |
throttle_* |
click_tracking_id |
|---|---|---|---|---|---|
new_message |
yes | yes | yes | ||
delivery_attempt |
yes | yes | yes | yes | yes |
bounce_all |
yes | yes | yes | yes | |
bounce_bad_address |
yes | yes | |||
bounce_lite |
yes | yes | |||
scomp |
yes | yes | yes | ||
scomp_lite |
yes | yes | yes | ||
engine_click |
yes | yes | |||
engine_open |
yes | yes | |||
engine_unsub |
yes | yes | |||
studio_click |
yes | ||||
studio_open |
yes | ||||
studio_unsub |
yes | ||||
studio_subscriber_created |
yes | ||||
studio_subscriber_updated |
yes | ||||
incoming_email |
yes | yes |
With no event_type[], a filter gives only the events of the types it can match.
A “yes” means that events of the type can store the field, not that every one does. For example,
a bounce_all event stores the RFC5321.MailFrom and the IP address or relay server only for a
message sent through SimpleMH while include_mtaid_info_at_delivery was on. Without
them, mailfrom_domain and outmta_* do not find the event.
Event Summaries
The summary of an event depends on its type. It starts with a label, such as
remote delivery failure (retry), and most labels are followed by free text, such as a message, a
bounce text or a URL. The free text is put on one line. Free text longer than 200 characters is
cut, and ends with …. The label is not cut, so a summary can be longer than 200 characters. When
the event has no free text, the summary is the label alone, without the : , ` from ` or other
words that come before the text. For example, an engine_unsub event with no URL has the summary
unsubscribe, and a new_message event of a bounce message, whose RFC5321.MailFrom is empty, has
the summary new message.
| Event type | Summary |
|---|---|
delivery_attempt |
remote delivery deferral (retry): 452 4.2.2 Mailbox full. The channel (local or remote) and the status, and the message unless the delivery succeeded. failure_toolong is “failure (too long in the queue)”, and connmaxout is “deferral (not attempted)”. A retry adds “retry” in the parentheses, as in remote delivery failure (too long in the queue, retry). |
bounce_all |
hard bounce (10: Bad e-mail address): 550 No such user. The bounce type, the bounce code and its description, and the bounce text. |
bounce_bad_address |
bad address: and the summary of a bounce_all event. |
bounce_lite |
bounce (10: Bad e-mail address): and the text that matched the bounce code. |
scomp |
spam complaint |
scomp_lite |
spam complaint on mail from and the RFC5321.MailFrom of the message that the complaint is about. |
engine_click, studio_click
|
click: and the URL. |
engine_unsub |
unsubscribe: and the URL. |
studio_unsub |
unsubscribe |
engine_open, studio_open
|
open, or privacy open. |
new_message, incoming_email
|
new message from or incoming email from , and the RFC5321.MailFrom. |
studio_subscriber_created, studio_subscriber_updated
|
subscriber created in list or subscriber updated in list , and the list’s name. |
Errors
Each error has the HTTP status 200 OK, as in the other Engine API endpoints. Read
error_code to tell the errors apart.
error_code |
When |
|---|---|
not_authorized |
The credentials are not valid, or the user’s permission is stats-only or none. |
feature_not_enabled |
Unified Statistics is not active, PostgreSQL is older than version 16, or the events table does not exist yet. The message gives the cause. |
invalid_request |
A parameter is not valid. The message names the parameter. |
query_timeout |
The request took longer than 30 seconds. Give a shorter time range, or change the filters. |
Other errors that any Engine API call can give, such as database_exception and
internal_error, can also occur.
For example:
{
"success": false,
"data": null,
"error_code": "query_timeout",
"error_messages": [
"the events query ran longer than 30s; give a shorter time range, or change the filters"
]
}
