Skip to main content
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..."
  }'
{
  "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"
}

Documentation Index

Fetch the complete documentation index at: https://docs.sendpilot.ai/llms.txt

Use this file to discover all available pages before exploring further.

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

X-API-Key
string
required
Your API key
leadId
string
required
The lead ID to send the message to
senderId
string
required
The LinkedIn sender account ID to use. Get available senders from the List Senders endpoint.
message
string
required
The message content to send (max 8000 characters). Supports template variables:
  • {{firstName}} - Lead’s first name
  • {{lastName}} - Lead’s last name

Response

success
boolean
Whether the message was sent successfully
messageId
string
Unique identifier for the sent message
recipientLinkedinUrl
string
The LinkedIn URL of the lead
leadId
string
The lead ID the message was sent to
status
string
Message status: sent
timestamp
string
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..."
  }'
{
  "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"
}
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

X-API-Key
string
header
required

API key for authentication

Path Parameters

leadId
string
required

The lead ID to send the message to

Body

application/json
senderId
string
required

The LinkedIn sender account ID to use

message
string
required

The message content to send. Supports template variables: {{firstName}} (lead's first name), {{lastName}} (lead's last name).

Maximum string length: 8000

Response

Message sent successfully

success
boolean
required
messageId
string
required
recipientLinkedinUrl
string
required
leadId
string
required
status
enum<string>
required
Available options:
sent
timestamp
string<date-time>
required