Tag statistics

GET/api/v2/stats/tags

Returns how many times each tag was added to a contact, per day.

Headers

  • x-api-keyheaderRequired

    Your API key.

  • Content-Typeheader

    application/json. Not needed for this request.

Query parameters

  • start_datestring

    First day, as YYYY-MM-DD. Send both dates, or neither for all time.

  • end_datestring

    Last day, as YYYY-MM-DD. Included.

  • timezonestring

    Time zone that decides when each day starts: an IANA name (America/New_York) or an offset (+02:00). Default UTC.

  • tag_namesstring

    Tags to filter contacts by, comma-separated: hot lead,vip. Needs tag_filter_operator.

  • tag_idsstring

    The same with tag ids: 287,301.

  • tag_filter_operatorstring

    any_of (any of the tags), is (all of them), is_not (none of them), is_empty (contacts without tags) or is_not_empty (contacts with any tag).

Errors

ErrorWhen
400
message is Validation failed and errors lists each query parameter that is not valid.
401
The API key is missing or wrong.
500
Something went wrong on our side, or timezone is not a time zone the API recognises.
Request
curl "https://app.dmtracker.ai/api/v2/stats/tags?start_date=2026-10-19&end_date=2026-10-21&timezone=America/New_York" \
  -H "x-api-key: $DMTRACKER_API_KEY" \
  -H "Content-Type: application/json"
Response 200
{
  "status": "ok",
  "data": {
    "total_tags": 46,
    "usage_over_time_per_tag": {
      "hot lead": {
        "color": "#22C55E",
        "series": [
          {
            "date": "2026-10-19T00:00:00",
            "count": 5
          },
          {
            "date": "2026-10-20T00:00:00",
            "count": 8
          },
          {
            "date": "2026-10-21T00:00:00",
            "count": 6
          }
        ]
      },
      "vip": {
        "color": "#6B7280",
        "series": [
          {
            "date": "2026-10-19T00:00:00",
            "count": 9
          },
          {
            "date": "2026-10-20T00:00:00",
            "count": 10
          },
          {
            "date": "2026-10-21T00:00:00",
            "count": 8
          }
        ]
      }
    }
  }
}
Link copied