---
title: "Department Analytics"
method: GET
path: "/api/cs/department-analytics"
tags: ["customer_service"]
---

# Department Analytics

`GET /api/cs/department-analytics`

## Request

- Base URL: `https://api.pigeonly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pigeonly.com/api/cs/department-analytics`
- Auth: none declared

Customer Service Analytics -- the department health-and-productivity
read-model (Frederick Hutson, 2026-08-09): "Analytics should just be all
the things that someone will want to know to gauge the health and
productivity of a customer service department ... rooted in the company
OS's overall." Gated the SAME way GET /department-overview above already
is (admin:people:read or cs:analytics:read) -- this is the same audience, a
second section of the same page, not a new audience, and `kinds` is
scoped the SAME way GET /department-overview's own fix scopes it
(2026-08-11, Cindy Palma) -- the caller's own tickets:b2c/tickets:b2g
grants, never the full kind list just because the page-access gate
passed.

See department_analytics_service's own module docstring for the full
reuse map (lifecycle.compute_ours_seconds for every duration,
supervisor_service.compute_agent_metrics for deflection/escalation,
supervisor_service.gather_rooster_performance for the Wilson lower
bound) and for why Rooster's figures here are DEPARTMENT-wide, a
different question than GET /rooster-performance's own per-caller desk
view above -- see gather_rooster_department's docstring.

## Query parameters

- `window_days` integer

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os.md) - [All operations](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/llms.txt) - [OpenAPI document](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/revisions/14571c4b7007?raw)
