Count Records
Count records matching a filter.
POST /v1/count-records
Count records matching a filter. Useful for dashboards or checking how many tasks are open/done in a workspace without fetching full data. Can also count by due date (window, presence, or overdue).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
workspaceId | string | No | Filter by workspace ID |
done | boolean | No | Filter by completion status |
archived | boolean | No | Filter by archived status |
dueStart | string | No | Due-date window start (ISO date or datetime). Must be sent together with dueEnd. Matches records whose start/due span overlaps the window. |
dueEnd | string | No | Due-date window end (ISO date or datetime). Must be sent together with dueStart. |
hasDueDate | boolean | No | true → only records that have a due date; false → only records without one. |
overdue | boolean | No | true → only records whose due date is in the past (all-day dates count once their day has ended). Combine with done:false for actionable overdue work. |
{
"workspaceId": "string",
"done": true,
"archived": true,
"dueStart": "string",
"dueEnd": "string",
"hasDueDate": true,
"overdue": true
}Response
Returns the result of the operation.
Example
curl -X POST https://rest.blue.app/v1/count-records \
-H "Authorization: Bearer $BLUE_TOKEN" \
-H "blue-org-id: $BLUE_ORG_ID" \
-H "Content-Type: application/json" \
-d '{"workspaceId":"string","done":true,"archived":true,"dueStart":"string","dueEnd":"string","hasDueDate":true,"overdue":true}'