• Quick Start
  • Send Survey
  • Get Contact
  • Remove Contact
  • Delete Contact (GDPR)
  • Get Unsubscribed
  • Get Responses
  • Get NPS
  • Sent Statistics
  • Historical Stats
  • Deactivate All
  • Bulk Add with CSV
  • Inapp Surveys
  • Bulk Add/Send

Change Log

  • Changes

Get Historical Statistics

Get your historical emails sent stats

API Endpoint

Make a GET request to https://DEMO.asknice.ly/api/v1/stats

Arguments

Argument Example Required Description
year 2023 Optional Year to get stats
month 8 Optional Month to get stats
day 16 Optional Day to get stats
segment VIP Customer Optional Filter stats based on this segment only
start_time 1692096286 Optional A unix timestamp for all responses sent at or after this time
end_time 1692269086 Optional A unix timestamp for all responses sent at or before this time
include-delay Optional Offset date by delayminutes

Example GET request

Emails sent in 16th Aug, 2023 in JSON format
curl --header "X-apikey: " \
"https://DEMO.asknice.ly/api/v1/stats?year=2023&month=8&day=16"

Response

{
   "success":true,
    "data":[
    {
        "year":"2023",
        "month":"8",
        "day":"16",
        "weekday":"Thu",
        "sent":"5",
        "delivered":"5",
        "opened":"3",
        "responded":"2",
        "promoters":"1",
        "passives":"1",
        "detractors":"0",
        "nps":"50.0",
        "fivestar": null,
        "csat": null,
        "comment_length":"68",
        "comment_responded_percent":"100.0",
        "surveys_responded_percent":"40.0",
        "surveys_opened_responded_percent":"66.7"
    }
   ]
}