The Webhook API gives you direct access to your lead data via a JSON endpoint. Pull your leads into any system, app, or custom integration.
This feature requires a PRO plan.
How It Works
Viewers provides a JSON API endpoint that returns your lead data. Make a GET request to your unique URL, and you’ll receive a JSON response with all your leads and their enrichment data.
Use it however you want - feed it into a custom CRM, build your own dashboards, sync with internal tools, or integrate with any platform that can make HTTP requests.
Getting Your API Endpoint
- Log in to your Viewers dashboard
- Go to Automations
- Find the Webhook API section
- Copy your unique JSON endpoint URL
Your URL includes your API key, so keep it private. Anyone with this URL can access your lead data.
Making a Request
Send a GET request to your endpoint URL:
GET https://app.viewers.com/api/leads/YOUR-API-KEY
No additional headers or authentication required - your API key is embedded in the URL.
Response Format
The endpoint returns a JSON object with your leads:
json
{
"success": true,
"count": 8,
"limit": 100,
"website": {
"domain": "yoursite.com"
},
"leads": [
{
"name": "Girish Redekar",
"email": "girish@sprinto.com",
"email_valid": "true",
"email_type": "business",
"module": "feedback",
"question": "How does this work?",
"device_type": "desktop",
"browser": "Chrome",
"os": "macOS",
"country_code": "us",
"company": {
"name": "Sprinto",
"logo": "/img/company-logos/company_105.jpg",
"website": "sprinto.com",
"phone": "+1 833 497 7663",
"revenue": null,
"employees": "251-1K",
"social": ["https://linkedin.com/in/girishredekar"]
},
"coworker_emails": [
"sales@sprinto.com",
"support@sprinto.com",
"info@sprinto.com"
],
"page_url": "https://yoursite.com/pricing",
"referrer": "direct",
"created_at": "2025-11-25 02:43:37",
"created_at_timestamp": 1764038617
}
]
}
Field Reference
Response Metadata
| Field | Description |
|---|---|
success | Whether the request succeeded |
count | Number of leads returned |
limit | Maximum leads per request |
website.domain | Your website domain |
Lead Fields
Contact Information
| Field | Description | Example |
|---|---|---|
name | Visitor’s name | Girish Redekar |
email | Email address | girish@sprinto.com |
email_valid | Verification status | true, false, or unknown |
email_type | Email type | business or personal |
Lead Context
| Field | Description | Example |
|---|---|---|
module | Which module captured the lead | chat, feedback, custom, newsletter, share, contactus, discount |
question | Message or response from visitor | How does this work? |
page_url | Page where lead was captured | https://yoursite.com/pricing |
referrer | Traffic source | direct, google, or a referring URL |
created_at | Timestamp (formatted) | 2025-11-25 02:43:37 |
created_at_timestamp | Unix timestamp | 1764038617 |
Device Information
| Field | Description | Example |
|---|---|---|
device_type | Device category | desktop or mobile |
browser | Browser name | Chrome, Safari, Firefox |
os | Operating system | macOS, Windows, iPhone |
country_code | Country code | us, uk, ca |
Enrichment Data
| Field | Description | Example |
|---|---|---|
company.name | Business name | Sprinto |
company.website | Company website | sprinto.com |
company.phone | Company phone | +1 833 497 7663 |
company.employees | Employee range | 251-1K, 51-250, 11-50 |
company.revenue | Revenue estimate | When available |
company.logo | Company logo path | /img/company-logos/company_105.jpg |
company.social | Social profile URLs | Array of LinkedIn URLs |
coworker_emails | Other contacts at company | Array of email addresses |
Example: cURL
bash
curl "https://app.viewers.com/api/leads/YOUR-API-KEY"
Example: JavaScript
javascript
fetch('https://app.viewers.com/api/leads/YOUR-API-KEY')
.then(response => response.json())
.then(data => {
console.log(`Retrieved ${data.count} leads`);
data.leads.forEach(lead => {
console.log(`${lead.name} - ${lead.email}`);
});
});
Example: Python
python
import requests
response = requests.get('https://app.viewers.com/api/leads/YOUR-API-KEY')
data = response.json()
print(f"Retrieved {data['count']} leads")
for lead in data['leads']:
print(f"{lead['name']} - {lead['email']}")
Example: PHP
php
$response = file_get_contents('https://app.viewers.com/api/leads/YOUR-API-KEY');
$data = json_decode($response, true);
echo "Retrieved " . $data['count'] . " leads\n";
foreach ($data['leads'] as $lead) {
echo $lead['name'] . " - " . $lead['email'] . "\n";
}
Null Values
Not every lead will have every field populated:
- Personal emails: Leads using Gmail, Yahoo, or other personal email addresses won’t have company data
- New/small businesses: Some companies may not have public data available
- Optional fields: Fields like
revenueorsocialmay be null even for business emails
Always check for null values before using enrichment data in your code.
Rate Limits
There are no hard rate limits at the moment, but keep your requests reasonable. Polling every 5–15 minutes is plenty for most use cases. We may throttle or block abusive requests and IPs.
Security
Your API key is embedded in your endpoint URL. Treat it like a password:
- Don’t share it publicly
- Don’t commit it to public code repositories
- Don’t expose it in client-side JavaScript on public websites
If you believe your API key has been compromised, contact us to generate a new one.
Frequently Asked Questions
What format is the response? JSON. Set your Content-Type to application/json if your client requires it.
Is there pagination? The endpoint returns up to the limit shown in the response. If you have more leads than the limit, contact us about pagination options.
Can I filter by date or module? Not currently. The endpoint returns all leads. Filter the response in your own code.
How often should I poll? Every 5–15 minutes is reasonable. More frequent polling isn’t necessary and may be throttled.
Is HTTPS required? Yes. All API requests must use HTTPS.
Need Help?
If you have questions about the Webhook API or need help with your integration, contact us.