> 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.

# BatchCreateBeaconInstitutions

POST https://api.getedulead.com/v4/beacons/{beacon_id}/institutions/batch_create
Content-Type: application/json

BatchCreateBeaconInstitutions adds institutions to a beacon by NCES id or Edulead id. An
 all-digit NCES id that lost its leading zeros still matches when only one id fits. Ids that
 match no institution come back in unmatched_ids and are not added; one already in the
 beacon is kept as it is.

Reference: https://docs.getedulead.com/api-reference/beacons/batch-create-institutions

## 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

### Path parameters

- `beacon_id` (string, required) — The beacon.

### Body (application/json)

This endpoint expects an object.

- `ids` (list of string, optional) — Identifiers of the resources the call names. A batch read leaves missing ones out of items; a batch write says in its description what it does with them.

## Response

### 200

Success

- `items` (list of edulead.v4.BeaconInstitution, optional) — The page of results, in the requested order.
- `unmatched_ids` (list of string, optional) — The ids, as given, that match no institution.

## Types

### edulead.v4.BeaconInstitution

BeaconInstitution is one institution of a beacon, with its catalogue fields as they are now. id is the Edulead institution id; create_time is when it was added to the beacon.

- `id` (string, optional) — Identifier of the resource, assigned by Edulead and opaque to callers.
- `beacon_id` (string, optional)
- `nces_id` (string, optional) — The NCES id (a district, school or private-school id); empty for an institution without one.
- `name` (string, optional)
- `type` (enum, optional) — InstitutionType is what kind of institution it is.
  - Allowed values: `INSTITUTION_TYPE_UNSPECIFIED`, `INSTITUTION_TYPE_DISTRICT`, `INSTITUTION_TYPE_SCHOOL`, `INSTITUTION_TYPE_AGENCY`, `INSTITUTION_TYPE_UNION`, `INSTITUTION_TYPE_PARENT_ORG`, `INSTITUTION_TYPE_SELPA`
- `state` (string, optional) — The two-letter state code.
- `creator_id` (string, optional) — The user or API key that added it.
- `create_time` (datetime, optional) — When Edulead created the resource.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "items": [
    {
      "id": "string",
      "beacon_id": "string",
      "nces_id": "string",
      "name": "string",
      "type": "INSTITUTION_TYPE_UNSPECIFIED",
      "state": "string",
      "creator_id": "string",
      "create_time": "2023-01-15T01:30:15.01Z"
    }
  ],
  "unmatched_ids": [
    "string"
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.getedulead.com/v4/beacons/beacon_id/institutions/batch_create"

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/beacons/beacon_id/institutions/batch_create';
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/beacons/beacon_id/institutions/batch_create"

	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/beacons/beacon_id/institutions/batch_create")

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/beacons/beacon_id/institutions/batch_create")
  .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/beacons/beacon_id/institutions/batch_create', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.getedulead.com/v4/beacons/beacon_id/institutions/batch_create");
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/beacons/beacon_id/institutions/batch_create")! 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()
```