Skip to content

Heatmap API

All endpoints require authentication and heatmap tool permissions.

GET /api/heatmap

Query parameters:

ParameterTypeDescription
viewstringsquad (default) or service
company_idsstringComma-separated company IDs to filter
service_idsstringComma-separated service IDs to filter
statusstringFilter cells by status
assigned_dmstringFilter by assigned DM user ID
tierstringFilter by client tier
blank_onlybooleanReturn only companies with unassessed cells

Response:

{
"companies": [{ "id": "...", "name": "...", "tier": "...", "health_score": 85, "dm_name": "..." }],
"services": [{ "id": "...", "name": "...", "category": "Development", "position": 1 }],
"cells": [{ "id": "...", "company_id": "...", "service_id": "...", "status": "active", "source": "manual", "notes": "...", "estimated_value": null }],
"service_stats": []
}

When view=service, service_stats includes per-service counts (active, opportunity, unassessed, etc.).

GET /api/heatmap/stats

Returns summary statistics scoped to the current user’s access level.

{
"total_cells": 900,
"assessed_cells": 150,
"unassessed_cells": 750,
"by_status": { "active": 50, "past": 30, "opportunity": 40, "proposed": 20, "not_relevant": 10 },
"total_opportunity_value": 125000
}
GET /api/heatmap/cells/:companyId/:serviceId

Returns the cell data and up to 10 history events. Returns { cell: null, blank: true } if no cell exists.

PATCH /api/heatmap/cells/:companyId/:serviceId

Creates or updates a cell. Requires heatmap.update permission.

Body:

{
"status": "opportunity",
"notes": "Client expressed interest in Q2",
"estimated_value": 25000
}

Valid statuses: active, past, opportunity, proposed, not_relevant.

DELETE /api/heatmap/cells/:companyId/:serviceId

Removes the cell, resetting it to unassessed. Only the cell creator or head/executive can delete.

POST /api/heatmap/cells/:companyId/:serviceId/action

Creates a task linked to the heatmap cell.

Body:

{
"title": "Explore Klaviyo with Acme Corp",
"assigned_to_user_id": "user-123",
"due_date": "2026-04-15",
"description": "Follow up on email marketing opportunity"
}