Get lead connection
curl --request GET \
--url https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}"
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/lead-connections/{leadConnectionId}', 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/lead-connections/{leadConnectionId}",
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/lead-connections/{leadConnectionId}"
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/lead-connections/{leadConnectionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}")
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": "3f9a2b6c-1d4e-4a8b-9c2f-7e5d6a1b8c30",
"tenant_id": 12,
"company_id": 6,
"event_id": null,
"lead_source_id": 44,
"workflow_id": null,
"rep_primary_id": 1159,
"site_type_id": 3,
"status_id": 1,
"is_active": true,
"data_type": "json",
"name": "Website Contact Form",
"description": "Leads submitted from the marketing site's contact form.",
"created_at": "2025-01-05 08:15:00",
"updated_at": "2025-01-05 08:15:00",
"last_lead_received_at": "2025-02-01 14:22:03"
}{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}Lead Connections
Get lead connection
Returns a single lead connection by id.
GET
/
lead-connections
/
{leadConnectionId}
Get lead connection
curl --request GET \
--url https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}"
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/lead-connections/{leadConnectionId}', 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/lead-connections/{leadConnectionId}",
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/lead-connections/{leadConnectionId}"
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/lead-connections/{leadConnectionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}")
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": "3f9a2b6c-1d4e-4a8b-9c2f-7e5d6a1b8c30",
"tenant_id": 12,
"company_id": 6,
"event_id": null,
"lead_source_id": 44,
"workflow_id": null,
"rep_primary_id": 1159,
"site_type_id": 3,
"status_id": 1,
"is_active": true,
"data_type": "json",
"name": "Website Contact Form",
"description": "Leads submitted from the marketing site's contact form.",
"created_at": "2025-01-05 08:15:00",
"updated_at": "2025-01-05 08:15:00",
"last_lead_received_at": "2025-02-01 14:22:03"
}{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}Authorizations
Query Parameters
Response
The requested lead connection.
The id of the company within your organization that owns this connection. See Company.
Example:
6
The id of the marketing event this connection is associated with. Null if not set. See Event.
The id of the lead source configured for the company that leads from this connection are attributed to. Null if not set. A lead source is a marketing channel configuration in Contractors Cloud — distinct from the Lead resource returned by this API. See Lead Source.
Example:
44
The id of the workflow assigned to projects created from leads through this connection. Null if not set. See Workflow.