Can an AI agent send LinkedIn InMail?
Short answer. Yes. AgentWeb's
send_inmailsends a message with a subject line to a LinkedIn member who is not a 1st-degree connection, from the user's own account. It is free when the recipient has an Open Profile, and otherwise it spends one InMail credit. LinkedIn allows one unanswered InMail per recipient, so a second one fails until they reply, and nothing is sent or charged.
What it does
Sends an InMail with a subject line to a member outside the user's 1st-degree network. It is a real send and cannot be unsent.
What your agent needs
recipient_profile_urn: fromverify_open_profile,search_peopleorget_profile.mailbox_urn: the member's own, fromget_me.subjectandtext.
What comes back
The created message and the new thread's conversation URN.
Using it safely
- Call
verify_open_profilefirst to see whether it will be free. - Check
get_inmail_creditsbefore a sequence. - Don't send a second InMail before the first is answered: LinkedIn rejects it (HTTP 422).
Try it
This sends a real message from the connected account. Get the person's approval first.
curl -s https://mcp.agentweb.us/api/execute \
-H "Authorization: Bearer $AGENTWEB_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: linkedin-send_inmail-1" \
-d '{"domain":"linkedin.com","action":"send_inmail","params":{"recipient_profile_urn":"urn:li:fsd_profile:<id>","mailbox_urn":"<from get_me>","subject":"Quick question","text":"Hi Alex, saw your post on agent tooling."}}'
Parameter names shown are illustrative. Your agent gets the exact schema for every action from AgentWeb's list_actions tool.
Frequently asked questions
Does InMail cost credits?
Free when the recipient has an Open Profile (check with verify_open_profile). Otherwise it spends one of the user's InMail credits, which get_inmail_credits shows.
Why did my second InMail fail?
LinkedIn allows one unanswered InMail per recipient. Until they reply, another one fails with HTTP 422, and nothing is sent and no credit is used.
What does it cost?
Each completed action costs $0.05, paid from prepaid blocks of $25, $50 or $100 that never expire. Failed actions are refunded.
Which AI tools can use it?
Any agent that speaks MCP or HTTP. Add https://mcp.agentweb.us/mcp as a remote MCP server in Claude, ChatGPT, Cursor, Codex or Grok, or call the REST endpoint directly.
Related
- Start a LinkedIn conversation
- Look up a LinkedIn profile
- Best way to let an AI agent send LinkedIn messages (2026)
- LinkedIn API for AI agents
Action list from AgentWeb's public sites API, snapshot Oct 22, 2026, 16:59 London time. Live coverage: mcp.agentweb.us/api/sites.
More: Sites AgentWeb can act on · All guides · Glossary · Install AgentWeb