Get email stats

Opens, click-throughs, bounces and clicks per link for one email.

GET https://cotlet.dev/api/v1/mautic/emails/{email_id}/stats

read

Returns what the email Email overview and its Click Counts tab show. Opens come from a tracking pixel, which Mautic itself calls not very accurate. Clicks are not counted for the Send Example link, direct sends from a contact profile or form preview emails. Bounces show only when bounce detection is set up in Mautic.

Parameters

Parameters: get_email_stats
NameTypeDescription
email_id integer required integer Email ID from list_emails.

Request

cURL
curl https://cotlet.dev/api/v1/mautic/emails/58/stats \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("mautic", "get_email_stats", {"email_id":58})
Node.js
const result = await cotlet.call('mautic', 'get_email_stats', {"email_id":58});
CLI
cotlet call mautic get_email_stats --data '{"email_id":58}'

Example response

JSON

{
  "email_id": 58,
  "name": "October newsletter",
  "opens": 614,
  "click_throughs": 87,
  "bounces": 9,
  "clicks_by_link": [
    {
      "url": "https://example.com/webinar",
      "clicks": 52
    },
    {
      "url": "https://example.com/pricing",
      "clicks": 35
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.