Skip to content
Suomi

Move the project to another phase

POST
/v1/projects/{projectId}/phase
Code sample: Shell / cURL
curl --request POST \
--url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/phase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "phase": "construction", "occurred_at": "2026-04-15T12:00:00Z" }'

Between construction and completed, either way. fm_active comes only from an accepted handover and cannot be left. Answers 409 PROJECT_PHASE_TRANSITION_INVALID for a move the project cannot make.

projectId
required
string format: uuid
Media typeapplication/json

The body of setProjectPhase.

object
phase
required

A project phase.

string
Allowed values: construction completed fm_active
occurred_at

When it happened; default now. An earlier time is recorded as entered later.

string format: date-time

The lifecycle after the change

Media typeapplication/json

Lifecycle: the phase and its history, newest first.

object
phase
required

A project phase.

string
Allowed values: construction completed fm_active
history
required
Array<object>

One phase change.

object
id
required
string format: uuid
from_phase
required

A project phase.

string
Allowed values: construction completed fm_active
to_phase
required

A project phase.

string
Allowed values: construction completed fm_active
occurred_at
required
string
recorded_at
required
string
entered_later
required
boolean
actor
required
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}$/
actor_name
required
string | null
created_via
required

integration when an integration made the change, app for an app acting for a person, agent for an AI assistant

string | null
via_client_id
required

The integration or app that made the change

string | null
via_client_name
required

For app: the app’s registered name. Show the actor as {actor_name} · via {via_client_name}

string | null
handover_request_id
required
string | null format: uuid
handover
required
One of:

Who handed the project over to whom.

object
from_account_name
required
string | null
to_account_name
required
string | null
requested_by_name
required
string | null
requested_via
required

integration or app when the request came through the API

string | null
requested_by_client_name
required

For app: the app’s registered name

string | null
accepted_by_name
required
string | null
accepted_by_integration
required

The acceptor is an integration

boolean
accepted_via
required

integration or app when the acceptance came through the API

string | null
accepted_by_client_name
required

For app: the app’s registered name

string | null
pending_handover
required

HandoverRequest as an object.

object
id
required
string format: uuid
project_id
required
string format: uuid
to_account_name
required
string
named_admin_name
required
string | null
named_admin_email
required
string
requested_at
required
string
expires_at
required
string
entered_later
boolean
recorded_at
string
last_handover
required
One of:

The project’s latest request that ended without acceptance.

object
id
required
string format: uuid
status
required

A last handover status.

string
Allowed values: rejected cancelled expired
to_account_name
required
string | null
decided_by_name
required
string | null
decided_by_integration
required
boolean
decided_via
required

integration or app when the decision came through the API

string | null
decided_by_client_name
required

For app: the app’s registered name

string | null
ended_at
required
string
can_request_handover
required
boolean

Example

{
"phase": "construction",
"history": [
{
"from_phase": "construction",
"to_phase": "construction"
}
],
"pending_handover": {
"entered_later": true
},
"last_handover": {
"status": "rejected"
}
}

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

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

PROJECT_PHASE_TRANSITION_INVALID

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