← Integration Guides

Email & Sales Platform Integrations

When someone views your document or enters their email, automatically push that lead to your sales or email platform. Every integration below uses the same ShareDoc webhook — the only thing that changes is the API call at the end.

How every integration works

1Someone views your doc or enters their email
2ShareDoc fires a lead.captured webhook with their email, name, and company
3Your handler calls the platform's API to add the contact

The webhook payload gives you everything you need:

data.lead.email           // "jane@acme.com"
data.lead.name            // "Jane Smith"
data.lead.company_domain  // "acme.com"
data.lead.pages_viewed    // 5
data.lead.total_pages     // 12
data.document.title       // "Series A Deck"
data.document.url         // "https://sharedoc.co/s/ab12cd"

Sales Engagement Push leads into outbound sequences

Salesloft

Add the lead as a Person, then optionally add them to a Cadence.

# Create person in Salesloft
curl -X POST https://api.salesloft.com/v2/people \
  -H "Authorization: Bearer YOUR_SALESLOFT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email_address": "jane@acme.com",
    "first_name": "Jane",
    "last_name": "Smith",
    "title": "",
    "company_name": "acme.com",
    "custom_fields": {
      "sharedoc_document": "Series A Deck",
      "sharedoc_pages_read": "5/12"
    }
  }'

# Then add to a Cadence
curl -X POST https://api.salesloft.com/v2/cadence_memberships \
  -H "Authorization: Bearer YOUR_SALESLOFT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"person_id": "PERSON_ID", "cadence_id": "YOUR_CADENCE_ID"}'

Outreach

Create a Prospect and add them to a Sequence.

# Create prospect in Outreach
curl -X POST https://api.outreach.io/api/v2/prospects \
  -H "Authorization: Bearer YOUR_OUTREACH_TOKEN" \
  -H "Content-Type: application/vnd.api+json" \
  -d '{
    "data": {
      "type": "prospect",
      "attributes": {
        "emails": ["jane@acme.com"],
        "firstName": "Jane",
        "lastName": "Smith",
        "company": "acme.com",
        "tags": ["sharedoc-lead"]
      }
    }
  }'

# Add to a Sequence
curl -X POST https://api.outreach.io/api/v2/sequenceStates \
  -H "Authorization: Bearer YOUR_OUTREACH_TOKEN" \
  -H "Content-Type: application/vnd.api+json" \
  -d '{
    "data": {
      "type": "sequenceState",
      "relationships": {
        "prospect": {"data": {"type": "prospect", "id": PROSPECT_ID}},
        "sequence": {"data": {"type": "sequence", "id": YOUR_SEQUENCE_ID}}
      }
    }
  }'

Apollo.io

Create a contact and optionally add to a sequence.

# Create contact in Apollo
curl -X POST https://api.apollo.io/api/v1/contacts \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_APOLLO_KEY" \
  -d '{
    "email": "jane@acme.com",
    "first_name": "Jane",
    "last_name": "Smith",
    "organization_name": "acme.com",
    "label_names": ["ShareDoc Lead"]
  }'

# Add to a sequence
curl -X POST https://api.apollo.io/api/v1/emailer_campaigns/SEQUENCE_ID/add_contact_ids \
  -H "X-Api-Key: YOUR_APOLLO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contact_ids": ["CONTACT_ID"]}'

Lemlist

Add a lead directly to a campaign.

# Add lead to a Lemlist campaign
curl -X POST "https://api.lemlist.com/api/campaigns/CAMPAIGN_ID/leads/jane@acme.com" \
  -u ":YOUR_LEMLIST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Jane",
    "lastName": "Smith",
    "companyName": "acme.com",
    "sharedocDocument": "Series A Deck",
    "sharedocPagesRead": "5 of 12"
  }'

Reply.io

Push a contact into a Reply sequence.

# Add person to Reply.io
curl -X POST https://api.reply.io/v1/people \
  -H "X-Api-Key: YOUR_REPLY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane@acme.com",
    "firstName": "Jane",
    "lastName": "Smith",
    "company": "acme.com",
    "campaignId": YOUR_CAMPAIGN_ID
  }'

Mailshake

Add a recipient to a Mailshake campaign.

# Add recipient to Mailshake campaign
curl -X POST https://api.mailshake.com/2017-04-01/campaigns/add-recipients \
  -H "Authorization: Basic YOUR_MAILSHAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "campaignID": YOUR_CAMPAIGN_ID,
    "addAsDraft": false,
    "recipients": [{
      "emailAddress": "jane@acme.com",
      "fullName": "Jane Smith",
      "fields": {
        "company": "acme.com",
        "document": "Series A Deck"
      }
    }]
  }'

Instantly.ai

Add a lead to an Instantly campaign.

# Add lead to Instantly campaign
curl -X POST https://api.instantly.ai/api/v1/lead/add \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_INSTANTLY_KEY",
    "campaign_id": "YOUR_CAMPAIGN_ID",
    "skip_if_in_workspace": true,
    "leads": [{
      "email": "jane@acme.com",
      "first_name": "Jane",
      "last_name": "Smith",
      "company_name": "acme.com",
      "custom_variables": {
        "sharedoc_doc": "Series A Deck",
        "pages_read": "5/12"
      }
    }]
  }'

Smartlead.ai

Add a lead to a Smartlead campaign.

# Add lead to Smartlead campaign
curl -X POST "https://server.smartlead.ai/api/v1/campaigns/CAMPAIGN_ID/leads?api_key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lead_list": [{
      "email": "jane@acme.com",
      "first_name": "Jane",
      "last_name": "Smith",
      "company": "acme.com",
      "custom_fields": {
        "sharedoc_document": "Series A Deck"
      }
    }]
  }'

QuickMail

Add a prospect to a QuickMail campaign.

# Add prospect to QuickMail
curl -X POST https://api.quickmail.com/v1/prospects \
  -H "Authorization: Bearer YOUR_QUICKMAIL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "campaign_id": "YOUR_CAMPAIGN_ID",
    "prospects": [{
      "email": "jane@acme.com",
      "first_name": "Jane",
      "last_name": "Smith",
      "company": "acme.com",
      "attributes": {
        "document_viewed": "Series A Deck"
      }
    }]
  }'

Woodpecker

Add a prospect to a Woodpecker campaign.

# Add prospect to Woodpecker campaign
curl -X POST https://api.woodpecker.co/rest/v1/add_prospects_campaign \
  -H "Authorization: Basic YOUR_WOODPECKER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "campaign": {"campaign_id": YOUR_CAMPAIGN_ID},
    "prospects": [{
      "email": "jane@acme.com",
      "first_name": "Jane",
      "last_name": "Smith",
      "company": "acme.com",
      "tags": "sharedoc-lead"
    }]
  }'

Hunter Campaigns

Add a recipient to a Hunter email campaign.

# Add recipient to Hunter campaign
curl -X POST https://api.hunter.io/v2/campaigns/CAMPAIGN_ID/recipients \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_HUNTER_KEY",
    "email": "jane@acme.com",
    "first_name": "Jane",
    "last_name": "Smith",
    "company": "acme.com"
  }'

CRM Create contacts and log engagement

HubSpot

Create or update a contact. HubSpot dedupes by email automatically.

# Create/update contact in HubSpot
curl -X POST https://api.hubapi.com/crm/v3/objects/contacts \
  -H "Authorization: Bearer YOUR_HUBSPOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "properties": {
      "email": "jane@acme.com",
      "firstname": "Jane",
      "lastname": "Smith",
      "company": "acme.com",
      "hs_lead_status": "NEW",
      "notes_last_contacted": "Viewed Series A Deck on ShareDoc (5/12 pages)"
    }
  }'

For the full guide with upsert logic and activity logging, see HubSpot integration guide.

Salesforce

Create a Lead in Salesforce. Use a Connected App for OAuth or a session token.

# Create Lead in Salesforce
curl -X POST https://YOUR_INSTANCE.salesforce.com/services/data/v59.0/sobjects/Lead \
  -H "Authorization: Bearer YOUR_SF_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "Email": "jane@acme.com",
    "FirstName": "Jane",
    "LastName": "Smith",
    "Company": "acme.com",
    "LeadSource": "ShareDoc",
    "Description": "Viewed Series A Deck (5/12 pages, 45s)"
  }'

Pipedrive

Create a Person and optionally a Deal.

# Create person in Pipedrive
curl -X POST "https://api.pipedrive.com/v1/persons?api_token=YOUR_PIPEDRIVE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Smith",
    "email": ["jane@acme.com"],
    "org_id": null,
    "visible_to": 3
  }'

# Optionally create a deal linked to the person
curl -X POST "https://api.pipedrive.com/v1/deals?api_token=YOUR_PIPEDRIVE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Jane Smith - Series A Deck",
    "person_id": PERSON_ID,
    "stage_id": YOUR_STAGE_ID
  }'

Close

Create a Lead with a contact in Close CRM.

# Create lead in Close
curl -X POST https://api.close.com/api/v1/lead/ \
  -u "YOUR_CLOSE_API_KEY:" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "acme.com",
    "contacts": [{
      "name": "Jane Smith",
      "emails": [{"email": "jane@acme.com", "type": "office"}]
    }],
    "custom": {
      "sharedoc_document": "Series A Deck",
      "sharedoc_engagement": "5/12 pages viewed"
    }
  }'

Email Marketing Add leads to lists and automations

Mailchimp

Add or update a subscriber in a Mailchimp audience. Tags let you segment by document.

# Add subscriber to Mailchimp list
curl -X PUT "https://us1.api.mailchimp.com/3.0/lists/LIST_ID/members/$(echo -n 'jane@acme.com' | md5)" \
  -u "anystring:YOUR_MAILCHIMP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email_address": "jane@acme.com",
    "status_if_new": "subscribed",
    "merge_fields": {
      "FNAME": "Jane",
      "LNAME": "Smith",
      "COMPANY": "acme.com"
    },
    "tags": ["sharedoc-lead", "series-a-deck"]
  }'

Replace us1 with your data center (found in your API key after the dash).

Klaviyo

Create/update a profile and add to a list. Klaviyo merges on email automatically.

# Add profile to Klaviyo list
curl -X POST https://a.klaviyo.com/api/v2/list/LIST_ID/members \
  -H "Api-Key: YOUR_KLAVIYO_PRIVATE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "profiles": [{
      "email": "jane@acme.com",
      "first_name": "Jane",
      "last_name": "Smith",
      "organization": "acme.com",
      "properties": {
        "sharedoc_document": "Series A Deck",
        "sharedoc_pages_viewed": 5,
        "sharedoc_total_pages": 12
      }
    }]
  }'

Customer.io

Create or update a person. Use attributes to trigger segments and campaigns.

# Create/update person in Customer.io
curl -X PUT https://track.customer.io/api/v1/customers/jane@acme.com \
  -u "YOUR_SITE_ID:YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane@acme.com",
    "first_name": "Jane",
    "last_name": "Smith",
    "company": "acme.com",
    "sharedoc_document": "Series A Deck",
    "sharedoc_pages_viewed": 5,
    "sharedoc_total_pages": 12,
    "sharedoc_lead": true
  }'

ActiveCampaign

Create a contact and add to a list or automation.

# Create contact in ActiveCampaign
curl -X POST "https://YOUR_ACCOUNT.api-us1.com/api/3/contacts" \
  -H "Api-Token: YOUR_AC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contact": {
      "email": "jane@acme.com",
      "firstName": "Jane",
      "lastName": "Smith",
      "fieldValues": [
        {"field": "1", "value": "acme.com"},
        {"field": "2", "value": "Series A Deck"}
      ]
    }
  }'

# Add to a list
curl -X POST "https://YOUR_ACCOUNT.api-us1.com/api/3/contactLists" \
  -H "Api-Token: YOUR_AC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contactList": {"list": LIST_ID, "contact": CONTACT_ID, "status": 1}}'

Email Infrastructure Add to contact lists or send a follow-up

These platforms are primarily for sending email. Use them to add leads to marketing contact lists, or to send an automated follow-up email when someone views your document.

SendGrid

Add to Marketing Contacts (for campaigns) or send a transactional email.

# Add to SendGrid Marketing Contacts
curl -X PUT https://api.sendgrid.com/v3/marketing/contacts \
  -H "Authorization: Bearer YOUR_SENDGRID_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "list_ids": ["YOUR_LIST_ID"],
    "contacts": [{
      "email": "jane@acme.com",
      "first_name": "Jane",
      "last_name": "Smith",
      "custom_fields": {
        "company": "acme.com",
        "source": "ShareDoc"
      }
    }]
  }'

# Or send a follow-up email immediately
curl -X POST https://api.sendgrid.com/v3/mail/send \
  -H "Authorization: Bearer YOUR_SENDGRID_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "personalizations": [{"to": [{"email": "jane@acme.com", "name": "Jane"}]}],
    "from": {"email": "you@yourcompany.com", "name": "Your Name"},
    "subject": "Thanks for reading our Series A Deck",
    "content": [{"type": "text/plain", "value": "Hi Jane, I noticed you checked out our deck..."}]
  }'

Postmark

Send a follow-up email via Postmark when a lead is captured.

# Send follow-up via Postmark
curl -X POST https://api.postmarkapp.com/email \
  -H "X-Postmark-Server-Token: YOUR_POSTMARK_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "From": "you@yourcompany.com",
    "To": "jane@acme.com",
    "Subject": "Thanks for reading our Series A Deck",
    "TextBody": "Hi Jane, I noticed you checked out our deck. Happy to walk you through it.",
    "MessageStream": "outbound"
  }'

Amazon SES

Add to an SES contact list or send a templated email.

# Add to SES contact list (v2)
aws sesv2 create-contact \
  --contact-list-name "sharedoc-leads" \
  --email-address "jane@acme.com" \
  --attributes-data '{"company":"acme.com","document":"Series A Deck"}'

# Or via API
curl -X POST "https://email.us-east-1.amazonaws.com/v2/email/contact-lists/sharedoc-leads/contacts" \
  -H "Content-Type: application/json" \
  --aws-sigv4 "aws:amz:us-east-1:ses" \
  -d '{
    "EmailAddress": "jane@acme.com",
    "AttributesData": "{\"company\":\"acme.com\"}"
  }'

Mailgun

Add to a Mailgun mailing list or send a message.

# Add to Mailgun mailing list
curl -X POST "https://api.mailgun.net/v3/lists/leads@mail.yourcompany.com/members" \
  -u "api:YOUR_MAILGUN_KEY" \
  -F address="jane@acme.com" \
  -F name="Jane Smith" \
  -F vars='{"company":"acme.com","document":"Series A Deck"}' \
  -F subscribed=true

# Or send a follow-up email
curl -X POST "https://api.mailgun.net/v3/mail.yourcompany.com/messages" \
  -u "api:YOUR_MAILGUN_KEY" \
  -F from="you@yourcompany.com" \
  -F to="jane@acme.com" \
  -F subject="Thanks for reading our Series A Deck" \
  -F text="Hi Jane, I saw you checked out our deck..."

Personal Email Get notified in your inbox

The simplest integration: send yourself an email when something happens. No server needed — use Zapier or n8n with a Gmail/Outlook action, or use the Gmail API directly.

Gmail

Send yourself a notification or draft a follow-up reply.

# Python — send yourself a notification via Gmail SMTP
import smtplib
from email.mime.text import MIMEText

def notify_gmail(lead, document):
    msg = MIMEText(
        f"New lead from ShareDoc!\n\n"
        f"Email: {lead['email']}\n"
        f"Company: {lead['company_domain']}\n"
        f"Document: {document['title']}\n"
        f"Pages read: {lead['pages_viewed']}/{lead['total_pages']}\n"
        f"Link: {document['url']}"
    )
    msg["Subject"] = f"ShareDoc lead: {lead['email']} viewed {document['title']}"
    msg["From"] = "you@gmail.com"
    msg["To"] = "you@gmail.com"

    with smtplib.SMTP_SSL("smtp.gmail.com", 465) as server:
        server.login("you@gmail.com", "YOUR_APP_PASSWORD")
        server.send_message(msg)

Use a Google App Password, not your regular password. Or skip the code entirely and use the Zapier guide with a Gmail action.

Microsoft Outlook

Send a notification via Microsoft Graph API.

# Send via Microsoft Graph API
curl -X POST https://graph.microsoft.com/v1.0/me/sendMail \
  -H "Authorization: Bearer YOUR_MS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
      "subject": "ShareDoc lead: jane@acme.com viewed Series A Deck",
      "body": {
        "contentType": "Text",
        "content": "New lead from ShareDoc!\n\nEmail: jane@acme.com\nCompany: acme.com\nDocument: Series A Deck\nPages: 5/12"
      },
      "toRecipients": [{"emailAddress": {"address": "you@yourcompany.com"}}]
    }
  }'

For a no-code approach, use Zapier with an Outlook action — no OAuth setup required.

Webhook setup (same for all platforms)

# 1. Register your webhook endpoint
curl -X POST https://sharedoc.co/api/v1/webhooks \
  -H "Authorization: Bearer bd_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://your-server.com/webhook", "events": ["lead.captured"]}'

# 2. Save the secret from the response for signature verification

# 3. Test it
curl -X POST https://sharedoc.co/api/v1/webhooks/test \
  -H "Authorization: Bearer bd_live_your_key_here"