Get lead details
curl --request GET \
--url https://api.sendpilot.ai/v1/leads/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.sendpilot.ai/v1/leads/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.sendpilot.ai/v1/leads/{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.sendpilot.ai/v1/leads/{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 => [
"X-API-Key: <api-key>"
],
]);
$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.sendpilot.ai/v1/leads/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.sendpilot.ai/v1/leads/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpilot.ai/v1/leads/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"linkedinUrl": "<string>",
"status": "PENDING",
"customLeadStatus": "<string>",
"campaignId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"company": "<string>",
"title": "<string>",
"senderId": "<string>",
"email": "<string>",
"location": "<string>",
"industry": "<string>",
"about": "<string>",
"website": "<string>",
"profilePictureUrl": "<string>",
"isPremium": true,
"isOpenProfile": true,
"connectionCount": 123,
"followerCount": 123,
"data": {}
}Leads
Get Lead
Read a campaign lead and its profile/contact details.
GET
/
v1
/
leads
/
{id}
Get lead details
curl --request GET \
--url https://api.sendpilot.ai/v1/leads/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.sendpilot.ai/v1/leads/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.sendpilot.ai/v1/leads/{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.sendpilot.ai/v1/leads/{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 => [
"X-API-Key: <api-key>"
],
]);
$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.sendpilot.ai/v1/leads/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.sendpilot.ai/v1/leads/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpilot.ai/v1/leads/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"linkedinUrl": "<string>",
"status": "PENDING",
"customLeadStatus": "<string>",
"campaignId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"company": "<string>",
"title": "<string>",
"senderId": "<string>",
"email": "<string>",
"location": "<string>",
"industry": "<string>",
"about": "<string>",
"website": "<string>",
"profilePictureUrl": "<string>",
"isPremium": true,
"isOpenProfile": true,
"connectionCount": 123,
"followerCount": 123,
"data": {}
}Requires
leads:read. Use the lead ID returned by List Campaign Leads. The lead must belong to this workspace.
The endpoint accepts the full query option. See the generated response schema for supported profile, contact, outreach and custom-field data. Do not assume a provider profile ID or LinkedIn URL is the campaign lead’s ID.Authorizations
API key for authentication (prefix: sp_live_ or sp_test_)
Path Parameters
Lead ID
Query Parameters
true (or 1) for all fields: contact data, profile details and custom fields
Response
Lead details (use ?full=true for full data)
Lead ID
LinkedIn URL
Lead status
Available options:
PENDING, PROCESSING, MESSAGE_SENT, CONNECTION_SENT, CONNECTION_ACCEPTED, CONNECTION_ALREADY_SENT, REPLY_RECEIVED, FOLLOWUP_SENT, BLOCKED, PROFILE_UNREACHABLE, RATE_LIMITED, FAILED, SUCCESS, UNSUBSCRIBED, IRRELEVANT, SKIPPED, DONE, MEETING_BOOKED, OPPORTUNITY, LIKED_POST, MESSAGE_SCHEDULED, CONNECTION_SCHEDULED, LIKE_POST_SCHEDULED, VIEW_PROFILE_SCHEDULED, CONNECTED, CONNECTION_WITHDRAWN, WITHDRAWAL_SCHEDULED, WITHDRAWAL_NOT_POSSIBLE, NOT_CONNECTED, ICP_MATCH, ICP_NOT_MATCH, PROFILE_VIEWED, STARTED, STOPPED, WAITING Custom lead status
Campaign ID the lead belongs to
When the lead was added
When the lead was last updated
First name
Last name
Company
Title
LinkedIn sender assigned to this lead (use as senderId for /v1/inbox/send); null until the campaign assigns one
Email address
Location
Industry
About/bio
Website
Profile picture URL
Is premium LinkedIn account
Is open profile
Connection count
Follower count
All dynamic lead data including custom fields