External API

API access for external integrations like GTM Dialer.

The External API allows third-party tools and custom integrations to access your Enrich Engine data. Unlike session-based endpoints, external API endpoints use API key authentication.

Note: External API access requires an API key with appropriate scopes. See API Key Management for setup instructions.

Authentication

Include your API key in the X-API-Key header:

curl -X GET "https://api.enrichengine.io/api/external/lists" \
  -H "X-API-Key: ee_live_xxxxxxxxxxxxx"
GET/api/external/listsAPI Key

List all accessible lists for the API key's organization

Parameters

pagenumberPage number (default: 1)
limitnumberResults per page (default: 50)

Request

GET /api/external/lists?page=1&limit=50
X-API-Key: ee_live_xxxxxxxxxxxxx

Response

{
  "data": [
    {
      "id": "list-123",
      "name": "Q1 Sales Prospects",
      "leadCount": 500,
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-20T14:45:00Z"
    },
    {
      "id": "list-456",
      "name": "Engineering Leaders",
      "leadCount": 150,
      "createdAt": "2024-01-18T09:00:00Z",
      "updatedAt": "2024-01-22T11:30:00Z"
    }
  ],
  "total": 15,
  "page": 1,
  "limit": 50,
  "totalPages": 1
}
GET/api/external/lists/:listIdAPI Key

Get a specific list with its leads

Parameters

listIdstringrequiredThe list ID
pagenumberPage number for leads (default: 1)
limitnumberLeads per page (default: 100)

Request

GET /api/external/lists/list-123?page=1&limit=100
X-API-Key: ee_live_xxxxxxxxxxxxx

Response

{
  "id": "list-123",
  "name": "Q1 Sales Prospects",
  "leads": [
    {
      "id": "lead-1",
      "linkedinUrl": "https://linkedin.com/in/johndoe",
      "firstName": "John",
      "lastName": "Doe",
      "title": "VP of Sales",
      "company": "Anthropic",
      "workEmail": "john@anthropic.com",
      "personalEmail": "john.doe@gmail.com",
      "phone": "+1 (415) 555-0123"
    },
    {
      "id": "lead-2",
      "linkedinUrl": "https://linkedin.com/in/janesmith",
      "firstName": "Jane",
      "lastName": "Smith",
      "title": "Head of Sales",
      "company": "Stripe",
      "workEmail": "jane@stripe.com"
    }
  ],
  "total": 500,
  "page": 1,
  "limit": 100,
  "totalPages": 5
}

GTM Dialer Integration

To integrate with GTM Dialer or similar calling tools:

  1. Create an API key in Settings > API Keys with lists:read and leads:read scopes
  2. Configure the webhook URL in your dialer: https://api.enrichengine.io/api/external/lists
  3. Add the API key as a header: X-API-Key: your_key
  4. Select a list from the available lists endpoint
  5. Fetch leads with pagination for the calling queue
GTM Dialer Integration Examplejavascript
// Example: Fetch leads for dialer queue
const API_KEY = 'ee_live_xxxxxxxxxxxxx';
const LIST_ID = 'list-123';

async function fetchLeadsForDialer(page = 1) {
  const response = await fetch(
    `https://api.enrichengine.io/api/external/lists/${LIST_ID}?page=${page}&limit=100`,
    {
      headers: {
        'X-API-Key': API_KEY
      }
    }
  );

  const data = await response.json();

  // Filter leads with phone numbers
  const dialableLeads = data.leads.filter(lead => lead.phone);

  return {
    leads: dialableLeads,
    hasMore: page < data.totalPages,
    nextPage: page + 1
  };
}

Required Scopes

EndpointRequired Scopes
GET /api/external/listslists:read
GET /api/external/lists/:idlists:read, leads:read