Send LinkedIn connection request
curl --request POST \
--url https://api.sendpilot.ai/v1/inbox/connect \
--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 would love to connect with you!"
}
'import requests
url = "https://api.sendpilot.ai/v1/inbox/connect"
payload = {
"senderId": "sender_123",
"recipientLinkedinUrl": "https://www.linkedin.com/in/johndoe/",
"message": "Hi John, I would love to connect with you!"
}
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 would love to connect with you!'
})
};
fetch('https://api.sendpilot.ai/v1/inbox/connect', 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/connect",
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 would love to connect with you!'
]),
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/connect"
payload := strings.NewReader("{\n \"senderId\": \"sender_123\",\n \"recipientLinkedinUrl\": \"https://www.linkedin.com/in/johndoe/\",\n \"message\": \"Hi John, I would love to connect with you!\"\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/connect")
.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 would love to connect with you!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpilot.ai/v1/inbox/connect")
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 would love to connect with you!\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"requestId": "conn_123",
"recipientLinkedinUrl": "<string>",
"status": "sent",
"timestamp": "2023-11-07T05:31:56Z",
"error": "<string>"
}Inbox and Senders
Send Connection Request
Request a LinkedIn connection from a workspace sender.
POST
/
v1
/
inbox
/
connect
Send LinkedIn connection request
curl --request POST \
--url https://api.sendpilot.ai/v1/inbox/connect \
--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 would love to connect with you!"
}
'import requests
url = "https://api.sendpilot.ai/v1/inbox/connect"
payload = {
"senderId": "sender_123",
"recipientLinkedinUrl": "https://www.linkedin.com/in/johndoe/",
"message": "Hi John, I would love to connect with you!"
}
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 would love to connect with you!'
})
};
fetch('https://api.sendpilot.ai/v1/inbox/connect', 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/connect",
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 would love to connect with you!'
]),
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/connect"
payload := strings.NewReader("{\n \"senderId\": \"sender_123\",\n \"recipientLinkedinUrl\": \"https://www.linkedin.com/in/johndoe/\",\n \"message\": \"Hi John, I would love to connect with you!\"\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/connect")
.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 would love to connect with you!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpilot.ai/v1/inbox/connect")
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 would love to connect with you!\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"requestId": "conn_123",
"recipientLinkedinUrl": "<string>",
"status": "sent",
"timestamp": "2023-11-07T05:31:56Z",
"error": "<string>"
}Requires
inbox:send. Supply senderId and recipientLinkedinUrl. The optional note field is message, at most 300 characters; MCP calls the corresponding argument note.
Sender account capability and daily connection limits still apply. Use an Idempotency-Key and inspect uncertain outcomes before retrying. A successful REST request executes directly, without an MCP confirmation token.Authorizations
API key for authentication (prefix: sp_live_ or sp_test_)
Body
application/json
LinkedIn sender ID to use (must be connected to workspace)
Example:
"sender_123"
LinkedIn URL of the recipient to connect with
Example:
"https://www.linkedin.com/in/johndoe/"
Optional connection note (only works for premium LinkedIn accounts)
Maximum string length:
300Example:
"Hi John, I would love to connect with you!"
Response
Connection request sent
Success status
Example:
true
Request ID
Example:
"conn_123"
Recipient LinkedIn URL
Connection status
Available options:
sent, already_connected, failed Example:
"sent"
Timestamp when request was sent
Error message if failed