# Buying Intent Score API Reference

> Platform documentation snapshot. Access, charging and provider requirements remain operation-specific; examples do not execute requests.

### What it does

A composite, explainable intent score per company built from hiring activity, funding events, technology change, web footprint and growth signals. Weightings adapt to your ICP, and every score returns its component breakdown so reps understand why an account is hot. Discover mode returns high-intent accounts across the market.

### Use cases

- Prioritize a large account list so reps work the top 5 percent of intent first.
- Route accounts above a score threshold straight into a sequence or to a senior AE automatically.
- Give marketing an intent-qualified audience for ads instead of a flat firmographic list.
- Explain pipeline prioritization to leadership using the per-component score breakdown.

### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `mode` | enum | "score" (rank the domains you supply) or "discover" (Bytemine finds in-market companies for you). Inferred from the body when omitted |
| `domains` | string[] | Domains to score, e.g. ["acme.com", "globex.com"] (mode "score") |
| `domain` | string | Single domain shortcut (mode "score") |
| `days` | integer | Signal lookback window in days (1-90, default: 30) |
| `limit` | integer | Companies to score (1-25, default: 10) |
| `min_score` | integer | Only return companies at or above this intent score |
| `industry` | string | Restrict discovery to one industry (mode "discover") |
| `location` | string | Restrict discovery by job-posting location (mode "discover") |
| `icp.hiring_titles` | string[] | Buyer or adjacent roles whose hiring implies demand, e.g. ["RevOps", "Head of Growth"] |
| `icp.technologies` | string[] | Technologies that indicate a good fit, e.g. ["salesforce", "segment"] |
| `icp.competitor_technologies` | string[] | Competitor products whose presence marks a displacement target, e.g. ["zoominfo", "apollo"] |
| `include_leadership_changes` | boolean | Add the senior job-change signal to the composite. Slower. Default: false |

### Response Schema

_Complete documented fields for this section, with nested notation preserved. Endpoint-specific envelopes, availability and additional fields are described under each endpoint below._

| Field | Notes |
|-------|-------|
| found | |
| mode | |
| days | |
| scored | |
| weights | |
| icp | |
| companies[] -> domain, company_name, intent_score (0-100), tier (hot \| warm \| monitor \| cold) | |
| companies[] -> reason_codes[] (HIRING_SURGE, ROLE_FIT, FRESH_CAPITAL, STACK_FIT, DISPLACEMENT, NEW_DECISION_MAKER) | |
| companies[] -> components -> hiring_velocity, role_fit_hiring, funding_recency, technographic_fit, displacement_opportunity, leadership_change -> {score, weight, detail} | |
| companies[] -> signals -> open_roles, matching_roles[], funding{total_raised, round_count, last_round_type, last_round_date, last_round_amount, lead_investor} | |
| companies[] -> signals -> technologies_detected, technology_matches[], competitor_technologies_detected[], senior_job_changes | |
| trimmed | |
| credits_warning | |

**Illustrative Example Response (synthetic, not a complete endpoint schema):**

```json
{
  "data": {
    "found": "string",
    "mode": "string",
    "days": "string",
    "scored": 0,
    "weights": "string",
    "icp": "string",
    "companies[] -> domain, company_name, intent_score (0-100), tier (hot | warm | monitor | cold)": 0,
    "companies[] -> reason_codes[]": "string",
    "companies[] -> components -> hiring_velocity, role_fit_hiring, funding_recency, technographic_fit, displacement_opportunity, leadership_change -> {score, weight, detail}": 0,
    "companies[] -> signals -> open_roles, matching_roles[], funding{total_raised, round_count, last_round_type, last_round_date, last_round_amount, lead_investor}": 0,
    "companies[] -> signals -> technologies_detected, technology_matches[], competitor_technologies_detected[], senior_job_changes": "string",
    "trimmed": "string",
    "credits_warning": "string"
  }
}
```

### POST /v1/intent/score — Score Accounts for Buying Intent

Bytemine's flagship composite. Fuses hiring velocity, role-fit hiring, funding recency, technographic fit, competitor displacement and (optionally) senior leadership changes into a single explainable 0-100 intent score per account, with reason codes your reps can quote verbatim in the first line of an email.

Every component is returned with its own sub-score, weight and plain-English detail, so the number is auditable rather than a black box. Components you do not configure are excluded from the weighting instead of dragging the score down. Costs 1 credit per company scored.

**Example Request Body:**

```json
{
  "mode": "score",
  "domains": [
    "notion.so",
    "figma.com",
    "ramp.com"
  ],
  "days": 30,
  "icp": {
    "hiring_titles": [
      "RevOps",
      "Sales Development",
      "Head of Growth"
    ],
    "technologies": [
      "salesforce",
      "segment"
    ],
    "competitor_technologies": [
      "zoominfo",
      "apollo"
    ]
  },
  "include_leadership_changes": false
}
```

**cURL Example:**

```bash
curl -X POST 'https://bvjmtgaxijpyasjtaqiv.supabase.co/functions/v1/api-gateway' \
  -H 'Content-Type: application/json' \
  -H 'x-amz-security-token: YOUR-API-KEY' \
  -d '{
  "path": "/v1/intent/score",
  "method": "POST",
  "body": {
    "mode": "score",
    "domains": [
      "notion.so",
      "figma.com",
      "ramp.com"
    ],
    "days": 30,
    "icp": {
      "hiring_titles": [
        "RevOps",
        "Sales Development",
        "Head of Growth"
      ],
      "technologies": [
        "salesforce",
        "segment"
      ],
      "competitor_technologies": [
        "zoominfo",
        "apollo"
      ]
    },
    "include_leadership_changes": false
  }
}'
```

### POST /v1/intent/score — Discover In-Market Accounts

Let Bytemine build the account list: companies with live hiring activity are surfaced, scored against your ICP, and returned ranked by intent. Costs 1 credit per company scored.

**Example Request Body:**

```json
{
  "mode": "discover",
  "days": 30,
  "limit": 25,
  "min_score": 50,
  "industry": "Computer Software",
  "icp": {
    "hiring_titles": [
      "RevOps",
      "Demand Generation"
    ],
    "competitor_technologies": [
      "zoominfo"
    ]
  }
}
```

**cURL Example:**

```bash
curl -X POST 'https://bvjmtgaxijpyasjtaqiv.supabase.co/functions/v1/api-gateway' \
  -H 'Content-Type: application/json' \
  -H 'x-amz-security-token: YOUR-API-KEY' \
  -d '{
  "path": "/v1/intent/score",
  "method": "POST",
  "body": {
    "mode": "discover",
    "days": 30,
    "limit": 25,
    "min_score": 50,
    "industry": "Computer Software",
    "icp": {
      "hiring_titles": [
        "RevOps",
        "Demand Generation"
      ],
      "competitor_technologies": [
        "zoominfo"
      ]
    }
  }
}'
```

