ApiUncategorized
Send a LinkedIn message
Send a direct message to a LinkedIn member. Supports regular messages (requires 1st-degree connection) and InMail (for non-connections, requires Premium). Can also send messages in group context. Provide either recipientProfileId or recipientProfileUrn.
POST
/messageSend a LinkedIn message
Send a direct message to a LinkedIn member. Supports regular messages (requires 1st-degree connection) and InMail (for non-connections, requires Premium). Can also send messages in group context. Provide either recipientProfileId or recipientProfileUrn.
Authentication requiredActions
Code Examples
curl -X POST '/linkedin/message' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"message":"string"}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use. If not provided, uses the default account. |
recipientProfileId | string | No | Recipient LinkedIn profile public ID (e.g., "john-doe-123") |
recipientProfileUrn | string | No | Recipient LinkedIn profile URN (e.g., "urn:li:fsd_profile:ABC123") |
message | string | Yes | Message content to send. Supports basic formatting. |
subject | string | No | Subject line (required for InMail, optional for regular messages) |
messageType | string | No | Message type: normal (1st-degree connections) or inmail (non-connections, requires Premium credits) |
groupId | string | No | Group ID to send message in group context (enables messaging non-connections who are group members) |
Example
{
"message": "string"
}Responses
| Status | Description |
|---|---|
| 200 | Message sent successfully |
