Send a DM
POST
https://myagentmail.com/linkedin/messagesFor agents View as Markdown
Send a direct message. Recipient must be a 1st-degree connection (LinkedIn rejects non-1st sends; the upstream error surfaces verbatim).
Pass exactly one of:
recipient(preferred): profile URL, slug, ACoA... profileId, or full URN. The backend resolves and does find-or-create on the 1:1 thread.conversationUrn(advanced): append to a known thread you already have an URN for, e.g. from a previous send response or fromGET /v1/linkedin/conversations.
Request body
Content-Type: application/json
sessionIdrequired string | |
textrequired string | |
recipientstring | Profile URL, slug, ACoA... profileId, or full URN. |
conversationUrnstring | urn:li:msg_conversation:(...) — append to known thread. |
Responses
200application/jsonMessage sent.
okboolean | |
messageUrnstring | |
conversationUrnstring | |
backendConversationUrnstring | |
deliveredAtinteger | Unix ms. |
400Validation error or LinkedIn rejected the send.
404Session not found.
429Daily quota exceeded for this session.
Authentication
Send your API key in the X-API-Key header (or Authorization: Bearer <key>). Any prefix accepted by this endpoint — tk_, wk_, ak_, or sa_ — is documented in the key prefix table.