Skip to main content
POST
Send Message
Send a direct message to any LinkedIn user. The message can be sent to either a new conversation or an existing one.
This endpoint costs 1 credit for text-only messages and 2 credits for messages with media attachments. Ignore this if you’re on per-seat pricing: usage is unlimited.

Header Parameters

string
required
Your API key

Body Parameters

string
required
LinkedIn profile URL of the recipient (e.g., “https://www.linkedin.com/in/username”) or profile URN (e.g., “ACoAAFHoUZgB6wGz0HEW1MdqGW45NI4e-JhvGqQ”)
string
required
Content of the message to send
string
default:"FR"
Country code for proxy selection. Available: US, CA, MX, CR, BR, AR, CL, CO, FR, UK, DE, NL, ES, IT, PT, BE, CH, AT, IE, SE, DK, FI, LT, LV, EE, PL, CZ, SK, HU, RO, UA, SI, HR, RS, AL, GR, CY, TR, IL, AE, EG, ZA, IN, PK, BD, JP, SG, MY, ID, TH, PH, AU
Direct URL to media file to attach to the message (use .png,.mp4,jpeg,.pdf link extension)
file
Media file to attach to the message (second priority)
Click to select a file from your computer. The file will be automatically converted to base64 format with metadata.
string
required
LinkedIn authentication cookie obtained from the login/verify process

Response

string
Request status (success/error)
string
Detailed message about the message status
object
Additional data returned when message is sent successfully

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