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.
Try it with your token in the interactive docs: select Authorize, paste the token without Bearer, then Try it out.
Request
Section titled “Request”GET https://api.officelycrew.com/v1/insights/peopleMost in the office over four weeks:
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:
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
Section titled “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. This adds people from your workspace directory.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. One of: json, csv. |
Rules across parameters
Section titled “Rules across parameters”- CSV forbids
cursorandlimit;includeNonOfficelyUsersandincludeArchivedmust 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
Section titled “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. |
└ 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
Section titled “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
Section titled “Example response”A synthetic example from the contract, /openapi.json. Lists longer than 2 items are cut to their first 2 here; the contract has the full example.
{ "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
Section titled “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.
Save the file under the name the API gives it:
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
Section titled “CSV columns”| Column | Example |
|---|---|
| Name | Alex Morgan |
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:
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,0Errors
Section titled “Errors”Errors are JSON: { "error": { "code", "message" } }. Branch on code, and see 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. |
Related
Still need help? Chat to our support team.
Contact support