Return task counts broken down by a field, in a single request — the efficient way to get per-campaign, per-sender or per-type activity without one call per slice.
group_field chooses the breakdown; filter (same fields as List tasks, composable) narrows what's counted. Response is a map of group value → count.
Common queries:
- Connections sent per campaign (one call):
{ "group_field": "flow_uuid", "filter": { "type": "linkedin_send_connection_request", "status": "closed" } } - One campaign's full action breakdown:
{ "group_field": "type", "filter": { "flow_uuid": "…", "status": "closed" } } - Scope any of the above to a date range by adding
"executed_at": { ">=": "2026-07-01", "<=": "2026-08-01" }to the filter.
Grouping is by a field, not by day — for a per-day series, loop date windows on the executed_at filter.
Security
bearerAuth
POST
curl -i -X POST \
https://leadgen.grinfi.io/flows/api/tasks/group-counts \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"group_field": "flow_uuid",
"filter": {
"type": "linkedin_send_connection_request",
"status": "closed"
}
}'