---
title: "Errors"
description: "Errors come back as JSON with a stable code and a readable message; branch on code, never on message."
url: https://help.officelycrew.com/developers/errors
product: developers
product_name: Developers
type: reference
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
errors:
  - "INVALID_QUERY"
  - "INVALID_CURSOR"
  - "DATE_RANGE_TOO_LARGE"
  - "EXPORT_TOO_LARGE"
  - "INCOMPATIBLE_OFFICE_WEEKDAYS"
  - "INVALID_REQUEST"
  - "UNAUTHORIZED"
  - "FORBIDDEN"
  - "NOT_FOUND"
  - "METHOD_NOT_ALLOWED"
  - "RATE_LIMITED"
  - "INTERNAL_ERROR"
  - "BAD_GATEWAY"
  - "SERVICE_UNAVAILABLE"
related:
  - https://help.officelycrew.com/developers/rate-limits
  - https://help.officelycrew.com/developers/authentication
  - https://help.officelycrew.com/developers/filters-and-dates
  - https://help.officelycrew.com/developers/pagination
---
# Errors

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

Errors come back as JSON with a stable `code` and a readable `message`. Branch on `code`, never on `message`.

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Invalid query parameter 'from': Required."
  }
}
```

## Error codes

| Code | HTTP | Meaning | What to do |
| --- | --- | --- | --- |
| `INVALID_QUERY` | 400 | A report query parameter is invalid. | Fix the parameter named in the message. |
| `INVALID_CURSOR` | 400 | The report cursor is invalid or does not match the query. | Resend the cursor with the same query, or start again without it. |
| `DATE_RANGE_TOO_LARGE` | 422 | The report date range exceeds the supported window. | Shorten the range. |
| `EXPORT_TOO_LARGE` | 422 | The CSV exceeds 10,000 rows; narrow the filters or date range. | Narrow the dates or filters, or use JSON pages. |
| `INCOMPATIBLE_OFFICE_WEEKDAYS` | 422 | Selected offices must have identical operating weekdays. | Request offices with the same working days separately. |
| `INVALID_REQUEST` | 400 | A query parameter or the cursor is invalid. The message says which. | Fix the parameter named in the message. |
| `UNAUTHORIZED` | 401 | The API token is missing, invalid, or revoked. | Check the header and token. |
| `FORBIDDEN` | 403 | The request is not allowed, for example from a browser origin without CORS access. | Call from a server, not a browser. |
| `NOT_FOUND` | 404 | The endpoint does not exist. | Check the path and IDs. |
| `METHOD_NOT_ALLOWED` | 405 | The endpoint only supports GET. | Use GET. |
| `RATE_LIMITED` | 429 | Too many requests. Wait for the number of seconds in Retry-After. | Wait for Retry-After seconds. |
| `INTERNAL_ERROR` | 500 | An unexpected error. Retry later, and quote X-Request-Id if it persists. | Retry later. Quote X-Request-Id if it persists. |
| `BAD_GATEWAY` | 502 | The API could not reach its backend. Retry later. | Retry later. |
| `SERVICE_UNAVAILABLE` | 503 | The API is temporarily disabled. Retry later. | Retry later. |

New codes may be added. For a code you don't recognise, fall back on the HTTP status. The preview `/v1/work-statuses` uses `INVALID_REQUEST` for bad parameters; the other endpoints use `INVALID_QUERY` and `INVALID_CURSOR`.

## X-Request-Id

Every response has an `X-Request-Id` header. Log it, and include it when you [contact support](https://help.officelycrew.com/account/contact-support): it lets us find the request.

```http
X-Request-Id: 62685d9b-fc09-419b-b254-7710a652d66f
```
