---
title: "GET /v1/insights/offices"
description: "GET /v1/insights/offices returns the numbers behind the Insights office dashboard for a period, each compared with the period before."
url: https://help.officelycrew.com/developers/v1-insights-offices
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/filters-and-dates
  - https://help.officelycrew.com/developers/weekly-attendance
  - https://help.officelycrew.com/developers/v1-offices
  - https://help.officelycrew.com/developers/errors
---
# GET /v1/insights/offices

> **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**.

Returns the numbers behind the Insights office dashboard: people, bookings, daily usage, the busiest day, a daily series and weekday averages, each compared with the period before.

Metrics count bookings, whether or not people checked in. Leave out `officeIds` to cover all current offices. The selected offices must share the same operating weekdays, or you get `422 INCOMPATIBLE_OFFICE_WEEKDAYS`. No bookings gives a zero report with `mostPopularDay: null`.

**Rate limit:** 5 requests a minute (standard 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/offices
```

Last 30 days, one office and team:

```sh
curl "https://api.officelycrew.com/v1/insights/offices?officeIds=office_london&teamIds=team_product&period=30_days&referenceDate=2026-10-15" \
  -H "Authorization: Bearer $OFFICELY_API_TOKEN"
```

A custom month:

```sh
curl "https://api.officelycrew.com/v1/insights/offices?period=custom&from=2026-09-01&to=2026-09-30" \
  -H "Authorization: Bearer $OFFICELY_API_TOKEN"
```

### Query parameters

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `officeIds` | string[] | — | — | Only count bookings in these offices. Leave out for all current 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. `YYYY-MM-DD`. |
| `period` | string | — | `30_days` | Reporting window that ends on, and includes, `referenceDate`. `custom` needs `from` and `to`. One of: `7_days`, `30_days`, `90_days`, `custom`. |
| `from` | date | — | — | First date when `period=custom`. Not allowed with a preset period. `YYYY-MM-DD`. |
| `to` | date | — | — | Last date when `period=custom`, on or after `from`. The range can be at most 366 days. `YYYY-MM-DD`. |

### Rules across parameters

- `period=custom` requires both from and to; presets forbid from and to.
- Ranges are inclusive, from ≤ to, and at most 366 days.
- All selected offices must have identical operating weekdays; otherwise return 422 `INCOMPATIBLE_OFFICE_WEEKDAYS`. Zero eligible offices returns an empty/zero report with an empty `workingWeekdays` array.

## 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 result. |
| └ `totalOfficeUsers` | object | Distinct people with a booking in the range. |
| └ `totalOfficeUsers.value` | integer | This period. |
| └ `totalOfficeUsers.previousValue` | integer | The comparison period. |
| └ `totalOfficeUsers.changePercent` | number \| null | Change in %, rounded to the nearest tenth. `0` when both are 0; `null` when growing from 0. |
| └ `totalBookings` | object | Bookings (person, office and date). Its `changePercent` is the dashboard’s Office attendance figure. |
| └ `totalBookings.value` | integer | This period. |
| └ `totalBookings.previousValue` | integer | The comparison period. |
| └ `totalBookings.changePercent` | number \| null | Change in %, rounded to the nearest tenth. `0` when both are 0; `null` when growing from 0. |
| └ `averageDailyUsage` | object | People a working day, rounded to the nearest tenth. `0` when the range has no working days. |
| └ `averageDailyUsage.value` | number | This period. |
| └ `averageDailyUsage.previousValue` | number | The comparison period. |
| └ `averageDailyUsage.changePercent` | number \| null | Change in people a working day, in %, rounded to the nearest tenth. `0` when both are 0. `null` when growing from 0, or when either range has no working days. |
| └ `mostPopularDay` | string \| null | Working weekday with the highest `averageBookedCount`. Earliest weekday wins a tie; `null` with no bookings on working days. One of: `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`. |
| └ `attendance[]` | object[] | One row per date in the range, including days with no bookings. |
| └ `attendance[].date` | string (date) | Office-local date. |
| └ `attendance[].bookedCount` | integer | Bookings that day. |
| └ `averageNumberOfPeoplePerDay[]` | object[] | One row per operating weekday. |
| └ `averageNumberOfPeoplePerDay[].weekday` | string | Day of the week. One of: `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`. |
| └ `averageNumberOfPeoplePerDay[].bookedCount` | integer | Bookings on that weekday in the range. |
| └ `averageNumberOfPeoplePerDay[].workingDayCount` | integer | Working days on that weekday in the range. |
| └ `averageNumberOfPeoplePerDay[].averageBookedCount` | number | Average bookings on that weekday, rounded to the nearest tenth. |
| `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. |
| └ `range` | object | The dates covered, inclusive. |
| └ `range.from` | string (date) | First date of the window. |
| └ `range.to` | string (date) | Last date of the window. |
| └ `range.days` | integer | Number of calendar days, inclusive. |
| └ `comparisonRange` | object | The period of the same length right before `range`, used for `previousValue`. |
| └ `comparisonRange.from` | string (date) | First date of the window. |
| └ `comparisonRange.to` | string (date) | Last date of the window. |
| └ `comparisonRange.days` | integer | Number of calendar days, inclusive. |
| └ `workingWeekdays` | string[] | Operating weekdays shared by the selected offices, used for the averages. Each one of: `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `Sunday`. |

### Response headers

| Header | Description |
| --- | --- |
| `Cache-Control` | Always `no-store`. |
| `X-Request-Id` | ID of this request. Quote it when you contact support. |

## 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": {
    "totalOfficeUsers": {
      "value": 1,
      "previousValue": 1,
      "changePercent": 0
    },
    "totalBookings": {
      "value": 2,
      "previousValue": 2,
      "changePercent": 0
    },
    "averageDailyUsage": {
      "value": 0.4,
      "previousValue": 0.4,
      "changePercent": 0
    },
    "mostPopularDay": "Monday",
    "attendance": [
      {
        "date": "2026-10-09",
        "bookedCount": 0
      },
      {
        "date": "2026-10-10",
        "bookedCount": 0
      }
    ],
    "averageNumberOfPeoplePerDay": [
      {
        "weekday": "Monday",
        "bookedCount": 1,
        "workingDayCount": 1,
        "averageBookedCount": 1
      },
      {
        "weekday": "Tuesday",
        "bookedCount": 0,
        "workingDayCount": 1,
        "averageBookedCount": 0
      }
    ]
  },
  "meta": {
    "generatedAt": "2026-10-15T12:00:00Z",
    "referenceDate": "2026-10-15",
    "selection": {
      "officeIds": [
        "office_london"
      ],
      "teamIds": [],
      "userIds": []
    },
    "range": {
      "from": "2026-10-09",
      "to": "2026-10-15",
      "days": 7
    },
    "comparisonRange": {
      "from": "2026-10-02",
      "to": "2026-10-08",
      "days": 7
    },
    "workingWeekdays": [
      "Monday",
      "Tuesday"
    ]
  }
}
```

## 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. |
| 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 | `DATE_RANGE_TOO_LARGE` | The date range is longer than the endpoint allows. |
| 422 | `INCOMPATIBLE_OFFICE_WEEKDAYS` | The selected offices don’t share the same operating weekdays. |
| 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. |
