Facebook Pixel
APILinkedIn Messaging

Send message (with channel selection)

Send a LinkedIn message. By default, messagingChannel is "auto" which auto-detects whether to use Sales Navigator or standard LinkedIn inbox based on the account premium status. Users can explicitly control the messaging channel by setting messagingChannel to: "sales_navigator" — forces the message through the Sales Navigator API (returns a 400 error if the account does not have an active Sales Navigator subscription), or "linkedin_inbox" — forces standard LinkedIn messaging even if the account has Sales Navigator. Example: to send via standard inbox on a Sales Nav account, pass { "messagingChannel": "linkedin_inbox" }. To explicitly use Sales Navigator, pass { "messagingChannel": "sales_navigator" }. If omitted or set to "auto", the system decides automatically. Supports file attachments.

POST/conversations/send
Authentication requiredConversations

Code Examples

curl -X POST 'https://api.connectsafely.ai/linkedin/conversations/send' \
-H 'Authorization: Bearer <your_api_key>' \
-H 'Content-Type: application/json' \
-d '{"accountId":"acc_12345","recipientProfileId":"john-doe-123","conversationUrn":"urn:li:example:123456","message":"Hello! I would like to connect with you.","subject":"Quick question about your work","attachments":[],"messagingChannel":"auto"}'

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID
recipientProfileIdstringConditionalRecipient LinkedIn profile vanity URL slug (e.g., "john-doe-123"). Prefer recipientProfileUrn when available. Either recipientProfileId or recipientProfileUrn must be provided.
recipientProfileUrnstringConditionalRecipient LinkedIn profile URN (e.g., "urn:li:fsd_profile:ACoAABJefVoBrz2LR3f..."). Preferred over recipientProfileId. Either recipientProfileUrn or recipientProfileId must be provided.
conversationUrnstringNoExisting conversation URN (skips recipient lookup)
messagestringYesMessage text
subjectstringNoMessage subject (optional)
attachmentsarrayNoFile attachments from upload-attachment endpoint
messagingChannelstringNoControls which messaging channel to use. Defaults to "auto" if not provided. Options: "auto" — automatically detects the best channel based on account premium status (Sales Navigator accounts use Sales Nav API, others use standard inbox). "sales_navigator" — explicitly send via Sales Navigator API. Use this when the user wants to send through Sales Navigator. Returns a 400 error with a clear message if the account does not have Sales Navigator. "linkedin_inbox" — explicitly send via standard LinkedIn inbox. Use this when the user wants to bypass Sales Navigator and send through the regular LinkedIn messaging, even if the account has a Sales Navigator subscription.

Example

{
  "message": "Hello! I would like to connect with you."
}

Responses

StatusDescription
200Message sent
400Bad request or send failed
401Unauthorized
404Account not found
500Server error

200 Response Parameters

NameTypeDescription
successboolean
messagestring
recipientProfileUrnstring
sentMessageobject
threadIdstringSales Navigator thread ID (only for Sales Nav accounts)

200 Example

{
  "success": true,
  "message": "Hello! I would like to connect with you.",
  "recipientProfileUrn": "urn:li:fsd_profile:ACoAABcdefgh",
  "sentMessage": {},
  "threadId": "12345"
}

400 Response Parameters

NameTypeDescription
errorstring

400 Example

{
  "error": "example_value"
}

401 Response Parameters

NameTypeDescription
errorstring

401 Example

{
  "error": "example_value"
}

404 Response Parameters

NameTypeDescription
errorstring

404 Example

{
  "error": "example_value"
}

500 Response Parameters

NameTypeDescription
errorstring

500 Example

{
  "error": "example_value"
}