LeadShark API
ProProgrammatic 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).
https://apex.leadshark.ioAuthentication
Include your API key in the request header.
x-api-key— Your API keyGetting Your API Key
- Log in to your LeadShark account (any paid plan)
- Go to Settings → API Access
- 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.datafor the current page of automations; useresponse.paginationfor metadata. - First page:
GET /api/automations?page=1&limit=10(or omit params for defaults). - Next page: same URL with
page=2, thenpage=3, etc. - Stop when
pagination.has_moreisfalse, or whenpage > pagination.total_pages. pagination.totalis the total number of automations across all pages.
| Field | Description |
|---|---|
total | Total automations (all pages) |
page | Current page number |
limit | Items per page requested |
total_pages | Total number of pages |
has_more | true if there is a next page |
stats object (same as dashboard)
| Field | Type | Description |
|---|---|---|
total_comments | number | Processed (GREATEST of webhooks, replies, chats with comment) |
total_dms_sent | number | Initial DMs sent |
total_connections_sent | number | Connection requests we sent (pending; outcome unknown) |
total_connections_accepted | number | Connection requests we accepted (inbound) |
total_comments_replied | number | First-degree comment replies sent |
total_non_first_degree_replies | number | Non-connected replies sent |
total_follow_ups_sent | number | Follow-up DMs sent |
total_follow_ups_skipped | number | Follow-ups skipped (e.g. no reply) |
total_auto_likes | number | Comments 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}}@JohnLeads API
List all your leads (from automations and post engagement). Each lead includes email & ICP score (when present). Paginated for large lists.
- Use
response.datafor the current page; useresponse.pagination.has_moreto 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_negativeand related internal fields are not included.
Lead object — available fields
Each item in data includes these fields (when present):
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Lead record ID |
name | string | Full name |
title | string | LinkedIn headline / job title |
linkedin_url | string | LinkedIn profile URL |
source | string | Automation or source name |
created_at | string (ISO 8601) | When the lead was captured |
updated_at | string (ISO 8601) | Last update time |
commenter_id | string | LinkedIn member URN (e.g. ACoAAB...) |
post_id | string | null | LinkedIn post ID if from a post |
linkedin_username | string | null | LinkedIn username |
first_name | string | null | First name (when available) |
icp_score | number | null | ICP match score (0–1) |
icp_analysis | object | null | ICP analysis details |
lead_type | string | automation | post_engagement | connection_requests |
engagements | array | Engagement events (e.g. comments) |
icp_fit | string | null | fit | maybe | not |
archived | boolean | Whether the lead is archived |
enriched_profile | object | null | Apex auto-enrich: full profile JSON |
enriched_at | string | null | Apex auto-enrich: when enriched |
email | string | null | Apex 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
Pre-Automation Object
When the scheduled post publishes, an automation is automatically created with these settings:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required* | Automation name |
dm_template | string | required* | Primary DM template (max 2000 chars) |
keywords | string[] | optional | Trigger keywords (max 20) |
dm_templates | string[] | optional | Multiple DM templates (rotated) |
comment_reply_template | string[] | optional | Reply templates for comments |
non_first_degree_reply_template | string[] | optional | Reply for non-connections |
auto_connect | boolean | optional | Send connection requests (default: false) |
auto_like | boolean | optional | Auto-like all comments — Pro+/Apex only (default: false) |
auto_enrich | boolean | optional | Auto-enrich lead profiles with full LinkedIn data — Apex only (default: false) |
icp_preset_id | string | null | optional | ICP preset UUID for follow-up gating. When set, follow-ups are only sent to leads matching this preset — Apex only |
enable_follow_up | boolean | optional | Enable follow-up DMs (default: false) |
follow_up_delay_minutes | number | optional | Delay before follow-up (default: 60) |
follow_up_only_if_no_response | boolean | optional | Only follow up if no reply (default: true) |
follow_up_template | string | optional | Follow-up message template |
template_id | string | optional | Use 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:
Note: PDF and video cannot be combined with other files. Only one PDF or video per post.
Error Codes
VALIDATION_ERROR — Invalid content, time, or automation configTIME_CONFLICT — Another post scheduled at this time (15-min window)SCHEDULING_TOO_SOON — Cannot edit post within 15 minutes of publish timePOST_ALREADY_PUBLISHED — Cannot modify published or failed postsPost Stats API
Retrieve analytics for your LinkedIn posts.
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 body401UnauthorizedMissing or invalid API key404Not FoundResource does not exist429Too Many RequestsRate limit exceeded500Server ErrorUnexpected error, try againNeed Help?
Contact our team for API support.
