Send a LinkedIn message directly to a lead. The lead must be a 1st-degree connection (connection must already be accepted).
Request
The lead ID to send the message to
The message content to send (max 8000 characters)
Specific LinkedIn sender account ID to use. If not provided, the system will automatically select an appropriate sender.
Response
Whether the message was sent successfully
Unique identifier for the sent message
The lead ID the message was sent to
The LinkedIn sender account ID that was used
ISO 8601 timestamp when the message was sent
curl -X POST https://api.sendpilot.ai/api/v1/inbox/send \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"leadId": "lead_abc123",
"message": "Hi John! Thanks for connecting. I wanted to follow up on our conversation about..."
}'
{
"success": true,
"messageId": "msg_xyz789",
"leadId": "lead_abc123",
"senderId": "sender_def456",
"sentAt": "2024-02-24T15:30:00.000Z"
}
Messages can only be sent to leads who have accepted a connection request. Attempting to message a non-connected lead will result in a 400 error.
When a message is sent, a message.sent webhook event will be sent to your registered webhook endpoints.