App Logo
linkedin.com

Send LinkedIn message

Send a message on LinkedIn (classic messaging, not Sales Navigator) — reply in an existing conversation by thread URL, start a conversation with a connection by name, or message by profile URL. Optionally attach a file (image or document) alongside the text. Returns whether it sent, who it went to, and confirmation the message/attachment landed. Limited to 1st-degree or open-profile connections; InMail (paid) is a separate flow not handled here.

Input

message optional

The message text to send. Optional if fileBase64 is given; required (non-empty) otherwise.

filename optional

Filename to attach it as, e.g. photo.png. Required when fileBase64 is set.

mimeType optional

MIME type of the attachment. Inferred from the filename extension when omitted.

recipient optional

Start/continue a conversation by the person's display name (e.g. "Jane Doe"). Every match the compose typeahead offers is checked against this name token-by-token (accent/case-insensitive) and the first one that matches is used, so a group conversation or another person ranked above your target does not block the send. A multi-word name must be contained in the match, and a single-word name only passes on an exact full-name match: "Chris" resolving to "Chris Anderson" is refused rather than messaging the wrong person. A name that matches nobody messageable (a misspelling, someone who is not a 1st-degree connection, or your own name) is refused as such. Prefer profileUrl when you have it. Pass this OR threadUrl OR profileUrl.

threadUrl optional

Reply in an existing conversation: its /messaging/thread/<id>/ URL (from list_inbox). LinkedIn thread ids can rotate over time, so fetch this fresh via list_inbox immediately before use rather than caching it long-term. Pass this OR profileUrl OR recipient.

fileBase64 optional

File contents to attach, base64-encoded (no data: prefix). Optional; combine with message for accompanying text.

profileUrl optional

Start/continue a conversation by the person's LinkedIn profile URL (from list_inbox's participants[].profileUrl, search_people, or get_profile), e.g. https://www.linkedin.com/in/<id>. Preferred over recipient: resolves the exact person directly with no name-search ambiguity. Pass this OR threadUrl OR recipient.

Output

sent required
message optional
filename optional
recipient optional

The conversation counterpart LinkedIn actually resolved and sent the message to. Confirm it's who you meant.

threadUrl optional

The conversation's /messaging/thread/<id>/ URL when the page landed on one; null in compose-overlay flows (never a compose URL).

attachmentVisible optional

True when the newly sent message renders an image or the filename, confirming the attachment landed rather than only that a message was sent. Null when no attachment was requested.

Start building not clicking