Skip to main content
POST
/
v2
/
messages
Send Message
curl --request POST \
  --url https://api.example.com/v2/messages \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "account_id": "<string>",
  "action": "<string>",
  "params": {
    "profile_url": "<string>",
    "message_text": "<string>",
    "media_link": "<string>",
    "media_file": {
      "data": "<string>",
      "filename": "<string>"
    },
    "media_path": "<string>"
  }
}
'
{
  "success": true,
  "data": {
    "entityUrn": "urn:li:messagingMessage:abc123",
    "conversation_id": "2-YWJjMTIz",
    "deliveredAt": "2026-03-24T12:00:00Z"
  },
  "metadata": {
    "action": "send",
    "account_id": "your-account-id",
    "credits_consumed": 1,
    "timestamp": "2026-03-24T12:00:00Z"
  }
}

Overview

Sends a message to a user identified by their profile URL. You can include text only, or attach media via a URL, base64-encoded file, or server-side path.
This endpoint consumes 1 credit for text-only messages and 2 credits when media is attached.
When multiple media options are provided, the priority order is: media_link > media_file > media_path. Only one media attachment will be used.

Request

x-api-key
string
required
Your API key for authentication.
account_id
string
required
The unique identifier of the account to use.
action
string
required
Must be "send".
params
object
required

Response

success
boolean
Indicates whether the request was successful.
data
object
Details of the sent message.
metadata
object
{
  "success": true,
  "data": {
    "entityUrn": "urn:li:messagingMessage:abc123",
    "conversation_id": "2-YWJjMTIz",
    "deliveredAt": "2026-03-24T12:00:00Z"
  },
  "metadata": {
    "action": "send",
    "account_id": "your-account-id",
    "credits_consumed": 1,
    "timestamp": "2026-03-24T12:00:00Z"
  }
}