curl --request GET \
--url https://api.contractorscloud.com/api/v1/leads/{leadId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contractorscloud.com/api/v1/leads/{leadId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.contractorscloud.com/api/v1/leads/{leadId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.contractorscloud.com/api/v1/leads/{leadId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.contractorscloud.com/api/v1/leads/{leadId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.contractorscloud.com/api/v1/leads/{leadId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/leads/{leadId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "7c2e4f1a-9b3d-4e6c-8a1f-2d5b9c3e7a44",
"tenant_id": 12,
"lead_connection_id": "3f9a2b6c-1d4e-4a8b-9c2f-7e5d6a1b8c30",
"transaction_id": "e1a4c9d2-6b7f-4a3e-9c8d-1f2b3a4c5d6e",
"created_by": 1159,
"project_id": null,
"status": "needs-review",
"status_message": "This lead needs additional data before a project can be created.",
"received_at": "2025-02-10 09:15:03",
"last_process_started_at": "2025-02-10 09:15:05",
"last_process_ended_at": "2025-02-10 09:15:07",
"validation_errors": {
"email": [
"The email field is required."
]
},
"derived_data": {
"first_name": "Jane",
"last_name": "Smith",
"phone": "(555) 201-4477"
},
"data": {
"first_name": "Jane",
"last_name": "Smith",
"phone": "(555) 201-4477"
},
"created_at": "2025-02-10 09:15:03",
"updated_at": "2025-02-10 09:15:07"
}{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}Get lead
Returns a single lead by id.
curl --request GET \
--url https://api.contractorscloud.com/api/v1/leads/{leadId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contractorscloud.com/api/v1/leads/{leadId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.contractorscloud.com/api/v1/leads/{leadId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.contractorscloud.com/api/v1/leads/{leadId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.contractorscloud.com/api/v1/leads/{leadId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.contractorscloud.com/api/v1/leads/{leadId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/leads/{leadId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "7c2e4f1a-9b3d-4e6c-8a1f-2d5b9c3e7a44",
"tenant_id": 12,
"lead_connection_id": "3f9a2b6c-1d4e-4a8b-9c2f-7e5d6a1b8c30",
"transaction_id": "e1a4c9d2-6b7f-4a3e-9c8d-1f2b3a4c5d6e",
"created_by": 1159,
"project_id": null,
"status": "needs-review",
"status_message": "This lead needs additional data before a project can be created.",
"received_at": "2025-02-10 09:15:03",
"last_process_started_at": "2025-02-10 09:15:05",
"last_process_ended_at": "2025-02-10 09:15:07",
"validation_errors": {
"email": [
"The email field is required."
]
},
"derived_data": {
"first_name": "Jane",
"last_name": "Smith",
"phone": "(555) 201-4477"
},
"data": {
"first_name": "Jane",
"last_name": "Smith",
"phone": "(555) 201-4477"
},
"created_at": "2025-02-10 09:15:03",
"updated_at": "2025-02-10 09:15:07"
}{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}Authorizations
Query Parameters
Response
The requested lead.
Groups every lead submitted in the same request. Filter List leads by filter[transaction_id] to retrieve them all.
"e1a4c9d2-6b7f-4a3e-9c8d-1f2b3a4c5d6e"
The lead's current position in its lifecycle: queued — waiting to be processed; processing — actively being processed; needs-review — processing finished but the data failed validation and needs correction; ready — passed validation and can be converted into a project; error — processing failed unexpectedly; converting — actively being converted into a project; successful — has been converted into a project. See the Leads guide for the full lifecycle.
queued, processing, needs-review, ready, error, converting, successful "needs-review"
The raw submitted lead data, parsed into key/value pairs. Field names are defined by your lead connection's field mapping. Edited with Update lead.