Skip to the page

Retrieve metrics

Volume, delivery and engagement for a period: totals, rates, one row a day and one row a domain.

opensend.metrics.get(input?)
Needs the scopemetrics:readFrom a terminalopensend metrics get

Input

  • rangestring

    The period to count: today, week, month, year, all or custom. Without it you get the last month.

    One oftodayweekmonthyearallcustom

  • fromstring

    The first day of a custom period, as a date such as 2026-11-01.

  • tostring

    The last day of a custom period, as a date such as 2026-11-30.

  • domainstring

    Only mail sent from this domain. Up to 120 characters.

Returns

The call resolves to the answer, already parsed. A call the API refuses throws OpenSendError with the code and the message of the answer. SDK lists the errors of the client itself.

  • object"metrics"

    Always metrics.

  • fromstring | null

    The start of the period, or null when it has no start.

  • tostring

    The end of the period.

  • totalsobject

    The counts for the whole period.

  • totals.sentinteger

    How many emails were sent.

  • totals.deliveredinteger

    How many were delivered.

  • totals.openedinteger

    How many were opened.

  • totals.clickedinteger

    How many had a link clicked.

  • totals.bouncedinteger

    How many bounced.

  • totals.complainedinteger

    How many were marked as spam by the recipient.

  • ratesobject

    The same counts as fractions, from 0 to 1.

  • rates.deliverednumber

    Delivered, as a fraction of what was sent.

  • rates.openednumber

    Opened, as a fraction of what was delivered.

  • rates.clickednumber

    Clicked, as a fraction of what was delivered.

  • rates.bouncednumber

    Bounced, as a fraction of what was sent.

  • rates.complainednumber

    Complaints, as a fraction of what was sent.

  • daysobject[]

    One entry for each day of the period, oldest first.

  • days[].sentinteger

    How many emails were sent.

  • days[].deliveredinteger

    How many were delivered.

  • days[].openedinteger

    How many were opened.

  • days[].clickedinteger

    How many had a link clicked.

  • days[].bouncedinteger

    How many bounced.

  • days[].complainedinteger

    How many were marked as spam by the recipient.

  • days[].daystring

    The day, as YYYY-MM-DD in UTC.

  • domainsobject[]

    One entry for each sending domain.

  • domains[].sentinteger

    How many emails were sent.

  • domains[].deliveredinteger

    How many were delivered.

  • domains[].openedinteger

    How many were opened.

  • domains[].clickedinteger

    How many had a link clicked.

  • domains[].bouncedinteger

    How many bounced.

  • domains[].complainedinteger

    How many were marked as spam by the recipient.

  • domains[].domainstring

    The sending domain.