Leads
Manage leads. Use action=“create” to create a new lead (requires name, email). Use action=“update” to update an existing lead (requires lead_id). Use action=“list” to get leads with filters. Use action=“qualify” to change status (requires status). Use action=“identify” to identify a visitor (requires visitor_id).
Input Schema
| Parameter | Type | Description |
|---|---|---|
| action | string | Action to perform on leads. Enum: create, list, update, qualify, identify |
| lead_id | string | Lead UUID |
| name | string | Lead full name |
| string | Email address | |
| phone | string | Phone number |
| position | string | Job title/position |
| company | string | Company name |
| notes | string | Notes |
| status | string | new, contacted, qualified, converted, lost |
| origin | string | Lead source (e.g. website, referral) |
| segment_id | string | Segment UUID |
| campaign_id | string | Campaign UUID |
| assignee_id | string | Assignee user UUID |
| site_id | string | Filter by site UUID |
| user_id | string | Filter by user UUID |
| search | string | Text search in name, email, notes |
| limit | number | Max results (default 50) |
| offset | number | Pagination offset |
| sort_by | string | Field to sort by |
| sort_order | string | Sort order. Enum: asc, desc |
| visitor_id | string | Visitor UUID |
| lead_score | number | Score 1-100 |
| source | string | Lead source |
| contact_info | object | Contact details |
| company_info | object | Company details |
| interest_level | string | Interest level |
| product_interest | string | Product interest |
| pages_visited | array | Pages visited |
| time_spent | number | Time spent |
| visit_count | number | Visit count |
REST Endpoint
Actions map to sub-routes: create → /create, list → /get, update → /update, qualify → /qualify, identify → /identify.
POST /api/agents/tools/leads/create
POST /api/agents/tools/leads/get
POST /api/agents/tools/leads/update
POST /api/agents/tools/leads/qualify
POST /api/agents/tools/leads/identifyPOST /api/agents/tools/leads/create
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"site_id": "YOUR_SITE_ID",
"name": "Jane Smith",
"email": "jane@example.com",
"company": "Acme Corp",
"status": "new"
}Response:
{
"success": true,
"lead": { "id": "...", "name": "Jane Smith", "email": "jane@example.com" }
}Last updated on