# Integrations in another organisation's project

> A project's admin adds another organisation's integration to the project by its client_id, and the integration reads and records in that project only.

An element factory's data often lives in a contractor's project: the factory supplies the elements, the contractor owns the project. The factory's integration, for example its production control, gets into the contractor's project when the contractor's project admin adds it there. The integration then sees that project only, none of the contractor's other projects.

On this page the factory is the integration's organisation and the contractor is the organisation that owns the project.

## Add the integration to the project

1. **The factory's administrator** opens *Integrations*, picks the integration and copies its `client_id` from the *Setup* card. They give it to the contractor's project admin. A `client_id` is not a secret: it signs nobody in and gets no access token without the factory's private key.
2. **The contractor's project admin** opens the project's members. Under *Integrations* they choose *Add another organisation's integration* and paste the `client_id`.
3. *May record element deliveries and installations* gives the integration the inspector role in the project. Without it the integration is a viewer.

The integration shows among the members under *Integrations* as *Another organisation · {organisation}*. The project admin can change its role between viewer and inspector or remove it from the project.

Only a project admin of the organisation that owns the project can add another organisation's integration. A member of another organisation cannot, even as the project's admin, and the integration's own organisation cannot add it to another organisation's project. Your own organisation's integration gets its projects on the integration's page; see [Create an integration](/en/integrations/create-an-integration/).

## What the integration sees and may do

- `GET /v1/projects` lists the project. `owner_account_id` and `owner_account_name` name the contractor, and `role` is the integration's role in the project.
- The integration reads the project's elements, inspections, findings and other data on the same lists as its own projects' data; see [Collect changes in a window](/en/integrations/collect-changes/).
- Two things bound what the integration may do. The permissions the factory's administrator gave it decide which calls it may make. The role the contractor chose decides which of them it may make in this project. Element events need the `element-events:write` permission and the inspector role. Finding drafts need `finding-drafts:write`; the viewer role is enough. Permissions that give the administrator role in the factory's own projects, such as `findings:delete`, `elements:write` and `elements:delete`, do not give it here: deleting findings, importing BCF, taking labels out of use and deleting labels answer `403 INSUFFICIENT_PROJECT_ROLE`, and linking a label needs the inspector role and the project's setting that lets inspectors link labels. When the factory's administrator changes the integration's permissions, its role in the contractor's project does not change.
- The contractor's settings apply to the project. If the contractor does not use the *Takt board*, lists skip the project's element events with `FEATURE_OFF` and recording answers `403 FEATURE_OFF`.
- If the contractor turns the API off, the lists name the project in `skipped_projects` with `reason: "PUBLIC_API_DISABLED"` and return none of its rows, and calls to the project's own addresses (`/v1/projects/{projectId}/…`), reads as well as records, answer `403 PUBLIC_API_DISABLED`. The factory's own projects keep working. When the project leaves `skipped_projects`, the API is back on: load the project again without a window (`project_id=…` without `modified_from`), because changes made while it was off are not in your later windows.

## Record in the contractor's project

The calls are the same as in your own project. Record a delivery in a project the integration was added to as an inspector:

```sh
curl -X POST "https://api.whatsbuilt.fi/v1/projects/$PROJECT/element-events" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: load-0417-delivered" \
  -d '{"kind":"delivered","global_ids":["2qL7xVb0P1hO3kQm9aZ001"],"load_ref":"LOAD-0417"}'
```

Propose a finding as a draft, which the contractor's inspector publishes or rejects:

```sh
curl -X POST "https://api.whatsbuilt.fi/v1/projects/$PROJECT/finding-drafts" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: QC-2026-1183" \
  -d '{"title":"Crack at the slab edge","element_global_ids":["2qL7xVb0P1hO3kQm9aZ001"],"source_ref":"QC-2026-1183"}'
```

The rules for the fields and for repeating a call are on [Record element events](/en/integrations/element-events/) and [Create finding drafts](/en/integrations/finding-drafts/). The app shows the records as *Integration · {name}* to the contractor's people too.

## When access ends

Access ends at the next call when

- the contractor's project admin removes the integration from the project's members,
- the factory's administrator chooses *Leave project* on the integration's page, on the *Other organisations' projects* card, or
- the factory's administrator revokes the integration.

`GET /v1/projects?modified_from=…` then lists the project once with `"deleted": true, "reason": "access_removed"`. Drop the project's data from your system. The integration gets back into the project only when the contractor's project admin adds it again.

The integration's page shows the factory's administrator each such project with its organisation and role on the *Other organisations' projects* card. The *Changes* card says who added the integration, changed its role or removed it.

## Errors

| Code | When |
|:-----|:-----|
| `403 INSUFFICIENT_PROJECT_ROLE` | The integration's role in the project is not enough, for example a viewer records an event |
| `403 INSUFFICIENT_SCOPE` | The integration lacks the permission the call needs |
| `403 FEATURE_OFF` | The contractor does not use the feature the call needs |
| `403 PUBLIC_API_DISABLED` | The contractor has turned the API off |

In the app, adding can end in these: *This is your organisation's own integration* (`INTEGRATION_OWN_ORGANISATION`), *The integration is already in this project* (`INTEGRATION_ALREADY_MEMBER`), or not found when the `client_id` is wrong or the integration is revoked. The other codes are on [Errors and limits](/en/integrations/errors-and-limits/).
