JavaScript SDK: swarmhit.accounts.connections.send(accountId, params)
Send a LinkedIn connection request from this sender account to a profile, with an optional note. Notes are a premium feature of up to 300 characters (a longer note is a 400 and nothing is sent); free sender accounts can't include one, so their invites are sent without the note and the returned action has note: null. The profile is tracked as a lead and a connection.accepted webhook fires when it is accepted. Returns 409 when this sender already has a pending invitation to the profile from an earlier direct request (invitations sent by campaigns are not checked), or 429 when the sender hit its daily cap, its weekly connection-request limit (a rolling 7 days, tier-based: 130 for free accounts, 150 for paid; admin-configurable) or its pending-invitation backlog (500 by default), unless the workspace has the limit bypass enabled.
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Path Parameters
Header Parameters
Unique key per action (e.g. a UUID). Reusing it replays the first response instead of sending again, so a retry can't double-send. Read only by the endpoints that list it. A key is scoped to the endpoint and the account (or chat) it acts on, and kept for 24 hours. Only a successful response is stored and replayed: a 4xx frees the key, while a 5xx keeps it (the action may have gone out; retry with a new key). So does a 400 passing on a LinkedIn, WhatsApp or mail provider failure (code provider-unreachable, provider-408 for the provider's own timeout, or provider- and a 5xx status such as provider-502), unless the request provably never reached the provider (its connection never opened): the action may have gone out. A retry with the same key then gets 409 idempotency_failed. The request body is not compared, so a reused key replays the first response even if the body differs.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/accounts/string/connections" \ -H "Content-Type: application/json" \ -d '{ "profileUrl": "string" }'{ "data": { "id": "string", "accountId": "string", "type": "invitation", "status": "pending", "profileUrl": "string", "publicIdentifier": "string", "postUrl": "string", "replyTo": "string", "reactionType": "like", "leadId": "string", "note": "string", "error": "string", "sentAt": "2019-08-24T14:15:22Z", "acceptedAt": "2019-08-24T14:15:22Z", "withdrawnAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z" }}Sales Navigator company search GET
**JavaScript SDK:** [`swarmhit.accounts.salesNavigator.accountSearch(accountId, params?)`](/smart-api/sdk/methods#accounts.salesNavigator) Search Sales Navigator for companies (accounts) on this sender's session and get the results directly. Pass free-text `keywords`, or a pasted Sales Navigator company search URL (`url`) for a filtered search; `cursor` pages (25 results a page). Any other link (a people search, a classic LinkedIn search, a Sales Navigator page with no search in it) is a 400 with `code: invalid_search_url`, and nothing is sent to LinkedIn. Needs a Sales Navigator seat on the account — otherwise 422 (409 when the account is not connected or can't be used right now).
Message a connection POST
**JavaScript SDK:** [`swarmhit.accounts.messages.send(accountId, params)`](/smart-api/sdk/methods#accounts.messages) Send a LinkedIn message from this sender account to a profile it is connected to. To reply within an existing inbox conversation, use the inbox endpoint instead. Counts against the sender's daily message cap.