Skip to main content

Engagements

Send a message

The Linked API allows you to send a message to another LinkedIn user programmatically. Below is an example of how to send a message using a simple POST request.

Endpoint

POST /v1/messages

Parameters

  • personUrl (required, string): The URL of the LinkedIn profile you want to send the message to.
  • message (required, string): The content of the message.

Example

curl -X POST https://api.linkedapi.io/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-token: your-api-token-here" \
-H "account-token: your-account-token-here" \
-d '{
  "personUrl": "https://www.linkedin.com/in/johndoe/",
  "message": "Hello, how are you doing?"
}'

Response

{
  "status": "Message Sent",
  "messageId": "123456789"
}

Errors

  • 400 Bad Request: Invalid or missing parameters.
  • 401 Unauthorized: Missing or invalid authorization token.
  • 404 Not Found: Person profile not found.