curl --request POST \
--url https://api.sendpilot.ai/v1/inbox/send \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"senderId": "sender_123",
"recipientLinkedinUrl": "https://www.linkedin.com/in/johndoe/",
"message": "Hi John, I wanted to follow up on our conversation...",
"campaignId": "campaign_123",
"leadId": "lead_123"
}
'import requests
url = "https://api.sendpilot.ai/v1/inbox/send"
payload = {
"senderId": "sender_123",
"recipientLinkedinUrl": "https://www.linkedin.com/in/johndoe/",
"message": "Hi John, I wanted to follow up on our conversation...",
"campaignId": "campaign_123",
"leadId": "lead_123"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
senderId: 'sender_123',
recipientLinkedinUrl: 'https://www.linkedin.com/in/johndoe/',
message: 'Hi John, I wanted to follow up on our conversation...',
campaignId: 'campaign_123',
leadId: 'lead_123'
})
};
fetch('https://api.sendpilot.ai/v1/inbox/send', 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/inbox/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'senderId' => 'sender_123',
'recipientLinkedinUrl' => 'https://www.linkedin.com/in/johndoe/',
'message' => 'Hi John, I wanted to follow up on our conversation...',
'campaignId' => 'campaign_123',
'leadId' => 'lead_123'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sendpilot.ai/v1/inbox/send"
payload := strings.NewReader("{\n \"senderId\": \"sender_123\",\n \"recipientLinkedinUrl\": \"https://www.linkedin.com/in/johndoe/\",\n \"message\": \"Hi John, I wanted to follow up on our conversation...\",\n \"campaignId\": \"campaign_123\",\n \"leadId\": \"lead_123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sendpilot.ai/v1/inbox/send")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"senderId\": \"sender_123\",\n \"recipientLinkedinUrl\": \"https://www.linkedin.com/in/johndoe/\",\n \"message\": \"Hi John, I wanted to follow up on our conversation...\",\n \"campaignId\": \"campaign_123\",\n \"leadId\": \"lead_123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpilot.ai/v1/inbox/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"senderId\": \"sender_123\",\n \"recipientLinkedinUrl\": \"https://www.linkedin.com/in/johndoe/\",\n \"message\": \"Hi John, I wanted to follow up on our conversation...\",\n \"campaignId\": \"campaign_123\",\n \"leadId\": \"lead_123\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"messageId": "msg_123",
"recipientLinkedinUrl": "<string>",
"status": "sent",
"timestamp": "2023-11-07T05:31:56Z",
"leadId": "<string>",
"conversationId": "<string>",
"error": "<string>"
}Send LinkedIn Message
Send a message from a workspace sender to a LinkedIn profile.
curl --request POST \
--url https://api.sendpilot.ai/v1/inbox/send \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"senderId": "sender_123",
"recipientLinkedinUrl": "https://www.linkedin.com/in/johndoe/",
"message": "Hi John, I wanted to follow up on our conversation...",
"campaignId": "campaign_123",
"leadId": "lead_123"
}
'import requests
url = "https://api.sendpilot.ai/v1/inbox/send"
payload = {
"senderId": "sender_123",
"recipientLinkedinUrl": "https://www.linkedin.com/in/johndoe/",
"message": "Hi John, I wanted to follow up on our conversation...",
"campaignId": "campaign_123",
"leadId": "lead_123"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
senderId: 'sender_123',
recipientLinkedinUrl: 'https://www.linkedin.com/in/johndoe/',
message: 'Hi John, I wanted to follow up on our conversation...',
campaignId: 'campaign_123',
leadId: 'lead_123'
})
};
fetch('https://api.sendpilot.ai/v1/inbox/send', 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/inbox/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'senderId' => 'sender_123',
'recipientLinkedinUrl' => 'https://www.linkedin.com/in/johndoe/',
'message' => 'Hi John, I wanted to follow up on our conversation...',
'campaignId' => 'campaign_123',
'leadId' => 'lead_123'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sendpilot.ai/v1/inbox/send"
payload := strings.NewReader("{\n \"senderId\": \"sender_123\",\n \"recipientLinkedinUrl\": \"https://www.linkedin.com/in/johndoe/\",\n \"message\": \"Hi John, I wanted to follow up on our conversation...\",\n \"campaignId\": \"campaign_123\",\n \"leadId\": \"lead_123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sendpilot.ai/v1/inbox/send")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"senderId\": \"sender_123\",\n \"recipientLinkedinUrl\": \"https://www.linkedin.com/in/johndoe/\",\n \"message\": \"Hi John, I wanted to follow up on our conversation...\",\n \"campaignId\": \"campaign_123\",\n \"leadId\": \"lead_123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpilot.ai/v1/inbox/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"senderId\": \"sender_123\",\n \"recipientLinkedinUrl\": \"https://www.linkedin.com/in/johndoe/\",\n \"message\": \"Hi John, I wanted to follow up on our conversation...\",\n \"campaignId\": \"campaign_123\",\n \"leadId\": \"lead_123\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"messageId": "msg_123",
"recipientLinkedinUrl": "<string>",
"status": "sent",
"timestamp": "2023-11-07T05:31:56Z",
"leadId": "<string>",
"conversationId": "<string>",
"error": "<string>"
}inbox:send. Required fields are senderId, recipientLinkedinUrl, and message (1–8,000 characters). campaignId and leadId are optional associations; they do not replace the required recipient URL.
This REST request sends when accepted. For a campaign-lead target and supported name variables, use Send to Lead.
Use an Idempotency-Key. Sender limits apply independently of API rate limits. If delivery is uncertain, inspect the conversation before retrying; do not switch keys to force a second send.Authorizations
API key for authentication (prefix: sp_live_ or sp_test_)
Body
LinkedIn sender ID to use (must be connected to workspace)
"sender_123"
LinkedIn URL of the recipient (must be a 1st degree connection)
"https://www.linkedin.com/in/johndoe/"
Message content to send
1 - 8000"Hi John, I wanted to follow up on our conversation..."
Optional campaign ID to associate this message with
"campaign_123"
Optional lead ID to associate this message with
"lead_123"
Response
Message sent or queued
Success status
true
Message ID
"msg_123"
Recipient LinkedIn URL
Message status
queued, sent, failed "sent"
Timestamp when message was sent/queued
Lead ID if message was sent to a lead
LinkedIn conversation ID, when the provider returns one (use with GET /v1/inbox/conversations/:conversationId/messages)
Error message if failed