---
title: "GET /v1/insights/people"
description: "GET /v1/insights/people lists people with their office attendance this week, over the last four weeks and as a trend, and exports the Recent activity CSV."
url: https://help.officelycrew.com/developers/v1-insights-people
product: developers
product_name: Developers
type: endpoint
platforms: [slack, teams]
private_beta: "The Officely Crew API is in private beta. Want in? [Contact support](/account/contact-support) to ask to join, and we'll turn on API tokens for your workspace. Once it's on, Account Admins see the API token setting under **Account & Billing**."
audience: [developer]
updated: 2026-11-30
verified: 2026-11-30
related:
  - https://help.officelycrew.com/developers/csv-exports
  - https://help.officelycrew.com/developers/pagination
  - https://help.officelycrew.com/developers/v1-insights-person
  - https://help.officelycrew.com/developers/rate-limits
---
# GET /v1/insights/people

> **Private beta.** The Officely Crew API is in private beta. Want in? [Contact support](https://help.officelycrew.com/account/contact-support) to ask to join, and we'll turn on API tokens for your workspace. Once it's on, Account Admins see the API token setting under **Account & Billing**.

Lists people with their attendance: this week, the last four weeks against their usual, regular weekdays, weekly totals and a six-point trend.

This is the Insights people table. Figures are anchored to `referenceDate`: a date range doesn’t change them. Add `format=csv` for the Recent activity export, which has only active, onboarded people.

**Rate limit:** 5 requests a minute (standard tier). CSV: 1 a minute (bulk tier). See [Rate limits](https://help.officelycrew.com/developers/rate-limits).

Try it with your token in the [interactive docs](https://api.officelycrew.com/docs): select **Authorize**, paste the token without `Bearer`, then **Try it out**.

## Request

```http
GET https://api.officelycrew.com/v1/insights/people
```

Most in the office over four weeks:

```sh
curl "https://api.officelycrew.com/v1/insights/people?sortBy=fourWeekRolling&sortOrder=desc&limit=100" \
  -H "Authorization: Bearer $OFFICELY_API_TOKEN"
```

Recent activity CSV for one team:

```sh
curl "https://api.officelycrew.com/v1/insights/people?teamIds=team_product&referenceDate=2026-10-15&format=csv" \
  -H "Authorization: Bearer $OFFICELY_API_TOKEN"
```

### Query parameters

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `officeIds` | string[] | — | — | Only people who belong to one of these offices, and only count their bookings in these offices. Up to 20 IDs. Comma-separated. |
| `teamIds` | string[] | — | — | Only people currently in one of these teams. Up to 20 IDs. Comma-separated. |
| `userIds` | string[] | — | — | Only these people. Use `id` from `GET /v1/users`, not `platformUserId`. Up to 100 IDs. Comma-separated. |
| `referenceDate` | date | — | — | The day the report is calculated from. Defaults to today (UTC). Can’t be in the future. Repeat it on cursor requests. `YYYY-MM-DD`. |
| `q` | string | — | — | Case-insensitive search on name and email. Up to 100 characters. |
| `includeNonOfficelyUsers` | boolean | — | `false` | Add people who haven’t onboarded yet. [Slack: This adds people from your workspace directory.][Microsoft Teams: Only people the app already knows about can appear.] Must be `false` for CSV. |
| `includeArchived` | boolean | — | `false` | Add archived or deactivated people. Must be `false` for CSV. |
| `sortBy` | string | — | `name` | What to sort people by. Ties sort by `user.id`; nulls sort last. One of: `name`, `daysInThisWeek`, `fourWeekRolling`, `fourWeekPercentageChanged`. |
| `sortOrder` | string | — | `asc` | Sort direction. One of: `asc`, `desc`. |
| `limit` | integer | — | `100` | Rows per page. Not allowed with `format=csv`. 1 to 500. |
| `cursor` | string | — | — | `meta.page.nextCursor` from the previous page. Send it with the same other parameters. Not allowed with `format=csv`. Up to 4096 characters. |
| `format` | string | — | `json` | `csv` returns the whole filtered result as a file, up to 10,000 rows. See [CSV exports](https://help.officelycrew.com/developers/csv-exports). One of: `json`, `csv`. |

### Rules across parameters

- CSV forbids `cursor` and `limit`; `includeNonOfficelyUsers` and `includeArchived` must be false.
- JSON supports all documented population filters; CSV applies the narrower active/onboarded export population.
- CSV has at most 10,000 rows and never silently truncates.

## Response

`200` with `{ "data": [...], "meta" }`. Every listed field is always present. A value that is unavailable or doesn’t apply is `null`.

| Field | Type | Description |
| --- | --- | --- |
| `data[]` | object[] | The results, one per row. |
| └ `user` | object | The person. |
| └ `user.id` | string | Person ID. Use it in paths and `userIds`. |
| └ `user.platform` | string | The chat platform the workspace uses. One of: `slack`, `ms_teams`. |
| └ `user.platformUserId` | string | The person’s user ID on the chat platform. Older records can differ from `id`: use `id` in paths and filters. |
| └ `user.name` | string | Display name. |
| └ `user.email` | string \| null | Email address, or `null`. |
| └ `user.avatarUrl` | string \| null | Profile picture, or `null`. |
| └ `user.homeOfficeId` | string \| null | The person’s first configured office, or `null`. |
| └ `user.teamIds` | string[] | Teams the person is in now. |
| └ `user.isOfficelyUser` | boolean | Whether the person has onboarded. |
| └ `user.state` | string | Whether the person is active, archived or deactivated. One of: `active`, `archived`, `deactivated`. |
| └ `user.invitedAt` | string (date-time) \| null | When the person was invited, or `null`. |
| └ `user.onboardedAt` | string (date-time) \| null | When the person onboarded, or `null`. |
| └ `attendanceStats` | object | Booking-based attendance, anchored to `referenceDate`. |
| └ `attendanceStats.daysInThisWeek` | integer | Office days this week, including days booked up to Sunday. |
| └ `attendanceStats.currentWeekOfficeDays` | string[] | Weekdays booked this week. Each one of: `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`. |
| └ `attendanceStats.fourWeekRolling` | integer | Office days in the four completed weeks before `referenceDate`. |
| └ `attendanceStats.fourWeekAverage` | number | Usual four-week total, from up to 26 completed weeks. The week someone joined counts only if they joined on its Monday. `0` with fewer than four. |
| └ `attendanceStats.fourWeekPercentageChanged` | number | `fourWeekRolling` against `fourWeekAverage`, in %. `0` when the average is 0. |
| └ `attendanceStats.regularWeekdays` | string[] | The weekdays the person is usually in. Each one of: `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`. |
| └ `attendanceStats.weeklyTotals[]` | object[] | This week and up to 26 weeks before it. |
| └ `attendanceStats.weeklyTotals[].weekStarting` | string (date) | Monday of the week. |
| └ `attendanceStats.weeklyTotals[].bookedDays` | integer | Days booked. A date at two offices counts once. |
| └ `attendanceStats.sixMonthTrend[]` | object[] | The last six calendar months, this month included, oldest first. |
| └ `attendanceStats.sixMonthTrend[].from` | string (date) | First day of the month. |
| └ `attendanceStats.sixMonthTrend[].to` | string (date) | Last day of the month. |
| └ `attendanceStats.sixMonthTrend[].bookedDays` | integer | Days booked. A date at two offices counts once. |
| `meta` | object | How the request was read. |
| └ `generatedAt` | string (date-time) | When the response was generated, not how fresh every record is. |
| └ `referenceDate` | string (date) | The reference date used. Repeat it on cursor requests. |
| └ `selection` | object | The filters you sent, as IDs. An empty array means that filter wasn’t sent. |
| └ `selection.officeIds` | string[] | The `officeIds` you sent. |
| └ `selection.teamIds` | string[] | The `teamIds` you sent. |
| └ `selection.userIds` | string[] | The `userIds` you sent. |
| └ `page` | object | Paging. See [Pagination](https://help.officelycrew.com/developers/pagination). |
| └ `page.limit` | integer | Page size used. |
| └ `page.nextCursor` | string \| null | Send as `cursor` to get the next page. `null` on the last page. |
| └ `page.totalCount` | integer | Rows matching the query, across all pages. |

### Response headers

| Header | Description |
| --- | --- |
| `Cache-Control` | Always `no-store`. |
| `X-Request-Id` | ID of this request. Quote it when you contact support. |
| `Content-Disposition` | CSV only: `attachment; filename="officely_<report>_<range>.csv"`. |

## Example response

A synthetic example from the contract, [`/openapi.json`](https://api.officelycrew.com/openapi.json). Lists longer than 2 items are cut to their first 2 here; the contract has the full example.

```json
{
  "data": [
    {
      "user": {
        "id": "usr_alex",
        "platform": "slack",
        "platformUserId": "usr_alex",
        "name": "Alex Morgan",
        "email": "alex@example.com",
        "avatarUrl": null,
        "homeOfficeId": "office_london",
        "teamIds": [
          "team_product"
        ],
        "isOfficelyUser": true,
        "state": "active",
        "invitedAt": "2026-09-13T10:00:00Z",
        "onboardedAt": "2026-09-14T09:00:00Z"
      },
      "attendanceStats": {
        "daysInThisWeek": 2,
        "currentWeekOfficeDays": [
          "Monday",
          "Thursday"
        ],
        "fourWeekRolling": 8,
        "fourWeekAverage": 8,
        "fourWeekPercentageChanged": 0,
        "regularWeekdays": [
          "Monday",
          "Thursday"
        ],
        "weeklyTotals": [
          {
            "weekStarting": "2026-09-14",
            "bookedDays": 2
          },
          {
            "weekStarting": "2026-09-21",
            "bookedDays": 2
          }
        ],
        "sixMonthTrend": [
          {
            "from": "2026-05-01",
            "to": "2026-05-31",
            "bookedDays": 0
          },
          {
            "from": "2026-06-01",
            "to": "2026-06-30",
            "bookedDays": 0
          }
        ]
      }
    }
  ],
  "meta": {
    "generatedAt": "2026-10-15T12:00:00Z",
    "referenceDate": "2026-10-15",
    "selection": {
      "officeIds": [],
      "teamIds": [],
      "userIds": []
    },
    "page": {
      "limit": 100,
      "nextCursor": null,
      "totalCount": 1
    }
  }
}
```

## CSV export

Add `format=csv` for the Recent activity export. You get every filtered row in one file, up to 10,000 rows; leave out `cursor` and `limit`. CSV requests have their own limit of 1 a minute per token, shared with the other export. More about [CSV exports](https://help.officelycrew.com/developers/csv-exports).

Save the file under the name the API gives it:

```sh
curl -OJ "https://api.officelycrew.com/v1/insights/people?teamIds=team_product&referenceDate=2026-10-15&format=csv" \
  -H "Authorization: Bearer $OFFICELY_API_TOKEN"
```

### CSV columns

| Column | Example |
| --- | --- |
| Name | `Alex Morgan` |
| Email | `alex@example.com` |
| User ID | `usr_alex` |
| Number of Days this Week | `2` |
| Last Four Weeks | `8` |
| Last Four Weeks vs Average (%) | `0` |

The synthetic example file from the contract:

```csv
Name,Email,User ID,Number of Days this Week,Last Four Weeks,Last Four Weeks vs Average (%)
Alex Morgan,alex@example.com,usr_alex,2,8,0
```

## Errors

Errors are JSON: `{ "error": { "code", "message" } }`. Branch on `code`, and see [Errors](https://help.officelycrew.com/developers/errors) for every code.

| HTTP | Code | When |
| --- | --- | --- |
| 400 | `INVALID_QUERY` | A parameter is missing, invalid, repeated or unknown. |
| 400 | `INVALID_CURSOR` | The cursor is invalid or doesn’t match the query. |
| 401 | `UNAUTHORIZED` | The token is missing, invalid or revoked. |
| 403 | `FORBIDDEN` | The request isn’t allowed. |
| 404 | `NOT_FOUND` | An ID in a filter isn’t in this workspace. |
| 405 | `METHOD_NOT_ALLOWED` | Only `GET` is supported. |
| 422 | `EXPORT_TOO_LARGE` | The CSV would have more than 10,000 rows. Narrow the filters or date range. |
| 429 | `RATE_LIMITED` | Over the rate limit. Wait for the seconds in `Retry-After`. |
| 500, 502, 503 | `INTERNAL_ERROR`, `BAD_GATEWAY`, `SERVICE_UNAVAILABLE` | Something went wrong on our side. Retry later, and quote `X-Request-Id` if it keeps happening. |
