The LinkedIn API for AI agents.
AI SDRs and agent products use the Smart API as their outreach hands: the agent decides who to contact and what to say, Swarmhit decides when and how fast. Every LinkedIn action is a REST call an agent can use as a tool, replies, accepted invitations and campaign progress come back as signed webhooks, and the per-sender limits live on the server, where no prompt can talk its way past them.
What you build on the Smart API
Tools the agent can call
Messages, connection requests, InMail, profile visits, follows, likes and comments are one endpoint each. Wrap them as tools in any framework that does function calling, or give the agent a single tool that creates a whole campaign.
Events instead of polling
message.received and connection.accepted arrive as signed webhooks when they happen, and comment.pending and voice_note.pending flag AI drafts from campaign steps with review on, so the agent wakes up on a reply instead of scanning inboxes.
Limits the model cannot bypass
Daily caps per action, the weekly connection-request cap and the pending-invitation ceiling are enforced per sender. A limit returns a 429 with the limit, the count used and, for daily and weekly caps, when it resets, which the agent can read and respect.
Four calls, then it runs on its own.
The Smart API queues, paces, retries and rotates every step once the campaign is live. Your code only handles what is specific to you.
- 1
GET /accounts/{id}/connections/{identifier}
Check before acting
Connection status, degree, open profile and canMessage, without a profile view or any cap used.
- 2
POST /accounts/{id}/messages
Act
Or invite, InMail, visit, follow, like, comment: one call per action, with an Idempotency-Key.
- 3
POST /webhooks
Listen
Replies, accepted invitations and AI drafts waiting for review, signed with HMAC-SHA256.
- 4
GET /pending-comments
Keep a human in the loop
AI comments and AI voice notes can wait for approval before anything reaches a lead.
A LinkedIn tool for your agent
api/v1// A tool your agent can call: message a LinkedIn connectionconst tool = {name: "send_linkedin_message",description: "Message a 1st-degree LinkedIn connection",input_schema: {type: "object",properties: { profileUrl: { type: "string" }, text: { type: "string" } },required: ["profileUrl", "text"],},};// When the agent calls it, forward to Swarmhitconst res = await swarmhit.post("/accounts/acc_123/messages", input, {headers: { "Idempotency-Key": toolCallId }, // a retried tool call never double-sends});// 429 carries { limit, used, scope, resetAt }: hand it back to the agent
LinkedIn + email
The agent picks the leads. The engine keeps the pace.
Agents are good at research and writing, and bad at timing. Let the agent create a campaign in one call and the sequencer runs each step per sender inside the sending window, rotates leads across senders, retries what failed and stops when a lead replies.
- 1Visit the profilevisit_profile
- 2AI comment, approved by a humancomment_post
- 3Connection requestinvite
- 4Message once acceptedmessage
- 5Not accepted: has an email?if_has_email
- 6Email from the mailbox poolemail
Operated for you, visible to you.
- 250+ safeguards on every LinkedIn sender
- Per-mailbox caps and bounce suppression
- One dashboard for accounts, API calls, webhooks and limits
- A playground to test campaigns before you code
Smart API pricing
LinkedIn from $16.90 per sender. Cold email from $59 a month.
Each channel is priced on its own: senders for LinkedIn, monthly sends for email. Free trial in the playground, up to 2 senders.
FAQ
Questions from ai agents.
Give your agent LinkedIn.
Keep the limits on the server.
Get an API key, connect a sender through a hosted link, and register your first tool today.