Get lead
curl --request GET \
--url https://api.roofkit.ai/api/v1/leads/{lead_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.roofkit.ai/api/v1/leads/{lead_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.roofkit.ai/api/v1/leads/{lead_id}', 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.roofkit.ai/api/v1/leads/{lead_id}",
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.roofkit.ai/api/v1/leads/{lead_id}"
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.roofkit.ai/api/v1/leads/{lead_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roofkit.ai/api/v1/leads/{lead_id}")
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{
"lead": {
"id": "<string>",
"contact_name": "<string>",
"contact_email": "jsmith@example.com",
"contact_phone": "<string>",
"property_address": "<string>",
"status": "<string>",
"status_stage_id": "<string>",
"attribution": {
"source": "<string>",
"medium": "<string>",
"campaign": "<string>",
"content": "<string>",
"conversion_url": "<string>",
"entry": "button"
},
"communication_summary": {
"last_call_at": "2023-11-07T05:31:56Z",
"last_sms_at": "2023-11-07T05:31:56Z",
"call_count": 123,
"answered_call_count": 123,
"missed_call_count": 123,
"sms_inbound_count": 123,
"sms_outbound_count": 123,
"last_tracking_number": {
"label": "<string>",
"phone_last4": "<string>",
"national_format": "<string>"
},
"last_communication_source": "<string>",
"last_communication_campaign": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"external_source": "<string>",
"status_label": "<string>",
"status_sort_order": 123,
"is_conversion_stage": true,
"stage_timestamps": {},
"funnel_gap_summary": {},
"lead_type": "<string>",
"lead_type_label": "<string>",
"landing_url": "<string>",
"first_form_name": "<string>",
"form_data": {},
"custom_fields": {},
"selected_material_id": "<string>",
"selected_color_id": "<string>",
"selected_shape_id": "<string>",
"notes": "<string>",
"quote_value": 123,
"sales_value": 123,
"follow_up_date": "2023-11-07T05:31:56Z",
"converted_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "API key does not include the required scope: leads.write.",
"request_id": "req_123",
"details": {
"required_scope": "leads.write",
"missing_scopes": [
"leads.write"
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}Leads
Get lead
Returns one active lead by public lead id.
GET
/
api
/
v1
/
leads
/
{lead_id}
Get lead
curl --request GET \
--url https://api.roofkit.ai/api/v1/leads/{lead_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.roofkit.ai/api/v1/leads/{lead_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.roofkit.ai/api/v1/leads/{lead_id}', 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.roofkit.ai/api/v1/leads/{lead_id}",
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.roofkit.ai/api/v1/leads/{lead_id}"
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.roofkit.ai/api/v1/leads/{lead_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roofkit.ai/api/v1/leads/{lead_id}")
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{
"lead": {
"id": "<string>",
"contact_name": "<string>",
"contact_email": "jsmith@example.com",
"contact_phone": "<string>",
"property_address": "<string>",
"status": "<string>",
"status_stage_id": "<string>",
"attribution": {
"source": "<string>",
"medium": "<string>",
"campaign": "<string>",
"content": "<string>",
"conversion_url": "<string>",
"entry": "button"
},
"communication_summary": {
"last_call_at": "2023-11-07T05:31:56Z",
"last_sms_at": "2023-11-07T05:31:56Z",
"call_count": 123,
"answered_call_count": 123,
"missed_call_count": 123,
"sms_inbound_count": 123,
"sms_outbound_count": 123,
"last_tracking_number": {
"label": "<string>",
"phone_last4": "<string>",
"national_format": "<string>"
},
"last_communication_source": "<string>",
"last_communication_campaign": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"external_source": "<string>",
"status_label": "<string>",
"status_sort_order": 123,
"is_conversion_stage": true,
"stage_timestamps": {},
"funnel_gap_summary": {},
"lead_type": "<string>",
"lead_type_label": "<string>",
"landing_url": "<string>",
"first_form_name": "<string>",
"form_data": {},
"custom_fields": {},
"selected_material_id": "<string>",
"selected_color_id": "<string>",
"selected_shape_id": "<string>",
"notes": "<string>",
"quote_value": 123,
"sales_value": 123,
"follow_up_date": "2023-11-07T05:31:56Z",
"converted_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "API key does not include the required scope: leads.write.",
"request_id": "req_123",
"details": {
"required_scope": "leads.write",
"missing_scopes": [
"leads.write"
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}