Facebook Pixel
CLI

Command reference

Every ConnectSafely CLI command with its flags, types and a runnable example — generated from the same OpenAPI specification as the REST API docs.

91 commands, generated from the same specification that produces the REST API reference and the MCP server — so a command here cannot exist in one surface and be missing from another.

Every command also documents itself in the binary, offline and with no API key:

connectsafely commands --search invitation   # find it
connectsafely schema send-connection-request # its parameters, as JSON
connectsafely send-connection-request --help # the same, for a person

Global flags — --json, --fields, --dry-run, --output and the rest — work on every command and are listed in Getting started.


Account & quota

CommandSummary
get-account-activityreadGet account activity history
get-account-premium-statusreadGet account premium status
get-account-quotareadQuota usage for one account
get-account-statusreadGet account status
get-account-status-by-idreadGet specific account status
get-connectionsreadGet connections list
get-organizationsreadGet user organizations
get-profile-visitorsreadGet profile visitors
get-received-invitationsreadGet received invitations
get-sent-invitationsreadGet sent connection invitations
list-linkedin-accountsreadList connected LinkedIn accounts (lightweight + searchable)

get-account-activity

Get account activity history.

GET /account/{accountId}/activity · read-only

FlagTypeRequiredDescription
--account-idstringyesUnique identifier for the LinkedIn account (24-character hex string)
connectsafely get-account-activity --account-id "$CONNECTSAFELY_ACCOUNT_ID"

get-account-premium-status

Get account premium status.

GET /account/{accountId}/premium · read-only

FlagTypeRequiredDescription
--account-idstringyesUnique identifier for the LinkedIn account (24-character hex string)
connectsafely get-account-premium-status --account-id "$CONNECTSAFELY_ACCOUNT_ID"

get-account-quota

Quota usage for one account.

GET /account/{accountId}/quota · read-only

FlagTypeRequiredDescription
--account-idstringyesLinkedIn account id (24-character Mongo ObjectId). Must be an account you own or one shared with you through a workspace.
connectsafely get-account-quota --account-id "$CONNECTSAFELY_ACCOUNT_ID"

get-account-status

Get account status.

GET /account/status · read-only

FlagTypeRequiredDescription
--account-idstringOptional LinkedIn account ID. If omitted, returns the most recently used account.
connectsafely get-account-status

get-account-status-by-id

Get specific account status.

GET /account/{accountId}/status · read-only

FlagTypeRequiredDescription
--account-idstringyesUnique identifier for the LinkedIn account (24-character hex string)
connectsafely get-account-status-by-id --account-id "$CONNECTSAFELY_ACCOUNT_ID"

get-connections

Get connections list.

GET /connections · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--start-indexnumberStarting index for pagination (0-indexed), counted in connections. Advance using nextStartIndex from the previous response, never by your requested limit — see limit. — min 0
--limitnumberUpper bound on how many connections to return. LinkedIn serves a fixed page (10 today) and offers no page-size control, so limit can only NARROW that page — asking for 12 returns 10. Read count for what you actually got and nextStartIndex for where to continue. — max 12 — min 1
--sort-bystringSort order for connections. Options: recentlyAdded (default), firstName, lastName. — recentlyAdded | firstName | lastName
connectsafely get-connections

get-organizations

Get user organizations.

GET /organizations · read-only

Takes no parameters beyond the global flags.

connectsafely get-organizations

get-profile-visitors

Get profile visitors.

POST /profile/visitors · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--time-rangestringTime range to filter visitors — past_7_days | past_30_days | past_90_days | past_1_year | PAST_7_DAYS | PAST_30_DAYS | PAST_90_DAYS | ALL_TIME
--countnumberPage size for pagination (visitors fetched per API request). Use maxVisitors to control the total limit. — max 100 — min 1
--startnumberPagination offset (0-indexed) — min 0
--fetch-allbooleanWhen true, automatically paginates to fetch all visitors up to maxVisitors limit
--max-visitorsnumberyesTotal number of visitors to retrieve. This is the primary limit - use this parameter to specify how many visitors you want (e.g., maxVisitors: 50 for 50 visitors). — max 500 — min 1
connectsafely get-profile-visitors --max-visitors 20

get-received-invitations

Get received invitations.

GET /invitations/received · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--start-indexnumberPagination start index (0-indexed), counted in invitations. Advance using nextStartIndex from the previous response, not by a fixed step — LinkedIn chooses the page size (10 today) and it is not guaranteed. — min 0
connectsafely get-received-invitations

get-sent-invitations

Get sent connection invitations.

GET /invitations/sent · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--start-indexnumberPagination start index (0-indexed), counted in invitations. Advance using nextStartIndex from the previous response, not by a fixed step — LinkedIn chooses the page size and it is not guaranteed to be 10. — min 0
connectsafely get-sent-invitations

list-linkedin-accounts

List connected LinkedIn accounts (lightweight + searchable).

GET /accounts · read-only

FlagTypeRequiredDescription
--qstringOptional search term. Matches firstName / lastName / publicId (case-insensitive), an exact 24-hex account id, or a LinkedIn profile URL (the public_id slug is extracted).
connectsafely list-linkedin-accounts

Search & sourcing

CommandSummary
get-company-detailsreadGet company details
get-group-detailsreadGet group details
get-job-detailsreadGet job details
search-companiesreadSearch LinkedIn companies
search-geo-locationsreadSearch geo locations
search-groupsreadSearch LinkedIn groups
search-jobsreadSearch LinkedIn jobs
search-peoplereadSearch LinkedIn people
search-people-aliasreadSearch LinkedIn people (alias)
search-people-v2readSearch LinkedIn people (V2 - with auto-pagination)
search-posts-v2readSearch LinkedIn posts (V2 - with auto-pagination)
search-schoolsreadSearch schools
search-service-categoriesreadSearch service categories

get-company-details

Get company details.

POST /search/companies/details · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--company-idstringyesLinkedIn company ID from search results or company page URL
connectsafely get-company-details --company-id 1234567

get-group-details

Get group details.

POST /search/groups/details · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--group-idstringyesLinkedIn group ID from search results or group page URL
connectsafely get-group-details --group-id 1234567

get-job-details

Get job details.

POST /search/jobs/details · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--job-idstringyesLinkedIn job ID from search results
connectsafely get-job-details --job-id 1234567890

search-companies

Search LinkedIn companies.

POST /search/companies · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use for the search. If not provided, uses the default account.
--keywordsstringSearch keywords for company name or description (used for regular LinkedIn search)
--urlstringSales Navigator company search URL (e.g., https://www.linkedin.com/sales/search/company?query=...). Requires Sales Navigator license. When provided, uses Sales Navigator API with advanced filters like revenue and employee count.
--countnumberTotal number of results to return. Pages are walked internally to reach it — see the rate-limit note. — max 100 — min 1
--startnumberRow offset to start from (0-indexed). Need not land on a page boundary. — min 0
--filtersobjectOptional filters to narrow down search results
connectsafely search-companies

search-geo-locations

Search geo locations.

POST /search/geo · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use for the search. If not provided, uses the default account.
--keywordsstringyesLocation name to search for (e.g., "San Francisco", "United States", "London")
--country-codesstring[]Limit results to specific countries using ISO country codes (e.g., ["US", "GB"])
connectsafely search-geo-locations --keywords "VP Marketing"

search-groups

Search LinkedIn groups.

POST /search/groups · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use for the search. If not provided, uses the default account.
--keywordsstringSearch keywords for group name or description
--countnumberNumber of results to return per page — max 100 — min 1
--startnumberPagination offset (0-indexed) — min 0
--filtersobjectOptional filters to narrow down search results
connectsafely search-groups

search-jobs

Search LinkedIn jobs.

POST /search/jobs · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use for the search. If not provided, uses the default account.
--keywordsstringSearch keywords for job title, company, or description
--countnumberNumber of results to return per page — max 100 — min 1
--startnumberPagination offset (0-indexed) — min 0
--filtersobjectOptional filters to narrow down search results
connectsafely search-jobs

search-people

Search LinkedIn people.

POST /search/people · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use for the search. If not provided, uses the default account.
--keywordsstringSearch keywords for name, title, company, or skills
--countnumberNumber of results to return per page — max 100 — min 1
--startnumberPagination offset (0-indexed) — min 0
--urlstringSales Navigator search URL. When provided, the search will use Sales Navigator Lead Search instead of regular LinkedIn search. The URL should contain /sales/search/ path (e.g., https://www.linkedin.com/sales/search/people?query=...).
--filtersobjectOptional filters to narrow down search results
connectsafely search-people

search-people-alias

Search LinkedIn people (alias).

POST /people/search · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use for the search. If not provided, uses the default account.
--keywordsstringSearch keywords for name, title, company, or skills
--countnumberNumber of results to return per page — max 100 — min 1
--startnumberPagination offset (0-indexed) — min 0
--filtersobjectOptional filters to narrow down search results
connectsafely search-people-alias

search-people-v2

Search LinkedIn people (V2 - with auto-pagination).

POST /search/people/v2 · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--keywordsstringSearch keywords for name, title, company, or skills
--countnumberTotal number of results to return. API will automatically paginate through LinkedIn pages (each page ~10 results) to collect this many. — max 100 — min 1
--startnumberStarting offset (0-indexed). Used to calculate which page to start from. — min 0
--filtersobjectOptional filters to narrow down search results
connectsafely search-people-v2

search-posts-v2

Search LinkedIn posts (V2 - with auto-pagination).

POST /search/posts/v2 · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--keywordsstringSearch keywords for post content
--countnumberTotal number of posts to return. API will automatically paginate (10 per page) to collect this many. — max 50 — min 1
--startnumberStarting offset (0-indexed) for pagination. — min 0
--exact-searchbooleanWhen true (default), the keyword is wrapped in double quotes for an exact-phrase match. Set to false for a broader search that also matches individual terms.
--filtersobjectOptional filters to narrow down search results
connectsafely search-posts-v2

search-schools

Search schools.

POST /search/schools · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use for the search. If not provided, uses the default account.
--keywordsstringyesSchool name to search for (e.g., "Stanford", "Pune", "MIT")
connectsafely search-schools --keywords "VP Marketing"

search-service-categories

Search service categories.

POST /search/service-categories · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use for the search. If not provided, uses the default account.
--keywordsstringyesService category name to search for (e.g., "Fina", "Marketing", "Accounting")
connectsafely search-service-categories --keywords "VP Marketing"

Profiles & companies

CommandSummary
endorse-skillwritesEndorse a skill on a LinkedIn profile
fetch-profilereadFetch LinkedIn profile information
get-company-followersreadGet company/organization followers
get-profilereadFetch LinkedIn profile information (GET)
send-company-follow-invitationswritesSend company follow invitations
visit-profilewritesVisit a LinkedIn profile

endorse-skill

Endorse a skill on a LinkedIn profile.

POST /endorse-skill · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--profile-idstringyesLinkedIn profile vanity URL slug (the part after linkedin.com/in/, e.g., "john-doe-123")
--skill-idstringSpecific skill ID to endorse (from skills list)
--randombooleanIf true, randomly select an unendorsed skill to endorse
connectsafely endorse-skill --profile-id ada-lovelace

fetch-profile

Fetch LinkedIn profile information.

POST /profile · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--profile-idstringyesLinkedIn profile vanity URL slug (the part after linkedin.com/in/, e.g., "john-doe-123")
--include-geo-locationbooleanInclude detailed geo location data (city, country, coordinates)
--include-contactbooleanInclude contact info (email, phone) if visible to viewer
--include-experiencebooleanInclude work experience history
--include-educationbooleanInclude education history
--include-skillsbooleanInclude skills with endorsement counts
--force-refreshbooleanSkip cache and fetch fresh data from LinkedIn. Use sparingly as it counts against rate limit.
connectsafely fetch-profile --profile-id ada-lovelace

get-company-followers

Get company/organization followers.

GET /organizations/{companyId}/followers · read-only

FlagTypeRequiredDescription
--company-idstringyesLinkedIn company ID (numeric ID from organization URN)
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--startnumberPagination offset (0-indexed) — min 0
--countnumberNumber of followers to return per page (max 100) — max 100 — min 1
--follower-typestringType of followers to retrieve: MEMBER (people) or PAGE (company pages) — MEMBER | PAGE
connectsafely get-company-followers --company-id 1234567

get-profile

Fetch LinkedIn profile information (GET).

GET /profile · read-only

FlagTypeRequiredDescription
--profile-idstringyesLinkedIn profile vanity URL slug (the part after linkedin.com/in/, e.g., "john-doe-123")
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--include-geo-locationbooleanInclude detailed geo location data
--include-contactbooleanInclude contact info if visible
--force-refreshbooleanSkip cache and fetch fresh data
connectsafely get-profile --profile-id ada-lovelace

send-company-follow-invitations

Send company follow invitations.

POST /organizations/{companyId}/follow-invitations · writes

FlagTypeRequiredDescription
--company-idstringyesLinkedIn company ID (numeric ID from organization URN)
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--profile-urnsstring[]yesArray of LinkedIn profile URNs to invite (max 50 per request)
connectsafely send-company-follow-invitations --company-id 1234567 --profile-urns 'urn:li:fsd_profile:ACoAAB1example'

visit-profile

Visit a LinkedIn profile.

POST /profile/visit · writes

FlagTypeRequiredDescription
--profile-idstringyesLinkedIn profile vanity URL slug of the user to visit (the part after linkedin.com/in/, e.g., "john-doe-123")
--account-idstringLinkedIn account ID to use for the visit. If not provided, uses the default account.
connectsafely visit-profile --profile-id ada-lovelace

Relationship actions

CommandSummary
check-relationshipreadCheck relationship status with profile
check-relationship-specific-accountreadCheck relationship status with specific account
follow-userwritesFollow or unfollow a LinkedIn profile
respond-to-received-invitationwritesAccept or ignore a received invitation
send-connection-requestwritesSend a connection request
withdraw-invitationwritesWithdraw a sent connection invitation

check-relationship

Check relationship status with profile.

GET /relationship/{profileId} · read-only

FlagTypeRequiredDescription
--profile-idstringyesLinkedIn profile vanity URL slug (the part after linkedin.com/in/, e.g., "john-doe-123")
connectsafely check-relationship --profile-id ada-lovelace

check-relationship-specific-account

Check relationship status with specific account.

GET /relationship/{accountId}/{profileId} · read-only

FlagTypeRequiredDescription
--account-idstringyesUnique identifier for the LinkedIn account to check from
--profile-idstringyesTarget LinkedIn profile vanity URL slug (the part after linkedin.com/in/, e.g., "john-doe-123")
connectsafely check-relationship-specific-account --account-id "$CONNECTSAFELY_ACCOUNT_ID" --profile-id ada-lovelace

follow-user

Follow or unfollow a LinkedIn profile.

POST /follow · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--profile-idstringLinkedIn profile vanity URL slug (the part after linkedin.com/in/, e.g., "john-doe-123"). Prefer profileUrn when available.
--profile-urnstringLinkedIn profile URN (e.g., "urn:li:fsd_profile:ACoAABJefVoBrz2LR3f..."). Preferred over profileId.
--actionstringAction to perform: follow or unfollow the profile — follow | unfollow
connectsafely follow-user

respond-to-received-invitation

Accept or ignore a received invitation.

POST /invitations/received/respond · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--actionstringyesAction to perform on the invitation — ACCEPT | IGNORE
--invitation-idstringyesLinkedIn invitation ID from the received invitation
--validation-tokenstringyesValidation token from the received invitation
--linked-in-invitation-typestringyesLinkedIn invitation type (e.g., GenericInvitationType_CONNECTION, GenericInvitationType_ORGANIZATION)
--first-namestringyesFirst name of the inviter
--last-namestringyesLast name of the inviter
--profile-idstringLinkedIn member ID (ACoAAA format). Optional, required for connection invitations.
connectsafely respond-to-received-invitation --action ACCEPT --invitation-id invitation-1234567890 --validation-token validation-token-abc --linked-in-invitation-type 'YOUR_LINKED_IN_INVITATION_TYPE' --first-name Ada --last-name Lovelace

send-connection-request

Send a connection request.

POST /connect · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--profile-idstringTarget LinkedIn profile vanity URL slug (e.g., "john-doe-123"). Either this or profileUrn is required. Prefer profileUrn when available.
--profile-urnstringTarget LinkedIn profile URN (e.g., "urn:li:fsd_profile:ACoAABJefVoBrz2LR3f..."). Either this or profileId is required. Preferred over profileId.
--custom-messagestringPersonalized connection message (max 300 characters). Leave empty for default request.
connectsafely send-connection-request

withdraw-invitation

Withdraw a sent connection invitation.

POST /invitations/withdraw · writes · destructive, needs --yes off a terminal

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--profile-idstringyesLinkedIn profile vanity URL slug (the part after linkedin.com/in/) of the person whose invitation to withdraw. This is the only required field.
--member-idstringLinkedIn member ID (ACoAAA format). Optional - will be auto-fetched from profile if not provided.
--first-namestringFirst name of the person. Optional - will be auto-fetched from profile if not provided.
--last-namestringLast name of the person. Optional - will be auto-fetched from profile if not provided.
--profile-urnstringLinkedIn profile URN. Optional - will be auto-fetched from profile if not provided.
--invitation-idstringLinkedIn invitation ID. Optional - will be auto-fetched from profile if not provided.
connectsafely withdraw-invitation --profile-id ada-lovelace

Inbox & messaging

CommandSummary
check-email-supportwritesCheck if profile supports email messaging
conversation-existsreadCheck if a conversation exists with a profile
conversations-delete-messagewritesDelete (recall) a message
conversations-download-mediawritesDownload media from message
conversations-mark-unreadwritesMark a conversation as unread
conversations-react-messagewritesReact or unreact to a message
conversations-refreshwritesRefresh conversation messages
conversations-send-messagewritesSend message (with channel selection)
conversations-starwritesStar a conversation
conversations-syncwritesTrigger conversation sync
conversations-sync-statusreadGet sync status
conversations-unstarwritesUnstar a conversation
conversations-upload-attachmentwritesUpload message attachment
get-conversation-messagesreadGet conversation messages
get-inmail-creditsreadGet InMail credits
list-conversationsreadList conversations
send-group-messagewritesSend message with group context

check-email-support

Check if profile supports email messaging.

POST /messaging/check-email-support · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--profile-idstringLinkedIn profile vanity URL slug (e.g., "john-doe-123"). Prefer profileUrn when available.
--profile-urnstringLinkedIn profile URN (e.g., "urn:li:fsd_profile:ACoAAFpqSoMB8vTqRbg4mN..."). Preferred over profileId.
connectsafely check-email-support

conversation-exists

Check if a conversation exists with a profile.

GET /conversations/exists/{profileId} · read-only

FlagTypeRequiredDescription
--profile-idstringyesLinkedIn profile vanity URL slug (the part after linkedin.com/in/, e.g., "john-doe-123")
--account-idstringLinkedIn account ID to check from. Omit to use the default account for the authenticated user.
connectsafely conversation-exists --profile-id ada-lovelace

conversations-delete-message

Delete (recall) a message.

DELETE /conversations/{conversationUrn}/messages/{messageUrn} · writes · destructive, needs --yes off a terminal

FlagTypeRequiredDescription
--conversation-urnstringyesConversation URN (URL-encoded)
--message-urnstringyesURN of the message to delete (URL-encoded)
--account-idstringLinkedIn account ID
connectsafely conversations-delete-message --conversation-urn 'urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAB1example,2-abc==)' --message-urn 'urn:li:msg_message:(urn:li:fsd_profile:ACoAAB1example,2-abc==)'

conversations-download-media

Download media from message.

POST /conversations/download-media · writes

FlagTypeRequiredDescription
--account-idstringyesLinkedIn account ID
--urlstringyesMedia URL from message attachment (www.linkedin.com or media.licdn.com)
connectsafely conversations-download-media --account-id "$CONNECTSAFELY_ACCOUNT_ID" --url 'https://example.com/file.pdf'

conversations-mark-unread

Mark a conversation as unread.

PATCH /conversations/{conversationUrn}/mark-unread · writes

FlagTypeRequiredDescription
--conversation-urnstringyesConversation URN (URL-encoded)
connectsafely conversations-mark-unread --conversation-urn 'urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAB1example,2-abc==)'

conversations-react-message

React or unreact to a message.

POST /conversations/{conversationUrn}/messages/{messageUrn}/react · writes

FlagTypeRequiredDescription
--conversation-urnstringyesConversation URN (URL-encoded)
--message-urnstringyesURN of the message to react to (URL-encoded)
--account-idstringLinkedIn account ID
--emojistringyesEmoji to react with (e.g., "👍")
--reactbooleanyestrue to add the reaction, false to remove it
connectsafely conversations-react-message --conversation-urn 'urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAB1example,2-abc==)' --message-urn 'urn:li:msg_message:(urn:li:fsd_profile:ACoAAB1example,2-abc==)' --emoji 'YOUR_EMOJI' --react true

conversations-refresh

Refresh conversation messages.

POST /conversations/refresh · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID
--conversation-urnstringyesConversation URN to refresh
connectsafely conversations-refresh --conversation-urn 'urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAB1example,2-abc==)'

conversations-send-message

Send message (with channel selection).

POST /conversations/send · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to send from. Accepted in this body OR as a query parameter. If omitted entirely, the most recently used account on the subscription is selected — on a multi-seat subscription that may not be the one you intend, and a send from an account that is not connected to the recipient fails with NOT_ENOUGH_INMAIL_CREDIT. Always pass it, and check the accountId echoed in the response.
--recipient-profile-idstringRecipient LinkedIn profile vanity URL slug (e.g., "john-doe-123"). Prefer recipientProfileUrn when available.
--recipient-profile-urnstringRecipient LinkedIn profile URN (e.g., "urn:li:fsd_profile:ACoAABJefVoBrz2LR3f..."). Preferred over recipientProfileId.
--conversation-urnstringExisting conversation URN (skips recipient lookup)
--messagestringyesMessage text
--subjectstringMessage subject (optional)
--attachmentsobject[]File attachments from the upload-attachment endpoint. Each item must wrap the upload response in a file key: [{ "file": { assetUrn, byteSize, mediaType, name } }]. Files uploaded with an image/* content type render inline as photos; others render as downloadable files.
--messaging-channelstringControls which messaging channel to use. Defaults to "auto" if not provided. Options: "auto" — automatically detects the best channel based on account premium status (Sales Navigator accounts use Sales Nav API, others use standard inbox). "sales_navigator" — explicitly send via Sales Navigator API. Use this when the user wants to send through Sales Navigator. Returns a 400 error with a clear message if the account does not have Sales Navigator. "linkedin_inbox" — explicitly send via standard LinkedIn inbox. Use this when the user wants to bypass Sales Navigator and send through the regular LinkedIn messaging, even if the account has a Sales Navigator subscription. — auto | sales_navigator | linkedin_inbox
connectsafely conversations-send-message --message "Thanks for connecting — what are you working on?"

conversations-star

Star a conversation.

PATCH /conversations/{conversationUrn}/star · writes

FlagTypeRequiredDescription
--conversation-urnstringyesConversation URN (URL-encoded)
connectsafely conversations-star --conversation-urn 'urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAB1example,2-abc==)'

conversations-sync

Trigger conversation sync.

POST /conversations/sync · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID
--forcebooleanForce sync even if recently synced
connectsafely conversations-sync

conversations-sync-status

Get sync status.

GET /conversations/sync/status · read-only

FlagTypeRequiredDescription
--account-idstringAccount ID (optional, returns all if omitted)
connectsafely conversations-sync-status

conversations-unstar

Unstar a conversation.

PATCH /conversations/{conversationUrn}/unstar · writes

FlagTypeRequiredDescription
--conversation-urnstringyesConversation URN (URL-encoded)
connectsafely conversations-unstar --conversation-urn 'urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAB1example,2-abc==)'

conversations-upload-attachment

Upload message attachment.

POST /conversations/upload-attachment · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID. If omitted, resolved from the authenticated user's default account.
--filenamestringOriginal file name including extension (e.g. "photo.png"). Defaults to "attachment" if omitted.
connectsafely conversations-upload-attachment

get-conversation-messages

Get conversation messages.

GET /conversations/{conversationUrn}/messages · read-only

FlagTypeRequiredDescription
--conversation-urnstringyesConversation URN (URL-encoded)
--account-idstringLinkedIn account ID. Honoured as a FILTER: if the conversation does not belong to this account you get an empty messages array, not another seat's thread. Omit it and the conversation's own account is used. Required for a thread we have not synced yet (and for Sales Navigator threads), since there is no stored account to infer.
--countnumberNumber of messages — max 100 — min 1
--cursorstringTimestamp cursor for older messages
--sincenumberTimestamp to fetch messages newer than (polling). Returns oldest-first, unlike every other call here. Ignored when cursor is also supplied — paginating backwards and polling forwards are mutually exclusive, and cursor wins.
--syncbooleanWait for LinkedIn response (sync mode)
connectsafely get-conversation-messages --conversation-urn 'urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAB1example,2-abc==)'

get-inmail-credits

Get InMail credits.

GET /inmail/credits · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID. If omitted, uses the default account.
--debugstringSet to "true" to include raw API response in the result. — true | false
connectsafely get-inmail-credits

list-conversations

List conversations.

GET /conversations · read-only

FlagTypeRequiredDescription
--account-idstringSingle LinkedIn account ID
--linkedin-account-idsstringComma-separated account IDs for multi-account batch
--countnumberNumber of conversations. Served from our cache, so up to 100 is honoured. Pages that fall through to LinkedIn are capped at 25 by LinkedIn itself (a higher count is silently clamped there), so a deep page may return fewer rows than a shallow one for the same count. — max 100 — min 1
--next-cursorstringPagination cursor — pass back the nextCursor from the previous response verbatim; never construct one. A plain timestamp pages our cache, a linkedin:-prefixed one continues the walk on LinkedIn. Drive the walk by nextCursor (or hasMore, which now always agrees with it) and stop when it is null. On a FILTERED listing (unreadOnly, labeledOnly, labelId, archived, snoozed, source=sales_navigator) the walk ends at the edge of our cache and returns nextCursor: null — LinkedIn cannot continue a filtered walk, so ending is deliberate rather than returning rows that do not match your filter.
--label-idstringFilter by label ID
--labeled-onlybooleanOnly labeled conversations
connectsafely list-conversations

send-group-message

Send message with group context.

POST /messaging/send-group · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--recipient-profile-urnstringyesRecipient LinkedIn profile URN (e.g., "urn:li:fsd_profile:ACoAABJefVoBrz2LR3f..."). Preferred over recipientProfileId.
--group-idstringyesLinkedIn group ID that both sender and recipient are members of
--messagestringyesMessage content to send
connectsafely send-group-message --recipient-profile-urn 'urn:li:fsd_profile:ACoAAB1example' --group-id 1234567 --message "Thanks for connecting — what are you working on?"

Posts & engagement

CommandSummary
comment-on-postwritesComment on a LinkedIn post
create-postwritesCreate a LinkedIn post
delete-scheduled-postwritesCancel a scheduled post
get-all-post-commentsreadGet all comments from a post
get-feedreadGet the current user's LinkedIn home feed
get-latest-postsreadGet latest posts from a profile
get-post-commentsreadGet comments from a post
get-post-reactionsreadGet reactions from a post
get-post-reactions-v2readGet reactions from a post (v2 - with vanity names)
get-repostsreadGet the list of people who reposted a post
get-scheduled-weekreadWhat is queued this week, and whether a boost slot is free
like-commentwritesLike a comment
list-scheduled-postsreadList scheduled posts
react-to-postwritesReact to a LinkedIn post
reply-to-commentwritesReply to a comment
repost-postwritesRepost a LinkedIn post
schedule-postwritesSchedule a LinkedIn post for later
scrape-postreadScrape LinkedIn post details
search-postsreadSearch posts by keyword
upload-and-postwritesUpload media and create a LinkedIn post (server-side)
upload-completewritesComplete multipart video upload
upload-document-statusreadCheck document (PDF) processing status
upload-initwritesInitialize media upload — get pre-signed URL(s)

comment-on-post

Comment on a LinkedIn post.

POST /posts/comment · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--post-urlstringyesFull URL of the LinkedIn post to comment on
--commentstringyesComment text content. Supports @mentions and hashtags. When tagPostAuthor is true, place a {{author}} placeholder where the author tag should appear — otherwise the author name is prepended.
--tag-post-authorbooleanWhen true, tags the post author with a real @mention that notifies them. The tag is inserted at a {{author}} placeholder in comment if present, otherwise the author name is prepended.
--company-urnstringCompany URN to post comment as company page instead of personal profile
connectsafely comment-on-post --post-url 'https://www.linkedin.com/feed/update/urn:li:activity:7429892659739029504' --comment "This matches what we saw last quarter."

create-post

Create a LinkedIn post.

POST /posts/create · writes

FlagTypeRequiredDescription
--account-idstringWhich connected account posts. Omit to use the default account.
--textstringyesThe post body (max 3,000 characters).
--visibilitystringWho can see the post. — ANYONE | CONNECTIONS_ONLY
--media-typestringWhat you are posting. Use "image" for a carousel too (with assetUrns). — none | image | video | document
--asset-urnstringSingle uploaded asset from /posts/upload/init. Required for image / video / document (a single image, video, or PDF).
--asset-urnsobject[]Carousel only: 2–9 uploaded images. Each item is { assetUrn, altText? }. Use instead of assetUrn with mediaType "image".
--recipesstring[]From /posts/upload/init. Required for video and document.
--alt-textstringAccessibility alt text for a single image (mediaType "image").
--titlestringDocument title shown on the post (mediaType "document").
--company-urnstringOptional. Post as a company page you administer instead of your personal profile. Provide the company URN (e.g., "urn:li:fsd_company:105672170").
connectsafely create-post --text "Three things we learned this quarter…"

delete-scheduled-post

Cancel a scheduled post.

DELETE /posts/schedule/{id} · writes · destructive, needs --yes off a terminal

FlagTypeRequiredDescription
--idstringyesScheduled post id, as returned by schedule-post or list-scheduled-posts.
connectsafely delete-scheduled-post --id 'YOUR_ID'

get-all-post-comments

Get all comments from a post.

POST /posts/comments/all · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--post-urlstringyesFull URL of the LinkedIn post to get all comments from
--batch-sizenumberNumber of comments to fetch per internal request — max 100 — min 10
--max-commentsnumberMaximum total comments to retrieve (safety limit) — max 5000 — min 10
connectsafely get-all-post-comments --post-url 'https://www.linkedin.com/feed/update/urn:li:activity:7429892659739029504'

get-feed

Get the current user's LinkedIn home feed.

POST /feed · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--countnumberNumber of feed posts to retrieve (max 50) — max 50 — min 1
--startnumberStarting offset for pagination — min 0
--sort-orderstringFeed sort order: relevance (default algorithm) or recent (newest first) — relevance | recent
connectsafely get-feed

get-latest-posts

Get latest posts from a profile.

POST /posts/latest · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--profile-idstringLinkedIn profile vanity URL slug (the part after linkedin.com/in/, e.g., "john-doe-123"). When possible, use profileUrn instead for more reliable results.
--profile-urnstringLinkedIn profile URN (e.g., "urn:li:fsd_profile:ACoAABJefVoBrz2LR3f..."). Preferred over profileId — avoids an extra API call to resolve the vanity name.
--countnumberNumber of recent posts to retrieve (max 20) — max 20 — min 1
--include-repostsbooleanWhether to include reposts/shares in results
connectsafely get-latest-posts

get-post-comments

Get comments from a post.

POST /posts/comments · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--post-urlstringyesFull URL of the LinkedIn post to get comments from
--comment-countnumberNumber of comments per page (enables pagination mode) — max 100 — min 1
--startnumberPagination offset (0-indexed) — min 0
--pagination-tokenstringToken from previous response to fetch next page
--max-commentsnumberMaximum total comments to retrieve — max 5000 — min 10
--batch-sizenumberInternal batch size for fetching — max 100 — min 10
connectsafely get-post-comments --post-url 'https://www.linkedin.com/feed/update/urn:li:activity:7429892659739029504'

get-post-reactions

Get reactions from a post.

POST /posts/reactions · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--post-urlstringyesFull URL of the LinkedIn post to get reactions from
--countnumberNumber of reactions per page (default 10) — max 100 — min 1
--pagination-tokenstringToken from previous response to fetch next page
--page-tokenstringDeprecated alias for paginationToken, kept for existing v2 clients
--startnumberDeprecated. LinkedIn pages this endpoint by token only, so this value is ignored. Use paginationToken. — min 0
connectsafely get-post-reactions --post-url 'https://www.linkedin.com/feed/update/urn:li:activity:7429892659739029504'

get-post-reactions-v2

Get reactions from a post (v2 - with vanity names).

POST /posts/reactions/v2 · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--post-urlstringyesFull URL of the LinkedIn post to get reactions from
--countnumberNumber of reactions per page (default 10) — max 100 — min 1
--pagination-tokenstringToken from previous response to fetch next page
--page-tokenstringDeprecated alias for paginationToken, kept for existing v2 clients
--startnumberDeprecated. LinkedIn pages this endpoint by token only, so this value is ignored. Use paginationToken. — min 0
connectsafely get-post-reactions-v2 --post-url 'https://www.linkedin.com/feed/update/urn:li:activity:7429892659739029504'

get-reposts

Get the list of people who reposted a post.

POST /posts/reposts · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--post-urlstringyesFull URL of the LinkedIn post to get reposters from
--countnumberNumber of reposters to request per page (default 50) — max 100 — min 1
--start-indexnumberOffset for pagination (default 0). Use pagination.nextStartIndex from the previous response. — min 0
--tokenstringCursor token from a previous response (pagination.token). Required together with startIndex for subsequent pages.
connectsafely get-reposts --post-url 'https://www.linkedin.com/feed/update/urn:li:activity:7429892659739029504'

get-scheduled-week

What is queued this week, and whether a boost slot is free.

GET /posts/schedule/week · read-only

FlagTypeRequiredDescription
--account-idstringScopes the post list and picks the workspace whose boost quota is reported. Omit to use the default account.
--week-startstringStart of the 7-day window. Defaults to Monday 00:00 UTC of the current week.
--timezonestringIANA name deciding which local day each post and boost slot falls on. Defaults to UTC.
connectsafely get-scheduled-week

like-comment

Like a comment.

POST /like-comment · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--comment-idstringyesID of the comment to like (same format as used in reply endpoint, from /posts/comments response)
--post-urlstringOptional post URL for referer header (helps with browser simulation)
--company-urnstringOptional company URN if liking as a company page
connectsafely like-comment --comment-id comment-1234567890

list-scheduled-posts

List scheduled posts.

GET /posts/schedule/list · read-only

FlagTypeRequiredDescription
--account-idstringOnly posts for this connected account.
--fromstringEarliest scheduledAt to include.
--tostringLatest scheduledAt to include.
--statusstringDRAFT | PENDING | PUBLISHED | FAILED
--limitintegermax 200
connectsafely list-scheduled-posts

react-to-post

React to a LinkedIn post.

POST /posts/react · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--post-urlstringyesFull URL of the LinkedIn post to react to. Can also provide threadUrn directly instead.
--thread-urnstringThread URN of the post. If provided, skips URL scraping for faster execution.
--reaction-typestringReaction type: LIKE (thumbs up), PRAISE (clap), APPRECIATION (heart), EMPATHY (caring), INTEREST (insightful), ENTERTAINMENT (funny) — LIKE | PRAISE | APPRECIATION | EMPATHY | INTEREST | ENTERTAINMENT
--company-urnstringCompany URN to react as company page instead of personal profile (e.g., "urn:li:fsd_company:123456"). Requires admin access to the company page.
connectsafely react-to-post --post-url 'https://www.linkedin.com/feed/update/urn:li:activity:7429892659739029504'

reply-to-comment

Reply to a comment.

POST /reply · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--comment-idstringyesID of the comment to reply to (from /posts/comments response)
--replystringyesReply text content. Supports hashtags. When mention is provided, place a {{user}} placeholder where the tag should appear — otherwise the tagged member's name is prepended.
--mentionobjectOptional @mention to tag a member in the reply. Produces a real LinkedIn tag that notifies the member (e.g. tag the original commenter). The visible tag replaces the {{user}} placeholder in reply (or is prepended if no placeholder is present).
connectsafely reply-to-comment --comment-id comment-1234567890 --reply "Agreed — the second point especially."

repost-post

Repost a LinkedIn post.

POST /posts/repost · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--post-urlstringFull URL of the LinkedIn post to repost. Will be scraped to extract URNs.
--share-urnstringShare URN of the post (e.g., "urn:li:share:7416350085304987648"). Use if you already have the URN.
--ugc-post-urnstringUGC Post URN (e.g., "urn:li:ugcPost:7417595827650519041"). Used as fallback if shareUrn not available.
--activity-urnstringActivity URN for pre-repost signal (e.g., "urn:li:activity:7416350088379338752"). Optional but recommended.
--company-urnstringOptional. Repost as a company page you administer instead of your personal profile. Provide the company URN (e.g., "urn:li:fsd_company:134684122").
connectsafely repost-post

schedule-post

Schedule a LinkedIn post for later.

POST /posts/schedule · writes

FlagTypeRequiredDescription
--account-idstringWhich connected account posts. Omit to use the default account.
--textstringyesThe post body (max 3,000 characters).
--scheduled-atstringWhen to publish, as an absolute UTC timestamp in the future. OMIT IT TO PUBLISH NOW — which still gives you the first comment on its natural delay, plus reposts and boost, in a single call. The response returns status PENDING with an id; read list-scheduled-posts for publishedUrl once it goes live.
--timezonestringIANA timezone name stored with the post and used for boost day windows. Defaults to UTC.
--company-urnstringOptional. Publish as a company page you administer instead of your personal profile.
--media-typestringWhat you are posting. Use "image" for a carousel too (with assetUrns). Documents are not schedulable. — none | image | video
--file-urlstringPublic URL of the image or video. The server downloads it and uploads it to LinkedIn, so you do not need to upload anything yourself. Max 30MB. Use this OR assetUrn/assetUrns, not both.
--asset-urnstringAlternative to fileUrl: an asset you already uploaded via /posts/upload/init.
--asset-urnsobject[]Carousel only: 2-9 uploaded images, each { assetUrn, altText? }. Use instead of assetUrn with mediaType "image".
--recipesstring[]From /posts/upload/init. Required for a pre-uploaded video; not needed with fileUrl.
--thumbnail-urlstringPreview image shown in the ConnectSafely composer. Generated for you when you pass an image fileUrl. Pass it yourself for video, or when supplying a pre-uploaded assetUrn — without one the composer shows no media for the post (the published post is unaffected).
--alt-textstringAccessibility alt text for the image. Always set this.
--first-commentstringPosted as a comment 20-30 seconds after the post goes live.
--repostsobject[]Other connected accounts that reshare this post after a delay.
--boostobjectOptional engagement boost that runs after the post publishes. Requires a paid plan.
connectsafely schedule-post --text "Three things we learned this quarter…"

scrape-post

Scrape LinkedIn post details.

POST /posts/scrape · read-only

FlagTypeRequiredDescription
--post-urlstringyesFull LinkedIn post URL to scrape
--account-idstringLinkedIn account ID for authenticated scraping (gets more data than public)
--use-cachebooleanWhether to use cached results if available
--max-cache-agenumberMaximum age of cached data in hours before refresh
--max-proxy-retriesnumberNumber of proxy rotation attempts on failure
--force-refreshbooleanForce fresh scrape ignoring cache
connectsafely scrape-post --post-url 'https://www.linkedin.com/feed/update/urn:li:activity:7429892659739029504'

search-posts

Search posts by keyword.

POST /posts/search · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--keywordsstringyesSearch keywords to find in post content
--countnumberNumber of posts to return per page — max 500 — min 1
--startnumberPagination offset (0-indexed) — min 0
--date-postedstringFilter by when post was published — past-24h | past-week | past-month | any-time
--sort-bystringSort order: relevance (best match) or date_posted (newest first) — relevance | date_posted
--author-job-titlesstring[]Filter by author job titles (e.g., ["CEO", "VP Marketing"])
--exact-searchbooleanWhen true (default), the keyword is wrapped in double quotes for an exact-phrase match. Set to false for a broader search that also matches individual terms.
connectsafely search-posts --keywords "VP Marketing"

upload-and-post

Upload media and create a LinkedIn post (server-side).

POST /posts/upload-and-post · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID. If omitted, uses the default account.
--file-urlstringyesPublic URL of the file to download and upload to LinkedIn. Maximum 100MB.
--textstringyesPost text content.
--media-typestringyesType of media being uploaded. — image | video
--visibilitystringPost visibility. — ANYONE | CONNECTIONS_ONLY
--alt-textstringAlt text for images.
connectsafely upload-and-post --file-url 'https://example.com/chart.png' --text "Three things we learned this quarter…" --media-type image

upload-complete

Complete multipart video upload.

POST /posts/upload/complete · writes

FlagTypeRequiredDescription
--account-idstring
--media-artifact-urnstringyesFrom /upload/init response.
--multipart-metadatastringFrom /upload/init response.
--part-upload-responsesobject[]yes
connectsafely upload-complete --media-artifact-urn 'urn:li:digitalmediaMediaArtifact:D4E10AQexample' --part-upload-responses '[{}]'

upload-document-status

Check document (PDF) processing status.

GET /posts/upload/document-status · read-only

FlagTypeRequiredDescription
--asset-urnstringyesDocument asset URN from /posts/upload/init.
--account-idstringLinkedIn account ID. If omitted, uses the default account.
connectsafely upload-document-status --asset-urn 'urn:li:digitalmediaAsset:D4E10AQexample'

upload-init

Initialize media upload — get pre-signed URL(s).

POST /posts/upload/init · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID.
--media-typestringyesimage / video / document (PDF). Documents upload as SINGLE and require a processing poll (see /posts/upload/document-status). — image | video | document
--file-sizenumberyesFile size in bytes.
--filenamestringyesFilename with extension.
--company-urnstringOptional. When the post will be authored by a company page you administer, pass the company URN here so the uploaded asset is registered with the organization as owner. Required for company-page image/video posts — without it LinkedIn accepts the later share (HTTP 200) but silently creates no post (no share URN). Must match the companyUrn passed to /posts/create.
connectsafely upload-init --media-type image --file-size 10 --filename chart.png

Analytics

CommandSummary
get-account-commentsreadList an account's own comments
get-account-reactionsreadList an account's own reactions
get-connection-countreadGet exact connection count
get-creator-dashboardreadGet creator dashboard overview
get-followers-analyticsreadGet followers analytics
get-network-summaryreadGet "Manage my network" counts
get-post-analytics-summaryreadGet per-post analytics

get-account-comments

List an account's own comments.

GET /account/{accountId}/comments · read-only

FlagTypeRequiredDescription
--account-idstringyesLinkedIn account ID (24-character hex string)
--countnumberNumber of comments to return per page — max 100 — min 1
--startnumberPagination offset (0-indexed). Ignored when paginationToken is provided. — min 0
--pagination-tokenstringToken from a previous response to fetch the next page
connectsafely get-account-comments --account-id "$CONNECTSAFELY_ACCOUNT_ID"

get-account-reactions

List an account's own reactions.

GET /account/{accountId}/reactions · read-only

FlagTypeRequiredDescription
--account-idstringyesLinkedIn account ID (24-character hex string)
--countnumberNumber of reactions to return per page — max 100 — min 1
--startnumberPagination offset (0-indexed). Ignored when paginationToken is provided. — min 0
--pagination-tokenstringToken from a previous response to fetch the next page
connectsafely get-account-reactions --account-id "$CONNECTSAFELY_ACCOUNT_ID"

get-connection-count

Get exact connection count.

GET /analytics/connections/count · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If omitted, uses the default account.
connectsafely get-connection-count

get-creator-dashboard

Get creator dashboard overview.

GET /analytics/creator/dashboard · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If omitted, uses the default account.
connectsafely get-creator-dashboard

get-followers-analytics

Get followers analytics.

GET /analytics/followers · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--result-typestringType of analytics data to retrieve — AUDIENCES | CONTENT | ENGAGEMENT | GROWTH
--time-rangestringTime range for analytics data — past_7_days | past_14_days | past_30_days | past_90_days | past_year | custom
--line-chart-typestringGranularity for line chart data — daily | weekly | monthly
--metric-typestringSpecific metric to retrieve
--start-datestringStart date for custom range (YYYY-MM-DD)
--end-datestringEnd date for custom range (YYYY-MM-DD)
connectsafely get-followers-analytics

get-network-summary

Get "Manage my network" counts.

GET /analytics/network/summary · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If omitted, uses the default account.
connectsafely get-network-summary

get-post-analytics-summary

Get per-post analytics.

POST /analytics/post/summary · read-only

FlagTypeRequiredDescription
--post-urlstringyesThe post, named any way you have it: an activity id, a share or ugcPost id/urn, a /feed/update/ URL, a /posts/ slug, or an lnkd.in short link.
--account-idstringLinkedIn account ID to use. If omitted, uses the default account.
connectsafely get-post-analytics-summary --post-url 'https://www.linkedin.com/feed/update/urn:li:activity:7429892659739029504'

Groups

CommandSummary
get-group-membersreadGet group members by group ID
get-group-members-by-urlreadGet group members by group URL
get-group-members-legacyreadGet group members (legacy endpoint)

get-group-members

Get group members by group ID.

POST /groups/members · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--group-idstringyesLinkedIn group ID (numeric ID from group URL)
--countnumberNumber of members to return per page (max 100) — max 100 — min 1
--startnumberPagination offset (0-indexed) — min 0
--membership-statusesstring[]Filter by membership status: OWNER (group owners), MANAGER (group admins), MEMBER (regular members)
--typeahead-querystringSearch query to filter members by name
connectsafely get-group-members --group-id 1234567

get-group-members-by-url

Get group members by group URL.

POST /groups/members-by-url · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--group-urlstringyesFull LinkedIn group URL (e.g., "https://www.linkedin.com/groups/12345")
--countnumberNumber of members to return per page (max 100) — max 100 — min 1
--startnumberPagination offset (0-indexed) — min 0
--membership-statusesstring[]Filter by membership status: OWNER (group owners), MANAGER (group admins), MEMBER (regular members)
--typeahead-querystringSearch query to filter members by name
connectsafely get-group-members-by-url --group-url 'https://www.linkedin.com/groups/1234567/'

get-group-members-legacy

Get group members (legacy endpoint).

POST /group-members · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID to use. If not provided, uses the default account.
--group-urlstringFull LinkedIn group URL (e.g., "https://www.linkedin.com/groups/12345")
--group-urnstringLinkedIn group URN (e.g., "urn:li:fsd_group:12345")
--group-idstringLinkedIn group ID (numeric ID from group URL)
--countnumberNumber of members to return per page — max 50 — min 1
--startnumberPagination offset (0-indexed) — min 0
--membership-statusesstring[]Filter by membership status: OWNER (group owners), MANAGER (group admins), MEMBER (regular members)
--typeahead-querystringSearch query to filter members by name
connectsafely get-group-members-legacy

Events

CommandSummary
get-event-attendeesreadGet event attendees

get-event-attendees

Get event attendees.

GET /events/{eventId}/attendees · read-only

FlagTypeRequiredDescription
--event-idstringyesLinkedIn event ID (numeric), full event URL, or search URL with eventAttending parameter.
--account-idstringLinkedIn account ID. If omitted, uses the default account.
--startintegerPagination offset (0-indexed). Increment by 10 to paginate. — min 0
--countintegerNumber of attendees to return per page (max 100, LinkedIn typically returns 10). — max 100 — min 1
connectsafely get-event-attendees --event-id 1234567890

Sales Navigator

CommandSummary
sales-nav-get-threadreadGet Sales Navigator thread with messages
sales-nav-list-threadsreadList Sales Navigator threads
sales-nav-mark-readwritesMark Sales Navigator thread as read
sales-nav-send-messagewritesSend Sales Navigator message

sales-nav-get-thread

Get Sales Navigator thread with messages.

GET /sales-nav/threads/{threadId} · read-only

FlagTypeRequiredDescription
--thread-idstringyesSales Navigator thread ID
--account-idstringLinkedIn account ID
--message-countnumberNumber of messages — max 100 — min 1
connectsafely sales-nav-get-thread --thread-id thread-1234567890

sales-nav-list-threads

List Sales Navigator threads.

GET /sales-nav/threads · read-only

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID
--countnumberNumber of threads — max 50 — min 1
--filterstringThread filter — INBOX | UNREAD | ARCHIVED
--page-starts-atnumberPagination offset
connectsafely sales-nav-list-threads

sales-nav-mark-read

Mark Sales Navigator thread as read.

POST /sales-nav/mark-read · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID
--thread-idstringyesThread ID to mark as read
connectsafely sales-nav-mark-read --thread-id thread-1234567890

sales-nav-send-message

Send Sales Navigator message.

POST /sales-nav/send · writes

FlagTypeRequiredDescription
--account-idstringLinkedIn account ID
--thread-idstringExisting thread ID to reply to
--recipientsstring[]Profile URNs for new conversation (required if no threadId)
--bodystringyesMessage text
--copy-to-crmbooleanCopy message to CRM
connectsafely sales-nav-send-message --body "Thursday at 10 works."

On this page

Account & quotaget-account-activityget-account-premium-statusget-account-quotaget-account-statusget-account-status-by-idget-connectionsget-organizationsget-profile-visitorsget-received-invitationsget-sent-invitationslist-linkedin-accountsSearch & sourcingget-company-detailsget-group-detailsget-job-detailssearch-companiessearch-geo-locationssearch-groupssearch-jobssearch-peoplesearch-people-aliassearch-people-v2search-posts-v2search-schoolssearch-service-categoriesProfiles & companiesendorse-skillfetch-profileget-company-followersget-profilesend-company-follow-invitationsvisit-profileRelationship actionscheck-relationshipcheck-relationship-specific-accountfollow-userrespond-to-received-invitationsend-connection-requestwithdraw-invitationInbox & messagingcheck-email-supportconversation-existsconversations-delete-messageconversations-download-mediaconversations-mark-unreadconversations-react-messageconversations-refreshconversations-send-messageconversations-starconversations-syncconversations-sync-statusconversations-unstarconversations-upload-attachmentget-conversation-messagesget-inmail-creditslist-conversationssend-group-messagePosts & engagementcomment-on-postcreate-postdelete-scheduled-postget-all-post-commentsget-feedget-latest-postsget-post-commentsget-post-reactionsget-post-reactions-v2get-repostsget-scheduled-weeklike-commentlist-scheduled-postsreact-to-postreply-to-commentrepost-postschedule-postscrape-postsearch-postsupload-and-postupload-completeupload-document-statusupload-initAnalyticsget-account-commentsget-account-reactionsget-connection-countget-creator-dashboardget-followers-analyticsget-network-summaryget-post-analytics-summaryGroupsget-group-membersget-group-members-by-urlget-group-members-legacyEventsget-event-attendeesSales Navigatorsales-nav-get-threadsales-nav-list-threadssales-nav-mark-readsales-nav-send-message