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

FieldTypeRequiredDescription
workspaceIdstringNoFilter by workspace ID
donebooleanNoFilter by completion status
archivedbooleanNoFilter by archived status
dueStartstringNoDue-date window start (ISO date or datetime). Must be sent together with dueEnd. Matches records whose start/due span overlaps the window.
dueEndstringNoDue-date window end (ISO date or datetime). Must be sent together with dueStart.
hasDueDatebooleanNotrue → only records that have a due date; false → only records without one.
overduebooleanNotrue → 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}'