Local Business Lead Operations API Documentation

Read supplied lead exports, call logs, and quote records to spot unanswered enquiries and prioritize follow-ups without accessing a CRM. Payment is the exact USDC price on Base with x402.

POSThttps://brainiac.software/api/v1/local-lead-operations/record-normalize$0.04 USDC

Normalize lead records

Copy supplied leads, calls, quotes, responses, and enquiries into a consistent inventory. Counts come from the request only. No CRM account is accessed.

Body

FieldRequiredNotes
textNostring
jsonNostring
csvNostring
fileNoobject; Object
leadsNoarray; Array
callsNoarray; Array
quotesNoarray; Array
responsesNoarray; Array
enquiriesNoarray; Array
sourcesNoarray; Array
asOfNostring
responseLimitHoursNonumber
quoteLimitDaysNonumber
minSampleNointeger

Request exampleJSON

{
  "text": "Lead: L-1 | Sam | 555-0100 | sam@example.com | google | 2026-11-01T09:00:00.000Z | open | 450\nCall: C-1 | L-1 | inbound | missed | 2026-11-01T09:05:00.000Z | 0 | true\nResponse: R-1 | L-1 | 2026-11-01T12:00:00.000Z | sms\nThis customer will convert.\n"
}

Response exampleJSON

{
  "checkedAt": "2026-11-04T17:00:00.000Z",
  "status": "normalized",
  "leads": [
    {
      "id": "L-1",
      "name": "Sam",
      "phone": "555-0100",
      "email": "sam@example.com",
      "source": "google",
      "received": "2026-11-01T09:00:00.000Z",
      "status": "open",
      "value": 450,
      "valueSupplied": true,
      "callCount": 1,
      "quoteCount": 0,
      "responseCount": 1,
      "enquiryCount": 0
    }
  ],
  "calls": [
    {
      "id": "C-1",
      "leadId": "L-1",
      "direction": "inbound",
      "status": "missed",
      "at": "2026-11-01T09:05:00.000Z",
      "duration": 0,
      "durationSupplied": true,
      "missed": true
    }
  ],
  "quotes": [],
  "responses": [
    {
      "id": "R-1",
      "leadId": "L-1",
      "at": "2026-11-01T12:00:00.000Z",
      "channel": "sms"
    }
  ],
  "enquiries": [],
  "crmAccessed": false,
  "messageSent": false,
  "callMade": false,
  "conversionClaimed": false,
  "findings": [
    {
      "kind": "ignored",
      "code": "unlabeled_line",
      "subject": "",
      "detail": "Lines without a recognized label were not read and their text was not copied."
    }
  ],
  "limitations": [
    "Leads, calls, quotes, responses, and enquiries are copied only from labeled fields supplied by the caller.",
    "Response delays and quote ages use only supplied timestamps. Missing times are not invented.",
    "Priority uses transparent rules on those records. It does not predict conversion.",
    "No message is sent, no call is placed, and no CRM account is accessed.",
    "An unconverted quote means no outcome was recorded in the request, not that the job is lost forever."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/local-lead-operations/record-normalize" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "text": "Lead: L-1 | Sam | 555-0100 | sam@example.com | google | 2026-11-01T09:00:00.000Z | open | 450\nCall: C-1 | L-1 | inbound | missed | 2026-11-01T09:05:00.000Z | 0 | true\nResponse: R-1 | L-1 | 2026-11-01T12:00:00.000Z | sms\nThis customer will convert.\n"
}
JSON
POSThttps://brainiac.software/api/v1/local-lead-operations/missed-call-analyze$0.04 USDC

Analyze missed-call leads

Identify missed calls and whether a later response was recorded for the same lead. Delays use supplied timestamps only.

Body

FieldRequiredNotes
textNostring
jsonNostring
csvNostring
fileNoobject; Object
leadsNoarray; Array
callsNoarray; Array
quotesNoarray; Array
responsesNoarray; Array
enquiriesNoarray; Array
sourcesNoarray; Array
asOfNostring
responseLimitHoursNonumber
quoteLimitDaysNonumber
minSampleNointeger

Request exampleJSON

{
  "calls": [
    {
      "id": "C-1",
      "leadId": "L-1",
      "direction": "inbound",
      "status": "missed",
      "at": "2026-11-01T09:00:00.000Z",
      "duration": 0,
      "missed": true
    },
    {
      "id": "C-2",
      "leadId": "L-2",
      "direction": "inbound",
      "status": "missed",
      "at": "2026-11-01T10:00:00.000Z",
      "missed": true
    }
  ],
  "responses": [
    {
      "id": "R-1",
      "leadId": "L-1",
      "at": "2026-11-01T10:30:00.000Z",
      "channel": "phone"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-04T17:00:00.000Z",
  "status": "analyzed",
  "missedCount": 2,
  "unansweredCount": 1,
  "items": [
    {
      "id": "C-1",
      "leadId": "L-1",
      "at": "2026-11-01T09:00:00.000Z",
      "status": "missed",
      "direction": "inbound",
      "responded": true,
      "responseAt": "2026-11-01T10:30:00.000Z",
      "responseChannel": "phone",
      "delayHours": 1.5,
      "delayHoursSupplied": true,
      "conversionClaimed": false
    },
    {
      "id": "C-2",
      "leadId": "L-2",
      "at": "2026-11-01T10:00:00.000Z",
      "status": "missed",
      "direction": "inbound",
      "responded": false,
      "responseAt": "",
      "responseChannel": "",
      "delayHours": 0,
      "delayHoursSupplied": false,
      "conversionClaimed": false
    }
  ],
  "crmAccessed": false,
  "messageSent": false,
  "callMade": false,
  "conversionClaimed": false,
  "findings": [
    {
      "kind": "observation",
      "code": "missed_without_response",
      "subject": "C-2",
      "detail": "A missed call has no recorded response for its lead id."
    }
  ],
  "limitations": [
    "Leads, calls, quotes, responses, and enquiries are copied only from labeled fields supplied by the caller.",
    "Response delays and quote ages use only supplied timestamps. Missing times are not invented.",
    "Priority uses transparent rules on those records. It does not predict conversion.",
    "No message is sent, no call is placed, and no CRM account is accessed.",
    "An unconverted quote means no outcome was recorded in the request, not that the job is lost forever."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/local-lead-operations/missed-call-analyze" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "calls": [
    {
      "id": "C-1",
      "leadId": "L-1",
      "direction": "inbound",
      "status": "missed",
      "at": "2026-11-01T09:00:00.000Z",
      "duration": 0,
      "missed": true
    },
    {
      "id": "C-2",
      "leadId": "L-2",
      "direction": "inbound",
      "status": "missed",
      "at": "2026-11-01T10:00:00.000Z",
      "missed": true
    }
  ],
  "responses": [
    {
      "id": "R-1",
      "leadId": "L-1",
      "at": "2026-11-01T10:30:00.000Z",
      "channel": "phone"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/local-lead-operations/response-delay-detect$0.04 USDC

Detect lead response delays

Calculate hours from enquiry received time to the first recorded response. Overdue uses the disclosed hour limit and does not claim conversion.

Body

FieldRequiredNotes
textNostring
jsonNostring
csvNostring
fileNoobject; Object
leadsNoarray; Array
callsNoarray; Array
quotesNoarray; Array
responsesNoarray; Array
enquiriesNoarray; Array
sourcesNoarray; Array
asOfNostring
responseLimitHoursNonumber
quoteLimitDaysNonumber
minSampleNointeger

Request exampleJSON

{
  "asOf": "2026-11-04T12:00:00.000Z",
  "responseLimitHours": 24,
  "leads": [
    {
      "id": "L-1",
      "name": "Sam",
      "received": "2026-11-01T09:00:00.000Z"
    },
    {
      "id": "L-2",
      "name": "Alex",
      "received": "2026-11-03T09:00:00.000Z"
    },
    {
      "id": "L-3",
      "name": "Jo",
      "received": "2026-11-04T08:00:00.000Z"
    }
  ],
  "responses": [
    {
      "id": "R-1",
      "leadId": "L-1",
      "at": "2026-11-02T12:00:00.000Z",
      "channel": "email"
    },
    {
      "id": "R-2",
      "leadId": "L-3",
      "at": "2026-11-04T08:30:00.000Z",
      "channel": "sms"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-04T17:00:00.000Z",
  "status": "detected",
  "limitHours": 24,
  "asOf": "2026-11-04T12:00:00.000Z",
  "overdueCount": 2,
  "unansweredCount": 1,
  "items": [
    {
      "id": "L-1",
      "name": "Sam",
      "received": "2026-11-01T09:00:00.000Z",
      "responseAt": "2026-11-02T12:00:00.000Z",
      "responseChannel": "email",
      "responded": true,
      "delayHours": 27,
      "delayHoursSupplied": true,
      "limitHours": 24,
      "overdue": true,
      "conversionClaimed": false
    },
    {
      "id": "L-2",
      "name": "Alex",
      "received": "2026-11-03T09:00:00.000Z",
      "responseAt": "",
      "responseChannel": "",
      "responded": false,
      "delayHours": 27,
      "delayHoursSupplied": true,
      "limitHours": 24,
      "overdue": true,
      "conversionClaimed": false
    },
    {
      "id": "L-3",
      "name": "Jo",
      "received": "2026-11-04T08:00:00.000Z",
      "responseAt": "2026-11-04T08:30:00.000Z",
      "responseChannel": "sms",
      "responded": true,
      "delayHours": 0.5,
      "delayHoursSupplied": true,
      "limitHours": 24,
      "overdue": false,
      "conversionClaimed": false
    }
  ],
  "crmAccessed": false,
  "messageSent": false,
  "callMade": false,
  "conversionClaimed": false,
  "findings": [
    {
      "kind": "observation",
      "code": "enquiry_without_response",
      "subject": "L-2",
      "detail": "An enquiry lead has no recorded response."
    }
  ],
  "limitations": [
    "Leads, calls, quotes, responses, and enquiries are copied only from labeled fields supplied by the caller.",
    "Response delays and quote ages use only supplied timestamps. Missing times are not invented.",
    "Priority uses transparent rules on those records. It does not predict conversion.",
    "No message is sent, no call is placed, and no CRM account is accessed.",
    "An unconverted quote means no outcome was recorded in the request, not that the job is lost forever."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/local-lead-operations/response-delay-detect" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "asOf": "2026-11-04T12:00:00.000Z",
  "responseLimitHours": 24,
  "leads": [
    {
      "id": "L-1",
      "name": "Sam",
      "received": "2026-11-01T09:00:00.000Z"
    },
    {
      "id": "L-2",
      "name": "Alex",
      "received": "2026-11-03T09:00:00.000Z"
    },
    {
      "id": "L-3",
      "name": "Jo",
      "received": "2026-11-04T08:00:00.000Z"
    }
  ],
  "responses": [
    {
      "id": "R-1",
      "leadId": "L-1",
      "at": "2026-11-02T12:00:00.000Z",
      "channel": "email"
    },
    {
      "id": "R-2",
      "leadId": "L-3",
      "at": "2026-11-04T08:30:00.000Z",
      "channel": "sms"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/local-lead-operations/quote-followup-priority$0.05 USDC

Prioritize quote follow-ups

Rank leads with transparent rules for missed calls, response delays, and quotes without outcomes. Priority is not a prediction that a customer will convert.

Body

FieldRequiredNotes
textNostring
jsonNostring
csvNostring
fileNoobject; Object
leadsNoarray; Array
callsNoarray; Array
quotesNoarray; Array
responsesNoarray; Array
enquiriesNoarray; Array
sourcesNoarray; Array
asOfNostring
responseLimitHoursNonumber
quoteLimitDaysNonumber
minSampleNointeger

Request exampleJSON

{
  "asOf": "2026-11-04T12:00:00.000Z",
  "responseLimitHours": 24,
  "quoteLimitDays": 7,
  "leads": [
    {
      "id": "L-1",
      "name": "Sam",
      "received": "2026-11-01T09:00:00.000Z",
      "value": 800
    },
    {
      "id": "L-2",
      "name": "Alex",
      "received": "2026-11-02T09:00:00.000Z",
      "value": 200
    },
    {
      "id": "L-3",
      "name": "Jo",
      "received": "2026-11-03T09:00:00.000Z",
      "value": 50
    }
  ],
  "calls": [
    {
      "id": "C-1",
      "leadId": "L-1",
      "status": "missed",
      "at": "2026-11-01T09:05:00.000Z",
      "missed": true
    }
  ],
  "quotes": [
    {
      "id": "Q-1",
      "leadId": "L-2",
      "amount": 200,
      "sent": "2026-10-20T09:00:00.000Z"
    },
    {
      "id": "Q-2",
      "leadId": "L-3",
      "amount": 50,
      "sent": "2026-11-03T10:00:00.000Z",
      "outcome": "won",
      "outcomeAt": "2026-11-03T18:00:00.000Z"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-04T17:00:00.000Z",
  "status": "prioritized",
  "rules": [
    "missed_call_without_response → high",
    "response_delay_over_24h → high",
    "unconverted_quote_over_7d → high",
    "unconverted_quote_with_amount → medium",
    "enquiry_without_response → medium",
    "open_lead_with_value → low"
  ],
  "responseLimitHours": 24,
  "quoteLimitDays": 7,
  "asOf": "2026-11-04T12:00:00.000Z",
  "highCount": 2,
  "items": [
    {
      "id": "L-1",
      "name": "Sam",
      "level": "high",
      "reasons": [
        "missed_call_without_response",
        "enquiry_without_response"
      ],
      "value": 800,
      "valueSupplied": true,
      "conversionClaimed": false
    },
    {
      "id": "L-2",
      "name": "Alex",
      "level": "high",
      "reasons": [
        "enquiry_without_response",
        "unconverted_quote_over_7d"
      ],
      "value": 200,
      "valueSupplied": true,
      "conversionClaimed": false
    },
    {
      "id": "L-3",
      "name": "Jo",
      "level": "medium",
      "reasons": [
        "enquiry_without_response"
      ],
      "value": 50,
      "valueSupplied": true,
      "conversionClaimed": false
    }
  ],
  "crmAccessed": false,
  "messageSent": false,
  "callMade": false,
  "conversionClaimed": false,
  "findings": [
    {
      "kind": "observation",
      "code": "missed_without_response",
      "subject": "C-1",
      "detail": "A missed call has no recorded response for its lead id."
    },
    {
      "kind": "observation",
      "code": "enquiry_without_response",
      "subject": "L-1",
      "detail": "An enquiry lead has no recorded response."
    },
    {
      "kind": "observation",
      "code": "enquiry_without_response",
      "subject": "L-2",
      "detail": "An enquiry lead has no recorded response."
    },
    {
      "kind": "observation",
      "code": "enquiry_without_response",
      "subject": "L-3",
      "detail": "An enquiry lead has no recorded response."
    },
    {
      "kind": "observation",
      "code": "quote_without_outcome",
      "subject": "Q-1",
      "detail": "A quote has no recorded outcome such as won, lost, accepted, or rejected."
    },
    {
      "kind": "observation",
      "code": "priority_rules",
      "subject": "",
      "detail": "Priority used these rules: missed_call_without_response → high; response_delay_over_24h → high; unconverted_quote_over_7d → high; unconverted_quote_with_amount → medium; enquiry_without_response → medium; open_lead_with_value → low."
    }
  ],
  "limitations": [
    "Leads, calls, quotes, responses, and enquiries are copied only from labeled fields supplied by the caller.",
    "Response delays and quote ages use only supplied timestamps. Missing times are not invented.",
    "Priority uses transparent rules on those records. It does not predict conversion.",
    "No message is sent, no call is placed, and no CRM account is accessed.",
    "An unconverted quote means no outcome was recorded in the request, not that the job is lost forever."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/local-lead-operations/quote-followup-priority" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "asOf": "2026-11-04T12:00:00.000Z",
  "responseLimitHours": 24,
  "quoteLimitDays": 7,
  "leads": [
    {
      "id": "L-1",
      "name": "Sam",
      "received": "2026-11-01T09:00:00.000Z",
      "value": 800
    },
    {
      "id": "L-2",
      "name": "Alex",
      "received": "2026-11-02T09:00:00.000Z",
      "value": 200
    },
    {
      "id": "L-3",
      "name": "Jo",
      "received": "2026-11-03T09:00:00.000Z",
      "value": 50
    }
  ],
  "calls": [
    {
      "id": "C-1",
      "leadId": "L-1",
      "status": "missed",
      "at": "2026-11-01T09:05:00.000Z",
      "missed": true
    }
  ],
  "quotes": [
    {
      "id": "Q-1",
      "leadId": "L-2",
      "amount": 200,
      "sent": "2026-10-20T09:00:00.000Z"
    },
    {
      "id": "Q-2",
      "leadId": "L-3",
      "amount": 50,
      "sent": "2026-11-03T10:00:00.000Z",
      "outcome": "won",
      "outcomeAt": "2026-11-03T18:00:00.000Z"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/local-lead-operations/unconverted-quote-detect$0.04 USDC

Detect unconverted quotes

Find quotes with no recorded outcome and age them from the sent timestamp. A missing outcome is not treated as a final loss.

Body

FieldRequiredNotes
textNostring
jsonNostring
csvNostring
fileNoobject; Object
leadsNoarray; Array
callsNoarray; Array
quotesNoarray; Array
responsesNoarray; Array
enquiriesNoarray; Array
sourcesNoarray; Array
asOfNostring
responseLimitHoursNonumber
quoteLimitDaysNonumber
minSampleNointeger

Request exampleJSON

{
  "asOf": "2026-11-04T12:00:00.000Z",
  "quoteLimitDays": 7,
  "quotes": [
    {
      "id": "Q-1",
      "leadId": "L-1",
      "amount": 900,
      "sent": "2026-10-20T09:00:00.000Z"
    },
    {
      "id": "Q-2",
      "leadId": "L-2",
      "amount": 300,
      "sent": "2026-11-03T09:00:00.000Z"
    },
    {
      "id": "Q-3",
      "leadId": "L-3",
      "amount": 150,
      "sent": "2026-11-01T09:00:00.000Z",
      "outcome": "lost",
      "outcomeAt": "2026-11-02T09:00:00.000Z"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-04T17:00:00.000Z",
  "status": "detected",
  "limitDays": 7,
  "asOf": "2026-11-04T12:00:00.000Z",
  "unconvertedCount": 2,
  "overdueCount": 1,
  "items": [
    {
      "id": "Q-1",
      "leadId": "L-1",
      "amount": 900,
      "amountSupplied": true,
      "sent": "2026-10-20T09:00:00.000Z",
      "outcome": "",
      "outcomeAt": "",
      "outcomeRecorded": false,
      "ageDays": 15.13,
      "ageDaysSupplied": true,
      "limitDays": 7,
      "overdue": true,
      "conversionClaimed": false
    },
    {
      "id": "Q-2",
      "leadId": "L-2",
      "amount": 300,
      "amountSupplied": true,
      "sent": "2026-11-03T09:00:00.000Z",
      "outcome": "",
      "outcomeAt": "",
      "outcomeRecorded": false,
      "ageDays": 1.13,
      "ageDaysSupplied": true,
      "limitDays": 7,
      "overdue": false,
      "conversionClaimed": false
    },
    {
      "id": "Q-3",
      "leadId": "L-3",
      "amount": 150,
      "amountSupplied": true,
      "sent": "2026-11-01T09:00:00.000Z",
      "outcome": "lost",
      "outcomeAt": "2026-11-02T09:00:00.000Z",
      "outcomeRecorded": true,
      "ageDays": 3.13,
      "ageDaysSupplied": true,
      "limitDays": 7,
      "overdue": false,
      "conversionClaimed": false
    }
  ],
  "crmAccessed": false,
  "messageSent": false,
  "callMade": false,
  "conversionClaimed": false,
  "findings": [
    {
      "kind": "observation",
      "code": "quote_without_outcome",
      "subject": "Q-1",
      "detail": "A quote has no recorded outcome such as won, lost, accepted, or rejected."
    },
    {
      "kind": "observation",
      "code": "quote_without_outcome",
      "subject": "Q-2",
      "detail": "A quote has no recorded outcome such as won, lost, accepted, or rejected."
    }
  ],
  "limitations": [
    "Leads, calls, quotes, responses, and enquiries are copied only from labeled fields supplied by the caller.",
    "Response delays and quote ages use only supplied timestamps. Missing times are not invented.",
    "Priority uses transparent rules on those records. It does not predict conversion.",
    "No message is sent, no call is placed, and no CRM account is accessed.",
    "An unconverted quote means no outcome was recorded in the request, not that the job is lost forever."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/local-lead-operations/unconverted-quote-detect" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "asOf": "2026-11-04T12:00:00.000Z",
  "quoteLimitDays": 7,
  "quotes": [
    {
      "id": "Q-1",
      "leadId": "L-1",
      "amount": 900,
      "sent": "2026-10-20T09:00:00.000Z"
    },
    {
      "id": "Q-2",
      "leadId": "L-2",
      "amount": 300,
      "sent": "2026-11-03T09:00:00.000Z"
    },
    {
      "id": "Q-3",
      "leadId": "L-3",
      "amount": 150,
      "sent": "2026-11-01T09:00:00.000Z",
      "outcome": "lost",
      "outcomeAt": "2026-11-02T09:00:00.000Z"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/local-lead-operations/source-performance-analyze$0.05 USDC

Analyze lead source performance

Calculate conversion rates from supplied source lead and converted counts. Ranking uses only sources that meet the disclosed sample minimum.

Body

FieldRequiredNotes
textNostring
jsonNostring
csvNostring
fileNoobject; Object
leadsNoarray; Array
callsNoarray; Array
quotesNoarray; Array
responsesNoarray; Array
enquiriesNoarray; Array
sourcesNoarray; Array
asOfNostring
responseLimitHoursNonumber
quoteLimitDaysNonumber
minSampleNointeger

Request exampleJSON

{
  "minSample": 20,
  "sources": [
    {
      "id": "google",
      "name": "Google",
      "leads": 40,
      "converted": 8
    },
    {
      "id": "referral",
      "name": "Referral",
      "leads": 25,
      "converted": 10
    },
    {
      "id": "flyer",
      "name": "Flyer",
      "leads": 5,
      "converted": 2
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-04T17:00:00.000Z",
  "status": "analyzed",
  "minSample": 20,
  "sources": [
    {
      "id": "google",
      "name": "Google",
      "leads": 40,
      "leadsSupplied": true,
      "converted": 8,
      "convertedSupplied": true,
      "conversionRate": 0.2,
      "conversionRateSupplied": true,
      "sampleSufficient": true,
      "conversionClaimed": false
    },
    {
      "id": "referral",
      "name": "Referral",
      "leads": 25,
      "leadsSupplied": true,
      "converted": 10,
      "convertedSupplied": true,
      "conversionRate": 0.4,
      "conversionRateSupplied": true,
      "sampleSufficient": true,
      "conversionClaimed": false
    },
    {
      "id": "flyer",
      "name": "Flyer",
      "leads": 5,
      "leadsSupplied": true,
      "converted": 2,
      "convertedSupplied": true,
      "conversionRate": 0.4,
      "conversionRateSupplied": true,
      "sampleSufficient": false,
      "conversionClaimed": false
    }
  ],
  "highestRateSourceId": "referral",
  "highestRate": 0.4,
  "highestRateSupplied": true,
  "crmAccessed": false,
  "messageSent": false,
  "callMade": false,
  "conversionClaimed": false,
  "findings": [
    {
      "kind": "observation",
      "code": "source_sample_small",
      "subject": "flyer",
      "detail": "A source rate is shown, but the sample is below the disclosed minimum of 20 leads. It is not used for ranking."
    }
  ],
  "limitations": [
    "Leads, calls, quotes, responses, and enquiries are copied only from labeled fields supplied by the caller.",
    "Response delays and quote ages use only supplied timestamps. Missing times are not invented.",
    "Priority uses transparent rules on those records. It does not predict conversion.",
    "No message is sent, no call is placed, and no CRM account is accessed.",
    "An unconverted quote means no outcome was recorded in the request, not that the job is lost forever."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/local-lead-operations/source-performance-analyze" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "minSample": 20,
  "sources": [
    {
      "id": "google",
      "name": "Google",
      "leads": 40,
      "converted": 8
    },
    {
      "id": "referral",
      "name": "Referral",
      "leads": 25,
      "converted": 10
    },
    {
      "id": "flyer",
      "name": "Flyer",
      "leads": 5,
      "converted": 2
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/local-lead-operations/customer-enquiry-classify$0.04 USDC

Classify customer enquiries

Classify enquiry text with transparent token rules such as emergency, quote, booking, or complaint. Classification is not a conversion prediction.

Body

FieldRequiredNotes
textNostring
jsonNostring
csvNostring
fileNoobject; Object
leadsNoarray; Array
callsNoarray; Array
quotesNoarray; Array
responsesNoarray; Array
enquiriesNoarray; Array
sourcesNoarray; Array
asOfNostring
responseLimitHoursNonumber
quoteLimitDaysNonumber
minSampleNointeger

Request exampleJSON

{
  "enquiries": [
    {
      "id": "E-1",
      "leadId": "L-1",
      "text": "Urgent boiler leak, no hot water",
      "channel": "web",
      "received": "2026-11-04T08:00:00.000Z"
    },
    {
      "id": "E-2",
      "leadId": "L-2",
      "text": "Can I get a quote for a new bathroom?",
      "channel": "email"
    },
    {
      "id": "E-3",
      "leadId": "L-3",
      "text": "Please book an appointment next week",
      "channel": "phone"
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-04T17:00:00.000Z",
  "status": "classified",
  "counts": [
    {
      "kind": "emergency",
      "count": 1
    },
    {
      "kind": "quote",
      "count": 1
    },
    {
      "kind": "booking",
      "count": 1
    }
  ],
  "items": [
    {
      "id": "E-1",
      "leadId": "L-1",
      "channel": "web",
      "received": "2026-11-04T08:00:00.000Z",
      "kind": "emergency",
      "matched": "urgent",
      "confidence": "token",
      "text": "Urgent boiler leak, no hot water",
      "conversionClaimed": false
    },
    {
      "id": "E-2",
      "leadId": "L-2",
      "channel": "email",
      "received": "",
      "kind": "quote",
      "matched": "quote",
      "confidence": "token",
      "text": "Can I get a quote for a new bathroom?",
      "conversionClaimed": false
    },
    {
      "id": "E-3",
      "leadId": "L-3",
      "channel": "phone",
      "received": "",
      "kind": "booking",
      "matched": "book",
      "confidence": "token",
      "text": "Please book an appointment next week",
      "conversionClaimed": false
    }
  ],
  "crmAccessed": false,
  "messageSent": false,
  "callMade": false,
  "conversionClaimed": false,
  "findings": [],
  "limitations": [
    "Leads, calls, quotes, responses, and enquiries are copied only from labeled fields supplied by the caller.",
    "Response delays and quote ages use only supplied timestamps. Missing times are not invented.",
    "Priority uses transparent rules on those records. It does not predict conversion.",
    "No message is sent, no call is placed, and no CRM account is accessed.",
    "An unconverted quote means no outcome was recorded in the request, not that the job is lost forever."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/local-lead-operations/customer-enquiry-classify" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "enquiries": [
    {
      "id": "E-1",
      "leadId": "L-1",
      "text": "Urgent boiler leak, no hot water",
      "channel": "web",
      "received": "2026-11-04T08:00:00.000Z"
    },
    {
      "id": "E-2",
      "leadId": "L-2",
      "text": "Can I get a quote for a new bathroom?",
      "channel": "email"
    },
    {
      "id": "E-3",
      "leadId": "L-3",
      "text": "Please book an appointment next week",
      "channel": "phone"
    }
  ]
}
JSON
POSThttps://brainiac.software/api/v1/local-lead-operations/conversion-opportunity-report$0.12 USDC

Report lead conversion opportunities

Combine unanswered missed calls, response delays, unconverted quotes, source rates, and enquiry classes from supplied records. No messages are sent and conversion is not claimed.

Body

FieldRequiredNotes
textNostring
jsonNostring
csvNostring
fileNoobject; Object
leadsNoarray; Array
callsNoarray; Array
quotesNoarray; Array
responsesNoarray; Array
enquiriesNoarray; Array
sourcesNoarray; Array
asOfNostring
responseLimitHoursNonumber
quoteLimitDaysNonumber
minSampleNointeger

Request exampleJSON

{
  "asOf": "2026-11-04T12:00:00.000Z",
  "responseLimitHours": 24,
  "quoteLimitDays": 7,
  "minSample": 20,
  "leads": [
    {
      "id": "L-1",
      "name": "Sam",
      "source": "google",
      "received": "2026-11-01T09:00:00.000Z",
      "status": "open",
      "value": 800
    },
    {
      "id": "L-2",
      "name": "Alex",
      "source": "referral",
      "received": "2026-11-02T09:00:00.000Z",
      "status": "open",
      "value": 200
    }
  ],
  "calls": [
    {
      "id": "C-1",
      "leadId": "L-1",
      "status": "missed",
      "at": "2026-11-01T09:05:00.000Z",
      "missed": true
    }
  ],
  "quotes": [
    {
      "id": "Q-1",
      "leadId": "L-2",
      "amount": 200,
      "sent": "2026-10-20T09:00:00.000Z"
    }
  ],
  "responses": [
    {
      "id": "R-1",
      "leadId": "L-2",
      "at": "2026-11-02T10:00:00.000Z",
      "channel": "phone"
    }
  ],
  "enquiries": [
    {
      "id": "E-1",
      "leadId": "L-1",
      "text": "Please call back about an urgent repair",
      "channel": "web"
    }
  ],
  "sources": [
    {
      "id": "google",
      "name": "Google",
      "leads": 40,
      "converted": 8
    },
    {
      "id": "referral",
      "name": "Referral",
      "leads": 25,
      "converted": 10
    }
  ]
}

Response exampleJSON

{
  "checkedAt": "2026-11-04T17:00:00.000Z",
  "status": "reported",
  "asOf": "2026-11-04T12:00:00.000Z",
  "responseLimitHours": 24,
  "quoteLimitDays": 7,
  "leadCount": 2,
  "missedUnansweredCount": 1,
  "overdueResponseCount": 1,
  "unconvertedQuoteCount": 1,
  "highPriorityCount": 2,
  "leads": [
    {
      "id": "L-1",
      "name": "Sam",
      "phone": "",
      "email": "",
      "source": "google",
      "received": "2026-11-01T09:00:00.000Z",
      "status": "open",
      "value": 800,
      "valueSupplied": true,
      "callCount": 1,
      "quoteCount": 0,
      "responseCount": 0,
      "enquiryCount": 1
    },
    {
      "id": "L-2",
      "name": "Alex",
      "phone": "",
      "email": "",
      "source": "referral",
      "received": "2026-11-02T09:00:00.000Z",
      "status": "open",
      "value": 200,
      "valueSupplied": true,
      "callCount": 0,
      "quoteCount": 1,
      "responseCount": 1,
      "enquiryCount": 0
    }
  ],
  "missed": [
    {
      "id": "C-1",
      "leadId": "L-1",
      "at": "2026-11-01T09:05:00.000Z",
      "status": "missed",
      "direction": "",
      "responded": false,
      "responseAt": "",
      "responseChannel": "",
      "delayHours": 0,
      "delayHoursSupplied": false,
      "conversionClaimed": false
    }
  ],
  "delays": [
    {
      "id": "L-1",
      "name": "Sam",
      "received": "2026-11-01T09:00:00.000Z",
      "responseAt": "",
      "responseChannel": "",
      "responded": false,
      "delayHours": 75,
      "delayHoursSupplied": true,
      "limitHours": 24,
      "overdue": true,
      "conversionClaimed": false
    },
    {
      "id": "L-2",
      "name": "Alex",
      "received": "2026-11-02T09:00:00.000Z",
      "responseAt": "2026-11-02T10:00:00.000Z",
      "responseChannel": "phone",
      "responded": true,
      "delayHours": 1,
      "delayHoursSupplied": true,
      "limitHours": 24,
      "overdue": false,
      "conversionClaimed": false
    }
  ],
  "priorities": [
    {
      "id": "L-1",
      "name": "Sam",
      "level": "high",
      "reasons": [
        "missed_call_without_response",
        "enquiry_without_response"
      ],
      "value": 800,
      "valueSupplied": true,
      "conversionClaimed": false
    },
    {
      "id": "L-2",
      "name": "Alex",
      "level": "high",
      "reasons": [
        "unconverted_quote_over_7d"
      ],
      "value": 200,
      "valueSupplied": true,
      "conversionClaimed": false
    }
  ],
  "quotes": [
    {
      "id": "Q-1",
      "leadId": "L-2",
      "amount": 200,
      "amountSupplied": true,
      "sent": "2026-10-20T09:00:00.000Z",
      "outcome": "",
      "outcomeAt": "",
      "outcomeRecorded": false,
      "ageDays": 15.13,
      "ageDaysSupplied": true,
      "limitDays": 7,
      "overdue": true,
      "conversionClaimed": false
    }
  ],
  "sources": [
    {
      "id": "google",
      "name": "Google",
      "leads": 40,
      "leadsSupplied": true,
      "converted": 8,
      "convertedSupplied": true,
      "conversionRate": 0.2,
      "conversionRateSupplied": true,
      "sampleSufficient": true,
      "conversionClaimed": false
    },
    {
      "id": "referral",
      "name": "Referral",
      "leads": 25,
      "leadsSupplied": true,
      "converted": 10,
      "convertedSupplied": true,
      "conversionRate": 0.4,
      "conversionRateSupplied": true,
      "sampleSufficient": true,
      "conversionClaimed": false
    }
  ],
  "enquiries": [
    {
      "id": "E-1",
      "leadId": "L-1",
      "channel": "web",
      "received": "",
      "kind": "emergency",
      "matched": "urgent",
      "confidence": "token",
      "text": "Please call back about an urgent repair",
      "conversionClaimed": false
    }
  ],
  "rules": [
    "missed_call_without_response → high",
    "response_delay_over_24h → high",
    "unconverted_quote_over_7d → high",
    "unconverted_quote_with_amount → medium",
    "enquiry_without_response → medium",
    "open_lead_with_value → low"
  ],
  "crmAccessed": false,
  "messageSent": false,
  "callMade": false,
  "conversionClaimed": false,
  "findings": [
    {
      "kind": "observation",
      "code": "missed_without_response",
      "subject": "C-1",
      "detail": "A missed call has no recorded response for its lead id."
    },
    {
      "kind": "observation",
      "code": "enquiry_without_response",
      "subject": "L-1",
      "detail": "An enquiry lead has no recorded response."
    },
    {
      "kind": "observation",
      "code": "quote_without_outcome",
      "subject": "Q-1",
      "detail": "A quote has no recorded outcome such as won, lost, accepted, or rejected."
    },
    {
      "kind": "observation",
      "code": "priority_rules",
      "subject": "",
      "detail": "Priority used these rules: missed_call_without_response → high; response_delay_over_24h → high; unconverted_quote_over_7d → high; unconverted_quote_with_amount → medium; enquiry_without_response → medium; open_lead_with_value → low."
    }
  ],
  "limitations": [
    "Leads, calls, quotes, responses, and enquiries are copied only from labeled fields supplied by the caller.",
    "Response delays and quote ages use only supplied timestamps. Missing times are not invented.",
    "Priority uses transparent rules on those records. It does not predict conversion.",
    "No message is sent, no call is placed, and no CRM account is accessed.",
    "An unconverted quote means no outcome was recorded in the request, not that the job is lost forever."
  ]
}

cURL

curl -i -X POST "https://brainiac.software/api/v1/local-lead-operations/conversion-opportunity-report" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "asOf": "2026-11-04T12:00:00.000Z",
  "responseLimitHours": 24,
  "quoteLimitDays": 7,
  "minSample": 20,
  "leads": [
    {
      "id": "L-1",
      "name": "Sam",
      "source": "google",
      "received": "2026-11-01T09:00:00.000Z",
      "status": "open",
      "value": 800
    },
    {
      "id": "L-2",
      "name": "Alex",
      "source": "referral",
      "received": "2026-11-02T09:00:00.000Z",
      "status": "open",
      "value": 200
    }
  ],
  "calls": [
    {
      "id": "C-1",
      "leadId": "L-1",
      "status": "missed",
      "at": "2026-11-01T09:05:00.000Z",
      "missed": true
    }
  ],
  "quotes": [
    {
      "id": "Q-1",
      "leadId": "L-2",
      "amount": 200,
      "sent": "2026-10-20T09:00:00.000Z"
    }
  ],
  "responses": [
    {
      "id": "R-1",
      "leadId": "L-2",
      "at": "2026-11-02T10:00:00.000Z",
      "channel": "phone"
    }
  ],
  "enquiries": [
    {
      "id": "E-1",
      "leadId": "L-1",
      "text": "Please call back about an urgent repair",
      "channel": "web"
    }
  ],
  "sources": [
    {
      "id": "google",
      "name": "Google",
      "leads": 40,
      "converted": 8
    },
    {
      "id": "referral",
      "name": "Referral",
      "leads": 25,
      "converted": 10
    }
  ]
}
JSON