On this page

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"
}
FieldRequiredNotes
campaignIdYes
leadIdYes
textYesMax 8000 chars. Newlines preserved; control/bidi strip + typography cleanup applied (same as product outbound hygiene).
accountIdNoDefaults from lead / product rules when omitted
{
  "ok": true,
  "chatId": "chat_...",
  "messageId": "msg_..."
}
Error codeWhen
validation_errorMissing/invalid fields
not_foundCampaign / lead
account_disconnectedAccount not usable (the account may be marked disconnected when LinkedIn returns a dead session mid-send)
rate_limited / linkedin_daily_quotaCaps
send_failedSend failed
conflictIdempotency conflict

Sending may hand the conversation to human/agent rules as in the product inbox.


MCP

Tool: send_message — optional idempotencyKey.