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/messageSend 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
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID |
recipientProfileId | string | No | Recipient's LinkedIn profile ID (not used with groupId) |
recipientProfileUrn | string | No | Recipient's LinkedIn profile URN (required when using groupId) |
message | string | Yes | Message content |
subject | string | No | Message subject (not used with groupId) |
messageType | string | No | Message type: 'normal' or 'inmail' (default: 'normal', not used with groupId) |
groupId | string | No | Optional LinkedIn group ID to send message in group context |
Example
{
"message": "Hello! I would like to connect with you."
}Responses
| Status | Description |
|---|---|
| 200 | Successful response |
200 Example
{
"success": true,
"message": "Message sent successfully",
"recipientProfileUrn": "urn:li:fsd_profile:...",
"groupId": "56766"
}