Facebook Pixel
ApiLinkedin messaging

Send Message

Send a direct message to a LinkedIn user

POST/linkedin/messaging/send

Send Message

Send a direct message to a LinkedIn user. A simpler alternative to the typing indicator variant.

Authentication requiredLinkedIn Messaging

Code Examples

curl -X POST 'https://api.connectsafely.ai/linkedin/messaging/send' \
-H 'Authorization: Bearer <your_api_key>' \
-H 'Content-Type: application/json' \
-d '{
"recipientProfileId": "john-doe-123",
"message": "Hello! I would like to connect with you."
}'

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID (uses default if not provided)
recipientProfileIdstringYes*Recipient's LinkedIn profile ID (required if recipientProfileUrn not provided)
recipientProfileUrnstringYes*Recipient's LinkedIn profile URN (required if recipientProfileId not provided)
messagestringYesMessage content to send
subjectstringNoMessage subject (for InMail messages)
messageTypestringNoMessage type: 'normal' or 'inmail' (default: 'normal')

* Either recipientProfileId or recipientProfileUrn must be provided.

Example

{
  "recipientProfileId": "john-doe-123",
  "message": "Hello! I would like to connect with you."
}

Example with InMail

{
  "recipientProfileId": "john-doe-123",
  "message": "I came across your profile and would love to discuss a potential opportunity.",
  "subject": "Exciting Opportunity",
  "messageType": "inmail"
}

Responses

StatusDescription
200Successful response

200 Example

{
  "success": true,
  "message": "Message sent successfully",
  "recipientProfileUrn": "urn:li:fsd_profile:ACoAAA..."
}

Usage Notes

  • Connection Required: For normal messages, you must be connected to the recipient
  • InMail: Use messageType: 'inmail' for non-connections (requires InMail credits)
  • Rate Limits: LinkedIn has limits on daily messages - use responsibly
  • Typing Indicator: For more natural messaging, use /messaging/send-with-typing