Linnia API reference
Every endpoint of the Linnia REST API at https://api.linnia.ai. Authenticate with Authorization: Bearer lin_…
GET /v1/meWho am I (Me). The organisation behind the credential. With an API key, `org` and `user` are null; with a signed-in session they describe the person.GET /v1/accountsList accounts (Accounts). Every connected LinkedIn account in the organisation, with status, health, working hours and budgets left, plus seat usage.POST /v1/accounts/connectStart connecting an account (Accounts). Creates the account and returns `connectUrl`, a Linnia page where the rep signs in to LinkedIn. LinkedIn credentials never pass through your integration. Takes a seat; fails with `notAllowed` when every seat is in use.GET /v1/accounts/{id}Get an account (Accounts).PATCH /v1/accounts/{id}Update account settings (Accounts). Label, timezone, working hours, what happens to writes outside working hours (`queue` waits for the next opening, `reject` fails at once; reads run at any hour, and a message to someone already connected may go on a non-working day inside the daily window), the invitation quality gate (0 disables), automatic withdrawal of stale invitations (days, or null to disable) and the operating mode.DELETE /v1/accounts/{id}Remove an account (Accounts). Disconnects the account and frees its seat.GET /v1/accounts/{id}/health-reportHealth report (Accounts). Network size, pending and stale invitations (older than 21 days) with a proposed cleanup, Social Selling Index when Sales Navigator is on, the warm-up plan and recommendations. Read it right after connecting.GET /v1/accounts/{id}/usageUsage report (Accounts). Units used per local day and per budget category over the last `days`, newest first, with how much came from the rep's own LinkedIn activity (`external`).GET /v1/accounts/{id}/briefDaily brief (Accounts). The morning read for one rep: replies that need them in priority order (with triage class), new connections ready for a first message, queue, approvals waiting, budgets and working hours.GET /v1/accounts/{id}/invitationsList invitations Linnia knows about (Accounts). Invitations sent from this account as Linnia recorded them (sent through Linnia, or seen when syncing), newest first, up to 200.GET /v1/accounts/{id}/limitsGet limits (Accounts). Each limit in force next to Linnia's default and the ceiling for the account's tier.PUT /v1/accounts/{id}/limitsSet limits (Accounts). Sets one or more limits. Lower is always fine; anything above the tier's ceiling is capped by the Governor. Warm-up and health still scale the limit down.POST /v1/accounts/{id}/pausePause an account (Accounts). Stops all writes until a person resumes it.POST /v1/accounts/{id}/resumeResume an account (Accounts). Resumes a paused or stopped account. After a LinkedIn restriction the account only reads for 7 days, then restarts warm-up at half its previous level.POST /v1/accounts/connect/credentialsAdd an account with its login (Account connection). One call from a login to a working account, for integrations that hold the credentials themselves: takes a seat, pins the proxy to the account, signs in, and answers the 2FA prompt from the authenticator secret. The password and the secret are used for this sign-in and are not stored.POST /v1/accounts/{id}/reconnectGet a reconnect link (Account connection). A Linnia page where the rep signs in to LinkedIn again.POST /v1/accounts/{id}/native-authSign in with LinkedIn email and password (Account connection). Signs an existing account in (or back in): for building your own connect screen, or for reconnecting an account you hold the login for. Linnia doesn't store the password or the authenticator secret; the session is held by Linnia's LinkedIn provider. With `totpSecret` Linnia answers the 2FA prompt itself; anything else LinkedIn asks for (an emailed code, a CAPTCHA, approval in the LinkedIn app) comes back as a checkpoint to complete with `native-checkpoint`. To create the account and sign in at once, use `POST /v1/accounts/connect/credentials`.POST /v1/accounts/{id}/native-cookieConnect with a LinkedIn session cookie (Account connection). Connects with the `li_at` cookie (and `li_a` for Sales Navigator or Recruiter). Only when cookie connect is enabled for the workspace; otherwise `notAllowed`.POST /v1/accounts/{id}/native-checkpointComplete a checkpoint (Account connection). Sends the code (or CAPTCHA token, selection, phone number) for the checkpoint. Send an empty `code` to wait on PAIRING_CODE or LOADING.POST /v1/accounts/{id}/native-checkpoint/resendResend a checkpoint code (Account connection).POST /v1/accounts/{id}/native-pollCheck an in-app approval (Account connection). After the rep approves the sign-in in the LinkedIn app, returns `connected`; otherwise still the IN_APP_VALIDATION checkpoint.POST /v1/accounts/{id}/hosted-authHosted sign-in link (legacy) (Account connection). A fresh hosted LinkedIn sign-in URL from the provider. Prefer `connectUrl` or the native endpoints.POST /v1/accounts/{id}/get_profileGet a profile (Commands: read). A person's profile: headline, company, location, connection degree, shared connections. Cached for a week; a fresh fetch counts against `profile_views`. Each detail section is a heavier LinkedIn call, so ask only for what you need.POST /v1/accounts/{id}/get_companyGet a company (Commands: read). A company page: industry, size, location, website.POST /v1/accounts/{id}/search_peopleSearch people (Commands: read). Searches LinkedIn for people. Charged one search page per call (`search_pages`: 100 a day, 200 for a seat with over 500 connections), whatever the page size. Filters marked Sales Navigator need it on the account.POST /v1/accounts/{id}/search_companiesSearch companies (Commands: read). Searches LinkedIn for companies. Charged per result row returned.POST /v1/accounts/{id}/company_employeesCompany employees (Commands: read). People who currently work at a company, optionally narrowed by title, location or seniority (Sales Navigator). Each person carries `teamConnections`: seats in your organisation already connected with them. Charged per result row returned.POST /v1/accounts/{id}/search_postsSearch posts (Commands: read). Searches LinkedIn posts by keywords. Use `datePosted` and `sortBy: date` for fresh buying signals. Charged per result row returned.POST /v1/accounts/{id}/search_jobsSearch jobs (Commands: read). Searches LinkedIn job postings. A company hiring for a role is a buying signal. Charged per result row returned.POST /v1/accounts/{id}/get_postsGet posts (Commands: read). Recent posts by a person or a company page, newest first. Give a person or a company, not both. Not budgeted.POST /v1/accounts/{id}/get_postGet a post (Commands: read). A post by URL or id: author, text, reaction and comment counts.POST /v1/accounts/{id}/list_chatsList conversations (Commands: read). Recent conversations, newest first. Each says which `inbox` it lives in (classic, sales_navigator, recruiter, organization) and carries the latest reply triage when there is one. Pass `inbox` to read only Sales Navigator messages, for example.POST /v1/accounts/{id}/get_conversationGet a conversation (Commands: read). Messages in one conversation (chat id from `list_chats`), newest first.POST /v1/accounts/{id}/list_invitesList invitations on LinkedIn (Commands: read). Sent or received invitations, read live from LinkedIn. Counts against `list_polls` (a few a day); for Linnia's own record use `GET /v1/accounts/{id}/invitations`.POST /v1/accounts/{id}/post_engagementPost engagement (Commands: read). Who commented on (`type: comments`) or reacted to (`type: reactions`) a post. Each row starts with the person (`providerId`, `name`, `headline`) so a workflow can fan out over engagers, carries the comment id and text for replies, and lists `teamConnections`. Charged per row returned.POST /v1/accounts/{id}/person_activityPerson activity (Commands: read). What a person has recently commented on (`type: comments`) or reacted to (`type: reactions`), for a specific opener.POST /v1/accounts/{id}/post_performancePost performance (Commands: read). The account's own recent posts with reactions, comments and reposts, totals, averages and the best post.POST /v1/accounts/{id}/list_connectionsList connections (Commands: read). The account's 1st-degree connections, newest first. Linnia also syncs them daily, so the `connected` skip rule and the person timeline know about connections made outside Linnia.POST /v1/accounts/{id}/profile_viewersProfile viewers (Commands: read). Who viewed the account's profile recently. Free LinkedIn shows only a few recent viewers.POST /v1/accounts/{id}/ssiSocial Selling Index (Commands: read). The account's Social Selling Index (score out of 100 and four pillars). Needs Sales Navigator.POST /v1/accounts/{id}/connectSend a connection request (Commands: write). Sends a connection request with an optional note (max 300 characters, no links). Linnia checks the target first: already connected, pending invitation, do-not-contact, recently contacted by a colleague, duplicate text and a targeting quality gate (`minInviteQuality`).POST /v1/accounts/{id}/withdraw_inviteWithdraw an invitation (Commands: write). Withdraws a pending invitation the account sent. Does not need approval in approve mode.POST /v1/accounts/{id}/send_messageSend a message (Commands: write). Sends a message to a 1st-degree connection (`person`) or into an existing conversation (`chat`). Set `inmail: true` for InMail (counts against `inmails`), or `via: sales_navigator` to message from Sales Navigator (needs it on the account). The same text twice to one person, and more than 10 near-identical messages a day, are blocked.POST /v1/accounts/{id}/accept_inviteAccept a received invitation (Commands: write). Accepts an invitation from the received list (`list_invites` with direction `received`).POST /v1/accounts/{id}/decline_inviteDecline a received invitation (Commands: write). Declines a received invitation. Does not need approval in approve mode.POST /v1/accounts/{id}/endorseEndorse a skill (Commands: write). Endorses one skill on a connection's profile, by the skill name shown on the profile.POST /v1/accounts/{id}/save_leadSave a Sales Navigator lead (Commands: write). Saves a person as a Sales Navigator lead, optionally into a lead list. Needs Sales Navigator.POST /v1/accounts/{id}/reactReact to a post (Commands: write). Reacts to a post.POST /v1/accounts/{id}/commentComment on a post (Commands: write). Comments on a post. Comments can't contain links.POST /v1/accounts/{id}/repostRepost a post (Commands: write). Reposts a post, optionally with your own text on top (no links).POST /v1/accounts/{id}/reply_commentReply to a comment (Commands: write). Replies to a comment on a post (comment id from `post_engagement`). Replies can't contain links.POST /v1/accounts/{id}/react_commentReact to a comment (Commands: write). Reacts to a comment on a post.POST /v1/accounts/{id}/remove_connectionRemove a connection (Commands: write). Removes a 1st-degree connection. Undoing it takes a new invitation.POST /v1/accounts/{id}/manage_chatManage a conversation (Commands: read). Marks a conversation read or unread, archives or mutes it (or undoes either). Not visible to the other person; not budgeted.POST /v1/accounts/{id}/create_postPublish a post (Commands: write). Publishes a post from the account.POST /v1/jobsRun a command (Jobs). The generic form of every command: `{ account, command, input }`. Same behaviour as `POST /v1/accounts/{id}/{command}`.GET /v1/jobsList jobs (Jobs). Recent jobs, newest first.GET /v1/jobs/{id}Get a job (long-poll) (Jobs). With `wait`, holds the request open up to that many seconds (max 600) and returns as soon as the job is completed, failed or cancelled. Otherwise returns the current snapshot.DELETE /v1/jobs/{id}Cancel a job (Jobs). Cancels a job that hasn't finished. Pending approvals for it are rejected. Anything already sent to LinkedIn is not undone.POST /v1/accounts/{id}/actionsRun a tree of actions (Jobs). Runs a one-off tree of actions on one seat in one job (a list of people taken through the same steps is a workflow, see /v1/workflows). The older `POST /v1/accounts/{id}/workflows` path with a `workflow` body key still works. Each node is `{ action, label?, params?, then?: node | node[] }`; actions are the command names plus `for_each_person` (after `search_people` or `list_invites`; runs `then` once per person, first 20) and `wait` (`days`, `workingDays` or `hours`). Nesting is limited to 5 levels. Inside `for_each_person`, `person` is implied and text may use `{{first_name}}`, `{{company}}`, `{{headline}}`. Call with `dryRun: true` first to get the plan with per-category cost.GET /v1/approvalsList approvals (Approvals).GET /v1/approvals/{id}Get an approval (Approvals).POST /v1/approvals/{id}/approveApprove (Approvals). Approves the write, optionally replacing its text (message, note or comment). The action then goes through the Governor like any other: working hours, budgets, pacing. Fails if the request expired (72 hours) or was already decided.POST /v1/approvals/{id}/rejectReject (Approvals).GET /v1/automationsList automations (Automations).POST /v1/automationsCreate an automation (Automations). A trigger plus up to 10 steps. Any reply from the person stops their run. Sends go through approvals, budgets and pacing like every other write.POST /v1/automations/{id}/pausePause an automation (Automations). Sets the status to `paused`. Everyone waiting in it is stopped.POST /v1/automations/{id}/resumeResume an automation (Automations). Sets the automation back to active.POST /v1/automations/{id}/archiveArchive an automation (Automations). Sets the status to `archived`. Everyone waiting in it is stopped.GET /v1/workflowsList workflows (Workflows). Newest first, with counts per stage. `status` is comma-separated; default is every status.POST /v1/workflowsCreate a workflow (draft) (Workflows). A name, the seats it may send from, and up to 10 steps. Nothing sends until it is launched; launching records who approved the copy, and the sends it creates then skip per-message approval but still run at each seat's pace.GET /v1/workflows/{id}Get a workflow and its plan (Workflows). The workflow with counts and the finish estimate, plus `plan`: people still to go, sends per person, warnings (templated copy, nobody enrolled), and a schedule per seat and category.GET /v1/workflows/{id}/peoplePeople in a workflow (Workflows). Newest first, each with their step ("2 of 3"), status and reason. `status` is comma-separated.POST /v1/workflows/{id}/peopleEnroll people (Workflows). Up to 500 per call. Each person gets a seat: the one named, else a seat already connected to them, else the least loaded. People on the do-not-contact list, touched by the team within the workflow's `contacted_last_Nd` window, or already enrolled are skipped and listed back. Free; no LinkedIn call.DELETE /v1/workflows/{id}/people/{runId}Remove one person (Workflows). Stops their run and cancels any queued send. Sent messages stay sent.POST /v1/workflows/{id}/launchLaunch a workflow (Workflows). Starts the workflow. Records the caller as having approved the copy: the sends it creates skip per-message approval and run at each seat's pace.POST /v1/workflows/{id}/pausePause a workflow (Workflows). Holds every send until resumed. Sends already queued stay queued.POST /v1/workflows/{id}/resumeResume a workflow (Workflows). Resumes a paused workflow.POST /v1/workflows/{id}/cancelCancel a workflow (Workflows). Ends the workflow: people still waiting are stopped and their queued sends cancelled. Sent messages stay sent.GET /v1/people/{person}/timelinePerson timeline (People). Everything the organisation has done with one person across every connected account: invitations, messages, replies (with triage), automations, pending approvals and notes, newest first. Also says whether the person is on the do-not-contact list.POST /v1/people/{person}/notesAdd a note (People). A note about a person, visible to the whole organisation in the timeline. Never sent to LinkedIn. Up to 4000 characters.GET /v1/lead-listsList lead lists (Lead lists). The organisation's lead lists, newest first, with member counts. Follow `nextCursor` for older pages.POST /v1/lead-listsCreate a lead list (Lead lists). A named list from rows you assembled or a CSV. Every person needs a first name, a last name (or a full name) and a LinkedIn profile; other columns become `{{fields}}` for a workflow's copy. Rows that fail come back in `invalid` with line numbers; at most 2,000 rows per call, the rest through `POST /v1/lead-lists/{id}/members`.POST /v1/lead-lists/inspectInspect a CSV before upload (Lead lists). Reads a CSV's columns, guesses which is which, and previews the parse without saving anything. Use the result's `mapping` keys to correct the guess on the upload.GET /v1/lead-lists/{id}A lead list and its people (Lead lists). One list with a page of its members: name, headline, company, the seats connected to them (the warm path), the workflows they are in, and the row's fields.PATCH /v1/lead-lists/{id}Rename a lead list (Lead lists).DELETE /v1/lead-lists/{id}Delete a lead list (Lead lists). Removes the list and its members. People already enrolled in a workflow stay in it.POST /v1/lead-lists/{id}/membersAdd people to a lead list (Lead lists). Rows or a CSV, as on create. People already on the list are skipped, with the reason.DELETE /v1/lead-lists/{id}/members/{memberId}Remove a person from a lead list (Lead lists).POST /v1/lead-lists/{id}/enrolEnrol a whole list in a workflow (Lead lists). Everyone on the list goes into the workflow, each row's columns as their fields. `account` picks the sending seat; left out, Linnia picks the seat connected to each person. People already in the workflow, on the do-not-contact list, or reached by a colleague recently are skipped with the reason.GET /v1/accounts/who-knowsWho on the team knows them (Network). Which seats know a person (`?person=`) or people at a company (`?company=`), and how well: connected since when, last conversation (who wrote last, never the text), the last outreach Linnia sent, engagement with their posts, ranked strong / medium / weak. For a person nobody is connected to, the mutual connections remembered from earlier searches. Reads Linnia's synced copy: instant, nothing reaches LinkedIn.GET /v1/networkSearch the team's network (Network). Every seat's synced 1st-degree connections in one place, one row per person with the seats connected to them. Free; nothing reaches LinkedIn. `sync` says how complete each seat's copy is.GET /v1/network/companiesCompany names in the network (Network). Company names among the team's connections that match `q`, for a picker.GET /v1/network/syncHow complete each seat's copy is (Network). Per seat: whether the connection sync has started, is backfilling or is live, and how many connections are in.POST /v1/network/mutuals/mapMap the mutual connections for a list (Network). The warm path to every target on a list at once. Targets a seat is connected to (`direct`) and targets whose mutual connections are already remembered (`mapped`) are answered from Linnia's copy, free. For the rest, one mutual-connection search per target and seat goes on the seats' lanes, where the Governor paces it inside the search and profile-view budgets: a long list finishes over the following days, and `seats[].runsToday` says how many fit today. Each search pages until every shared connection is in, charging one search page per 50 shared connections and one profile view; there is no cap, but above `warnAbove` shared connections (100) a search stops after its first page with status `confirm` and the cost, and continues only with `confirm: true` (or pass `maxMutuals` for an explicit cap). A search never overruns the seat's search pages for the day: it stops with a cursor and continues the next day. Reads run at any hour; only writes keep working hours. Results land in the team's memory as searches complete: call again with `enqueue: false` to watch without queueing more, then `GET /v1/accounts/who-knows` for one person or `GET /v1/network/mutuals` for the whole map. The same list on the same day returns the existing searches, not new ones; a map found in the last 30 days is reused unless `fresh` is true. For an API-only integration this is the one call that starts the work: send the list (up to 200 targets per call, or a lead list by `listId`), then repeat it with `enqueue: false` until `searches.pending` is 0 and `counts.confirm` is 0, then export. One established seat clears about 80 targets a day, 120 once it has over 500 connections or on Sales Navigator. Walkthrough: https://docs.linnia.ai/api/mutual-connections/GET /v1/network/mutualsThe remembered mutual connections (Network). The team's map of mutual connections as rows, or a CSV download with `format=csv`: for the targets given, a lead list, or, with neither, everyone the team has ever mapped. Each row is one target and one mutual, with the seats connected to each side, the seat that found the edge and the seat that should ask. Free; nothing reaches LinkedIn.POST /v1/network/mutuals/exportThe remembered mutual connections (long lists) (Network). The same as `GET /v1/network/mutuals`, with the targets in the body for lists too long for a query string. Call it once the map reports nothing pending; rows for targets still being searched are whatever has landed so far.GET /v1/do-not-contactList the do-not-contact list (Do-not-contact). Newest first. Pass `person` to ask whether one person is on it (a URL, handle or member id all find the same entry). Entries Linnia adds itself for a reply that says not interested carry an `expiresAt`; the ones you add are permanent unless you set one.POST /v1/do-not-contactAdd people to the do-not-contact list (Do-not-contact). One call for someone who opted out. They go on the workspace's list, and they are taken out of every workflow they are in, on every account: their runs end as `stopped` with the reason `added to the do-not-contact list`, sends still queued for them are cancelled, and each run fires `workflow.person_finished`. From then on any invitation or message to them, from any account, fails with `doNotContact`, and workflows skip them at enrolment.DELETE /v1/do-not-contactTake a person off the do-not-contact list (Do-not-contact). Pass `person` in the query (a profile URL, handle or member id). `DELETE /v1/do-not-contact/{person}` does the same for a handle or member id. Runs that were stopped stay stopped; enrol the person again to resume. Owners and admins only (API keys count as the owner).GET /v1/webhooksList webhook endpoints (Webhooks). Your endpoints and the event types you can subscribe to. Owners and admins only (API keys count as the owner).POST /v1/webhooksAdd a webhook endpoint (Webhooks). Registers an https URL that must resolve to public addresses. Returns the signing secret (`whsec_…`) once; store it. Leave `events` empty to receive every event. Owners and admins only (API keys count as the owner).PATCH /v1/webhooks/{id}Update a webhook endpoint (Webhooks). Change the URL, events or mode, or disable it. Owners and admins only (API keys count as the owner).DELETE /v1/webhooks/{id}Delete a webhook endpoint (Webhooks). Owners and admins only (API keys count as the owner).GET /v1/webhooks/{id}/deliveriesRecent deliveries (Webhooks). The last 50 deliveries to this endpoint with attempts and the last status or error. Owners and admins only (API keys count as the owner).GET /v1/keysList API keys (API keys). Every key in the organisation (never the secret). `current` is the key making this call. Owners and admins only.POST /v1/keysCreate an API key (API keys). Returns the key once. Owners and admins only.POST /v1/keys/{id}/revokeRevoke an API key (API keys). Revokes the key at once. MCP connections that were authorised with this key stop working too. Owners and admins only.GET /v1/billingPlan, seats and subscription (Billing). The plan, seat usage, invoice details and, when the workspace pays by card, the subscription. `seats.total` is what the workspace has paid for (or what Linnia set for an invoiced plan).PATCH /v1/billingUpdate invoice details (Billing). The company name, billing email, address and tax id shown on invoices. Owners and admins only (API keys count as the owner).POST /v1/billing/checkoutPay for seats by card (Billing). Starts a secure checkout for a per-seat subscription on a plan (Standard or Navigator) and interval, and returns the page to send the person to. Only for trial and team workspaces without a live subscription; `seats` can't be fewer than the accounts already connected. The first subscription a workspace starts gets the free trial days from `trialDays`. After payment the plan becomes `team`, `billingPlan` and `billingInterval` say what was bought, and `seats.total` follows the paid quantity. Owners and admins only (API keys count as the owner).POST /v1/billing/checkout/completeApply a finished checkout (Billing). Back from the checkout page: reads the session and applies the subscription at once instead of waiting for Stripe's webhook. Safe to call more than once. Owners and admins only (API keys count as the owner).POST /v1/billing/portalOpen the billing portal (Billing). A short-lived link to the billing portal, where the workspace changes its seat count, switches between Standard and Navigator, updates the card, downloads invoices or cancels. Seat changes reach Linnia within a minute. Owners and admins only (API keys count as the owner).