Convert lead to project
const url = 'https://app.buildworkpro.com/api/v1/leads/1/convert';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.buildworkpro.com/api/v1/leads/1/convert \ --header 'Authorization: Bearer <token>'Promotes a lead to a project and moves the lead to the Won stage. When the lead has an accepted bid, the project is linked to that bid and its original contract is the bid’s pre-tax total; if that bid already has a project, that project is returned (200) instead of creating a duplicate. Rejects with 409 if the lead is already in the Won stage.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Header Parameters
Section titled “ Header Parameters ”Idempotent retry key for mutating operations. The first request with a given key executes normally and BuildWorkPro caches the response. Replaying the same key with the same request body (method + path + JSON body, SHA-256 hashed) returns the cached response without re-executing the mutation. Replaying with a DIFFERENT body returns 409 idempotency_key_reused. The cache TTL is 24 hours; after expiry the key is treated as a new operation. Keys are tenant-scoped. Recommended: a fresh UUID v4 per logical operation.
Responses
Section titled “ Responses ”The lead’s accepted bid already had a project; that project is returned
object
object
Server-generated request identifier
object
Opaque cursor for the next page; null when no more results
Whether more pages are available after this one
Items in this page
Example generated
{ "data": "example", "meta": { "request_id": "example", "pagination": { "cursor": "example", "has_more": true, "count": 1 } }}Project created
object
object
Server-generated request identifier
object
Opaque cursor for the next page; null when no more results
Whether more pages are available after this one
Items in this page
Example generated
{ "data": "example", "meta": { "request_id": "example", "pagination": { "cursor": "example", "has_more": true, "count": 1 } }}Not found
object
URL identifying the problem type
Short human-readable summary
HTTP status code
Human-readable explanation
Server-generated request identifier
Validation error array (422 only)
object
Field path that failed validation
Validation error code
Human-readable validation message
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}Conflict
object
URL identifying the problem type
Short human-readable summary
HTTP status code
Human-readable explanation
Server-generated request identifier
Validation error array (422 only)
object
Field path that failed validation
Validation error code
Human-readable validation message
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}