LinkedIn API endpoint

LinkedIn InMail API: reach beyond the network

Swarmhit's LinkedIn InMail API sends an InMail from a premium sender to a profile it is not connected to, with one POST to /accounts/{id}/inmails and an optional subject. Through Swarmhit, Sales Navigator and Recruiter senders reach open profiles without spending credits, within a plan-dependent allowance, and other sends draw the sender's InMail credits. Errors say exactly why a send could not go out.

Endpoints

  • POST/accounts/{id}/inmails

    Send an InMail

  • GET/accounts/{id}/connections/{identifier}

    Check whether the profile is open

POST

/accounts/{id}/inmails

api/v1
curl -X POST https://app.swarmhit.com/api/v1/accounts/acc_123/inmails \
  -H "Authorization: Bearer $SWARMHIT_API_KEY" \
  -H "Idempotency-Key: 6f1c2f3e-inmail-ana" \
  -H "Content-Type: application/json" \
  -d '{
    "profileUrl": "https://www.linkedin.com/in/ana-lopez",
    "subject": "Your outbound stack",
    "text": "Hi Ana, a quick idea on scaling LinkedIn outreach across your team."
  }'

How the LinkedIn InMail API works

  • InMail needs a premium LinkedIn plan on the sender; free accounts cannot send any. The account resource shows the remaining balance as inmailCredits.
  • Through Swarmhit, Sales Navigator and Recruiter senders can InMail open profiles without spending credits, within a monthly allowance that depends on the plan. The connection check reports openProfile before you send.
  • Failures are explicit: 409 sender_paused, 409 inmail_not_available when the sender has no premium InMail access, and 429 inmail_credits_exhausted when the balance is empty.

As a campaign step

The same action runs inside sequences as the inmail step: one POST /campaigns sets up the whole sequence, and the engine schedules each step per sender and mailbox, inside the sending window, with rotation across senders.

  • The inmail step takes subject, text and their fallbacks, up to five variants each with its own attachments (voice notes belong to message steps), and ends on a reply.
  • whenUnable decides what happens when an InMail cannot be sent: auto pauses the sender when it is out of credits and otherwise moves on, pause always pauses the sender, skip always continues. Put an if_open_profile branch in front to spend credits only where they are needed.

Limits and safety

  • Each send counts against the sender's daily InMail cap, and the API answers 429 with details { limit, used, scope, resetAt } when it is reached.
  • Credit exhaustion is its own 429 code, inmail_credits_exhausted, so your product can tell a busy day from an empty balance.
  • Every sender runs on its own dedicated proxy with managed warmup and health checks, behind 250+ safeguards monitored 24/7.

LinkedIn senders cost $16.90 a month each for the first 50, tiered down to $6.90, with no minimum. See pricing.

Webhooks

Events to subscribe to: message.sent, message.received. Deliveries are signed and retried. How LinkedIn webhooks work

Going deeper: LinkedIn InMail guide.

LinkedIn InMail API, answered

Does the LinkedIn InMail API need Sales Navigator?

It needs a premium LinkedIn plan on the sender: Premium, Sales Navigator or Recruiter. Free accounts cannot send InMail. Through Swarmhit, Sales Navigator and Recruiter senders can also InMail open profiles without spending credits, within a monthly allowance that depends on the plan.

What happens when a sender runs out of InMail credits?

A direct send returns 429 with the code inmail_credits_exhausted. In a campaign, the inmail step's whenUnable setting decides: pause the sender, skip to the next step, or the default auto mode, which pauses the sender only when credits are gone.

What is an open profile on LinkedIn?

A premium member who accepts InMails from anyone on LinkedIn, without a connection. Through Swarmhit, Sales Navigator and Recruiter senders reach open profiles without using credits, within a plan-dependent allowance. The connection check returns an openProfile flag, and campaigns can branch on it with the if_open_profile step.

Can I send an InMail to a 1st-degree connection?

There is no need: connections receive regular messages, which cost no credits. Campaigns enforce it, since invite, inmail and connection checks cannot sit below a branch where the lead is already connected.

More LinkedIn API endpoints

  • Sequencer built in
  • 250+ safeguards monitored 24/7
  • REST API and signed webhooks

Send an InMail from your product.
Safeguards included.

Get an API key, connect a sender through a hosted link, and make your first call in minutes.