POST/inbox/messages
Purpose
Send a LinkedIn DM to an existing campaign lead (synchronous).
Request
POST /inbox/messages
X-API-Key: sk_live_...
Content-Type: application/json
Idempotency-Key: optional-uuid
{
"campaignId": "search_abc",
"leadId": "lead_xyz",
"text": "Hi Jane — following up on our conversation.",
"accountId": "acc_abc"
}
| Field | Required | Notes |
|---|---|---|
campaignId | Yes | |
leadId | Yes | |
text | Yes | Max 8000 chars. Newlines preserved; control/bidi strip + typography cleanup applied (same as product outbound hygiene). |
accountId | No | Defaults from lead / product rules when omitted |
{
"ok": true,
"chatId": "chat_...",
"messageId": "msg_..."
}
| Error code | When |
|---|---|
validation_error | Missing/invalid fields |
not_found | Campaign / lead |
account_disconnected | Account not usable (the account may be marked disconnected when LinkedIn returns a dead session mid-send) |
rate_limited / linkedin_daily_quota | Caps |
send_failed | Send failed |
conflict | Idempotency conflict |
Sending may hand the conversation to human/agent rules as in the product inbox.
MCP
Tool: send_message — optional idempotencyKey.