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

# UpdateIntegration

PATCH https://api.getedulead.com/v4/integrations/{id}
Content-Type: application/json

UpdateIntegration changes the fields update_mask names: app_installed (Salesforce only),
 contact_field_mappings, institution_field_mappings. A mapping list replaces the stored one;
 editing mappings needs the CRM connected and the crm-field-mappings:edit permission,
 app_installed the crm-connection:manage permission.

Reference: https://docs.getedulead.com/api-reference/integrations/update

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

- `id` (enum, required) — Identifier of the resource, assigned by Edulead and opaque to callers.
  - Allowed values: `hubspot`, `salesforce`

### Query parameters

- `update_mask` (string, optional) — Which fields of the resource to change. Fields not listed keep their values.

### Body (application/json)

This endpoint expects an edulead.v4.Integration.

- `id` (string, optional) — Identifier of the resource, assigned by Edulead and opaque to callers.
- `connected` (boolean, optional) — Whether the team has connected the CRM.
- `account_id` (string, optional) — The connected account: the HubSpot portal id, the Salesforce organization id.
- `instance_url` (string, optional) — The Salesforce organization's base URL; empty for HubSpot.
- `scopes` (list of string, optional) — The OAuth scopes the CRM granted.
- `connect_time` (datetime, optional) — When the CRM was connected.
- `app_installed` (boolean, optional) — Salesforce: whether the Edulead package is installed in the organization; always false for HubSpot.
- `contact_field_mappings` (list of edulead.v4.IntegrationFieldMapping, optional) — How Edulead's contact fields map to the CRM's contact fields. contact_field_mappings.unique // each edulead_field may be mapped once
- `institution_field_mappings` (list of edulead.v4.IntegrationFieldMapping, optional) — How Edulead's institution fields map to the CRM's company (HubSpot) or account (Salesforce) fields. institution_field_mappings.unique // each edulead_field may be mapped once
- `field_mappings_configured` (boolean, optional) — Whether every field an export to the CRM requires is mapped.
- `missing_required_fields` (list of edulead.v4.IntegrationField, optional) — The required fields that are not mapped yet, contacts first.
- `update_time` (datetime, optional) — When any field last changed.

## Response

### 200

Success

- `integration` (edulead.v4.Integration, optional) — Integration is one CRM and the team's connection to it; id is `hubspot` or `salesforce`. Only app_installed and the two mapping lists can change; the service sets the others.

## Types

### edulead.v4.IntegrationFieldMapping

IntegrationFieldMapping maps one Edulead field to a CRM field.

- `edulead_field` (string, optional) — The Edulead field, as the field list names it (`email`, `ncesIdDistrict`).
- `crm_field` (string, optional) — The CRM field's API name.

### edulead.v4.IntegrationField

IntegrationField is one Edulead field an export to the CRM requires.

- `object_type` (enum, optional) — enum.defined_only = true
  - Allowed values: `INTEGRATION_OBJECT_TYPE_UNSPECIFIED`, `INTEGRATION_OBJECT_TYPE_CONTACT`, `INTEGRATION_OBJECT_TYPE_INSTITUTION`
- `edulead_field` (string, optional)
- `label` (string, optional) — How the console labels it (`District NCES ID`).

### edulead.v4.Integration

Integration is one CRM and the team's connection to it; id is `hubspot` or `salesforce`. Only app_installed and the two mapping lists can change; the service sets the others.

- `id` (string, optional) — Identifier of the resource, assigned by Edulead and opaque to callers.
- `connected` (boolean, optional) — Whether the team has connected the CRM.
- `account_id` (string, optional) — The connected account: the HubSpot portal id, the Salesforce organization id.
- `instance_url` (string, optional) — The Salesforce organization's base URL; empty for HubSpot.
- `scopes` (list of string, optional) — The OAuth scopes the CRM granted.
- `connect_time` (datetime, optional) — When the CRM was connected.
- `app_installed` (boolean, optional) — Salesforce: whether the Edulead package is installed in the organization; always false for HubSpot.
- `contact_field_mappings` (list of edulead.v4.IntegrationFieldMapping, optional) — How Edulead's contact fields map to the CRM's contact fields. contact_field_mappings.unique // each edulead_field may be mapped once
- `institution_field_mappings` (list of edulead.v4.IntegrationFieldMapping, optional) — How Edulead's institution fields map to the CRM's company (HubSpot) or account (Salesforce) fields. institution_field_mappings.unique // each edulead_field may be mapped once
- `field_mappings_configured` (boolean, optional) — Whether every field an export to the CRM requires is mapped.
- `missing_required_fields` (list of edulead.v4.IntegrationField, optional) — The required fields that are not mapped yet, contacts first.
- `update_time` (datetime, optional) — When any field last changed.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "integration": {
    "id": "string",
    "connected": true,
    "account_id": "string",
    "instance_url": "string",
    "scopes": [
      "string"
    ],
    "connect_time": "2023-01-15T01:30:15.01Z",
    "app_installed": true,
    "contact_field_mappings": [
      {
        "edulead_field": "string",
        "crm_field": "string"
      }
    ],
    "institution_field_mappings": [
      {
        "edulead_field": "string",
        "crm_field": "string"
      }
    ],
    "field_mappings_configured": true,
    "missing_required_fields": [
      {
        "object_type": "INTEGRATION_OBJECT_TYPE_UNSPECIFIED",
        "edulead_field": "string",
        "label": "string"
      }
    ],
    "update_time": "2023-01-15T01:30:15.01Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.getedulead.com/v4/integrations/hubspot"

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

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

print(response.json())
```

```javascript
const url = 'https://api.getedulead.com/v4/integrations/hubspot';
const options = {
  method: 'PATCH',
  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/integrations/hubspot"

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

	req, _ := http.NewRequest("PATCH", 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/integrations/hubspot")

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

request = Net::HTTP::Patch.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.patch("https://api.getedulead.com/v4/integrations/hubspot")
  .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('PATCH', 'https://api.getedulead.com/v4/integrations/hubspot', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.getedulead.com/v4/integrations/hubspot");
var request = new RestRequest(Method.PATCH);
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/integrations/hubspot")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```