Logo

SmartLead

Authentication Type: API Key
Description: Integrate with SmartLead to manage email outreach campaigns and leads with comprehensive analytics and performance tracking.


Authentication

To authenticate, you'll need a SmartLead API key. Learn how to get one in the SmartLead API documentation.


Campaigns

Operations for SmartLead campaigns with analytics and performance tracking.

List All Campaigns

Retrieves a list of all campaigns in your SmartLead account.

Operation Type: Query (Read)

Parameters:

  • None

Returns:

  • campaigns array of objects: Array of campaign objects
    • id number: Campaign ID
    • user_id number: User ID who created the campaign
    • created_at string: Campaign creation timestamp
    • updated_at string: Campaign last update timestamp
    • status enum: Campaign status (DRAFTED, ACTIVE, COMPLETED, STOPPED, PAUSED)
    • name string: Campaign name
    • track_settings array of enums: Tracking settings for the campaign
    • min_time_btwn_emails number: Minimum time between emails in minutes
    • max_leads_per_day number: Maximum leads per day
    • parent_campaign_id number (nullable): Parent campaign ID if this is a child campaign
    • client_id number (nullable): Client ID if attached to a client

Example Usage:

{}

Get Campaign Statistics

Fetches detailed statistics for a specific campaign including lead interactions, email status, and engagement metrics.

Operation Type: Query (Read)

Parameters:

  • campaignId number (required): The campaign ID
  • offset number (nullable): Pagination offset
  • limit number (nullable): Pagination limit
  • emailSequenceNumber number (nullable): Email sequence number filter
  • emailStatus string (nullable): Email status filter (opened | clicked | replied | unsubscribed | bounced)

Returns:

  • total_stats string: Total statistics count
  • data array of objects: Array of campaign statistics
    • lead_name string (nullable): Lead name
    • lead_email string: Lead email address
    • lead_category string (nullable): Lead category
    • sequence_number number: Email sequence number
    • email_subject string: Email subject line
    • email_message string: Email message content
    • sent_time string (nullable): Email sent timestamp
    • open_time string (nullable): Email open timestamp
    • click_time string (nullable): Email click timestamp
    • reply_time string (nullable): Email reply timestamp
    • open_count number: Number of times email was opened
    • click_count number: Number of times email was clicked
    • is_unsubscribed boolean: Whether lead is unsubscribed
    • is_bounced boolean: Whether email bounced
  • offset number: Pagination offset
  • limit number: Pagination limit

Example Usage:

{
  "campaignId": 12345,
  "offset": 0,
  "limit": 100,
  "emailSequenceNumber": 1,
  "emailStatus": "opened"
}

Get Campaign Analytics by Date Range

Retrieves campaign analytics for a specific date range (max 30 days). Provides counts for sent, opened, clicked, replied, bounced, and unsubscribed emails.

Operation Type: Query (Read)

Parameters:

  • campaignId number (required): The campaign ID
  • startDate string (required): Start date in YYYY-MM-DD format
  • endDate string (required): End date in YYYY-MM-DD format

Returns:

  • id number: Campaign ID
  • user_id number: User ID
  • created_at string: Campaign creation timestamp
  • status string: Campaign status
  • name string: Campaign name
  • start_date string: Analytics start date
  • end_date string: Analytics end date
  • sent_count string: Number of emails sent
  • open_count string: Number of emails opened
  • click_count string: Number of emails clicked
  • reply_count string: Number of replies received
  • block_count string: Number of blocks
  • bounce_count string: Number of bounced emails
  • unsubscribed_count string: Number of unsubscribed leads

Example Usage:

{
  "campaignId": 12345,
  "startDate": "2024-12-01",
  "endDate": "2024-12-31"
}

Get Campaign Top-Level Analytics

Fetches comprehensive campaign analytics including overall performance metrics, lead statistics, tags, and client information.

Operation Type: Query (Read)

Parameters:

  • campaignId number (required): The campaign ID

Returns:

  • id number: Campaign ID
  • user_id number: User ID
  • created_at string: Campaign creation timestamp
  • status string: Campaign status
  • name string: Campaign name
  • sent_count string: Number of emails sent
  • open_count string: Number of emails opened
  • click_count string: Number of emails clicked
  • reply_count string: Number of replies received
  • bounce_count string: Number of bounced emails
  • unsubscribed_count string: Number of unsubscribed leads
  • sequence_count string: Number of sequences
  • unique_open_count string: Unique opens count
  • unique_click_count string: Unique clicks count
  • unique_sent_count string: Unique sent count
  • client_id number (nullable): Client ID
  • client_name string (nullable): Client name
  • client_email string (nullable): Client email
  • parent_campaign_id number (nullable): Parent campaign ID
  • tags array of objects (nullable): Campaign tags
    • id number: Tag ID
    • name string: Tag name
    • color string: Tag color
  • campaign_lead_stats object: Campaign lead statistics
    • total number: Total leads
    • blocked number: Blocked leads
    • stopped number: Stopped leads
    • completed number: Completed leads
    • inprogress number: In progress leads
    • notStarted number: Not started leads

Example Usage:

{
  "campaignId": 12345
}

Create Campaign

Creates a new SmartLead campaign with the specified name. Optionally associate it with a client.

Operation Type: Mutation (Write)

Parameters:

  • name string (required): Name of the campaign
  • clientId number (nullable): Client ID to associate with the campaign (optional)

Returns:

  • id number: The created campaign ID
  • name string: The campaign name
  • created_at string: Campaign creation timestamp

Example Usage:

{
  "name": "Q1 2025 Outreach Campaign",
  "clientId": 456
}

Add Sequence to Campaign

Adds email sequences to a campaign. Each sequence can have multiple variants for A/B testing with customizable delays.

Operation Type: Mutation (Write)

Parameters:

  • campaignId number (required): The campaign ID
  • sequences array of objects (required): Array of sequences to add to the campaign
    • seqNumber number (required): Sequence number (order in campaign, starting from 1)
    • seqDelayDays number (required): Days to wait before sending this sequence
    • variants array of objects (required): Email variants for A/B testing (provide 1-3 variants)
      • subject string (required): Email subject line
      • email_body string (required): Email body content (HTML supported)

Returns:

  • sequences array of objects: Array of created sequences
    • id number: The sequence ID
    • seq_number number: The sequence number (order in campaign)
    • seq_delay_details object: Delay configuration
      • delay_in_days number: Days delay before sending

Example Usage:

{
  "campaignId": 12345,
  "sequences": [
    {
      "seqNumber": 1,
      "seqDelayDays": 0,
      "variants": [
        {
          "subject": "Quick question about {{companyName}}",
          "email_body": "<p>Hi {{firstName}},</p><p>I noticed you work at {{companyName}} and wanted to reach out...</p>"
        },
        {
          "subject": "{{firstName}}, a quick thought",
          "email_body": "<p>Hi {{firstName}},</p><p>I came across your profile and thought you might be interested...</p>"
        }
      ]
    },
    {
      "seqNumber": 2,
      "seqDelayDays": 3,
      "variants": [
        {
          "subject": "Following up",
          "email_body": "<p>Hi {{firstName}},</p><p>Just wanted to follow up on my previous email...</p>"
        }
      ]
    }
  ]
}

Update Campaign Schedule

Updates the sending schedule for a campaign including timezone, active days, hours, and rate limits.

Operation Type: Mutation (Write)

Parameters:

  • campaignId number (required): The campaign ID
  • schedule object (required): Schedule configuration
    • timezone string (required): Timezone (e.g., "America/Los_Angeles")
    • days_of_the_week array of numbers (required): Days to send emails (0=Sunday through 6=Saturday)
    • start_hour string (required): Start hour in HH:MM format (e.g., "09:00")
    • end_hour string (required): End hour in HH:MM format (e.g., "17:00")
    • min_time_btw_emails number (required): Minimum minutes between emails (default: 5)
    • max_new_leads_per_day number (required): Maximum new leads to contact per day

Returns:

  • ok boolean: Whether the operation was successful

Example Usage:

{
  "campaignId": 12345,
  "schedule": {
    "timezone": "America/New_York",
    "days_of_the_week": [1, 2, 3, 4, 5],
    "start_hour": "09:00",
    "end_hour": "17:00",
    "min_time_btw_emails": 5,
    "max_new_leads_per_day": 50
  }
}

Update Campaign Status

Changes the status of a campaign. Set to ACTIVE to start sending, PAUSED to temporarily stop, or STOPPED to end the campaign.

Operation Type: Mutation (Write)

Parameters:

  • campaignId number (required): The campaign ID
  • status string (required): The new status for the campaign. Options: "ACTIVE", "PAUSED", "STOPPED"

Returns:

  • ok boolean: Whether the operation was successful

Example Usage:

{
  "campaignId": 12345,
  "status": "ACTIVE"
}

Leads

Operations for SmartLead leads with comprehensive management capabilities.

Add Leads to Campaign

Adds leads to a SmartLead campaign with full contact details including name, email, phone, company, location, LinkedIn profile, and custom fields (max 100 leads per request).

Operation Type: Mutation (Write)

Parameters:

  • campaignId number (required): The campaign ID
  • leadList array of objects (required): Array of lead objects to add to the campaign (max 100 leads)
    • email string (required): Email address of the lead
    • firstName string (nullable): First name of the lead
    • lastName string (nullable): Last name of the lead
    • phoneNumber string (nullable): Phone number of the lead
    • companyName string (nullable): Company name of the lead
    • website string (nullable): Website of the lead
    • location string (nullable): Location of the lead
    • customFields object (nullable): Custom fields object (max 20 fields). Keys are field names, values are field values.
    • linkedinProfile string (nullable): LinkedIn profile URL
    • companyUrl string (nullable): Company URL
  • settings object (nullable): Optional settings for lead import behavior
    • ignoreGlobalBlockList boolean (nullable): If true, ignores leads that are part of your global/client level block list
    • ignoreUnsubscribeList boolean (nullable): If true, ignores leads that have unsubscribed previously
    • ignoreDuplicateLeadsInOtherCampaign boolean (nullable): If false, allows leads to be added even if they exist in another campaign

Returns:

  • ok boolean: Whether the operation was successful
  • upload_count number: Number of leads uploaded
  • total_leads number: Total number of leads in the campaign
  • duplicate_count number: Number of duplicate emails
  • invalid_email_count number: Number of invalid formatted emails
  • already_added_to_campaign number: Number of leads already in the campaign
  • unsubscribed_leads array of strings: Array of unsubscribed email addresses
  • is_lead_limit_exhausted boolean: Whether the lead credit limit has been reached
  • lead_import_stopped_count number: Number of leads that couldn't be imported due to limits

Example Usage:

{
  "campaignId": 12345,
  "leadList": [
    {
      "email": "john.doe@example.com",
      "firstName": "John",
      "lastName": "Doe",
      "phoneNumber": "+1-555-123-4567",
      "companyName": "Acme Corp",
      "website": "https://acmecorp.com",
      "location": "San Francisco, CA",
      "linkedinProfile": "https://linkedin.com/in/johndoe",
      "companyUrl": "https://acmecorp.com",
      "customFields": {
        "industry": "Technology",
        "company_size": "50-200"
      }
    },
    {
      "email": "jane.smith@example.com",
      "firstName": "Jane",
      "lastName": "Smith",
      "companyName": "Tech Startup Inc"
    }
  ],
  "settings": {
    "ignoreGlobalBlockList": false,
    "ignoreUnsubscribeList": false,
    "ignoreDuplicateLeadsInOtherCampaign": true
  }
}

Get Lead by Email

Retrieves detailed information about a lead using their email address, including contact details, company information, and subscription status.

Operation Type: Query (Read)

Parameters:

  • email string (required): Email address to search for

Returns:

  • id string: Lead ID
  • first_name string: Lead first name
  • last_name string: Lead last name
  • email string: Lead email address
  • created_at string: Lead creation timestamp
  • phone_number string (nullable): Lead phone number
  • company_name string (nullable): Lead company name
  • website string (nullable): Lead website
  • location string (nullable): Lead location
  • custom_fields object: Custom fields object
  • linkedin_profile string (nullable): LinkedIn profile URL
  • company_url string (nullable): Company URL
  • is_unsubscribed boolean: Whether lead is unsubscribed

Example Usage:

{
  "email": "john.doe@example.com"
}

Add to Global Block List

Adds email addresses or domains to the global block list to prevent future outreach. Can be applied globally or to a specific client.

Operation Type: Mutation (Write)

Parameters:

  • domainBlockList array of strings (required): Array of email addresses or domains to add to global block list
  • clientId number (nullable): Client ID if the block list is client-specific (null for global)

Returns:

  • uploadCount number: Number of items successfully added
  • totalDomainAdded number: Total domains/emails added to block list

Example Usage:

{
  "domainBlockList": ["spam-domain.com", "badlead@example.com"],
  "clientId": null
}

Common Use Cases

Campaign Management:

  • Monitor campaign performance with detailed statistics and analytics
  • Track email engagement metrics across different time periods
  • Analyze campaign effectiveness with comprehensive reporting

Lead Operations:

  • Bulk import leads into campaigns with duplicate detection
  • Search for existing leads by email address
  • Manage lead lifecycle and subscription status

Data Quality:

  • Add problematic domains and emails to global block lists
  • Track invalid and duplicate email submissions
  • Monitor lead import success rates and limitations