Send Message

Send a message to a LinkedIn user. Optionally include groupId to send a message in the context of a LinkedIn group, allowing you to message group members you're not connected with.

POST/linkedin/message

Send Message

Send a message to a LinkedIn user. Optionally include groupId to send a message in the context of a LinkedIn group, allowing you to message group members you're not connected with.

Authentication requiredLinkedIn Actions

Code Examples

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

Parameters

No parameters.

Request Body

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID
recipientProfileIdstringNoRecipient's LinkedIn profile ID (not used with groupId)
recipientProfileUrnstringNoRecipient's LinkedIn profile URN (required when using groupId)
messagestringYesMessage content
subjectstringNoMessage subject (not used with groupId)
messageTypestringNoMessage type: 'normal' or 'inmail' (default: 'normal', not used with groupId)
groupIdstringNoOptional LinkedIn group ID to send message in group context

Example

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

Responses

StatusDescription
200Successful response

200 Example

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