Source: https://www.agentweb.us/sites/linkedin.com/send-inmail/

# Can an AI agent send LinkedIn InMail?

By Andrey Marey, Founder of AgentWeb · As of Oct 22, 2026

> **Short answer.** Yes. AgentWeb's `send_inmail` sends 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`: from `verify_open_profile`, `search_people` or `get_profile`.
- `mailbox_urn`: the member's own, from `get_me`.
- `subject` and `text`.

## What comes back

The created message and the new thread's conversation URN.

## Using it safely

- Call `verify_open_profile` first to see whether it will be free.
- Check `get_inmail_credits` before 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.

```bash
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](/sites/linkedin.com/start-conversation/)
- [Look up a LinkedIn profile](/sites/linkedin.com/get-profile/)
- [Best way to let an AI agent send LinkedIn messages (2026)](/blog/best-way-to-let-an-ai-agent-send-linkedin-messages-2026/)
- [LinkedIn API for AI agents](/sites/linkedin.com/)
