> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getedulead.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getedulead.com/_mcp/server.

# CreateMatch

POST https://api.getedulead.com/v4/matches
Content-Type: application/json

CreateMatch starts a match of the team's HubSpot companies with the given strategy and
 properties. It returns at once, FETCHING; GetMatch follows its progress. The same
 request_id returns the match it started.

Reference: https://docs.getedulead.com/api-reference/matches/create

## Authentication

- `Authorization` header (bearer token, required) — A team API key, sent as `Authorization: Bearer <key>`.
- `Authorization` header (bearer token, required) — The Cognito access token of a signed-in Edulead user (`edulead auth login`), sent as `Authorization: Bearer <token>`.

## Request

### Query parameters

- `request_id` (string, optional) — Caller-chosen idempotency key. The same key from the same caller within 24 hours returns the original result instead of acting again.

### Body (application/json)

This endpoint expects an edulead.v4.Match.

- `id` (string, optional) — Identifier of the resource, assigned by Edulead and opaque to callers.
- `state` (enum, optional) — enum.defined_only = true
  - Allowed values: `MATCH_STATE_UNSPECIFIED`, `MATCH_STATE_CREATED`, `MATCH_STATE_FETCHING`, `MATCH_STATE_MATCHING`, `MATCH_STATE_READY`, `MATCH_STATE_FAILED`
- `strategy` (enum, optional) — Required on create. enum.defined_only = true
  - Allowed values: `MATCH_STRATEGY_UNSPECIFIED`, `MATCH_STRATEGY_NCES_ID`, `MATCH_STRATEGY_NAME_ADDRESS`
- `hubspot_name_property` (string, optional) — The HubSpot company property holding the company's name; required for NAME_ADDRESS.
- `hubspot_address_property` (string, optional) — The HubSpot company property holding the company's address.
- `hubspot_state_property` (string, optional) — The HubSpot company property holding the company's state; required for NAME_ADDRESS.
- `hubspot_nces_id_property` (string, optional) — The HubSpot company property holding the company's NCES id; required for NCES_ID.
- `creator_id` (string, optional) — The user or API key that created it.
- `companies_fetched` (integer, optional, nullable) — Companies read from HubSpot so far; unset until the first page is read.
- `companies_total` (integer, optional, nullable) — Companies the match covers; set when reading ends.
- `companies_matched` (integer, optional, nullable) — Companies matched to an institution; set when READY.
- `matched_by_nces` (integer, optional, nullable) — Companies matched by NCES id (either NCES tier); set when READY.
- `matched_by_name` (integer, optional, nullable) — Companies matched by name; set when READY.
- `institutions_distinct` (integer, optional, nullable) — Distinct institutions matched; set when READY (stats.distinct_institutions is live).
- `failure_message` (string, optional) — Why the match FAILED.
- `hubspot_portal_id` (string, optional) — The team's connected HubSpot account, to link a row's company; GetMatch only, empty when the team has none.
- `stats` (edulead.v4.MatchStats, optional) — Counts over the rows; GetMatch only.
- `create_time` (datetime, optional) — When Edulead created the resource.
- `complete_time` (datetime, optional) — When the match became READY or FAILED.
- `update_time` (datetime, optional) — When any field last changed.

## Response

### 200

Success

- `match` (edulead.v4.Match, optional) — Match is one matching of the team's HubSpot companies to Edulead institutions. On create, strategy and the hubspot_*_property fields are read; the service sets the others.

## Types

### edulead.v4.MatchStats

MatchStats counts a match's rows.

- `total` (integer, optional)
- `matched` (integer, optional)
- `unmatched` (integer, optional) — total - matched.
- `included` (integer, optional) — Matched rows included in an export.
- `distinct_institutions` (integer, optional) — Distinct institutions of the matched, included rows: what an export would hold.
- `by_tier` (list of edulead.v4.MatchTierCount, optional) — Matched rows per tier, in tier order.
- `by_failure_reason` (list of edulead.v4.MatchFailureReasonCount, optional) — Unmatched rows per reason, in reason order; UNSPECIFIED counts rows without a reason.

### edulead.v4.Match

Match is one matching of the team's HubSpot companies to Edulead institutions. On create, strategy and the hubspot_*_property fields are read; the service sets the others.

- `id` (string, optional) — Identifier of the resource, assigned by Edulead and opaque to callers.
- `state` (enum, optional) — enum.defined_only = true
  - Allowed values: `MATCH_STATE_UNSPECIFIED`, `MATCH_STATE_CREATED`, `MATCH_STATE_FETCHING`, `MATCH_STATE_MATCHING`, `MATCH_STATE_READY`, `MATCH_STATE_FAILED`
- `strategy` (enum, optional) — Required on create. enum.defined_only = true
  - Allowed values: `MATCH_STRATEGY_UNSPECIFIED`, `MATCH_STRATEGY_NCES_ID`, `MATCH_STRATEGY_NAME_ADDRESS`
- `hubspot_name_property` (string, optional) — The HubSpot company property holding the company's name; required for NAME_ADDRESS.
- `hubspot_address_property` (string, optional) — The HubSpot company property holding the company's address.
- `hubspot_state_property` (string, optional) — The HubSpot company property holding the company's state; required for NAME_ADDRESS.
- `hubspot_nces_id_property` (string, optional) — The HubSpot company property holding the company's NCES id; required for NCES_ID.
- `creator_id` (string, optional) — The user or API key that created it.
- `companies_fetched` (integer, optional, nullable) — Companies read from HubSpot so far; unset until the first page is read.
- `companies_total` (integer, optional, nullable) — Companies the match covers; set when reading ends.
- `companies_matched` (integer, optional, nullable) — Companies matched to an institution; set when READY.
- `matched_by_nces` (integer, optional, nullable) — Companies matched by NCES id (either NCES tier); set when READY.
- `matched_by_name` (integer, optional, nullable) — Companies matched by name; set when READY.
- `institutions_distinct` (integer, optional, nullable) — Distinct institutions matched; set when READY (stats.distinct_institutions is live).
- `failure_message` (string, optional) — Why the match FAILED.
- `hubspot_portal_id` (string, optional) — The team's connected HubSpot account, to link a row's company; GetMatch only, empty when the team has none.
- `stats` (edulead.v4.MatchStats, optional) — Counts over the rows; GetMatch only.
- `create_time` (datetime, optional) — When Edulead created the resource.
- `complete_time` (datetime, optional) — When the match became READY or FAILED.
- `update_time` (datetime, optional) — When any field last changed.

### edulead.v4.MatchTierCount

MatchTierCount is how many matched rows one tier matched.

- `tier` (enum, optional) — MatchTier is how a matched company was matched.
  - Allowed values: `MATCH_TIER_UNSPECIFIED`, `MATCH_TIER_NCES_ID`, `MATCH_TIER_NCES_ALT`, `MATCH_TIER_NAME_ADDRESS`
- `count` (integer, optional)

### edulead.v4.MatchFailureReasonCount

MatchFailureReasonCount is how many unmatched rows failed for one reason.

- `reason` (enum, optional) — MatchFailureReason is why a company matched no institution.
  - Allowed values: `MATCH_FAILURE_REASON_UNSPECIFIED`, `MATCH_FAILURE_REASON_NO_CANDIDATE`, `MATCH_FAILURE_REASON_BELOW_THRESHOLD`, `MATCH_FAILURE_REASON_MULTIPLE`, `MATCH_FAILURE_REASON_NO_NAME`, `MATCH_FAILURE_REASON_NO_STATE`
- `count` (integer, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "match": {
    "id": "string",
    "state": "MATCH_STATE_UNSPECIFIED",
    "strategy": "MATCH_STRATEGY_UNSPECIFIED",
    "hubspot_name_property": "string",
    "hubspot_address_property": "string",
    "hubspot_state_property": "string",
    "hubspot_nces_id_property": "string",
    "creator_id": "string",
    "companies_fetched": 1,
    "companies_total": 1,
    "companies_matched": 1,
    "matched_by_nces": 1,
    "matched_by_name": 1,
    "institutions_distinct": 1,
    "failure_message": "string",
    "hubspot_portal_id": "string",
    "stats": {
      "total": 1,
      "matched": 1,
      "unmatched": 1,
      "included": 1,
      "distinct_institutions": 1,
      "by_tier": [
        {
          "tier": "MATCH_TIER_UNSPECIFIED",
          "count": 1
        }
      ],
      "by_failure_reason": [
        {
          "reason": "MATCH_FAILURE_REASON_UNSPECIFIED",
          "count": 1
        }
      ]
    },
    "create_time": "2023-01-15T01:30:15.01Z",
    "complete_time": "2023-01-15T01:30:15.01Z",
    "update_time": "2023-01-15T01:30:15.01Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.getedulead.com/v4/matches"

payload = {}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.getedulead.com/v4/matches';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getedulead.com/v4/matches"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.getedulead.com/v4/matches")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getedulead.com/v4/matches")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getedulead.com/v4/matches', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.getedulead.com/v4/matches");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getedulead.com/v4/matches")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```