REST API v1.0 Documentation

Developer Platform API

Get API Keys

Programmatically access B2B lead enrichment, specialized query filters (web-less prospects, high confidence, job hiring leads), and autonomous DeepSeek AI Agentic prospecting workflows.

Header Auth

Bearer Authentication

Send Bearer API Key header on every request.

Permissions

Granular Scopes

Keys inherit explicit read, write, or delete permissions.

Queries

Specialized Filtering

Filter web-less leads, 80%+ confidence, or job hiring leads.

Automation

DeepSeek AI Agentic

Trigger autonomous AI web scraping & outreach tasks.

Authentication & Scopes

Secure your requests with Bearer tokens & granular permissions

All V1 API requests require HTTP Bearer authentication. Your API keys can be managed in your user dashboard. Keys support granular security permissions: read, write, and delete.

Authorization: Bearer YOUR_API_KEYRequired

V1 Quickstart Code Samples

Select your preferred language to get started

# 1. Search Leads with Filters
curl -X GET "https://enrich.leadske.pro/api/v1/leads?page=1&limit=20&verified=true&minConfidence=80" \
  -H "Authorization: Bearer YOUR_API_KEY"

# 2. Create a New Lead
curl -X POST "https://enrich.leadske.pro/api/v1/leads" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Smith",
    "email": "jane@techcorp.io",
    "company": "TechCorp Solutions",
    "website": "https://techcorp.io",
    "phone": "+15550192834",
    "source": "api_import"
  }'

# 3. Schedule DeepSeek AI Agentic Prospecting Workflow
curl -X POST "https://enrich.leadske.pro/api/v1/automations/agentic" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Scrape tech companies hiring React engineers in Nairobi, enrich contact info, and generate tailored cold email drafts.",
    "callbackUrl": "https://your-domain.com/webhooks/agentic"
  }'

API Endpoints Reference

Detailed specifications for all 10 V1 routes

GET/api/v1/leads
Required Scope:read

List & Search Leads

Fetches a paginated, filterable collection of enriched leads associated with your API key. Supports multi-parameter filtering by source, verification status, and confidence score thresholds.

How it works: Returns array of lead objects sorted by newest first. Includes full pagination details (page, limit, total count, total pages). Automatically isolated to your user account.

Parameters:

ParameterTypeRequiredDescription
pagenumberOptionalPage number for pagination (default: 1).
limitnumberOptionalNumber of records per page (default: 100).
sourcestringOptionalFilter leads by source origin (e.g. 'linkedin', 'google_maps', 'indeed').
verifiedbooleanOptionalSet to true to return only verified email leads.
minConfidencenumberOptionalFilter leads with confidence score >= threshold (e.g. 75 or 90).

Response Example (JSON):

{
  "success": true,
  "leads": [
    {
      "_id": "66c3a1b8e4b0123456789abc",
      "name": "Alex Mercer",
      "email": "alex@nexus.co.ke",
      "company": "Nexus Solutions",
      "phone": "+254712345678",
      "website": "https://nexus.co.ke",
      "confidence": 92,
      "verified": true,
      "source": "google_maps",
      "createdAt": "2026-08-20T18:30:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 100,
    "total": 450,
    "pages": 5
  }
}
POST/api/v1/leads
Required Scope:write

Create New Lead

Inserts a new enriched lead record into your CRM database.

How it works: Validates request payload and associates the newly created lead directly with your authenticated API user ID. Returns HTTP status 201 Created on success.

Parameters:

ParameterTypeRequiredDescription
namestringOptionalContact full name.
emailstringOptionalLead email address.
phonestringOptionalPhone number with country code.
companystringOptionalCompany or business name.
websitestringOptionalCompany website domain URL.
locationstringOptionalCity or region location.
titlestringOptionalJob title or position.
sourcestringOptionalLead source identifier.
confidencenumberOptionalConfidence score rating (0 - 100).

Request Body (JSON):

{
  "name": "Sarah Connor",
  "email": "sarah@cyberdyne.com",
  "company": "Cyberdyne Systems",
  "phone": "+14155550199",
  "website": "https://cyberdyne.com",
  "title": "Head of Operations",
  "source": "api_import"
}

Response Example (JSON):

{
  "success": true,
  "lead": {
    "_id": "66c3a9f0e4b0987654321def",
    "userId": "usr_9988776655",
    "name": "Sarah Connor",
    "email": "sarah@cyberdyne.com",
    "company": "Cyberdyne Systems",
    "phone": "+14155550199",
    "website": "https://cyberdyne.com",
    "title": "Head of Operations",
    "source": "api_import",
    "createdAt": "2026-08-20T19:00:00.000Z"
  }
}
GET/api/v1/leads/:id
Required Scope:read

Fetch Lead Details by ID

Retrieves complete details of a single lead by its unique database ID.

How it works: Ensures security by enforcing that the target lead belongs to the authenticated user ID. Returns HTTP 404 if the lead does not exist or belongs to another user.

Parameters:

ParameterTypeRequiredDescription
idstringYesUnique MongoDB ObjectId string of the lead.

Response Example (JSON):

{
  "success": true,
  "lead": {
    "_id": "66c3a1b8e4b0123456789abc",
    "name": "Alex Mercer",
    "email": "alex@nexus.co.ke",
    "company": "Nexus Solutions",
    "phone": "+254712345678",
    "website": "https://nexus.co.ke",
    "confidence": 92,
    "verified": true,
    "source": "google_maps"
  }
}
PUT/api/v1/leads/:id
Required Scope:write

Update Lead by ID

Updates specific fields on an existing lead record.

How it works: Applies partial or full field updates to the lead record. Requires write permission scope on your API key.

Parameters:

ParameterTypeRequiredDescription
idstringYesUnique MongoDB ObjectId of the lead.

Request Body (JSON):

{
  "verified": true,
  "confidence": 98,
  "notes": "Contacted via WhatsApp, interested in enterprise plan."
}

Response Example (JSON):

{
  "success": true,
  "lead": {
    "_id": "66c3a1b8e4b0123456789abc",
    "name": "Alex Mercer",
    "verified": true,
    "confidence": 98,
    "notes": "Contacted via WhatsApp, interested in enterprise plan."
  }
}
DELETE/api/v1/leads/:id
Required Scope:delete

Delete Lead by ID

Permanently removes a lead record from your database.

How it works: Requires an API key generated with the explicit 'delete' permission scope. Deletions are immediate and unrecoverable.

Parameters:

ParameterTypeRequiredDescription
idstringYesUnique MongoDB ObjectId of the lead to delete.

Response Example (JSON):

{
  "success": true,
  "message": "Lead deleted successfully"
}
GET/api/v1/leads/nowebsite
Required Scope:read

Get Unbuilt / Website-Less Leads

Retrieves leads that do not currently have a website domain (where domain is null, empty string, or missing).

How it works: Specifically designed for web design agencies, SEO freelancers, and digital growth agencies seeking prospects who need a modern web presence. Supports pagination.

Parameters:

ParameterTypeRequiredDescription
pagenumberOptionalPage number (default: 1).
limitnumberOptionalPage size limit (default: 100).

Response Example (JSON):

{
  "success": true,
  "leads": [
    {
      "_id": "66c3b012e4b0112233445566",
      "company": "Kamburu Bakery",
      "email": "info@kamburubakery.co.ke",
      "phone": "+254700112233",
      "website": null,
      "location": "Nairobi, Kenya"
    }
  ],
  "pagination": { "page": 1, "limit": 100, "total": 120, "pages": 2 }
}
GET/api/v1/leads/confidence80
Required Scope:read

Get High-Confidence Leads (80%+)

Queries high-grade leads with data enrichment confidence rating >= 80%.

How it works: Filters out unverified or low-confidence contact entries to protect cold email sender domain reputation and maximize campaign deliverability.

Parameters:

ParameterTypeRequiredDescription
pagenumberOptionalPage number (default: 1).
limitnumberOptionalPage size limit (default: 100).
sourcestringOptionalOptional source filter.
minConfidencenumberOptionalCustom minimum confidence threshold (default: 80).

Response Example (JSON):

{
  "success": true,
  "leads": [
    {
      "_id": "66c3c555e4b0998877665544",
      "name": "David Kim",
      "company": "Apex Logistics",
      "email": "dkim@apexlogistics.com",
      "confidence": 95,
      "verified": true
    }
  ],
  "pagination": { "page": 1, "limit": 100, "total": 310, "pages": 4 }
}
GET/api/v1/careerleads
Required Scope:read

Get Job Board / Hiring Career Leads

Fetches leads extracted from active hiring campaigns across major job platforms (e.g. Indeed, LinkedIn Jobs).

How it works: Provides companies actively spending on hiring talent. Formats response with normalized company info, contact numbers, emails, and notes indicating advertised job roles, locations, and source platforms.

Parameters:

ParameterTypeRequiredDescription
pagenumberOptionalPage number (default: 1).
limitnumberOptionalPage size limit (default: 100).

Response Example (JSON):

{
  "success": true,
  "leads": [
    {
      "_id": "66c3d888e4b0776655443322",
      "name": "Horizon Tech",
      "company": "Horizon Tech",
      "email": "careers@horizontech.io",
      "phone": "+254722334455",
      "website": "https://horizontech.io",
      "notes": "Hiring for: Senior Fullstack Engineer | Location: Nairobi | Platform: Indeed",
      "createdAt": "2026-08-20T17:45:00.000Z"
    }
  ],
  "pagination": { "page": 1, "limit": 100, "total": 85, "pages": 1 }
}
POST/api/v1/automations/agentic
Required Scope:write

Schedule AI Agentic Prospecting Task

Triggers an autonomous AI background agent powered by DeepSeek AI to execute end-to-end prospecting workflows.

How it works: Parses your plain-text prompt instruction (e.g. 'Scrape software firms in Westlands, enrich owner emails, draft customized cold emails'), initializes an Agentic Task, runs non-blocking background execution, and posts final outputs to your specified webhook callbackUrl upon completion.

Parameters:

ParameterTypeRequiredDescription
promptstringYesNatural language instructions for the AI prospecting agent.
callbackUrlstringOptionalValid HTTP or HTTPS URL to receive webhook completion notifications.
webhookMetadataobjectOptionalCustom JSON object echoed back in your webhook payload.

Request Body (JSON):

{
  "prompt": "Find tech startups hiring sales reps in Nairobi, enrich contact emails, and generate personalized cold email outreach.",
  "callbackUrl": "https://your-app.com/api/webhooks/agentic-result",
  "webhookMetadata": { "campaignId": "cmp_2026_q3" }
}

Response Example (JSON):

{
  "success": true,
  "message": "Agentic workflow scheduled successfully",
  "taskId": "66c3e999e4b04433221100aa",
  "status": "parsing"
}
GET/api/v1/automations/agentic/:id
Required Scope:read

Get AI Agentic Task Status & Results

Polls execution status, real-time logs, metrics, enriched leads, and generated content for an AI Agentic Task.

How it works: Returns live execution state ('parsing', 'running', 'completed', 'failed'), real-time step logs, metrics (leadsCount, emailsSent, smsSent), webhook delivery status, and full enriched output payloads once completed.

Parameters:

ParameterTypeRequiredDescription
idstringYesTask ID returned when scheduling the Agentic Task.

Response Example (JSON):

{
  "success": true,
  "task": {
    "id": "66c3e999e4b04433221100aa",
    "prompt": "Find tech startups hiring sales reps in Nairobi...",
    "status": "completed",
    "leadsCount": 15,
    "emailsSent": 0,
    "smsSent": 0,
    "logs": [
      "Initiated Agentic Mode workflow via Public API.",
      "Analyzing assignment prompt with DeepSeek AI...",
      "Scraping targeted business directory...",
      "Enrichment completed successfully."
    ],
    "webhookStatus": "delivered",
    "createdAt": "2026-08-20T19:30:00.000Z"
  },
  "results": {
    "leads": [
      { "_id": "66c3f111...", "company": "CloudKaya", "email": "founder@cloudkaya.co.ke" }
    ],
    "generatedContent": [
      { "leadId": "66c3f111...", "subject": "Growth Partnership", "body": "Hi CloudKaya team..." }
    ]
  }
}

HTTP Status Codes & Errors

Our API returns standardized HTTP response codes alongside descriptive error messages in JSON format.

400

Bad Request

Missing required parameters or malformed JSON body.

401

Unauthorized

Missing, expired, or invalid Bearer API key.

403

Forbidden

API key lacks the required permission scope ('read', 'write', or 'delete').

404

Not Found

Target lead or task ID does not exist or belongs to another account.

429

Rate Limited

Too many requests. Standard rate limit is 100 requests per minute.

500

Internal Server Error

An internal server error occurred. Contact support if persistent.

Build Faster with Enrich.LeadsKe.Pro

Need custom API rate limits, webhooks integration, or dedicated developer support for enterprise workflows?