Mailrelay API Reference

Get the statistics of an automation

GET https://{account}/api/v1/automations/{id}/stats

Authentication

Requires an API key sent in the X-AUTH-TOKEN header.

Get the totals of an automation since it was created and the same numbers for each of its blocks. The totals only count the blocks that the automation has now. Removed email and SMS blocks are only listed when includeremovedblocks is sent.

Parameters

NameTypeRequiredDescription
id integer Yes ID of the record
include_removed_blocks boolean No Include the email and SMS blocks that were removed from the automation in the results

Responses

StatusDescription
200 Success
404 Couldn't find record with provided ID.
401 The API key wasn't sent, is invalid or has expired
403 The API key or its user doesn't have permission to use this endpoint, or the request comes from an IP address the key doesn't allow.
429 Too many requests. You have exceeded the rate limit, wait and try again later.
500 An internal error happened. Try again later.

Response fields

NameTypeDescription
sent_emails_count integer Sent emails
impressions_count integer Impressions
unique_impressions_count integer Unique impressions
clicks_count integer Clicks
unique_clicks_count integer Unique clicks
unsubscribe_events_count integer Unsubscribes
sms_sent_messages_count integer SMS sent messages
sms_clicks_count integer SMS clicks
unique_sms_clicks_count integer Unique SMS clicks
sms_unsubscribe_events_count integer SMS unsubscribes
pending_activities_count integer Number of subscribers that are waiting in a block
blocks array Statistics of each block of the automation that isn't a trigger. The email counters are only returned for send_email blocks and the SMS counters for send_sms blocks