Skip to content
Suomi

Create a project in the integration's organisation

POST
/v1/projects
Code sample: Shell / cURL
curl --request POST \
--url https://api.whatsbuilt.fi/v1/projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "description": "example" }'

Needs organisation:admin. The integration is not the project’s owner: it reaches the project as its organisation’s admin. A repeat with the same Idempotency-Key and body returns the first project with 200; another body answers 422. The key stays bound to that project: once it is deleted, the key answers 410 RESOURCE_DELETED and makes nothing.

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

object
name
required
string
>= 1 characters <= 255 characters
description
string
<= 20000 characters

Example generated

{
"name": "example",
"description": "example"
}

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

Media typeapplication/json

ProjectDetails: one project with its settings.

object
id
required
string format: uuid
name
required
string
description
required
string | null
phase
required

A project phase.

string
Allowed values: construction completed fm_active
owner_account_id
required
string format: uuid
owner_account_name
required
string | null
role
required

The principal’s own role on the project; null when it reaches the project as its organisation’s admin

string | null
allow_inspector_label_linking
required
boolean
handoff_approval
required
boolean
member_count
required

People on the project; integrations are not counted

integer format: int32
created_at
required
string
changed_at
required
string

Example

{
"phase": "construction"
}

The project

Media typeapplication/json

ProjectDetails: one project with its settings.

object
id
required
string format: uuid
name
required
string
description
required
string | null
phase
required

A project phase.

string
Allowed values: construction completed fm_active
owner_account_id
required
string format: uuid
owner_account_name
required
string | null
role
required

The principal’s own role on the project; null when it reaches the project as its organisation’s admin

string | null
allow_inspector_label_linking
required
boolean
handoff_approval
required
boolean
member_count
required

People on the project; integrations are not counted

integer format: int32
created_at
required
string
changed_at
required
string

Example

{
"phase": "construction"
}

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_ROLE when the integration is not an admin of its organisation; FEATURE_OFF when the organisation does not use handovers

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, event or element

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"
}