Create a finding draft for the project's inspectors to publish or reject
curl --request POST \ --url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/finding-drafts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "example", "description": "example", "priority": "example", "labels": [ "example" ], "element_global_ids": [ "example" ], "storey_global_id": "example", "point": { "x": 1, "y": 1, "z": 1 }, "source_ref": "example", "photo_keys": [ "example" ] }'A project holds at most 500 pending drafts; above that the answer is 409 DRAFT_LIMIT. A repeat with the same Idempotency-Key and body returns the first draft with 200.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”A repeat with the same key and body returns the first answer instead of writing again. Keys are per integration and project.
Request Bodyrequired
Section titled “Request Bodyrequired”object
GlobalIds of live elements in the project; the published finding selects them
The storey a point is on, when no element fits (spec 054 §3.8)
Your own id for the draft, shown to the inspector
Up to 10 keys from uploadDraftPhoto, each uploaded before the draft is created
Example generated
{ "title": "example", "description": "example", "priority": "example", "labels": [ "example" ], "element_global_ids": [ "example" ], "storey_global_id": "example", "point": { "x": 1, "y": 1, "z": 1 }, "source_ref": "example", "photo_keys": [ "example" ]}Responses
Section titled “Responses”The draft an earlier call with the same Idempotency-Key created
A draft as /v1 answers it; for the document only.
object
The photos the draft carries; each becomes a photo of the published finding
Example
{ "status": "pending"}The draft
A draft as /v1 answers it; for the document only.
object
The photos the draft carries; each becomes a photo of the published finding
Example
{ "status": "pending"}Invalid body, parameters or Idempotency-Key
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}Missing, malformed, expired or revoked token
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}INSUFFICIENT_SCOPE, or PUBLIC_API_DISABLED when an admin of the integration’s organisation, or on a per-project route of the project’s owning organisation, has turned the API off
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}No such project, event or element
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}DRAFT_LIMIT
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}IDEMPOTENCY_KEY_REUSED: the key was used with another body
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RATE_LIMITED; wait for Retry-After seconds
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}