Skip to content
Suomi

Create an inspection plan

POST
/v1/projects/{projectId}/inspection-plans
Code sample: Shell / cURL
curl --request POST \
--url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/inspection-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "template_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "description": "example", "scope": { "ifc_type": [ "example" ], "storey_name": [ "example" ], "global_ids": [ "example" ] }, "start_date": "2026-03-15", "due_date": "2026-03-15", "assignee_ids": [ "example" ] }'

A plan starts as a draft; activate it with updateInspectionPlan. A repeat with the same Idempotency-Key and body returns the first plan with 200.

projectId
required
string format: uuid
idempotency-key
string
/^[\x21-\x7e]{1,255}$/

A repeat with the same key and body returns the first answer instead of writing again. Keys are per integration and project.

Media typeapplication/json

The body of createInspectionPlan.

object
template_id
required

A template of the project or of its organisation

string format: uuid
name
required
string
>= 1 characters <= 255 characters
description
string | null
<= 2000 characters
scope

Default {}, the whole project

object
ifc_type
Array<string>
>= 1 items <= 100 items
storey_name
Array<string>
>= 1 items <= 100 items
global_ids
Array<string>
>= 1 items <= 1000 items
start_date
string | null format: date

Example

2026-03-15
due_date
string | null format: date

Example

2026-03-15
assignee_ids

Project members who can inspect, in priority order

Array<string>
<= 100 items

The plan an earlier call with the same Idempotency-Key created

Media typeapplication/json

A live inspection plan.

object
id
required

The plan.

string format: uuid
project_id
required

The project.

string format: uuid
template_id
required

Its template.

string format: uuid
name
required

Its name.

string
description
required

Its description.

string | null
scope
required

Keys AND together, values within a key OR; {} is the whole project. New keys may come.

object
ifc_type

IFC types.

Array<string>
storey_name

Storey names.

Array<string>
global_ids

GlobalIds.

Array<string>
assigned

The plan also covers its added elements (listInspectionPlanElements, kind added)

boolean
excluded

The plan leaves out its excluded elements

boolean
start_date
required

YYYY-MM-DD

string | null
due_date
required

YYYY-MM-DD

string | null
status
required

Draft, active, completed or archived; new statuses may come

string
Allowed values: draft active completed archived
created_by
required

Who created it.

string | null
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/
created_at
required

When it was created.

string
modified_date
required

When it was changed last.

string
assignees
required

Its assignees.

Array<object>

An assignee of a plan.

object
user_id
required

The user.

string
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/
name
required

Their name.

string | null
sort_order
required

The first assignee gets the findings of failed steps

integer format: int32
changed_at
required

The row’s change time.

string
deleted
required
boolean

Example

{
"scope": {
"assigned": true,
"excluded": true
},
"status": "draft",
"deleted": false
}

The plan

Media typeapplication/json

A live inspection plan.

object
id
required

The plan.

string format: uuid
project_id
required

The project.

string format: uuid
template_id
required

Its template.

string format: uuid
name
required

Its name.

string
description
required

Its description.

string | null
scope
required

Keys AND together, values within a key OR; {} is the whole project. New keys may come.

object
ifc_type

IFC types.

Array<string>
storey_name

Storey names.

Array<string>
global_ids

GlobalIds.

Array<string>
assigned

The plan also covers its added elements (listInspectionPlanElements, kind added)

boolean
excluded

The plan leaves out its excluded elements

boolean
start_date
required

YYYY-MM-DD

string | null
due_date
required

YYYY-MM-DD

string | null
status
required

Draft, active, completed or archived; new statuses may come

string
Allowed values: draft active completed archived
created_by
required

Who created it.

string | null
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/
created_at
required

When it was created.

string
modified_date
required

When it was changed last.

string
assignees
required

Its assignees.

Array<object>

An assignee of a plan.

object
user_id
required

The user.

string
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/
name
required

Their name.

string | null
sort_order
required

The first assignee gets the findings of failed steps

integer format: int32
changed_at
required

The row’s change time.

string
deleted
required
boolean

Example

{
"scope": {
"assigned": true,
"excluded": true
},
"status": "draft",
"deleted": false
}

Invalid body, parameters or Idempotency-Key

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

Missing, malformed, expired or revoked token

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

INSUFFICIENT_SCOPE; INSUFFICIENT_PROJECT_ROLE when the project role the scopes give does not cover the write, or the project is not the integration’s; PUBLIC_API_DISABLED when the project’s owning organisation has turned the API off

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

No such project or plan, or a draft plan and the role is not admin

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

RESOURCE_DELETED: what this Idempotency-Key created has since been deleted; details.id names it

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

IDEMPOTENCY_KEY_REUSED: the key was used with another body

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

RATE_LIMITED; wait for Retry-After seconds

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}