> ## Documentation Index
> Fetch the complete documentation index at: https://docs.collective.work/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics

> Export organization usage, recruiter activity, and engagement

Get the data behind your organization's Analytics dashboard with `GET /analytics`.

## Sandbox

Start with fictional data using your **organization API key**, available in
[Organisation settings](https://app.collective.work/recruiter/organization/api). Your organization needs at least one recruiter;
production API access and analytics access are not required.

Set `COLLECTIVE_API_KEY` in your terminal or server environment, then make a request:

```bash curl theme={null}
curl 'https://api.collective.work/sandbox/v1/analytics' \
  --header "Authorization: Bearer ${COLLECTIVE_API_KEY}"
```

```javascript JavaScript (Node.js) theme={null}
const response = await fetch('https://api.collective.work/sandbox/v1/analytics', {
  headers: { Authorization: `Bearer ${process.env.COLLECTIVE_API_KEY}` },
});
if (!response.ok) throw new Error(`Analytics HTTP ${response.status}`);
console.log(await response.json());
```

The sandbox returns **four fictional recruiters**, including one with no activity. Use IDs from its
`recruiters` array to filter requests; real recruiter IDs are rejected. Fixed UTC dates give repeatable results.

## Production

Ask [support@collective.work](mailto:support@collective.work) to enable **production API access** and
**analytics access**, then switch the URL to:

```text theme={null}
https://api.collective.work/production/v1/analytics
```

Production returns your organization's data. Use the recruiter IDs from its response when filtering.

## Choose your report

By default: **all recruiters, all sections, daily totals, last 30 UTC calendar days including today**.

| Section | What you get |
| - | - |
| `usage` | Event totals and time series for profiles, Sherlock, searches, jobs, applications, messages, and contacts. |
| `activity` | Distinct active days per recruiter and feature. |
| `engagement` | Recruiters grouped as power, regular, or casual users. |
| `recruiterSummary` | Each recruiter's event counts and overall active days. |

Match IDs to names using `recruiters`; see the resolved filters in `metadata.filters`.
Inactive recruiters, including former members still attached to the organization, remain in the results
with zero counts where appropriate.

Usage counts **events**; activity counts **distinct UTC days**. Multiple events on one day count as
one active day. Overall activity combines days across Sherlock, searches, jobs, and messages.

* **Recruiters:** repeat `recruiterIds` to select multiple people.
* **Sections:** repeat `sections`, for example `sections=usage&sections=engagement`. Only selected sections are returned.
* **Dates:** choose a preset `range`, or use `range=CUSTOM` with inclusive UTC `from` and `to` dates (`YYYY-MM-DD`).
* **Grouping:** set `breakdown` to `DAILY`, `WEEKLY`, `MONTHLY`, or `YEARLY`.

Weeks start on Monday; months and years start on their first day. A first bucket may start before
your range, but only events within the requested dates count. Dashboard dates selected in a local
timezone can differ from these UTC dates.

> [!NOTE]
>
> Requests that are too complex are rejected. Shorten the timeframe, or adjust the filters or
> breakdown as indicated by the error message.

See [Get Analytics](https://docs.collective.work/api-reference/endpoint/analytics/get.md) for parameters, metric definitions, and responses.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.