Skip to main content
POST
/
outbound
/
speed-to-lead
/
webhook
curl -X POST https://api.avoca.ai/v1/outbound/speed-to-lead/webhook \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Workspace-ID: YOUR_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "team_id": 123,
    "customer_name": "John Doe",
    "phone_number": "(555) 123-4567",
    "email": "[email protected]",
    "address": "123 Main St",
    "city": "Los Angeles",
    "state": "CA",
    "zip": "90210",
    "lead_source": "Website Form",
    "service_type": "HVAC Repair",
    "notes": "AC not cooling properly, would like service ASAP",
    "urgency": "urgent",
    "campaign_id": 456,
    "external_id": "lead_abc123"
  }'
{
  "success": true,
  "message": "Speed to lead call scheduled successfully",
  "data": {
    "id": "stl_123456",
    "external_id": "lead_abc123",
    "status": "SCHEDULED",
    "scheduled_at": "2024-01-20T10:30:15Z",
    "attempts": 3
  }
}
Speed-to-lead calls are triggered immediately when new leads are received, maximizing conversion by contacting prospects while their interest is highest. Studies show calling within 5 minutes increases conversion by 9x.

Request

team_id
number
required
Your ServiceTitan team/tenant ID
customer_name
string
required
Full name of the lead
phone_number
string
required
Phone number to call (any format accepted)
email
string
Customer email address for follow-up
address
string
Service address street
city
string
Service address city
state
string
Service address state (2-letter code)
zip
string
Service address ZIP code
lead_source
string
required
Where the lead originated:
  • Website Form
  • Google Ads
  • Facebook Lead Form
  • Angi
  • Google LSA
  • Custom
service_type
string
Type of service requested:
  • HVAC Repair
  • AC Installation
  • Plumbing Service
  • Electrical Work
  • Maintenance
notes
string
Additional details about the service request
urgency
string
Lead urgency level:
  • emergency - Call immediately
  • urgent - Call within 1 hour
  • standard - Call within 5 minutes (default)
campaign_id
number
ServiceTitan campaign ID for tracking
business_unit_id
number
ServiceTitan business unit ID
external_id
string
Your system’s unique ID for this lead
custom_fields
object
Additional lead data

Response

success
boolean
Whether the speed-to-lead call was scheduled successfully
message
string
Status message
data
object
Speed-to-lead call details
curl -X POST https://api.avoca.ai/v1/outbound/speed-to-lead/webhook \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Workspace-ID: YOUR_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "team_id": 123,
    "customer_name": "John Doe",
    "phone_number": "(555) 123-4567",
    "email": "[email protected]",
    "address": "123 Main St",
    "city": "Los Angeles",
    "state": "CA",
    "zip": "90210",
    "lead_source": "Website Form",
    "service_type": "HVAC Repair",
    "notes": "AC not cooling properly, would like service ASAP",
    "urgency": "urgent",
    "campaign_id": 456,
    "external_id": "lead_abc123"
  }'
{
  "success": true,
  "message": "Speed to lead call scheduled successfully",
  "data": {
    "id": "stl_123456",
    "external_id": "lead_abc123",
    "status": "SCHEDULED",
    "scheduled_at": "2024-01-20T10:30:15Z",
    "attempts": 3
  }
}

Webhook Events

After the speed-to-lead call completes, you’ll receive a webhook notification:
{
  "event": "speed_to_lead.completed",
  "timestamp": "2024-01-20T10:35:00Z",
  "data": {
    "id": "stl_123456",
    "external_id": "lead_abc123",
    "status": "COMPLETED",
    "outcome": "CONNECTED",
    "duration": 145,
    "appointment_scheduled": true,
    "appointment_id": "appt_789",
    "call_recording_url": "https://recordings.avoca.ai/stl_123456.mp3",
    "transcript_available": true
  }
}

Best Practices

  1. Call Immediately: Trigger STL within 30 seconds of lead submission
  2. Include Context: Pass all available information to improve conversation quality
  3. Set Proper Urgency: Use emergency only for true emergencies
  4. Track Sources: Use campaign IDs to measure ROI by lead source
  5. Handle Failures: Implement retry logic for failed API calls