Skip to content

Get messages report

Returns sent, delivered, read, failed, and replied counts plus cost for a date range, in aggregate and per WhatsApp API number. Pass template_name to scope the report to one template.

from and to accept either a plain date (YYYY-MM-DD) for daily reports or a UTC timestamp (YYYY-MM-DDTHH:MM:SSZ) for hourly ranges.

GET
https://api.zacx.io/v1/workspace/reports

Authorisation

  • bearerAuthHTTPrequired

Query parameters

  • fromstringrequired

    Start of the range, inclusive. A date or a UTC timestamp.

  • tostringrequired

    End of the range, inclusive. A date or a UTC timestamp.

  • template_nameoptionalstring

    Restrict the report to one template, by its name in your workspace.

Returns

200

The report.

JSON
  • statusstringrequired
  • dataobjectrequired
    5 properties
    • templateNameoptionalstring

      Present only when the report was scoped with template_name.

    • reportGeneratedAtoptionalstring
      format: date-time
    • channeloptionalstring
      Example: "whatsapp"
    • aggregateStatsoptionalobject
      6 properties
      • sentoptionalinteger
      • deliveredoptionalinteger
      • readoptionalinteger
      • failedoptionalinteger
      • repliedoptionalinteger
      • totalCostoptionalobject
        2 properties
        • amountnumberrequired
          Example: 12.5
        • currencystringrequired
          Example: "INR"
    • wabaBreakdownoptionalarray ofunknown

      The same counts, split per WhatsApp API number.

      7 properties
      • wabaNumberoptionalstring
        Example: "15558047064"
      • sentoptionalinteger
      • deliveredoptionalinteger
      • readoptionalinteger
      • failedoptionalinteger
      • repliedoptionalinteger
      • costoptionalobject
        2 properties
        • amountnumberrequired
          Example: 12.5
        • currencystringrequired
          Example: "INR"

400

A required parameter is missing or invalid.

JSON
  • statusstringrequired
  • codestringrequired

    Stable machine-readable error code.

  • messagestringrequired

    Human-readable explanation.

  • errorsoptionalarray ofobject

    One entry per failing parameter.

    4 properties
    • typeoptionalstring
      Example: "parameter"
    • fieldoptionalstring
      Example: "from"
    • messageoptionalstring
    • inputoptionalunknown

      The value that was received, or null when it was missing.

404

No template with that name exists in the workspace.

JSON
  • statusstringrequired
  • codestringrequired

    Stable machine-readable error code.

  • messagestringrequired

    Human-readable explanation.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close