> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linkupapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Message

> Send a message to a LinkedIn user

Send a direct message to any LinkedIn user. The message can be sent to either a new conversation or an existing one.

<Note>
  This endpoint costs **1 credit** for text-only messages and **2 credits** for messages with media attachments.
</Note>

### Header Parameters

<ParamField header="x-api-key" type="string" required>
  Your API key
</ParamField>

### Body Parameters

<ParamField body="linkedin_url" type="string" required>
  LinkedIn profile URL of the recipient (e.g., "[https://www.linkedin.com/in/username](https://www.linkedin.com/in/username)") or profile URN (e.g., "ACoAAFHoUZgB6wGz0HEW1MdqGW45NI4e-JhvGqQ")
</ParamField>

<ParamField body="message_text" type="string" required>
  Content of the message to send
</ParamField>

<ParamField body="country" type="string" default="FR">
  Country code for proxy selection. Available: (US, UK, FR, DE, NL, IT, IL, CA, BR, ES, IN)
</ParamField>

<ParamField body="media_link" type="string">
  Direct URL to media file to attach to the message (use .png,.mp4,jpeg,.pdf link extension)
</ParamField>

<ParamField body="media_file" type="file">
  Media file to attach to the message (second priority)

  <Note>
    Click to select a file from your computer. The file will be automatically converted to base64 format with metadata.
  </Note>
</ParamField>

<ParamField body="login_token" type="string" required>
  LinkedIn authentication cookie obtained from the login/verify process
</ParamField>

### Response

<ResponseField name="status" type="string">
  Request status (success/error)
</ResponseField>

<ResponseField name="message" type="string">
  Detailed message about the message status
</ResponseField>

<ResponseField name="data" type="object">
  Additional data returned when message is sent successfully

  <Expandable title="data properties">
    <ResponseField name="entityUrn" type="string">
      LinkedIn entity URN for the sent message
    </ResponseField>

    <ResponseField name="conversation_id" type="string">
      LinkedIn conversation URN identifier
    </ResponseField>

    <ResponseField name="deliveredAt" type="integer">
      Timestamp when the message was delivered (Unix timestamp in milliseconds)
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "status": "success",
    "message": "Message sent successfully",
    "data": {
      "entityUrn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAAFHoUZgB6wGz0HEW1MdqGW45NI4e-JhvGqQ,2-MTc1MzY5NjE4NzkxMmIyODM2My0xMDAmZDYxZWIyZjUtMDQ5MS00NjJmLWJjY2ItOWFkYWVhZmM4MWFmXzEwMA==)",
      "conversation_id": "urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAFHoUZgB6wGz0HEW1MdqGW45NI4e-JhvGqQ,2-ZDYxZWIyZjUtMDQ5MS00NjJmLWJjY2ItOWFkYWVhZmM4MWFmXzEwMA==)",
      "deliveredAt": 1753696188256
    }
  }
  ```
</ResponseExample>

### Notes

* The API automatically determines if there's an existing conversation with the recipient
* The API includes a typing indicator for existing conversations
* Messages are sent with push notification enabled for the recipient
* The recipient profile must be accessible with your login token
* **Media Priority**: If multiple media parameters are provided, the system uses this priority order:
  1. `media_link` (direct URL) - highest priority
  2. `media_file` (base64 with metadata) - second priority
* For `media_file`, the base64 data can include the data URL prefix (e.g., "data:image/jpeg;base64,...")
* Temporary files created from `media_file` are automatically cleaned up after sending
* The following errors can occur:
  * Invalid profile URL format
  * Invalid media\_file format or base64 encoding
  * Network or permission errors
  * Rate limiting from LinkedIn
