ClientSphereDocs
API reference/Stats

Get workspace summary

Ticket, lead and task totals in a single call, for dashboards that would otherwise fan out across four endpoints.

GET
/stats/summary

Authorization

AuthorizationRequiredBearer <token>

API key as Bearer token: Authorization: Bearer sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

X-API-Key<token>

API key via header: X-API-Key: sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

curl -X GET "https://clientsphere.io/api/v1/stats/summary" \
  -H "Authorization: Bearer <token>"

Workspace summary

{
  "data": {
    "tickets": {
      "all": 128,
      "mine": 0,
      "unresolved": 31,
      "resolved": 97
    },
    "leads": {
      "stages": [
        {
          "stage": "qualified",
          "count": 14
        }
      ]
    },
    "tasks": {
      "total": 42,
      "statuses": [
        {
          "statusId": 0,
          "statusName": "In Progress",
          "statusColor": "#3B82F6",
          "count": 12
        }
      ]
    },
    "overdueTasksCount": 3
  }
}