Tag statistics
GET
/api/v2/stats/tagsReturns how many times each tag was added to a contact, per day.
Headers
x-api-keyheaderRequiredYour API key.
Content-Typeheaderapplication/json. Not needed for this request.
Query parameters
start_datestringFirst day, as
YYYY-MM-DD. Send both dates, or neither for all time.end_datestringLast day, as
YYYY-MM-DD. Included.timezonestringTime zone that decides when each day starts: an IANA name (
America/New_York) or an offset (+02:00). DefaultUTC.tag_namesstringTags to filter contacts by, comma-separated:
hot lead,vip. Needstag_filter_operator.tag_idsstringThe same with tag ids:
287,301.tag_filter_operatorstringany_of(any of the tags),is(all of them),is_not(none of them),is_empty(contacts without tags) oris_not_empty(contacts with any tag).
Errors
| Error | When |
|---|---|
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. |
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"{
"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
}
]
}
}
}
}