Gets customer event logs for an account
Security
basicAuth or basicAuth
The start date (default: 1 day before current time). Must be in RFC 2822 format: https://datatracker.ietf.org/doc/html/rfc2822.html#page-14
The end date (default: current time). Must be in RFC 2822 format: https://datatracker.ietf.org/doc/html/rfc2822.html#page-14
A duration in the format of '1d' '2h'. If duration is provided then it is calculated from the end date and overwrites the start date.
Optional set of analytics metric events. Will be converted into corresponding events.
Filters to apply to the query.
- US Mailgunhttps://api.mailgun.net/v1/analytics/logs
- EU Mailgunhttps://api.eu.mailgun.net/v1/analytics/logs
- basicAuth
- basicAuth
curl -i -X POST \
-u '<username>:<password>' \
https://api.mailgun.net/v1/analytics/logs \
-H 'Content-Type: application/json' \
-d '{
"start": "Mon, 08 Jul 2024 00:00:00 -0000",
"end": "Fri, 12 Jul 2024 00:00:00 -0000",
"filter": {
"AND": [
{
"attribute": "domain",
"comparator": "=",
"values": [
{
"label": "example.com",
"value": "example.com"
}
]
}
]
},
"include_subaccounts": true,
"pagination": {
"sort": "timestamp:asc",
"token": "cjsijbijewbu78t678tVTYUYU76754fyuiksin865g",
"limit": 50
}
}'A 200 response
Response
{ "start": "Mon, 08 Jul 2024 00:00:00 -0000", "end": "Fri, 12 Jul 2024 00:00:00 -0000", "items": [ { … } ], "pagination": { "previous": "cjsijbijewbu78t678tVTYUYU76754fyuiksi23h75", "next": "cjsijbijewbu78t678tVTYUYU76754fyuiksin98hh", "first": "cjsijbijewbu78t678tVTYUYU76754fyuiksin865g", "last": "875bunjnWkmis75bjklnsdk0s7jksnjknlknc64aTR", "total": 100 }, "aggregates": {} }