Send a LinkedIn message directly to a recipient. The recipient must be a 1st-degree connection of the sender (connection must already be accepted).
Request
The LinkedIn sender account ID to use. Get available senders from the List Senders endpoint.
The LinkedIn profile URL of the recipient (e.g., https://www.linkedin.com/in/john-doe)
The message content to send (max 8000 characters)
Response
Whether the message was sent successfully
Unique identifier for the sent message
The LinkedIn URL of the recipient
ISO 8601 timestamp when the message was sent
curl -X POST https://api.sendpilot.ai/v1/inbox/send \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"senderId": "sender_abc123",
"recipientLinkedinUrl": "https://www.linkedin.com/in/john-doe",
"message": "Hi John! Thanks for connecting. I wanted to follow up on our conversation about..."
}'
const response = await fetch('https://api.sendpilot.ai/v1/inbox/send', {
method: 'POST',
headers: {
'X-API-Key': process.env.SENDPILOT_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
senderId: 'sender_abc123',
recipientLinkedinUrl: 'https://www.linkedin.com/in/john-doe',
message: 'Hi John! Thanks for connecting...'
})
});
const result = await response.json();
import requests
response = requests.post(
'https://api.sendpilot.ai/v1/inbox/send',
headers={
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'senderId': 'sender_abc123',
'recipientLinkedinUrl': 'https://www.linkedin.com/in/john-doe',
'message': 'Hi John! Thanks for connecting...'
}
)
result = response.json()
{
"success": true,
"messageId": "msg_xyz789",
"recipientLinkedinUrl": "https://www.linkedin.com/in/john-doe",
"status": "sent",
"timestamp": "2024-02-24T15:30:00.000Z"
}
{
"statusCode": 400,
"error": "Bad Request",
"code": "SENDER_NOT_ACTIVE",
"message": "LinkedIn sender 'sender_abc123' is not active. Current status: disconnected"
}
{
"statusCode": 404,
"error": "Not Found",
"code": "SENDER_NOT_FOUND",
"message": "LinkedIn sender with ID 'sender_abc123' not found in this workspace"
}
{
"statusCode": 429,
"error": "Too Many Requests",
"code": "DAILY_LIMIT_EXCEEDED",
"message": "LinkedIn sender 'sender_abc123' has reached its daily message limit. Resets at midnight UTC."
}
Messages can only be sent to recipients who are 1st-degree connections of the sender. Attempting to message a non-connected profile will result in an error.
When a message is sent, a message.sent webhook event will be triggered if you have webhooks configured.
To send a message to a lead by their ID (with automatic LinkedIn URL lookup), use the Send Message to Lead endpoint instead. API key for authentication
LinkedIn sender account ID to use
LinkedIn profile URL of the recipient
Message content (max 8000 characters)
Maximum string length: 8000
Optional campaign ID for tracking
Optional lead ID for tracking
Message sent successfully
Available options:
queued,
sent
timestamp
string<date-time>
required