JavaScript SDK: swarmhit.accounts.posts.like(accountId, params)
Like a LinkedIn post from this account, or leave another reaction on it. Pass exactly one of postUrl (that post) or profileUrl (the lead's most recent post). Counts against the account's daily post-like cap, whatever the reaction. Returns 422 when the lead has no recent post, and 422 with code: post_not_found when postUrl is not a post's link (checked before anything else) or this account can't see the post. A post given by its link isn't tied to a lead: no lead is created, and the action's profileUrl is the post's author when that is a person.
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/post-likes" \ -H "Content-Type: application/json" \ -d '{ "postUrl": "https://www.linkedin.com/posts/jane-doe_hiring-activity-7332661864792854528-hcGT", "reactionType": "celebrate" }'{ "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" }}Follow a lead POST
**JavaScript SDK:** [`swarmhit.accounts.profiles.follow(accountId, params)`](/smart-api/sdk/methods#accounts.profiles) Follow a lead from this sender account — subscribe to their posts without sending a connection request. Counts against the sender's daily follow cap.
List emails sent through the API GET
**JavaScript SDK:** [`swarmhit.emailAccounts.emails.list(emailAccountId, params?)`](/smart-api/sdk/methods#emailAccounts.emails) The emails this mailbox sent with POST /email-accounts/{id}/emails, newest first. Campaign emails and inbox replies are not listed. A request that failed returned its error and was not logged.