LeadShark API

Pro

Programmatic access to LinkedIn enrichment, automations, and more.

Last updated: Mar 24, 2026

Overview

The LeadShark API provides programmatic access to LinkedIn enrichment, automation management, bookmarking, and scheduled posting. Available on all paid plans (Pro, Pro+, Apex).

Base URLhttps://apex.leadshark.io

Authentication

Include your API key in the request header.

Headerx-api-key— Your API key

Getting Your API Key

  1. Log in to your LeadShark account (any paid plan)
  2. Go to Settings → API Access
  3. Generate your API key

Rate Limits

250

req/hr

Hourly

1,000

req/day

Daily

100

req/min

Burst

Exceeding limits returns 429 Too Many Requests. Use exponential backoff.

Enrichment API

Enrich LinkedIn profiles and companies with detailed data.

Automations API

Create and manage LinkedIn post engagement automations.

How to paginate

  • Use response.data for the current page of automations; use response.pagination for metadata.
  • First page: GET /api/automations?page=1&limit=10 (or omit params for defaults).
  • Next page: same URL with page=2, then page=3, etc.
  • Stop when pagination.has_more is false, or when page > pagination.total_pages.
  • pagination.total is the total number of automations across all pages.
FieldDescription
totalTotal automations (all pages)
pageCurrent page number
limitItems per page requested
total_pagesTotal number of pages
has_moretrue if there is a next page

stats object (same as dashboard)

FieldTypeDescription
total_commentsnumberProcessed (GREATEST of webhooks, replies, chats with comment)
total_dms_sentnumberInitial DMs sent
total_connections_sentnumberConnection requests we sent (pending; outcome unknown)
total_connections_acceptednumberConnection requests we accepted (inbound)
total_comments_repliednumberFirst-degree comment replies sent
total_non_first_degree_repliesnumberNon-connected replies sent
total_follow_ups_sentnumberFollow-up DMs sent
total_follow_ups_skippednumberFollow-ups skipped (e.g. no reply)
total_auto_likesnumberComments auto-liked

Aliases: processed, dms_sent, sent, accepted are also set for backward compatibility.

Template Variables

{{firstName}}John
{{fullName}}John Doe
{{linkedinUsername}}john-doe
{{firstNameMention}}@John

Leads API

List all your leads (from automations and post engagement). Each lead includes email & ICP score (when present). Paginated for large lists.

  • Use response.data for the current page; use response.pagination.has_more to know if there is a next page.
  • First page: GET /api/leads?page=1&limit=250 (omit params for defaults).
  • Only non-archived, individual leads (LinkedIn profile IDs starting with ACo) are returned.
  • Response uses a limited field set; user_id, icp_starred, icp_negative and related internal fields are not included.

Lead object — available fields

Each item in data includes these fields (when present):

FieldTypeDescription
idstring (UUID)Lead record ID
namestringFull name
titlestringLinkedIn headline / job title
linkedin_urlstringLinkedIn profile URL
sourcestringAutomation or source name
created_atstring (ISO 8601)When the lead was captured
updated_atstring (ISO 8601)Last update time
commenter_idstringLinkedIn member URN (e.g. ACoAAB...)
post_idstring | nullLinkedIn post ID if from a post
linkedin_usernamestring | nullLinkedIn username
first_namestring | nullFirst name (when available)
icp_scorenumber | nullICP match score (0–1)
icp_analysisobject | nullICP analysis details
lead_typestringautomation | post_engagement | connection_requests
engagementsarrayEngagement events (e.g. comments)
icp_fitstring | nullfit | maybe | not
archivedbooleanWhether the lead is archived
enriched_profileobject | nullApex auto-enrich: full profile JSON
enriched_atstring | nullApex auto-enrich: when enriched
emailstring | nullApex auto-enrich: email when found

Note: enriched_profile, enriched_at, and email are populated by Apex auto-enrich (Apex tier). They may be null for other plans or before enrichment runs.

Bookmarks API

Save and organize LinkedIn profiles with tags and notes.

Scheduled Posts API

Schedule LinkedIn posts with optional pre-configured automations that activate when the post goes live.

Scheduling Constraints

Minimum: 15 minutes from now
Maximum: 90 days in advance

Pre-Automation Object

When the scheduled post publishes, an automation is automatically created with these settings:

FieldTypeRequiredDescription
namestringrequired*Automation name
dm_templatestringrequired*Primary DM template (max 2000 chars)
keywordsstring[]optionalTrigger keywords (max 20)
dm_templatesstring[]optionalMultiple DM templates (rotated)
comment_reply_templatestring[]optionalReply templates for comments
non_first_degree_reply_templatestring[]optionalReply for non-connections
auto_connectbooleanoptionalSend connection requests (default: false)
auto_likebooleanoptionalAuto-like all comments — Pro+/Apex only (default: false)
auto_enrichbooleanoptionalAuto-enrich lead profiles with full LinkedIn data — Apex only (default: false)
icp_preset_idstring | nulloptionalICP preset UUID for follow-up gating. When set, follow-ups are only sent to leads matching this preset — Apex only
enable_follow_upbooleanoptionalEnable follow-up DMs (default: false)
follow_up_delay_minutesnumberoptionalDelay before follow-up (default: 60)
follow_up_only_if_no_responsebooleanoptionalOnly follow up if no reply (default: true)
follow_up_templatestringoptionalFollow-up message template
template_idstringoptionalUse existing template (makes name/dm_template optional)

* Required unless template_id is provided

File Attachments

Use multipart/form-data to upload files with your post:

Images: JPG, PNG, GIF — 5MB each
PDF: 1 file only — 50MB
Video: MP4 only — 50MB

Note: PDF and video cannot be combined with other files. Only one PDF or video per post.

Error Codes

VALIDATION_ERRORInvalid content, time, or automation config
TIME_CONFLICTAnother post scheduled at this time (15-min window)
SCHEDULING_TOO_SOONCannot edit post within 15 minutes of publish time
POST_ALREADY_PUBLISHEDCannot modify published or failed posts

Post Stats API

Retrieve analytics for your LinkedIn posts.

Tip: The social_id returned here is the LinkedIn post URN you need when setting up automations via the API.

Signals APIApex

Access your ranked hot leads and raw engagement signal events via API. Requires an Apex subscription.

  • Use response.pagination.total_pages to know how many pages exist. Increment page until you reach it.
  • Both endpoints use total_pages pagination (not has_more). Check page < total_pages to determine if more data is available.
  • All results are scoped to the authenticated user's data only.

Signal object — available fields

Each item in signals includes these fields:

FieldTypeDescription
idstring (UUID)Hot lead record ID
actor_namestringLead's full name
actor_linkedin_idstringLinkedIn member identifier
actor_linkedin_urlstringLinkedIn profile URL
actor_profile_picture_urlstring | nullProfile picture URL
heat_scorenumberComposite engagement score (higher = hotter lead)
signal_countnumberTotal number of signal events from this lead
signal_breakdownobjectCounts per signal type, e.g. { "comment": 5, "reaction": 3 }
top_signalsarrayRecent signal events with type, date, and source_url
connection_statusstringLinkedIn relationship: FIRST_DEGREE, SECOND_DEGREE, etc.
first_seen_atstring (ISO 8601)When this lead first appeared in signals
computed_atstring (ISO 8601)When the heat score was last computed

Event object — available fields

Each item in events includes these fields:

FieldTypeDescription
idstring (UUID)Signal event record ID
actor_linkedin_idstringLinkedIn member identifier
actor_namestringLead's full name
actor_titlestring | nullLinkedIn headline / job title
actor_linkedin_urlstringLinkedIn profile URL
signal_typestringOne of the signal types below
signal_weightnumberWeight of this signal toward heat score
source_urlstring | nullLinkedIn post or page URL that triggered the signal
metaobjectAdditional metadata (varies by signal type)
signal_datestring (ISO 8601)When the signal occurred
created_atstring (ISO 8601)When the event was recorded

Signal Types

TypeDescription
commentCommented on your post
reactionReacted to your post
repostReposted your content
profile_viewViewed your LinkedIn profile
lead_magnet_clickClicked your lead magnet link
dm_sentYou sent them a DM
comment_replyYou replied to their comment
connection_acceptedConnection request accepted
connection_sentConnection request sent
automation_engagementEngagement via automation

Pages APIPro+

Create and manage quiz pages, view responses, and export collected emails. Requires Pro+ or Apex subscription.

Error Codes

400Bad RequestInvalid parameters or malformed body
401UnauthorizedMissing or invalid API key
404Not FoundResource does not exist
429Too Many RequestsRate limit exceeded
500Server ErrorUnexpected error, try again

Need Help?

Contact our team for API support.

Contact