# Errors and limits

> The error codes of the WhatsBuilt API, what to do about each, and the rate limits.

## Errors

Every error from `/v1` has the same body:

```json
{ "error": "This operation needs the scope findings:read", "code": "INSUFFICIENT_SCOPE", "details": { "scope": "findings:read" }, "request_id": "4c0f…" }
```

Branch on `code`; `error` is a sentence for people and may change. Give `request_id` when you contact us about a call. Every answer also carries it as the `X-Request-Id` header.

| Status | `code` | What to do |
|:-------|:-------|:-----------|
| `400` | `VALIDATION_ERROR` | A parameter is wrong: a time without an offset, a date that does not exist, more than 9 fractional digits, `modified_to` before `modified_from`, a `limit` outside 1–1000, or an unknown filter value. `details` lists each problem. A call stopped at its time limit (a template save, a carry-over, a carry-over undo, the deviations CSV) has one entry with `params.reason` `TIME_LIMIT` and `params.operation` `template_save`, `carry_over_apply`, `carry_over_undo` or `export`. Nothing was saved: send less in one call. A template change whose added and removed steps times the inspections that use the template exceed 30 000 is refused before anything is saved, with one entry whose `params.reason` is `TOO_LARGE`; `params.steps`, `params.inspections`, `params.size` and `params.limit` give the numbers. Change fewer steps in one call |
| `400` | `INVALID_CURSOR` | The cursor is malformed, from another list, or sent with other parameters. Send `next_cursor` with the parameters of the page it came from |
| `401` | `UNAUTHORIZED` | The token is missing, malformed, expired or revoked, or its key was removed. Fetch a new token. If that fails too, the integration may be disabled or revoked |
| `403` | `INSUFFICIENT_SCOPE` | The integration lacks the permission. `details.scope` names it; an administrator can add it on *Integrations* |
| `403` | `INSUFFICIENT_PROJECT_ROLE` | The project is not one of the integration's, or the role its permissions give does not cover the write |
| `403` | `PUBLIC_API_DISABLED` | An administrator has turned off the API for the integration's organisation (*Settings* › *Connections* › *API*). On a project's routes (`/v1/projects/{projectId}/…`), also when the organisation that owns the project has turned it off |
| `404` | `ROUTE_NOT_FOUND` | No such endpoint in `/v1` |
| `403` | `FEATURE_OFF` | The project's organisation does not use the feature: the *Takt board* for element events, zones, the takt board, zone handoffs and deviations, the schedule for schedule imports and tasks, carry-over for carrying data to new elements, the maintenance phase for the lifecycle, phase and handovers |
| `403` | `INSUFFICIENT_ROLE` | The operation needs an admin of the organisation. Deleting another organisation's project answers `404` when the integration is on the project, and `403 INSUFFICIENT_PROJECT_ROLE` otherwise |
| `403` | `MEMBER_EXTERNAL_ADD_FORBIDDEN` | Adding by e-mail is only for projects of the integration's own organisation |
| `400` | `MEMBER_OTHER_ACCOUNT` | The person belongs to another organisation and has no approved access request. Add them by e-mail, or approve their request |
| `404` | `MEMBER_EMAIL_NOT_FOUND` | No person has a WhatsBuilt account with this address. Nothing was saved |
| `409` | `PROJECT_OWNER_ROLE_LOCKED` | The owner's role cannot be changed |
| `409` | `LAST_PROJECT_MEMBER` | The last person of a project cannot be removed |
| `409` | `PROJECT_PHASE_TRANSITION_INVALID` | The project cannot move to that phase now, or it is not completed for a handover |
| `409` | `HANDOVER_PENDING_EXISTS` | The project already has a pending handover request |
| `409` | `HANDOVER_NAME_TAKEN` | A fail-reason list name became taken in the receiving organisation during the handover. Try again |
| `403` | `SCOPE_NOT_HELD` | An integration can give another integration only scopes it holds itself, and adds a key to or enables only one whose scopes it holds. `details.scopes` names the missing ones |
| `403` | `INTEGRATION_SELF` | An integration cannot change the scopes, keys, status or projects of itself or of an integration up its creator chain. An admin does that on *Integrations* |
| `403` | `PROJECTS_NOT_HELD` | An integration can give another integration only projects it reaches itself. `details.project_ids` names the others |
| `403` | `INTEGRATION_ON_OTHER_PROJECTS` | The integration is on another organisation's project, so only a person admin adds a key to it or enables it, in the app |
| `409` | `LAST_ADMIN` | The organisation's last person admin cannot be demoted or removed through the API |
| `409` | `INTEGRATION_ALREADY_MEMBER` | The other organisation's integration is already on the project |
| `404` | `NOT_FOUND` | The project, finding, comment, viewpoint, draft, event, label, model, model version, reference document, template, checklist, plan, inspection, zone or schedule task does not exist, or the integration cannot reach it. `details.resource` names it |
| `400` | `BCF_ARCHIVE_INVALID` | The BCF import's file is not a ZIP archive that can be read |
| `400` | `BCF_ARCHIVE_TOO_LARGE` | The BCF archive unpacks to more than 40 MiB. Split it into smaller archives |
| `400` | `BCF_ENTRY_TOO_LARGE` | One XML file of the BCF archive is over 5 MiB unpacked |
| `400` | `BCF_TOO_MANY_ENTRIES` | The BCF archive has more than 5,000 files |
| `400` | `BCF_TOO_MANY_TOPICS` | The BCF archive has more than 2,000 topics. Split it into smaller archives |
| `400` | `MISSING_FILE` | A BCF import's form field `file` holds text, not a file. Without the field the answer is `VALIDATION_ERROR` |
| `400` | `DOCUMENT_TYPE_NOT_ALLOWED` | A reference document must be a PDF |
| `400` | `DOCUMENT_TOO_LARGE` | The reference document is over 20 MB |
| `400` | `DOCUMENT_UPLOAD_INCOMPLETE` | The reference document's upload did not finish. Upload it again |
| `400` | `DOCUMENT_CONTENT_MISMATCH` | The uploaded file is not a PDF |
| `400` | `UPLOAD_ALREADY_QUEUED` | The model version is already queued for processing; wait for it instead of retrying |
| `403` | `LABEL_LINK_NOT_ALLOWED` | Only a project administrator links labels on this project. The project's administrator can let inspectors link them |
| `409` | `ASSET_ALREADY_LABELLED` | The element already has a label. `details.giai` names it when known |
| `409` | `LABEL_RETIRED` | The label is out of use and cannot be linked again. Create a new label |
| `409` | `CONFLICT` | The label is on another element: send `"move": true` to move it, or take it out of use and create a new one. Or the reference document's upload is already recorded |
| `409` | `UPLOAD_NOT_CLAIMABLE` | The model version is already processing or processed, or the model has no complete version to update yet |
| `409` | `MODEL_BUSY` | Another version of the model is being processed. Try again when it is done |
| `409` | `MODEL_CHANGED` | A newer version of the model finished first, so this file was not processed. Upload it again as a new version |
| `409` | `UPLOAD_HAS_LINKED_ELEMENTS` | The unfinished upload's elements carry labels, inspections or other data. Process it again instead of deleting it |
| `400` | `CHECK_GROUP_UNAVAILABLE` | A step names a checklist that is not the project's or its organisation's. `details.checkGroupId` names it |
| `400` | `PLAN_NOT_COVERING` | The `plan_id` sent is not active or does not cover the element |
| `409` | `TEMPLATE_IN_USE` | Inspections or plans use the template, so it cannot be deleted |
| `409` | `STEP_HAS_RESULTS` | A step left out of `steps` has recorded results. `details.steps` names them; keep them in the list |
| `409` | `TEMPLATE_STEPS_STALE` | The template is in use and `steps` keeps none of its steps. Send the existing steps with their `id` |
| `409` | `TEMPLATE_STEPS_REQUIRED` | The template is in use, so `steps` cannot be empty |
| `409` | `DEFAULT_TEMPLATE_CONFLICT` | Another template became the default at the same moment. Send the request again |
| `409` | `CHECK_GROUP_IN_USE` | A template step or a recorded result uses the checklist, so it cannot be deleted |
| `409` | `CHECK_GROUP_VERSION_CONFLICT` | The checklist changed at the same moment. Read it and send the change again |
| `409` | `PLAN_IN_USE` | The plan has open inspections. Archive it instead |
| `409` | `PLAN_NOT_ACTIVE` | The action needs an active plan |
| `409` | `PLAN_TEMPLATE_LOCKED` | The plan already has inspections, so its template cannot change. Create a new plan |
| `409` | `PLAN_CHOICE_REQUIRED` | Several active plans cover the element or use the template. Send one of `details.plans` as `plan_id` |
| `409` | `ELEMENT_HAS_OTHER_WORK` | The element has open work under another plan or template. Send `confirm=true` to go on |
| `400` | `NO_LINKED_TOPIC` | The step has no finding to comment on or attach a photo to. `{stepId}` is the step's `step_id`, not its `id` |
| `403` | `PLAN_RECORDED_BY_OWNER` | The inspection's plan belongs to another organisation, which records its results |
| `403` | `STEP_REOPEN_NOT_ALLOWED` | Only who recorded the verdict, or a project administrator, reopens the step |
| `409` | `PRIOR_STEP_INCOMPLETE` | A required step before this sequential step has not passed. `details.blockingStep` names it |
| `409` | `STEP_HAS_CHECKS` | The step is passed by its checks. Record each check instead |
| `400` | `HANDOFF_TRANSITION_INVALID` | Defects go with `received` or `returned`, and `reopened` needs a `note`. As `409` the task is not in a state the kind follows, or the zone changed meanwhile |
| `400` | `HANDOFF_BLOCKING_DEFECT_REQUIRED` | `returned` needs at least one defect with `"blocking": true` |
| `400` | `HANDOFF_ELEMENT_NOT_IN_ZONE` | A defect names an element outside the zone |
| `409` | `HANDOFF_APPROVAL_OFF` | The project does not use approval; `received` is the last state |
| `409` | `DRAFT_DECIDED` | The finding draft was already published or rejected. `details.status` says which |
| `409` | `DRAFT_LIMIT` | The project already holds 500 pending finding drafts. Try again once the inspectors have handled some |
| `410` | `RESOURCE_DELETED` | What this `Idempotency-Key` created has since been deleted, so the repeat creates nothing. `details.id` names it; use a new key to create it again |
| `422` | `IDEMPOTENCY_KEY_REUSED` | The `Idempotency-Key` was already used with another body. Use a new key for a new write |
| `422` | `WINDOW_BEFORE_RETENTION` | The window starts more than 400 days ago, before the oldest deletions kept. `details.oldest_from` is the earliest start; load again without a window |
| `429` | `RATE_LIMITED` | Too many calls. Wait for the seconds in `Retry-After` |
| `503` | `LABEL_GENERATION_INCOMPLETE` | No labels were created. Send the same request again |
| `503` | `UPLOAD_NOT_READY` | Model processing is not available right now. Send the same request again in a moment |
| `503` | `DATABASE_UNAVAILABLE` | The service is starting. Nothing was done; wait for `Retry-After` and send the same request again |
| `503` | `DATABASE_UNAVAILABLE_INFLIGHT` | The service failed during the call. A list call can be sent again |

The token endpoint answers OAuth errors instead; see [Get an access token](/en/integrations/get-an-access-token/#when-the-token-endpoint-refuses).

### Times

Send times as RFC 3339 with an offset: `Z` or `±hh:mm`. Lower-case `t` and `z` are accepted. Up to 9 fractional digits are accepted; digits past microseconds are dropped. 10 or more fractional digits, a time without an offset and a date that does not exist answer `400 VALIDATION_ERROR`. Answers give times in UTC with microseconds, such as `2026-11-17T08:14:03.512844+00:00`.

## Limits

| Limit | Value |
|:------|:------|
| Calls | 120 a minute per integration |
| Token requests | 30 a minute per integration, and 60 a minute from one address |
| Page | 1000 rows or about 2 MB, whichever comes first |
| Access token | 15 minutes |
| Deletions kept | 400 days |
| Call log | 90 days |
| IFC processing | 60 files an hour per integration |
| Reference document uploads | 200 in 15 minutes per integration |

Every answer to a valid token carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds until the minute starts again). A `429` also carries `Retry-After`.

A day's collection for a large project, tens of thousands of elements of which ten thousand changed, is a few dozen calls: well inside the limit. Ask for a full load without a window only when you need one.
