Upload and update models
An integration, such as a design team’s model server or a document management system, can upload a project’s IFC models and their new versions, follow the processing, handle the elements a new version removed, and add reference documents, as a project administrator does on Mallit in the app. See Upload an IFC model for how the app shows the same.
What you need
Section titled “What you need”- The permission
models:writefor every write on this page except deleting a model, which needsmodels:delete. Either gives the integration the administrator role on its projects, because uploading and deleting models are administrator actions in the app. The administrator role comes only in projects of the integration’s own organisation; in another organisation’s project the writes answer403 INSUFFICIENT_PROJECT_ROLE. An organisation administrator chooses the permissions; see Create an integration. models:readto read model versions, carry-overs and reference documents. Downloading an IFC file and the removed-element reads also need the administrator role, so they needmodels:writeas well.- An access token whose scopes include them. The new elements are read with
elements:read.
Upload a model
Section titled “Upload a model”- Start the upload. Without
model_idthe file starts a new model:
curl -X POST "https://api.whatsbuilt.fi/v1/projects/$PROJECT/model-versions" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: rak-2026-11-20" \ -d '{"filename":"RAK_runko.ifc"}'The answer is 201 with the pending model version and a presigned upload address:
{ "model_version": { "id": "9b2e…", "model_id": "9b2e…", "filename": "RAK_runko.ifc", "status": "pending", "version": null, "…": "…" }, "upload_url": "https://…", "method": "PUT", "headers": { "Content-Type": "application/octet-stream" }, "expires_in": 3600 }- Upload the file with exactly those headers, at most 1 GB:
curl -X PUT "$UPLOAD_URL" -H "Content-Type: application/octet-stream" --data-binary @RAK_runko.ifc- Start the processing:
curl -X POST "https://api.whatsbuilt.fi/v1/projects/$PROJECT/model-versions/$VERSION/ingest" \ -H "Authorization: Bearer $TOKEN"The answer is 202 at once. Read GET /v1/projects/{projectId}/model-versions/{versionId} until status is complete or failed, a few seconds to some minutes. A complete version has its version number and element_count, and its elements come in GET /v1/elements; see Collect changes in a window.
A repeat of step 1 with the same Idempotency-Key and body returns the same model version with 200 and a new upload address; once the file has been processed, upload_url is null. Each processing counts against the integration’s hourly limit of 60 IFC files, like a person’s: over it the answer is 429 with Retry-After.
Upload a new version
Section titled “Upload a new version”Send the model’s model_id in step 1, then steps 2 and 3 as above:
curl -X POST "https://api.whatsbuilt.fi/v1/projects/$PROJECT/model-versions" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -H "Idempotency-Key: rak-2026-12-01" \ -d '{"filename":"RAK_runko_rev_A.ifc","model_id":"9b2e…"}'Labels, inspections and other data stay on the elements whose GlobalId the new file keeps. The new version’s diff counts the elements kept, added and removed, and how many removed ones carry data. A model that has no complete version yet answers 409 UPLOAD_NOT_CLAIMABLE, and one whose version is being processed 409 MODEL_BUSY.
POST …/model-versions/{versionId}/retry processes a version again: a complete one as a new version of its model, a failed one in place. It also counts against the hourly limit.
Removed elements and carry-over
Section titled “Removed elements and carry-over”An element missing from the new file is archived with its data: it comes in GET /v1/elements with archived_at. GET /v1/projects/{projectId}/models/removed-summary counts each model’s removed elements, and GET …/models/{modelId}/removed-elements lists them with their label, inspections and plans.
When the designer gave an element a new GlobalId, carry its data to the new element (Siirrä tiedot in the app):
curl -X POST "https://api.whatsbuilt.fi/v1/projects/$PROJECT/models/$MODEL/carry-overs" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -H "Idempotency-Key: rev-a-carry-1" \ -d '{"pairs":[{"from":"1hOSvn6df7F8_7GcBWlRGQ","to":"2O2Fr$t4X7Zf8NOew3FLOH"}]}'from is a removed element, to a live element of the current version. GET …/models/{modelId}/carry-over-candidates?search=SK-1112 finds candidates, and with the carry-over feature removed-elements proposes one for each row. The label, inspections, plan rows and element events move in one transaction; a pair that would put two labels or two inspections with results on one element comes back with status refused and the code LABEL_ON_BOTH or INSPECTION_ON_BOTH, and the other pairs are carried. Each carried pair has a carry_over_id; all pairs of a call share a batch_id. A repeat with the same Idempotency-Key and body returns the first call’s answer and moves nothing again. A carry-over still running 25 seconds after the request arrived answers 400 VALIDATION_ERROR and carries nothing: carry fewer pairs at a time.
Take carry-overs back with their ids or the whole batch:
curl -X POST "https://api.whatsbuilt.fi/v1/projects/$PROJECT/models/$MODEL/carry-overs/undo" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{"batch_id":"5d0c…"}'Work recorded on the new element after the carry-over stays there and is counted in stayed. An undo still running 25 seconds after the request arrived answers 400 VALIDATION_ERROR and undoes nothing: undo fewer carry-overs at a time, by carry_over_ids. Carry-over needs the organisation’s carry-over feature; without it these calls answer 403 FEATURE_OFF, and GET /v1/carry-overs names the project in skipped_projects with FEATURE_OFF.
Mark removed elements resolved when nothing needs to move: POST …/models/{modelId}/removed-elements/resolve with {"global_ids":[…]} or {"all":true}. Their data stays.
Delete a model
Section titled “Delete a model”Deleting needs models:delete. GET …/model-versions/{versionId}/impact tells what deleting takes. DELETE /v1/projects/{projectId}/model-versions/{versionId} on a complete version deletes the whole model: every version and its elements. The model’s labels and inspections are left without an element. Its element events and carry-overs stay as history: they keep the element’s global id and name and show model_deleted: true. This cannot be undone. On a failed or unfinished upload it deletes that upload only, and answers 409 UPLOAD_HAS_LINKED_ELEMENTS if its elements carry data.
Reference documents
Section titled “Reference documents”A reference document (ohje) is a PDF that a template or a step shows to the inspector. Add it to the project in three calls:
curl -X POST "https://api.whatsbuilt.fi/v1/projects/$PROJECT/reference-documents/uploads" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{"filename":"IV-kone_asennusohje.pdf","content_type":"application/pdf","byte_size":4404019}'
curl -X PUT "$UPLOAD_URL" -H "Content-Type: application/pdf" -H "Content-Length: 4404019" --data-binary @IV-kone_asennusohje.pdf
curl -X POST "https://api.whatsbuilt.fi/v1/projects/$PROJECT/reference-documents" \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -H "Idempotency-Key: iv-kone-ohje" \ -d '{"key":"documents/…","filename":"IV-kone_asennusohje.pdf"}'The last call checks that the upload finished and is a PDF of at most 20 MB, and answers 201 with the document; a repeat with the same Idempotency-Key answers 200 with the same document. Attaching it to a template comes with the inspection writes. Download one with GET …/reference-documents/{documentId}/file, which redirects to the file.
Follow models, carry-overs and documents
Section titled “Follow models, carry-overs and documents”These lists work in a window like the others:
GET /v1/model-versions: one row per uploaded file. Every version of a model sharesmodel_id; the highest completeversionis the current one. A version changes as its processing moves on. Filter withstatusormodel_id.GET /v1/carry-overs: each carry-over withfrom_global_idandto_global_id; an undone one is a change withundone_at. Filter withbatch_id. A project whose organisation does not use carry-over is inskipped_projects.GET /v1/reference-documents: the project’s reference documents. A document no template uses any more is deleted.
A deleted model comes as a deletion of each of its versions, elements and carry-overs.
The error codes are on Errors and limits and the fields in the API reference.