LinkedIn messaging API: message connections and InMail from your account
Message a connection from your account, reply in an existing thread, or send an InMail to someone you are not connected to. InMail credits belong to one LinkedIn product: inmail:true draws on the Premium credits, api recruiter or sales_navigator sends through that seat and its credits. linkedin.accounts with inmail_credits:true shows each balance before you send. You are the sender of record.
Unipile:
all inputs
✓ marks a combination proven with a real provider call. Others are wired and unit-tested; their first live run verifies them.
| Provider | Status |
|---|---|
Unipile |
live |
Unit: per_message · unmatched results billed: no
Priced per message sent; a refused send bills nothing.
The exact quote is returned by /v1/inspect before every call and held with headroom on execution. The quote is the price floor: if the provider's actual cost overruns it, the run bills the overrun at the same rate, never above the hold. The unused part of every hold is released.
curl https://api.routergrowth.com/v1/run \ -H "Authorization: Bearer $ROUTERGROWTH_API_KEY" \ -d '{ "capability": "linkedin.message", "input": { "text": "..." }, "routing": {"provider": "auto"} }'
{
"properties": {
"account_id": {
"description": "The account name (or id) from linkedin.accounts; optional when you have one account",
"type": "string"
},
"api": {
"default": "classic",
"description": "The LinkedIn product a new conversation is sent through, and whose InMail credits it uses: classic (Premium, with inmail:true), recruiter or sales_navigator. Outside classic the message is an InMail and needs a subject. Ignored on a reply (chat_id)",
"enum": [
"classic",
"recruiter",
"sales_navigator"
],
"type": "string"
},
"attachments": {
"description": "Images or files sent with the message, 10 at most and 10 MB in total. Each carries the file one of two ways: url, a public https URL fetched at send time (a redirecting URL works), or data_base64, the file inline (4 MB in total). Works on replies and new conversations.",
"items": {
"properties": {
"content_type": {
"description": "Media type, e.g. image/jpeg; guessed from the filename when omitted",
"type": "string"
},
"data_base64": {
"description": "The file\u0027s bytes as standard base64; exactly one of url or data_base64",
"type": "string"
},
"filename": {
"description": "Plain file name, e.g. letter.jpg",
"type": "string"
},
"url": {
"description": "Public https URL of the file; exactly one of url or data_base64",
"type": "string"
}
},
"required": [
"filename"
],
"type": "object"
},
"maxItems": 10,
"type": "array"
},
"chat_id": {
"description": "From linkedin.messages: reply in that thread",
"type": "string"
},
"inmail": {
"default": false,
"description": "Send as InMail on the account\u0027s Premium credits (needs a subject). For a Recruiter or Sales Navigator seat, pass api instead",
"type": "boolean"
},
"profile_url": {
"description": "Start a new conversation with this person",
"type": "string"
},
"provider_id": {
"type": "string"
},
"subject": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
}
chat_id · message_id