MindScan Intelligence API

AI-powered behavioral intelligence — REST API v2.0

Developer Docs: This page documents public integration endpoints only. Internal tester/debug endpoints are intentionally excluded.
Quick Navigation Authentication Products Overview Depth & Credits Use Case Flows (5 Products) POST /v1/scan — Generate Intelligence Report POST /v1/report — Full Report POST /v1/compatibility — Multi-Person Compatibility GET /v1/group/{group_id} — Retrieve Group Results People Cache Endpoints GET /v1/usage — Check Usage Stats GET /v1/locations — Per-Location Breakdown Business Profiles Sales Coach Error Codes Report Fields (18 CRM-Ready Fields) Rate Limits & Best Practices

Authentication

All API requests require an API key passed via the X-API-Key header.

curl -X POST https://your-domain.com/v1/scan \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ms_live_xxxxxxxxxxxxxxxx" \
  -d '{"first_name":"John","last_name":"Smith","date_of_birth":"1985-03-15"}'
API Key Format: Keys start with ms_live_ for production or ms_test_ for testing. Keep your key secure — treat it like a password.

Products Overview

profile_type selects the intelligence product.

profile_typeUse CasePrimary Output
salesLead conversionMessaging, objections, next-step scripts
hiringCandidate and team fitRole fit, management style, collaboration risk
leadershipLeader/team dynamicsLeadership style, delegation, conflict patterns
retentionCustomer retentionLoyalty drivers, churn risk, engagement cadence
personalityGeneral personality profilingTraits, motivators, decision style

Depth & Credits

depth=quick for operational execution. depth=full for strategic deep analysis.

ModeCredit CostNotes
quick1Fast profile response
full3Deep report for most products
leadership + full5Leadership deep analysis
compatibilityN + 2N people + synthesis credits

Use Case Flows (5 Products)

Recommended endpoint flow per use case:

Use CaseFlow
Sales IntelligencePOST /v1/scan with profile_type=sales
Hiring IntelligencePOST /v1/scan with profile_type=hiring, optional cv_summary
Leadership IntelligencePOST /v1/report with profile_type=leadership
Retention IntelligencePOST /v1/scan with profile_type=retention
Profiling IntelligencePOST /v1/compatibility with profile_type=personality

Generate Intelligence Report

POST /v1/scan

Generate a complete behavioral sales intelligence report for a lead. Returns 18 CRM-ready fields with actionable sales insights.

Request Body

ParameterTypeRequiredDescription
first_namestringREQUIREDLead's first name
last_namestringREQUIREDLead's last name
date_of_birthstringREQUIREDDOB in YYYY-MM-DD format (e.g. "1985-03-15")
citystringREQUIREDLead's city
statestringoptionalLead's state or region — depends on the country
countrystringREQUIREDLead's country
location_idstringoptionalGHL location/subaccount ID — enables per-location usage tracking for agencies
business_contextstringoptionalPer-scan business context override (max 2000 characters)
profile_typestringoptionalsales | hiring | leadership | retention | personality (default: sales)
depthstringoptionalquick | full (default: quick)
context_rolestringoptionalcandidate, team_member, manager, customer, etc.
responsibilitiesstringoptionalRole responsibilities, mainly for hiring/leadership
cv_summarystringoptionalPre-processed CV summary text (max 2000 chars)
group_idintegeroptionalLink scan to an existing group assessment

Example Request

{
  "first_name": "Sarah",
  "last_name": "Johnson",
  "date_of_birth": "1988-07-22",
  "city": "Austin",
  "state": "TX",
  "country": "US",
  "location_id": "abc123locationXYZ",
  "business_context": "Company serves US homeowners, tone should be consultative and trust-first."
}

Example Response

{
  "status": "success",
  "lead": {
    "first_name": "Sarah",
    "last_name": "Johnson"
  },
  "report": {
    "Executive_Summary": "Sarah is a vision-driven buyer who...",
    "Buying_Style": "Emotionally motivated with analytical validation...",
    "Psychological_Drivers": "Status, innovation, social proof...",
    "Decision_Process": "Fast initial interest, needs social proof...",
    "Communication_Tone": "Warm, enthusiastic, story-driven...",
    "Cheat_Sheet_DO": "Lead with vision and transformation...",
    "Cheat_Sheet_DONT": "Don't overwhelm with specs early...",
    "Objection_Handling": "When she says 'I need to think'...",
    "Messaging_Hooks": "3 high-converting angles for outreach...",
    "Follow_Up_Cadence": "Day 1: Personal touch. Day 3: Value...",
    "Onboarding_Strategy": "Start with quick wins to build...",
    "Retention_Loyalty": "Monthly check-ins with progress data...",
    "Churn_Risk": "Medium — watch for engagement drops...",
    "Next_Best_Action": "Send a personalized case study...",
    "Opening_Script": "Hi Sarah, I noticed you...",
    "Close_Script": "Based on everything we discussed...",
    "Follow_Up_Message_SMS": "Hey Sarah! Quick thought on...",
    "Follow_Up_Message_Email": "Subject: Sarah, this reminded me..."
  },
  "usage": {
    "total_scans": 142,
    "monthly_scans": 38,
    "scans_remaining": 62,
    "plan": "enterprise"
  }
}

Full Report Endpoint

POST /v1/report

Convenience endpoint for deep reports. Same request shape as /v1/scan but forces depth=full.

Compatibility Endpoint

POST /v1/compatibility

Runs quick profiles for each person, then returns a synthesis compatibility analysis.

{
  "profile_type": "hiring",
  "group_name": "Q1 Sales Hire",
  "depth": "quick",
  "people": [
    {"first_name":"Alex","last_name":"Rivera","date_of_birth":"1990-01-15","city":"Austin","country":"US","context_role":"team_member"},
    {"first_name":"Mia","last_name":"Cole","date_of_birth":"1995-09-21","city":"Dallas","country":"US","context_role":"candidate","cv_summary":"5 years B2B SaaS closing."}
  ]
}

Group Results Endpoint

GET /v1/group/{group_id}

Fetches all individual scans plus synthesis result for a previously-created group.

People Cache Endpoints

GET /v1/people

List cached people for your account. Reuse them in compatibility workflows.

POST /v1/people/{person_id}/cv

Attach or update CV summary for a cached person (used in hiring analysis).

Check Usage Stats

GET /v1/usage

Check your current scan usage, remaining quota, and plan details.

Example Response

{
  "account": "Level Up Marketplace",
  "company": "Level Up",
  "usage": {
    "total_scans": 142,
    "monthly_scans": 38,
    "scans_remaining": 62,
    "plan": "enterprise",
    "scan_limit": 100
  }
}

Per-Location Usage Breakdown

GET /v1/locations

Get scan usage broken down by GHL location/subaccount. Agencies use this to see which subaccounts are consuming scans — ideal for per-location billing.

Requires the same API key authentication as other endpoints.

Example Response

{
  "account": "My Agency",
  "company": "Agency Inc",
  "overall_usage": {
    "total_scans": 250,
    "monthly_scans": 82,
    "scans_remaining": 918,
    "plan": "growth"
  },
  "locations": [
    {
      "location_id": "loc_abc123",
      "total_scans": 120,
      "monthly_scans": 45,
      "daily_scans": 3,
      "last_scan_at": "2025-12-15T14:30:00"
    },
    {
      "location_id": "loc_def456",
      "total_scans": 80,
      "monthly_scans": 22,
      "daily_scans": 1,
      "last_scan_at": "2025-12-15T11:20:00"
    }
  ]
}
Tip: Pass location_id with every scan request to enable this breakdown. In GHL workflows, use {{location.id}} to automatically send the subaccount ID.

Business Profiles

PUT /v1/profile

Set or update your business profile used to personalize report outputs.

Example Request

{
  "company_name": "Acme Roofing",
  "industry": "Home Services",
  "value_proposition": "Fast roof replacement with premium materials.",
  "services": "roof repair, roof replacement, inspections",
  "target_market": "US homeowners",
  "tone": "professional and consultative",
  "proof_points": "500+ projects completed",
  "pricing_model": "per-project"
}

Example Response

{
  "status": "success",
  "profile": {
    "company_name": "Acme Roofing",
    "industry": "Home Services",
    "value_proposition": "Fast roof replacement with premium materials.",
    "services": "roof repair, roof replacement, inspections",
    "target_market": "US homeowners",
    "tone": "professional and consultative",
    "proof_points": "500+ projects completed",
    "pricing_model": "per-project"
  }
}
GET /v1/profile

Retrieve the active business profile for your API key context.

Example Response

{
  "status": "success",
  "profile": {
    "company_name": "Acme Roofing",
    "industry": "Home Services",
    "value_proposition": "Fast roof replacement with premium materials.",
    "services": "roof repair, roof replacement, inspections",
    "target_market": "US homeowners",
    "tone": "professional and consultative",
    "proof_points": "500+ projects completed",
    "pricing_model": "per-project"
  }
}
Business context is limited to 2000 characters to support deeper personalization with consistent quality.

Sales Coach

The Sales Coach is an AI-powered sales advisor that analyzes your contact's behavioral profile and CRM activity to provide real-time, personalized sales guidance. Activate a coach session on any contact, then chat to get specific scripts, messages, and strategies tailored to that person's psychology.

Pricing: Sales Coach uses usage-based pricing. Contact us for rates.
POST /v1/coach/activate

Activate a new coach session for a CRM contact. If an active session already exists for that contact, the existing session is returned.

Example Request

{
  "contact_id": "ghl_contact_abc123",
  "contact_name": "John Smith",
  "contact_profile": {
    "Executive_Summary": "Analytical, cautious buyer..."
  },
  "crm_context": {
    "deal_stage": "Proposal Sent",
    "deal_value": "$5,000",
    "last_activity": "Downloaded pricing PDF",
    "recent_messages": [
      {"type":"email","direction":"outbound","date":"2026-02-10","summary":"Sent proposal with 3 options"},
      {"type":"sms","direction":"inbound","date":"2026-02-11","summary":"Thanks, will review this week"}
    ],
    "notes": "Prefers morning calls. Budget approved by manager.",
    "tags": ["hot-lead", "enterprise"]
  }
}

Example Response

{
  "status": "success",
  "session_id": 42,
  "contact_id": "ghl_contact_abc123",
  "contact_name": "John Smith",
  "initial_analysis": "Here's what I see with John..."
}
POST /v1/coach/link

Generate a secure contact-specific coach launch link for CRM custom fields.

Example Request

{
  "contact_id": "ghl_contact_abc123",
  "contact_name": "John Smith",
  "crm_context": {
    "deal_stage": "Proposal Sent",
    "notes": "Budget approved"
  },
  "auto_tag": "sales_coach"
}

Example Response

{
  "status": "success",
  "coach_link": "https://api.mind-scan.com/coach/open?t=...",
  "expires_at": "2026-02-20T10:30:00+00:00"
}
POST /v1/coach/message

Send a message to an active coach session and receive practical next-step guidance.

Example Request

{
  "session_id": 42,
  "message": "Can you draft an SMS to follow up on the proposal?"
}

Example Response

{
  "status": "success",
  "session_id": 42,
  "response": "Here's an SMS for John that plays to his analytical nature...",
  "messages_used": 5,
  "messages_remaining": 95
}
GET /v1/coach/sessions

List active coach sessions for your account.

Example Response

{
  "status": "success",
  "sessions": [
    {
      "session_id": 42,
      "contact_id": "ghl_contact_abc123",
      "contact_name": "John Smith",
      "status": "active",
      "message_count": 5,
      "created_at": "2026-02-13T10:30:00Z"
    }
  ]
}
GET /v1/coach/session/{id}

Get full conversation history for a specific coach session.

Example Response

{
  "status": "success",
  "session_id": 42,
  "contact_name": "John Smith",
  "session_status": "active",
  "messages": [
    {"role":"assistant","content":"Here's what I see with John...","created_at":"2026-02-13T10:30:02Z"},
    {"role":"user","content":"Can you draft an SMS?","created_at":"2026-02-13T10:31:10Z"},
    {"role":"assistant","content":"Here's an SMS for John...","created_at":"2026-02-13T10:31:12Z"}
  ],
  "messages_used": 3,
  "messages_remaining": 97
}
POST /v1/coach/close/{id}

Close a coach session when the conversation is complete.

Example Response

{
  "status": "success",
  "session_id": 42,
  "final_message_count": 12
}
CRM Context Best Practices: Include current deal stage, recent message summaries (last 10-15 touchpoints), key notes, and relevant tags. More context leads to stronger coaching quality. Keep recent messages as concise summaries rather than full transcripts.

Error Codes

CodeMeaningAction
200SuccessReport generated — parse the report object
400Bad RequestCheck your request body — missing or invalid fields
401UnauthorizedInvalid or missing API key in X-API-Key header
402Scan Limit ReachedPlan quota exhausted — contact us to upgrade
422Validation ErrorInvalid date format or field values
429Rate LimitedToo many requests — wait and retry
500Server ErrorRetry after a few seconds. If persistent, contact support

Report Fields

Every scan returns exactly 18 fields. All fields are strings ready to map directly into your CRM, database, or app.

FieldDescription
Executive_SummaryHigh-level behavioral profile of the lead
Buying_StyleHow they make purchase decisions
Psychological_DriversCore motivations and triggers
Decision_ProcessStep-by-step decision-making pattern
Communication_ToneHow to talk to them (tone, pace, style)
Cheat_Sheet_DOWhat TO do when selling to this person
Cheat_Sheet_DONTWhat NOT to do — common mistakes to avoid
Objection_HandlingPre-built responses to their likely objections
Messaging_HooksHigh-converting messaging angles
Follow_Up_CadenceOptimal follow-up timing and approach
Onboarding_StrategyHow to onboard them after the sale
Retention_LoyaltyLong-term retention strategy
Churn_RiskChurn risk level and prevention tactics
Next_Best_ActionThe single most impactful next step
Opening_ScriptReady-to-use opening message/script
Close_ScriptClosing script tailored to their psychology
Follow_Up_Message_SMSSMS follow-up template
Follow_Up_Message_EmailEmail follow-up template

Rate Limits & Best Practices

Rate Limits: Enterprise accounts support high-throughput usage. For best results, keep concurrent requests under 50 and implement exponential backoff on 429/500 errors.

Each scan takes approximately 3-8 seconds under normal load. For bulk processing, we recommend queuing scans and processing them with a concurrency of 10-20 requests.

The minimum required data is first_name, last_name, and date_of_birth. Adding city, state, and country improves the quality and localization of insights.

MindScan Intelligence API v2.0 — Behavioral Sales Intelligence
Questions? Contact your account manager or email support.