Developer Docs

bizbot API Reference

Everything you need to integrate bizbot into your own stack — leads, AI chat, usage signals, and outbound webhooks. All endpoints are REST, all responses are JSON.

Getting started

Base URL

https://bizbottech.com/api

All endpoints are prefixed with this base. Use HTTPS only.

Authentication

POST to /api/auth with your credentials to receive a JWT. Pass it as:
Authorization: Bearer <token>

Rate limits

60 requests / minute per IP address. Responses include X-RateLimit-Remaining and X-RateLimit-Reset headers.

Response format

All responses return { ok: true|false, ... }. Errors include an error string and HTTP status ≥ 400.

Free plan limits: lead scoring is capped at 25 batch scores/month on free accounts. PQL check endpoint signals when you approach limits. Upgrade at bizbottech.com/pricing.

Authentication

Obtain a JWT token to authenticate subsequent requests. Tokens expire after 24 hours.

POST /api/auth No auth

Exchange email + password for a signed JWT. Store this token and include it in the Authorization header of every authenticated request.

Request body
ParameterTypeRequiredDescription
emailstringRequiredAccount email address
passwordstringRequiredAccount password
curlResponse
curl -X POST https://bizbottech.com/api/auth \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"••••••••"}'
200 OK
{
  "ok":    true,
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "email": "you@example.com",
  "plan":  "growth"
}
POST /api/auth Bearer JWT

Validate an existing token. Useful for server-side middleware to confirm a JWT is still active before processing a request.

Request body
ParameterTypeRequiredDescription
actionstringRequiredMust be "verify"
curlResponse
curl -X POST https://bizbottech.com/api/auth \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"action":"verify"}'
200 OK
{
  "ok":     true,
  "valid":  true,
  "email":  "you@example.com",
  "plan":   "growth",
  "expiresAt": "2026-04-19T12:00:00Z"
}

Leads

Find, qualify, and score leads using Orbit AI. All lead endpoints require authentication.

POST /api/lead-finder Bearer JWT

Search for leads matching specific business criteria. Returns a ranked list with contact info and lead metadata, logged to your Google Sheet.

Request body
ParameterTypeRequiredDescription
industrystringRequiredBusiness vertical to search (e.g. "plumbing", "real estate")
locationstringOptionalCity, state, or ZIP code to filter results
limitintegerOptionalMax results to return. Default 10, max 50
keywordsstring[]OptionalAdditional keyword filters for narrowing results
curl
curl -X POST https://bizbottech.com/api/lead-finder \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "industry": "plumbing",
    "location": "Austin, TX",
    "limit": 20
  }'
200 OK
{
  "ok":    true,
  "count": 18,
  "leads": [
    {
      "businessName": "Austin Plumbing Co.",
      "ownerName":    "Mike Torres",
      "email":        "mike@austinplumbing.com",
      "phone":        "+15125550188",
      "score":        87,
      "source":       "organic"
    }
    // ... more leads
  ]
}
GET /api/lead-qualify Bearer JWT

Run Orbit's qualification logic on a single lead. Returns a fit score (0–100) and qualification reasoning.

Query parameters
ParameterTypeRequiredDescription
emailstringRequiredLead's email address to qualify
businessNamestringOptionalImproves scoring accuracy
phonestringOptionalPhone number for additional signal
curl
curl "https://bizbottech.com/api/lead-qualify?email=mike@austinplumbing.com&businessName=Austin+Plumbing+Co." \
  -H "Authorization: Bearer <token>"
200 OK
{
  "ok":        true,
  "score":      82,
  "qualified":  true,
  "reasoning":  "Active business, valid email, strong industry fit",
  "signals":    ["verified_email", "has_website", "local_business"]
}
POST /api/lead-quality-batch Bearer JWT

Score up to 25 leads in a single request. Free accounts are limited to 25 batch scores per month; paid plans have unlimited access.

Request body
ParameterTypeRequiredDescription
leadsobject[]RequiredArray of lead objects. Each must include at minimum email. Max 25 per call.
curl
curl -X POST https://bizbottech.com/api/lead-quality-batch \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "leads": [
      { "email": "a@example.com", "businessName": "Acme HVAC" },
      { "email": "b@example.com", "businessName": "Blue Sky Electric" }
    ]
  }'
200 OK
{
  "ok":      true,
  "scored":  2,
  "remaining": 23,  // free-tier monthly allowance
  "results": [
    { "email": "a@example.com", "score": 91, "qualified": true  },
    { "email": "b@example.com", "score": 64, "qualified": false }
  ]
}
🤖

AI Chat

Talk to Orbit — bizbot's AI agent — and check whether a user is approaching their usage limit.

POST /api/chat Bearer JWT

Send a message to Orbit AI. Orbit has context about the authenticated user's business and responds with actionable, business-specific guidance.

Request body
ParameterTypeRequiredDescription
messagestringRequiredThe user's message to Orbit
sessionIdstringOptionalPass a consistent ID to maintain conversation context across turns
contextobjectOptionalAdditional key/value context to pass to Orbit (e.g. current page, selected lead)
curl
curl -X POST https://bizbottech.com/api/chat \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "What should I say to a lead who went cold after 2 weeks?",
    "sessionId": "sess_abc123"
  }'
200 OK
{
  "ok":        true,
  "reply":     "Try a value-add re-engage: share a quick tip specific to their industry...",
  "sessionId": "sess_abc123",
  "tokens":    312
}
GET /api/pql-check Bearer JWT

Check whether the authenticated user is approaching their plan usage limit — useful for triggering upgrade prompts in your UI.

Query parameters
ParameterTypeRequiredDescription
featurestringOptionalFilter by specific feature ("chat", "lead_scoring", "lead_finder"). Omit to get all.
curl
curl "https://bizbottech.com/api/pql-check" \
  -H "Authorization: Bearer <token>"
200 OK
{
  "ok":           true,
  "nearLimit":   true,
  "usagePercent": 84,
  "features": {
    "chat":         { "used": 420, "limit": 500, "pct": 84 },
    "lead_scoring": { "used": 18,  "limit": 25,  "pct": 72 }
  },
  "upgradeUrl":   "https://bizbottech.com/pricing.html"
}

Usage & Health

Log feature activity, retrieve client health scores, and identify at-risk accounts before they churn.

POST /api/log-usage Bearer JWT

Record a feature usage event for the authenticated account. Events feed into the health score and PQL calculations.

Request body
ParameterTypeRequiredDescription
featurestringRequiredFeature identifier (e.g. "lead_finder", "chat", "audit_tool")
actionstringOptionalSpecific action taken (e.g. "export_csv", "send_message")
metaobjectOptionalFree-form metadata object (max 2 KB)
curl
curl -X POST https://bizbottech.com/api/log-usage \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"feature":"lead_finder","action":"search","meta":{"industry":"plumbing"}}'
200 OK
{
  "ok":        true,
  "logged":    true,
  "eventId":   "evt_8a3f2c...",
  "timestamp": "2026-04-18T09:15:00Z"
}
GET /api/health-score Bearer JWT

Get the composite health score for the authenticated client account. Scores are computed from 10 behavioral signals including login recency, feature adoption, chat engagement, and lead activity.

curl
curl "https://bizbottech.com/api/health-score" \
  -H "Authorization: Bearer <token>"
200 OK
{
  "ok":        true,
  "score":     74,
  "tier":      "healthy",  // "healthy" | "at_risk" | "critical"
  "signals": {
    "loginRecency":   10,
    "featureAdoption":8,
    "chatEngagement": 9,
    "leadActivity":   7,
    // ... 6 more signals
  },
  "updatedAt": "2026-04-18T06:00:00Z"
}
GET /api/churn-predict Bearer JWT

Identify accounts at risk of churning. Returns a ranked list of at-risk clients with churn probability and suggested intervention actions. Available on Growth and Full Stack plans.

Query parameters
ParameterTypeRequiredDescription
thresholdintegerOptionalMinimum churn probability % to include. Default 60.
limitintegerOptionalMax results to return. Default 10.
curl
curl "https://bizbottech.com/api/churn-predict?threshold=70" \
  -H "Authorization: Bearer <token>"
200 OK
{
  "ok":      true,
  "atRisk":  3,
  "clients": [
    {
      "email":           "client@example.com",
      "businessName":   "Sunset HVAC",
      "churnProbability":78,
      "healthScore":    31,
      "lastLogin":      "2026-04-04T10:00:00Z",
      "recommendation": "Schedule check-in call within 48 hours"
    }
  ]
}
🔌

Integrations

Push data into bizbot from any external tool via the Zapier webhook endpoint, and subscribe to outbound events with REST hooks. See the Zapier integration guide for step-by-step setup.

POST /api/zapier-webhook X-Zapier-Secret

Inbound webhook endpoint. Send structured event payloads from Zapier (or any HTTP client) to write leads, clients, or contact submissions into bizbot. Authenticate with your ZAPIER_WEBHOOK_SECRET header.

Supported events
EventRequired fieldsOptional fields
new_lead name, email phone, source, notes
new_client businessName, email ownerName, phone, plan
contact_form name, email phone, subject, message
curl
curl -X POST https://bizbottech.com/api/zapier-webhook \
  -H "X-Zapier-Secret: <ZAPIER_WEBHOOK_SECRET>" \
  -H "Content-Type: application/json" \
  -d '{
    "event":  "new_lead",
    "name":   "Jane Smith",
    "email":  "jane@example.com",
    "source": "Typeform"
  }'
200 OK
{
  "ok":        true,
  "event":     "new_lead",
  "processed": true,
  "bizbotId":  "a3f2b1c0-..."
}
POST /api/zapier-webhook/subscribe Bearer JWT

Register a URL to receive outbound events from bizbot (REST hooks). Zapier calls this automatically when setting up a Trigger. You can also call it directly from your own system.

Request body
ParameterTypeRequiredDescription
hookUrlstringRequiredThe URL bizbot will POST events to
eventstringRequiredEvent type to subscribe to (e.g. "new_lead")
curl
curl -X POST https://bizbottech.com/api/zapier-webhook/subscribe \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"hookUrl":"https://hooks.zapier.com/hooks/catch/abc123/","event":"new_lead"}'
200 OK
{
  "ok": true,
  "id": "hook_7f3a9c..."
}
GET /api/zapier-webhook/sample No auth

Returns sample payloads for every supported event type. Zapier uses this endpoint during Zap setup so you can map fields without waiting for a real event to fire.

curl
curl "https://bizbottech.com/api/zapier-webhook/sample"
200 OK
{
  "ok": true,
  "samples": {
    "new_lead":    { "event": "new_lead",    "name": "Jane Smith", "email": "jane@example.com" },
    "new_client":  { "event": "new_client",  "businessName": "Acme LLC", "email": "acme@example.com" },
    "contact_form":{ "event": "contact_form","name": "Bob Lee",     "email": "bob@example.com"  }
  }
}
📡

Webhooks (outbound)

bizbot fires events to your systems when key things happen. Configure your webhook URL in the client dashboard.

Stripe events: bizbot forwards the standard Stripe webhook event set — checkout.session.completed, customer.subscription.updated, customer.subscription.deleted, invoice.payment_failed, and more — to your registered URL if you opt in via the dashboard.
Event When it fires Key payload fields
new_lead A lead is written to your Leads sheet (via API or Zapier) name, email, phone, source, bizbotId, timestamp
checkout.session.completed A new subscriber completes Stripe checkout customer_email, plan, amount, subscription_id
customer.subscription.updated A subscription changes plan or status subscription_id, status, plan, cancel_at_period_end
customer.subscription.deleted A subscription is cancelled and expires subscription_id, customer_email, ended_at
invoice.payment_failed A payment attempt fails (dunning begins) invoice_id, customer_email, amount_due, next_attempt
health_score.critical A client's health score drops below 30 email, businessName, score, recommendation

To register your webhook URL for new_lead events, use POST /api/zapier-webhook/subscribe. For Stripe event forwarding, contact support or configure via the client dashboard.

Ready to build?

Get your API key from your bizbot dashboard and make your first call in under 5 minutes.