curl -X POST https://api.sendpilot.ai/v1/inbox/send/lead/lead_abc123 \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"senderId": "sender_def456",
"message": "Hi {{firstName}}! Thanks for connecting. I wanted to follow up on our conversation..."
}'
const leadId = 'lead_abc123';
const response = await fetch(`https://api.sendpilot.ai/v1/inbox/send/lead/${leadId}`, {
method: 'POST',
headers: {
'X-API-Key': process.env.SENDPILOT_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
senderId: 'sender_def456',
message: 'Hi {{firstName}}! Thanks for connecting...'
})
});
const result = await response.json();
import requests
lead_id = 'lead_abc123'
response = requests.post(
f'https://api.sendpilot.ai/v1/inbox/send/lead/{lead_id}',
headers={
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'senderId': 'sender_def456',
'message': 'Hi {{firstName}}! Thanks for connecting...'
}
)
result = response.json()
{
"success": true,
"messageId": "msg_xyz789",
"recipientLinkedinUrl": "https://www.linkedin.com/in/john-doe",
"leadId": "lead_abc123",
"status": "sent",
"timestamp": "2024-02-24T15:30:00.000Z"
}
{
"statusCode": 400,
"error": "Bad Request",
"code": "MISSING_LINKEDIN_URL",
"message": "Lead 'lead_abc123' does not have a LinkedIn URL"
}
{
"statusCode": 404,
"error": "Not Found",
"code": "LEAD_NOT_FOUND",
"message": "Lead with ID 'lead_abc123' not found in this workspace"
}
{
"statusCode": 429,
"error": "Too Many Requests",
"code": "DAILY_LIMIT_EXCEEDED",
"message": "LinkedIn sender 'sender_def456' has reached its daily message limit."
}
Inbox
Send Message to Lead
Send a direct message to a lead by their ID
POST
/
v1
/
inbox
/
send
/
lead
/
{leadId}
curl -X POST https://api.sendpilot.ai/v1/inbox/send/lead/lead_abc123 \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"senderId": "sender_def456",
"message": "Hi {{firstName}}! Thanks for connecting. I wanted to follow up on our conversation..."
}'
const leadId = 'lead_abc123';
const response = await fetch(`https://api.sendpilot.ai/v1/inbox/send/lead/${leadId}`, {
method: 'POST',
headers: {
'X-API-Key': process.env.SENDPILOT_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
senderId: 'sender_def456',
message: 'Hi {{firstName}}! Thanks for connecting...'
})
});
const result = await response.json();
import requests
lead_id = 'lead_abc123'
response = requests.post(
f'https://api.sendpilot.ai/v1/inbox/send/lead/{lead_id}',
headers={
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'senderId': 'sender_def456',
'message': 'Hi {{firstName}}! Thanks for connecting...'
}
)
result = response.json()
{
"success": true,
"messageId": "msg_xyz789",
"recipientLinkedinUrl": "https://www.linkedin.com/in/john-doe",
"leadId": "lead_abc123",
"status": "sent",
"timestamp": "2024-02-24T15:30:00.000Z"
}
{
"statusCode": 400,
"error": "Bad Request",
"code": "MISSING_LINKEDIN_URL",
"message": "Lead 'lead_abc123' does not have a LinkedIn URL"
}
{
"statusCode": 404,
"error": "Not Found",
"code": "LEAD_NOT_FOUND",
"message": "Lead with ID 'lead_abc123' not found in this workspace"
}
{
"statusCode": 429,
"error": "Too Many Requests",
"code": "DAILY_LIMIT_EXCEEDED",
"message": "LinkedIn sender 'sender_def456' has reached its daily message limit."
}
Send a LinkedIn message to a lead using their ID. The lead’s LinkedIn URL is looked up automatically from the database. Supports template variables like
{{firstName}} and {{lastName}}.
Request
string
required
Your API key
string
required
The lead ID to send the message to
string
required
The LinkedIn sender account ID to use. Get available senders from the List Senders endpoint.
string
required
The message content to send (max 8000 characters). Supports template variables:
{{firstName}}- Lead’s first name{{lastName}}- Lead’s last name
Response
boolean
Whether the message was sent successfully
string
Unique identifier for the sent message
string
The LinkedIn URL of the lead
string
The lead ID the message was sent to
string
Message status:
sentstring
ISO 8601 timestamp when the message was sent
curl -X POST https://api.sendpilot.ai/v1/inbox/send/lead/lead_abc123 \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"senderId": "sender_def456",
"message": "Hi {{firstName}}! Thanks for connecting. I wanted to follow up on our conversation..."
}'
const leadId = 'lead_abc123';
const response = await fetch(`https://api.sendpilot.ai/v1/inbox/send/lead/${leadId}`, {
method: 'POST',
headers: {
'X-API-Key': process.env.SENDPILOT_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
senderId: 'sender_def456',
message: 'Hi {{firstName}}! Thanks for connecting...'
})
});
const result = await response.json();
import requests
lead_id = 'lead_abc123'
response = requests.post(
f'https://api.sendpilot.ai/v1/inbox/send/lead/{lead_id}',
headers={
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'senderId': 'sender_def456',
'message': 'Hi {{firstName}}! Thanks for connecting...'
}
)
result = response.json()
{
"success": true,
"messageId": "msg_xyz789",
"recipientLinkedinUrl": "https://www.linkedin.com/in/john-doe",
"leadId": "lead_abc123",
"status": "sent",
"timestamp": "2024-02-24T15:30:00.000Z"
}
{
"statusCode": 400,
"error": "Bad Request",
"code": "MISSING_LINKEDIN_URL",
"message": "Lead 'lead_abc123' does not have a LinkedIn URL"
}
{
"statusCode": 404,
"error": "Not Found",
"code": "LEAD_NOT_FOUND",
"message": "Lead with ID 'lead_abc123' not found in this workspace"
}
{
"statusCode": 429,
"error": "Too Many Requests",
"code": "DAILY_LIMIT_EXCEEDED",
"message": "LinkedIn sender 'sender_def456' has reached its daily message limit."
}
The lead must be a 1st-degree connection of the sender. Attempting to message a non-connected lead will result in an error.
Use template variables like
{{firstName}} to personalize your messages. The variables are automatically replaced with the lead’s actual data.Authorizations
API key for authentication
Path Parameters
The lead ID to send the message to
Body
application/json