Enterprise APIv1

AgentScout Pro REST API

Integrate insurance agent intelligence directly into your CRM, AMS, or recruiting platform. Search 2.7M+ licensed agents across 39 states, get recruitability scores, and manage your pipeline programmatically.

Quick Start

All API requests require an API key in the Authorization header. You can generate a key from your Settings page (Enterprise plan required).

bash
curl -X GET "https://agentscoutpro.com/api/v1/agents/search?state=FL&limit=10" \
  -H "Authorization: Bearer ask_live_your_key_here"

Authentication

Include your API key as a Bearer token in the Authorization header of every request. Keys are prefixed with ask_live_ so you can identify them in your code.

http
Authorization: Bearer ask_live_abc123def456...
Important: Your API key is shown once when generated. Store it in a secure environment variable. If you lose it, revoke the old key and generate a new one.

SandboxComing Soon

Test your integration without touching production data. Sandbox keys use the ask_test_ prefix and return real response schemas populated with synthetic data. No production agent PII is ever exposed in sandbox mode.

PropertyDetail
Key prefixask_test_...
Daily limit1,000 requests/day (all plans)
DataSynthetic agents with realistic schema. No real PII.
Endpoint parityAll endpoints work identically in sandbox and production.
WebhooksSandbox fires webhook events to your test URL.
bash
# Sandbox request -- same endpoints, test key
curl -X GET "https://agentscoutpro.com/api/v1/agents/search?state=FL&limit=5" \
  -H "Authorization: Bearer ask_test_your_sandbox_key"

Generate sandbox keys from Settings > API Keys. Both sandbox and production keys are managed from the same dashboard.

Rate Limits

Every response includes rate limit headers so you can build throttling into your integration. Limits vary by plan.

Limits by Plan

PlanRequests / minRequests / dayBulk Endpoints
Pro6010,000Not included
Agency12025,000Included
IMO300100,000Included
Enterprise600500,000Included
White LabelCustomCustomIncluded

Response Headers

HeaderDescription
X-RateLimit-LimitMaximum requests per 60-second window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetISO 8601 timestamp when the window resets

When you exceed your rate limit, the API returns a 429 status code. Implement exponential backoff or wait for the reset window.

Error Codes

CodeMeaning
400Bad request. Check your parameters.
401Missing or invalid API key.
403Insufficient permissions for this action.
404Resource not found.
409Conflict. Resource already exists (e.g. agent already in pipeline).
429Rate limit exceeded. Wait for the reset window.
500Internal server error. Contact support.

Endpoints

GET/api/v1/agents/searchread

Search the agent database with filters. Returns paginated results.

Parameters

NameTypeRequiredDescription
statestringNo2-letter state abbreviation (e.g. FL, TX)
license_typestringNoLicense type (Life, Health, Property, Casualty, Variable, Annuity, LTC)
min_scoreintegerNoMinimum recruitability score (0-100)
limitintegerNoResults per page (1-100, default 25)
offsetintegerNoPagination offset (default 0)

Response

json
{
  "agents": [
    {
      "npn": "12345678",
      "name": "Jane Smith",
      "first_name": "Jane",
      "last_name": "Smith",
      "state": "FL",
      "city": "Miami",
      "license_types": ["Life", "Health"],
      "entity_type": "agent",
      "license_date": "2018-03-15",
      "total_states": 3,
      "licensed_states": ["FL", "GA", "TX"],
      "has_contact": true
    }
  ],
  "total": 1542,
  "limit": 25,
  "offset": 0,
  "page": 1
}
GET/api/v1/agents/:npnread

Get a single agent profile by their National Producer Number (NPN).

Parameters

NameTypeRequiredDescription
npnstringYesNational Producer Number (path parameter)

Response

json
{
  "agent": {
    "npn": "12345678",
    "name": "Jane Smith",
    "first_name": "Jane",
    "last_name": "Smith",
    "state": "FL",
    "city": "Miami",
    "license_types": ["Life", "Health"],
    "entity_type": "agent",
    "license_date": "2018-03-15",
    "total_states": 3,
    "licensed_states": ["FL", "GA", "TX"],
    "has_phone": true,
    "has_email": true,
    "contact_confidence": "verified"
  }
}
GET/api/v1/agents/scoreread

Get the recruitability score and transition signals for an agent. Provide NPN for exact match or name + state for fuzzy match.

Parameters

NameTypeRequiredDescription
npnstringNoNational Producer Number (exact match)
namestringNoAgent name (fuzzy match)
statestringNo2-letter state abbreviation (use with name)

Response

json
{
  "result": {
    "name": "Jane Smith",
    "npn": "12345678",
    "state": "FL",
    "city": "Miami",
    "total_states": 3,
    "score": 78,
    "signals": {
      "multi_state": 15,
      "has_contact": 10,
      "experience": 12,
      "license_diversity": 8
    },
    "transition_signals": ["Recently added new state"],
    "why": ["Multi-state producer", "Verified contact"],
    "license_types": ["Life", "Health"],
    "license_date": "2018-03-15",
    "has_contact": true,
    "contact_confidence": "verified"
  }
}
GET/api/v1/pipelineread

List agents in your organization's recruiting pipeline.

Parameters

NameTypeRequiredDescription
statusstringNoFilter by status: new, contacted, qualified, recruited, declined
limitintegerNoResults per page (1-200, default 50)
offsetintegerNoPagination offset (default 0)

Response

json
{
  "agents": [
    {
      "id": "uuid-here",
      "name": "Jane Smith",
      "npn": "12345678",
      "state": "FL",
      "status": "contacted",
      "recruitability_score": 78,
      "outreach_status": "sent",
      "created_at": "2026-03-15T10:30:00Z"
    }
  ],
  "total": 42,
  "limit": 50,
  "offset": 0,
  "page": 1
}
POST/api/v1/pipelinewrite

Add an agent to your pipeline by NPN. The agent's data is pulled from the master database.

Parameters

NameTypeRequiredDescription
npnstringYesNational Producer Number (JSON body)

Response

json
{
  "agent": {
    "id": "uuid-here",
    "name": "Jane Smith",
    "npn": "12345678",
    "state": "FL",
    "status": "new"
  }
}
PATCH/api/v1/pipeline/:idwrite

Update an agent's status in your pipeline.

Parameters

NameTypeRequiredDescription
idstringYesAgent ID (path parameter)
statusstringNonew, contacted, qualified, recruited, declined
outreach_statusstringNoqueued, sent, replied, interested, booked, not_interested, opted_out

Response

json
{
  "agent": {
    "id": "uuid-here",
    "name": "Jane Smith",
    "npn": "12345678",
    "status": "qualified",
    "outreach_status": "interested"
  }
}
DELETE/api/v1/pipeline/:idwrite

Remove an agent from your pipeline.

Parameters

NameTypeRequiredDescription
idstringYesAgent ID (path parameter)

Response

json
{
  "success": true,
  "message": "Removed Jane Smith from pipeline"
}

Bulk EndpointsComing Soon

Process multiple agents in a single request. Available on Agency plans and above. All bulk endpoints return a consistent response envelope with per-item error reporting.

POST/api/v1/agents/bulk-scoreread (Agency+)

Score up to 500 agents by NPN in one request. Returns recruitability scores for each agent.

Parameters

NameTypeRequiredDescription
npnsstring[]YesArray of NPNs to score (max 500)

Response

json
{
  "results": [
    {
      "npn": "12345678",
      "name": "Jane Smith",
      "score": 78,
      "signals": { "multi_state": 15, "has_contact": 10, "experience": 12 }
    },
    {
      "npn": "87654321",
      "name": "John Doe",
      "score": 62,
      "signals": { "multi_state": 10, "has_contact": 10, "experience": 8 }
    }
  ],
  "errors": [
    { "npn": "00000000", "error": "Agent not found" }
  ],
  "meta": { "total": 3, "success": 2, "failed": 1 }
}
POST/api/v1/agents/bulk-searchread (Agency+)

Run multiple search queries in parallel. Each query uses the same parameters as GET /agents/search.

Parameters

NameTypeRequiredDescription
queriesobject[]YesArray of search query objects (max 10 queries per request)

Response

json
{
  "results": [
    {
      "query": { "state": "FL", "min_score": 70 },
      "agents": [ { "npn": "12345678", "name": "Jane Smith", "score": 78 } ],
      "total": 1542
    },
    {
      "query": { "state": "TX", "license_type": "Life" },
      "agents": [ { "npn": "87654321", "name": "John Doe", "score": 62 } ],
      "total": 2301
    }
  ],
  "errors": [],
  "meta": { "total": 2, "success": 2, "failed": 0 }
}
POST/api/v1/pipeline/bulk-addwrite (Agency+)

Add up to 100 agents to your pipeline in one request.

Parameters

NameTypeRequiredDescription
npnsstring[]YesArray of NPNs to add (max 100)
statusstringNoInitial status for all agents (default: new)

Response

json
{
  "results": [
    { "npn": "12345678", "name": "Jane Smith", "id": "uuid-1", "status": "new" },
    { "npn": "87654321", "name": "John Doe", "id": "uuid-2", "status": "new" }
  ],
  "errors": [
    { "npn": "11111111", "error": "Agent already in pipeline" }
  ],
  "meta": { "total": 3, "success": 2, "failed": 1 }
}

CampaignsComing Soon

Create and manage outreach campaigns programmatically. Campaign endpoints are available on IMO plans and above.

POST/api/v1/campaigns/createwrite (IMO+)

Create a new outreach campaign targeting agents in your pipeline.

Parameters

NameTypeRequiredDescription
namestringYesCampaign name
pipeline_filterobjectNoFilter criteria to select agents from your pipeline
template_idstringNoMessage template ID (from Settings > Templates)

Response

json
{
  "campaign": {
    "id": "cmp_abc123",
    "name": "Florida Life Agents Q2",
    "status": "draft",
    "agent_count": 42,
    "created_at": "2026-03-28T14:00:00Z"
  }
}
GET/api/v1/campaigns/:id/statusread (IMO+)

Get the current status and delivery metrics for a campaign.

Parameters

NameTypeRequiredDescription
idstringYesCampaign ID (path parameter)

Response

json
{
  "campaign": {
    "id": "cmp_abc123",
    "name": "Florida Life Agents Q2",
    "status": "active",
    "metrics": {
      "total": 42,
      "sent": 38,
      "delivered": 36,
      "replied": 8,
      "interested": 4,
      "booked": 2,
      "opted_out": 1
    },
    "created_at": "2026-03-28T14:00:00Z",
    "started_at": "2026-03-28T15:00:00Z"
  }
}

WebhooksComing Soon

Receive real-time notifications when events occur in your account. Configure webhook URLs from Settings > API Keys > Webhooks.

Available Events

EventTrigger
agent.scoredA recruitability score is calculated or updated
campaign.sentA campaign message is delivered to an agent
campaign.repliedAn agent replies to a campaign message
agent.interestedAn agent is marked as interested (manual or auto-classified)
agent.bookedAn agent books a meeting through your scheduling link
agent.opted_outAn agent opts out of future communications
pipeline.exportedA pipeline export is completed

Payload Format

json
{
  "id": "evt_abc123def456",
  "event": "agent.interested",
  "timestamp": "2026-03-28T14:32:00Z",
  "data": {
    "agent": {
      "npn": "12345678",
      "name": "Jane Smith",
      "state": "FL",
      "score": 78
    },
    "campaign_id": "cmp_abc123",
    "pipeline_id": "uuid-here"
  },
  "signature": "sha256=a1b2c3d4e5f6..."
}

Signature Verification

Every webhook includes an X-AgentScout-Signature header. Verify it by computing an HMAC-SHA256 of the raw request body using your webhook secret.

javascript
import crypto from "crypto";

function verifyWebhook(body, signature, secret) {
  const expected = "sha256=" + crypto
    .createHmac("sha256", secret)
    .update(body, "utf8")
    .digest("hex");

  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

Retry Policy

AttemptDelayNotes
1st retry30 secondsAfter initial delivery failure (non-2xx response)
2nd retry5 minutesExponential backoff
3rd retry30 minutesFinal attempt. After 3 failures, event is logged as undelivered.

Your endpoint must return a 2xx status within 10 seconds. Timed-out requests count as failures. Failed webhooks are visible in Settings > API Keys > Webhook Logs.

Code Examples

curl

bash
# Search agents in Florida with a recruitability score above 70
curl -X GET "https://agentscoutpro.com/api/v1/agents/search?state=FL&min_score=70&limit=10" \
  -H "Authorization: Bearer ask_live_your_key_here"

# Get a specific agent by NPN
curl -X GET "https://agentscoutpro.com/api/v1/agents/12345678" \
  -H "Authorization: Bearer ask_live_your_key_here"

# Add an agent to your pipeline
curl -X POST "https://agentscoutpro.com/api/v1/pipeline" \
  -H "Authorization: Bearer ask_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"npn": "12345678"}'

JavaScript

javascript
const API_KEY = process.env.AGENTSCOUT_API_KEY;
const BASE_URL = "https://agentscoutpro.com/api/v1";

async function searchAgents(state, minScore = 0) {
  const params = new URLSearchParams({ state, min_score: String(minScore), limit: "25" });
  const res = await fetch(`${BASE_URL}/agents/search?${params}`, {
    headers: { Authorization: `Bearer ${API_KEY}` },
  });

  if (!res.ok) {
    const err = await res.json();
    throw new Error(err.error || "API request failed");
  }

  return res.json();
}

async function addToPipeline(npn) {
  const res = await fetch(`${BASE_URL}/pipeline`, {
    method: "POST",
    headers: {
      Authorization: `Bearer ${API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ npn }),
  });

  return res.json();
}

// Usage
const { agents, total } = await searchAgents("FL", 70);
logger.info(`Found ${total} agents in Florida with score >= 70`);

for (const agent of agents) {
  logger.info(`${agent.name} (NPN: ${agent.npn}) - ${agent.license_types.join(", ")}`);
}

Python

python
import os
import requests

API_KEY = os.environ["AGENTSCOUT_API_KEY"]
BASE_URL = "https://agentscoutpro.com/api/v1"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

def search_agents(state, min_score=0, limit=25):
    params = {"state": state, "min_score": min_score, "limit": limit}
    resp = requests.get(f"{BASE_URL}/agents/search", headers=HEADERS, params=params)
    resp.raise_for_status()
    return resp.json()

def get_score(npn):
    params = {"npn": npn}
    resp = requests.get(f"{BASE_URL}/agents/score", headers=HEADERS, params=params)
    resp.raise_for_status()
    return resp.json()

def add_to_pipeline(npn):
    resp = requests.post(
        f"{BASE_URL}/pipeline",
        headers={**HEADERS, "Content-Type": "application/json"},
        json={"npn": npn},
    )
    resp.raise_for_status()
    return resp.json()

# Usage
data = search_agents("TX", min_score=70)
print(f"Found {data['total']} agents in Texas with score >= 70")

for agent in data["agents"]:
    score = get_score(agent["npn"])
    print(f"{agent['name']}: {score['result']['score']}/100")

SDKsComing Soon

Official SDKs for JavaScript/TypeScript and Python are planned for Q2 2026. In the meantime, the API works with any HTTP client. Here are minimal wrappers to get started.

curl

bash
# Search + score in one pipeline
NPN=$(curl -s "https://agentscoutpro.com/api/v1/agents/search?state=FL&min_score=80&limit=1" \
  -H "Authorization: Bearer ask_live_your_key" | jq -r '.agents[0].npn')

curl -s "https://agentscoutpro.com/api/v1/agents/score?npn=$NPN" \
  -H "Authorization: Bearer ask_live_your_key" | jq .

JavaScript / TypeScript

typescript
// Minimal AgentScout client -- replace with official SDK when available
class AgentScoutClient {
  private baseUrl = "https://agentscoutpro.com/api/v1";

  constructor(private apiKey: string) {}

  private async request<T>(path: string, options?: RequestInit): Promise<T> {
    const res = await fetch(this.baseUrl + path, {
      ...options,
      headers: {
        Authorization: `Bearer ${this.apiKey}`,
        "Content-Type": "application/json",
        ...options?.headers,
      },
    });
    if (!res.ok) throw new Error(`AgentScout API ${res.status}: ${await res.text()}`);
    return res.json();
  }

  searchAgents(params: Record<string, string>) {
    const qs = new URLSearchParams(params).toString();
    return this.request(`/agents/search?${qs}`);
  }

  getScore(npn: string) {
    return this.request(`/agents/score?npn=${npn}`);
  }

  addToPipeline(npn: string) {
    return this.request("/pipeline", {
      method: "POST",
      body: JSON.stringify({ npn }),
    });
  }

  bulkScore(npns: string[]) {
    return this.request("/agents/bulk-score", {
      method: "POST",
      body: JSON.stringify({ npns }),
    });
  }
}

// Usage
const client = new AgentScoutClient(process.env.AGENTSCOUT_API_KEY!);
const data = await client.searchAgents({ state: "FL", min_score: "70" });

Python

python
# Minimal AgentScout client -- replace with official SDK when available
import os
import requests

class AgentScoutClient:
    BASE_URL = "https://agentscoutpro.com/api/v1"

    def __init__(self, api_key: str = None):
        self.api_key = api_key or os.environ["AGENTSCOUT_API_KEY"]
        self.session = requests.Session()
        self.session.headers.update({"Authorization": f"Bearer {self.api_key}"})

    def _get(self, path, params=None):
        resp = self.session.get(f"{self.BASE_URL}{path}", params=params)
        resp.raise_for_status()
        return resp.json()

    def _post(self, path, data):
        resp = self.session.post(f"{self.BASE_URL}{path}", json=data)
        resp.raise_for_status()
        return resp.json()

    def search_agents(self, **kwargs):
        return self._get("/agents/search", params=kwargs)

    def get_score(self, npn: str):
        return self._get("/agents/score", params={"npn": npn})

    def add_to_pipeline(self, npn: str):
        return self._post("/pipeline", {"npn": npn})

    def bulk_score(self, npns: list[str]):
        return self._post("/agents/bulk-score", {"npns": npns})

# Usage
client = AgentScoutClient()
data = client.search_agents(state="TX", min_score=80, limit=25)
for agent in data["agents"]:
    print(f"{agent['name']}: NPN {agent['npn']}")

Ready to integrate?

API access is available on the Enterprise plan. Start your free trial and generate your first API key in minutes.