LinkedIn API for AI agents: what the options are
If you want an AI agent to read or send LinkedIn messages, there are two very different routes: LinkedIn's own Messages API, or connecting your own account through a tool like Spaces. This guide sets out what LinkedIn says about each.
Route 1: LinkedIn's Messages API
LinkedIn's Messages API documentation on Microsoft Learn says: "Usage of this API is restricted to approved partners, subject to limitations via API agreement." The same page lists requirements. Among them:
- A message must be associated with a specific member action. Member actions do not include an automated or scheduled event.
- Members must opt in to sending a message, and must be given a choice about whether to send it.
- If the app proposes a pre-prepared message, the member must be able to edit the subject, body and attachments, and must take an affirmative action to send it.
- A message must be posted at, or around, the time the member took action.
Route 2: connecting your own account
Tools like Spaces connect your own LinkedIn account by signing in, so your agent can read and reply through an MCP server or REST API. LinkedIn's User Agreement section 8.2 prohibits using "bots or other unauthorized automated methods" to send messages, add contacts, or create, comment on, like or share posts. LinkedIn's help page on prohibited software says members using such tools "risk having their accounts restricted or shut down."
What Spaces does
Spaces gives your agent the inbox, replies, new chats and profile lookups on a LinkedIn account you own. It also covers invitations, search, posts, comments and reactions. Spaces enforces its own per-account limits for every key, and every send is safe to retry. Spaces' Terms forbid bulk unsolicited messages and cold outreach at scale.
Who you message
Pricing
FAQ
Can anyone use LinkedIn's Messages API?
No. LinkedIn's documentation says usage of the Messages API is restricted to approved partners, subject to limitations via API agreement.
Does LinkedIn's Messages API allow automated sending?
LinkedIn's documentation says a message must be associated with a specific member action, and that member actions do not include an automated or scheduled event.
What does LinkedIn say about third-party automation tools?
LinkedIn's User Agreement section 8.2 prohibits bots or other unauthorized automated methods to send messages and other actions, and LinkedIn says members using such tools risk having their accounts restricted or shut down.
Is Spaces affiliated with LinkedIn?
No. Spaces connects your own account by signing in and is not affiliated with LinkedIn.