Skip to content
Suomi

Hand off a zone's work

POST
/v1/projects/{projectId}/handoffs
Code sample: Shell / cURL
curl --request POST \
--url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/handoffs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "zone_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "task_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "work_name": "example", "kind": "done", "occurred_at": "2026-04-15T12:00:00Z", "note": "example", "defects": [ { "title": "example", "description": "example", "global_ids": [ "example" ], "blocking": true, "responsible_account_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ] }'

Marks a zone’s task done, received, returned, approved or reopened, with defects that become findings on their elements, as the app’s handoff does. done needs the inspector role; received, returned, approved and reopened need the project admin role, which a scope such as inspections:write gives, or the answer is 403 INSUFFICIENT_PROJECT_ROLE. Each event names the integration (created_via, via_client_id). A repeat with the same Idempotency-Key and body returns the first answer with replayed: true.

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

object
zone_id
required
string format: uuid
task_id

One task of the zone; leave it out to hand off every task of work_name in the zone

string format: uuid
work_name
string
>= 1 characters <= 255 characters
kind
required

A handoff transition.

string
Allowed values: done received returned approved reopened
occurred_at
string format: date-time
note
string
>= 1 characters <= 2000 characters
defects
Array<object>
<= 10 items

A defect of recordZoneHandoff.

object
title
required
string
>= 1 characters <= 200 characters
description
string
<= 5000 characters
global_ids

Elements of the zone the defect is on; none for a defect of the whole zone.

Array<string>
<= 50 items
blocking
required

Blocks the next work from starting; a receive with one is recorded as returned.

boolean
responsible_account_id

The organisation responsible; by default the one that marked the task done.

string format: uuid

The events recorded and the defects raised

Media typeapplication/json

The answer to POST …/handoffs.

object
kind
required

The kind stored: a receive with a blocking defect is stored as returned.

string
Allowed values: done received returned approved reopened
replayed
required
boolean
events
required
Array<object>

One handoff event.

object
id
required
string format: uuid
task_id
required
string format: uuid
task_name
required
string
kind
required

New kinds may come

string
Allowed values: done received returned approved reopened
occurred_at
required
string
recorded_at
required
string
entered_later
required
boolean
actor_name
required
string | null
account_id
required
string | null
account_name
required
string
created_via
required

Null for a person in the app; agent, integration or app otherwise. New values may come.

string | null
via_client_id
required

The integration’s id or the app’s client id when created_via is integration or app

string | null
via_client_name
required

The registered name of the app when created_via is app; the app shows it as {person} · sovelluksella {app}

string | null
note
required
string | null
defects
required
Array<object>

A defect of a handoff with its finding.

object
finding_id
required

The finding’s guid

string format: uuid
number
required
string | null
title
required
string
status
required
string | null
open
required
boolean
blocking
required
boolean
handoff_event_id
required
string format: uuid
task_id
required
string format: uuid
global_ids
required
Array<string>
responsible
required
One of:

An organisation a task or a defect is put on.

object
account_id
required
string | null
name
required
string

Example

{
"kind": "done",
"events": [
{
"kind": "done"
}
]
}

VALIDATION_ERROR; HANDOFF_TRANSITION_INVALID for defects with a kind other than received or returned, or a reopen without a note; HANDOFF_BLOCKING_DEFECT_REQUIRED; HANDOFF_ELEMENT_NOT_IN_ZONE

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, zone or task

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

HANDOFF_TRANSITION_INVALID when the task is not in a state this kind follows or the zone changed meanwhile; HANDOFF_APPROVAL_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"
}

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