LinkedIn API for AI agents
Connect your LinkedIn profile and your AI agent can answer messages from connections, send InMail, send and answer connection requests, see who viewed your profile, search people, companies, posts and jobs, read profiles and posts, follow people, publish, comment and react, and handle job posts and Recruiter or Sales Navigator actions, all inside LinkedIn’s limits for your plan.
What your agent can do on LinkedIn
- Answer messages from connections, and send an InMail when you have credits
- Send, track and withdraw connection requests, and accept or decline the ones you receive
- See who viewed your profile, and read a profile’s experience, skills and contact details
- Search people, companies, posts and jobs, with filters, Sales Navigator or Recruiter
- Follow people, endorse a skill, and keep your connections tidy
- Publish posts with images, video or a link preview, comment and react
- Schedule posts, reshare a post, or post as a company page you manage
- See how your posts do: impressions, clicks, engagement and reach
- Stay inside LinkedIn’s limits for your plan, with this week’s count on each account
- Manage job posts and applicants, and Recruiter or Sales Navigator actions
Three steps
- Start free and connect LinkedIn. You sign in to LinkedIn through a secure link and approve the connection.
- Add Spaces to your AI agent with one URL,
https://api.spacesos.com/mcp/linkedin, or use the REST API athttps://api.spacesos.com/v1. Steps for each AI client. - Your agent reads and answers. Spaces paces every message inside the limits that keep the account safe.
Or paste this into your agent and let it set things up with you:
Set up Spaces for me by following https://www.spacesos.com/agentsThe core tools
| What it does | MCP tool | REST |
|---|---|---|
| Your conversations, newest first, with their tags, owner, star and whether a person has taken them over. Filter to unread, unanswered, starred, archived, message requests, handed over, a tag or an owner. | list_messaging_chats | GET …/chats |
| The messages in one conversation. | list_messaging_messages | GET …/chats/{chat_id}/messages |
| A photo, video, voice note, GIF, sticker or file from a message, or a private link to it that works for ten minutes. | get_messaging_attachment | GET …/chats/{chat_id}/messages/{message_id}/attachments/{attachment_id} |
| Reply in a conversation, with text or attachments. | reply_in_chat | POST …/chats/{chat_id}/messages |
| Start a new conversation with someone who expects to hear from you. | start_chat | POST …/chats |
| Send a message at a set local time, inside working hours you choose. | schedule_message | POST /v1/messaging/schedules |
Only on LinkedIn
| What it does | MCP tool | REST |
|---|---|---|
| Send a connection request, with an optional note. | send_invitation | POST …/invitations |
| Connection requests you have sent. | list_invitations | GET …/invitations |
| Withdraw a connection request. | cancel_invitation | DELETE …/invitations/{invitation_id} |
| Search LinkedIn for people, companies, posts or jobs, with filters such as location and industry, through Sales Navigator or Recruiter, or from a search link copied from LinkedIn. | search_linkedin | POST …/search |
| Connection requests waiting for you, with any note. | list_received_invitations | GET …/invitations/received |
| Accept or decline a connection request. | respond_to_invitation | POST …/invitations/received/{invitation_id} |
| Withdraw your invitations that are still waiting after a number of days you choose. Off unless you turn it on. | set_linkedin_auto_withdraw | PATCH …/linkedin/settings |
| Who viewed your profile recently. | list_profile_viewers | GET …/linkedin/profile-viewers |
Every LinkedIn tool · LinkedIn MCP guide · Full reference
Limits that keep the account safe
Up to 100 messages a day per account, at least 20 seconds apart, with 100 new chats a day at most and a four-week warm-up for new accounts. LinkedIn limits in full · How accounts are kept safe.
FAQ
Does LinkedIn have an API for messages?
LinkedIn does not offer a public API for messaging from a personal profile. Spaces connects your own profile after you sign in through a secure link, so your agent can read and answer your messages inside safe daily limits.
Can my agent send connection requests?
Yes, with an optional note, at a pace that stays inside LinkedIn’s limits for your plan: 100 a day and 150 a week on a free account, 100 a day and 200 a week on Premium, Sales Navigator or Recruiter, and fewer while a new account warms up. You can also have old invitations withdrawn for you.
What happens if LinkedIn restricts my account?
Sending from that account stays paused until you reconnect it. Open LinkedIn and do what it asks. A limit on one action does not pause the account, and reading keeps working.
Can I use this for cold outreach?
Spaces is for people who know you and expect to hear from you. It refuses the same cold message sent to many people and stops messaging anyone who says stop.
How much does the LinkedIn API cost?
Free to start, then $19 per connected account a month. The Free plan has one connected account and needs no card. You pay per connected account, not per message or per contact.