LeadShark API

Pro

Programmatic access to LinkedIn enrichment, automations, and more.

Last updated: Feb 27, 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.

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