Get message analytics
Message Analytics rows per campaign and automation: sends, clicks, orders, revenue and unsubscribes.
GET https://cotlet.dev/api/v1/postscript/message-analytics
Reads Data & Insights > Messages for the date range, one row per message flow with the columns Postscript shows: Messages Sent, Total Clicks, Unique Clicks, Click-Through Rate (CTR), Orders, Revenue, Total Unsubscribes and Unsubscribe %. Postscript updates the data every 15 minutes, and Total Unsubscribes counts only opt-outs attributed to an automation or campaign. To read a calendar month, use its exact first and last day. Works on all Postscript plans.
Parameters
| Name | Type | Description |
|---|---|---|
| from date | date | First day of the range. |
| to date | date | Last day of the range. |
| group_by enum | enum | day, week or month.. |
| sort_by string | string | Column to sort by, for example Revenue.. |
Request
curl https://cotlet.dev/api/v1/postscript/message-analytics \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("postscript", "get_message_analytics") const result = await cotlet.call('postscript', 'get_message_analytics'); cotlet call postscript get_message_analytics Example response
{
"from": "2026-10-12",
"to": "2026-10-18",
"rows": [
{
"name": "VIP drop",
"type": "campaign",
"messages_sent": 4120,
"total_clicks": 988,
"unique_clicks": 802,
"orders": 37,
"revenue": 2310,
"total_unsubscribes": 21,
"unsubscribe_pct": 0.5
},
{
"name": "Win-back for quiet subscribers",
"type": "campaign",
"messages_sent": 3412,
"total_clicks": 301,
"unique_clicks": 260,
"orders": 21,
"revenue": 1840,
"total_unsubscribes": 34,
"unsubscribe_pct": 1
}
]
}