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

# Correct a policy's broker contact

PUT https://api.tradeguardins.com/v1/subcontractors/{subcontractorId}/policies/{policyId}/broker-contact
Content-Type: application/json

Correct who placed this policy, for example "workers' comp is with Franklin Tyrer, not Jacob Eaton". From then on, verification calls and emails for this policy go to the corrected broker, and a new COI does not overwrite the correction. Use [Reset](https://docs.tradeguardins.com/api-reference/subcontractors/reset-policy-broker-contact) to go back to the COI.

Fields you leave out keep the value in use now; `null` or `""` clears one. The result needs an email or a phone number. Phone numbers are stored in E.164. Only TradeGuard staff can mark a policy as placed by TradeGuard: a request with `inHouse` returns 403. The broker contact is shared by every GC the subcontractor works for, like the policy itself; the change is recorded in the [policy history](https://docs.tradeguardins.com/api-reference/subcontractors/get-subcontractor-policy-history) and your audit log.

Requires scopes `subcontractors:read` and `subcontractors:write`.

Reference: https://docs.tradeguardins.com/api-reference/subcontractors/set-policy-broker-contact

## Authentication

- `Authorization` header (bearer token, required) — Session JWT or API key (`ak_...`)

## Request

### Path parameters

- `subcontractorId` (string, required)
- `policyId` (string, required) — A policy id from `policies[].id` on Get a subcontractor.

### Body (application/json)

This endpoint expects a BrokerContactInput.

- `personName` (string, optional, nullable)
- `agencyName` (string, optional, nullable)
- `email` (string, optional, nullable)
- `phone` (string, optional, nullable) — A real US number such as (816) 555-0142, or + and the country code.

## Response

### 200

The policy's broker contact after the change

- `data` (PolicyBrokerContact, optional)

## Errors

### 400 Bad Request Error

Request failed schema validation (`validation_failed`)

- `error` (string, required) — Human-readable message. Wording may change; do not parse it.
- `code` (enum, required) — Stable, machine-readable error code. Status-level codes: `bad_request` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405, with an `Allow` header), `conflict` (409), `gone` (410), `payload_too_large` (413), `unprocessable` (422), `rate_limited` (429), `internal_error` (500), `bad_gateway` (502), `service_unavailable` (503). Specific codes: `validation_failed` and `invalid_identifier` (400); `reextraction_limit_reached` and `llm_budget_exhausted` (429, document re-extraction only); `sandbox_unavailable` (503, a sandbox key used where the sandbox is not provisioned); `assignment_exists` (409, a live assignment for this subcontractor and project already exists — its id is in `details`), `project_not_ready` (409, the project's setup is not Ready), `project_document` (409, a baseline-only action on a project certificate) and `subcontractor_match` (409, a new subcontractor's email or phone matches one already on TradeGuard — its id is in `details`); `portal_link_expired` and `portal_link_used` (410, sub portal links only).
  - Allowed values: `bad_request`, `unauthenticated`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `gone`, `payload_too_large`, `unprocessable`, `rate_limited`, `internal_error`, `bad_gateway`, `service_unavailable`, `validation_failed`, `invalid_identifier`, `reextraction_limit_reached`, `llm_budget_exhausted`, `sandbox_unavailable`, `assignment_exists`, `project_not_ready`, `project_document`, `subcontractor_match`, `portal_link_expired`, `portal_link_used`
- `requestId` (string, optional) — Same value as the `x-request-id` response header.
- `details` (list of ErrorDetailsItems, optional) — Present when `code` is `validation_failed`.

### 401 Unauthorized Error

Missing, malformed, expired or revoked credential (`unauthenticated`)

- `error` (string, required) — Human-readable message. Wording may change; do not parse it.
- `code` (enum, required) — Stable, machine-readable error code. Status-level codes: `bad_request` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405, with an `Allow` header), `conflict` (409), `gone` (410), `payload_too_large` (413), `unprocessable` (422), `rate_limited` (429), `internal_error` (500), `bad_gateway` (502), `service_unavailable` (503). Specific codes: `validation_failed` and `invalid_identifier` (400); `reextraction_limit_reached` and `llm_budget_exhausted` (429, document re-extraction only); `sandbox_unavailable` (503, a sandbox key used where the sandbox is not provisioned); `assignment_exists` (409, a live assignment for this subcontractor and project already exists — its id is in `details`), `project_not_ready` (409, the project's setup is not Ready), `project_document` (409, a baseline-only action on a project certificate) and `subcontractor_match` (409, a new subcontractor's email or phone matches one already on TradeGuard — its id is in `details`); `portal_link_expired` and `portal_link_used` (410, sub portal links only).
  - Allowed values: `bad_request`, `unauthenticated`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `gone`, `payload_too_large`, `unprocessable`, `rate_limited`, `internal_error`, `bad_gateway`, `service_unavailable`, `validation_failed`, `invalid_identifier`, `reextraction_limit_reached`, `llm_budget_exhausted`, `sandbox_unavailable`, `assignment_exists`, `project_not_ready`, `project_document`, `subcontractor_match`, `portal_link_expired`, `portal_link_used`
- `requestId` (string, optional) — Same value as the `x-request-id` response header.
- `details` (list of ErrorDetailsItems, optional) — Present when `code` is `validation_failed`.

### 403 Forbidden Error

The credential lacks the scope or role for this action (`forbidden`)

- `error` (string, required) — Human-readable message. Wording may change; do not parse it.
- `code` (enum, required) — Stable, machine-readable error code. Status-level codes: `bad_request` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405, with an `Allow` header), `conflict` (409), `gone` (410), `payload_too_large` (413), `unprocessable` (422), `rate_limited` (429), `internal_error` (500), `bad_gateway` (502), `service_unavailable` (503). Specific codes: `validation_failed` and `invalid_identifier` (400); `reextraction_limit_reached` and `llm_budget_exhausted` (429, document re-extraction only); `sandbox_unavailable` (503, a sandbox key used where the sandbox is not provisioned); `assignment_exists` (409, a live assignment for this subcontractor and project already exists — its id is in `details`), `project_not_ready` (409, the project's setup is not Ready), `project_document` (409, a baseline-only action on a project certificate) and `subcontractor_match` (409, a new subcontractor's email or phone matches one already on TradeGuard — its id is in `details`); `portal_link_expired` and `portal_link_used` (410, sub portal links only).
  - Allowed values: `bad_request`, `unauthenticated`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `gone`, `payload_too_large`, `unprocessable`, `rate_limited`, `internal_error`, `bad_gateway`, `service_unavailable`, `validation_failed`, `invalid_identifier`, `reextraction_limit_reached`, `llm_budget_exhausted`, `sandbox_unavailable`, `assignment_exists`, `project_not_ready`, `project_document`, `subcontractor_match`, `portal_link_expired`, `portal_link_used`
- `requestId` (string, optional) — Same value as the `x-request-id` response header.
- `details` (list of ErrorDetailsItems, optional) — Present when `code` is `validation_failed`.

### 404 Not Found Error

Resource not found, or not visible to the caller's organization (`not_found`)

- `error` (string, required) — Human-readable message. Wording may change; do not parse it.
- `code` (enum, required) — Stable, machine-readable error code. Status-level codes: `bad_request` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405, with an `Allow` header), `conflict` (409), `gone` (410), `payload_too_large` (413), `unprocessable` (422), `rate_limited` (429), `internal_error` (500), `bad_gateway` (502), `service_unavailable` (503). Specific codes: `validation_failed` and `invalid_identifier` (400); `reextraction_limit_reached` and `llm_budget_exhausted` (429, document re-extraction only); `sandbox_unavailable` (503, a sandbox key used where the sandbox is not provisioned); `assignment_exists` (409, a live assignment for this subcontractor and project already exists — its id is in `details`), `project_not_ready` (409, the project's setup is not Ready), `project_document` (409, a baseline-only action on a project certificate) and `subcontractor_match` (409, a new subcontractor's email or phone matches one already on TradeGuard — its id is in `details`); `portal_link_expired` and `portal_link_used` (410, sub portal links only).
  - Allowed values: `bad_request`, `unauthenticated`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `gone`, `payload_too_large`, `unprocessable`, `rate_limited`, `internal_error`, `bad_gateway`, `service_unavailable`, `validation_failed`, `invalid_identifier`, `reextraction_limit_reached`, `llm_budget_exhausted`, `sandbox_unavailable`, `assignment_exists`, `project_not_ready`, `project_document`, `subcontractor_match`, `portal_link_expired`, `portal_link_used`
- `requestId` (string, optional) — Same value as the `x-request-id` response header.
- `details` (list of ErrorDetailsItems, optional) — Present when `code` is `validation_failed`.

### 429 Too Many Requests Error

Rate limit exceeded (`rate_limited`); retry after `Retry-After` seconds

- `error` (string, required) — Human-readable message. Wording may change; do not parse it.
- `code` (enum, required) — Stable, machine-readable error code. Status-level codes: `bad_request` (400), `unauthenticated` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405, with an `Allow` header), `conflict` (409), `gone` (410), `payload_too_large` (413), `unprocessable` (422), `rate_limited` (429), `internal_error` (500), `bad_gateway` (502), `service_unavailable` (503). Specific codes: `validation_failed` and `invalid_identifier` (400); `reextraction_limit_reached` and `llm_budget_exhausted` (429, document re-extraction only); `sandbox_unavailable` (503, a sandbox key used where the sandbox is not provisioned); `assignment_exists` (409, a live assignment for this subcontractor and project already exists — its id is in `details`), `project_not_ready` (409, the project's setup is not Ready), `project_document` (409, a baseline-only action on a project certificate) and `subcontractor_match` (409, a new subcontractor's email or phone matches one already on TradeGuard — its id is in `details`); `portal_link_expired` and `portal_link_used` (410, sub portal links only).
  - Allowed values: `bad_request`, `unauthenticated`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `gone`, `payload_too_large`, `unprocessable`, `rate_limited`, `internal_error`, `bad_gateway`, `service_unavailable`, `validation_failed`, `invalid_identifier`, `reextraction_limit_reached`, `llm_budget_exhausted`, `sandbox_unavailable`, `assignment_exists`, `project_not_ready`, `project_document`, `subcontractor_match`, `portal_link_expired`, `portal_link_used`
- `requestId` (string, optional) — Same value as the `x-request-id` response header.
- `details` (list of ErrorDetailsItems, optional) — Present when `code` is `validation_failed`.

## Types

### PolicyBrokerContact

- `policyId` (string, optional)
- `policyNumber` (string, optional, nullable)
- `carrierName` (string, optional, nullable)
- `policyTypes` (list of string, optional) — The coverage types on this policy, e.g. general_liability and automobile_liability on one number.
- `status` (string, optional)
- `expirationDate` (datetime, optional, nullable)
- `brokerContact` (BrokerContact, optional, nullable) — The contact in use. Null when the COI printed no producer and nobody added one.
- `printedOnCoi` (BrokerContactFields, optional, nullable) — What the newest COI printed in its producer box.
- `brokerGroupKey` (string, optional, nullable) — Policies with the same key share a broker (same mailbox or phone).

### ErrorDetailsItems

- `path` (string, optional)
- `message` (string, optional)

### BrokerContact

- `personName` (string, optional, nullable) — The agent or account manager, when known.
- `agencyName` (string, optional, nullable)
- `email` (string, optional, nullable)
- `phone` (string, optional, nullable) — E.164 when entered by hand; as printed on the COI otherwise.
- `id` (string, optional, nullable) — The stored contact, or null when it is only printed on the COI.
- `inHouse` (boolean, optional) — TradeGuard staff confirmed TradeGuard placed this policy. It is never called or emailed for verification.
- `inHouseSuspected` (boolean, optional) — The broker looks like TradeGuard (its email or agency name), but staff haven't confirmed it. The policy is verified as usual until they do.
- `source` (enum, optional) — `coi` = what the certificate printed. Anything else = corrected by hand: `gc` in the web app, `api` by API key, `sub` in the sub portal, `ops` by TradeGuard staff.
  - Allowed values: `coi`, `gc`, `sub`, `ops`, `api`
- `editedAt` (datetime, optional, nullable)
- `carriedFromPolicyId` (string, optional, nullable) — Set when this correction was carried over from the previous term's policy. A correction carries to the renewal while the renewal COI still prints the same broker; a renewal COI naming a different broker makes that the broker.

### BrokerContactFields

- `personName` (string, optional, nullable) — The agent or account manager, when known.
- `agencyName` (string, optional, nullable)
- `email` (string, optional, nullable)
- `phone` (string, optional, nullable) — E.164 when entered by hand; as printed on the COI otherwise.

## Examples

**Request**

```json
{
  "personName": "Franklin Tyrer",
  "agencyName": "American Family Insurance - Franklin A Tyrer Agency",
  "email": "ftyrer@amfam.com",
  "phone": "(816) 555-0142"
}
```

**Response**

```json
{
  "data": {
    "policyId": "string",
    "policyNumber": "string",
    "carrierName": "string",
    "policyTypes": [
      "string"
    ],
    "status": "string",
    "expirationDate": "2024-01-15T09:30:00Z",
    "brokerContact": {
      "personName": "string",
      "agencyName": "string",
      "email": "string",
      "phone": "string",
      "id": "string",
      "inHouse": true,
      "inHouseSuspected": true,
      "source": "coi",
      "editedAt": "2024-01-15T09:30:00Z",
      "carriedFromPolicyId": "string"
    },
    "printedOnCoi": {
      "personName": "string",
      "agencyName": "string",
      "email": "string",
      "phone": "string"
    },
    "brokerGroupKey": "string"
  }
}
```

**SDK Code**

```python Subcontractors_setPolicyBrokerContact_example
import requests

url = "https://api.tradeguardins.com/v1/subcontractors/subcontractorId/policies/policyId/broker-contact"

payload = {
    "personName": "Franklin Tyrer",
    "agencyName": "American Family Insurance - Franklin A Tyrer Agency",
    "email": "ftyrer@amfam.com",
    "phone": "(816) 555-0142"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Subcontractors_setPolicyBrokerContact_example
const url = 'https://api.tradeguardins.com/v1/subcontractors/subcontractorId/policies/policyId/broker-contact';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"personName":"Franklin Tyrer","agencyName":"American Family Insurance - Franklin A Tyrer Agency","email":"ftyrer@amfam.com","phone":"(816) 555-0142"}'
};

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

```go Subcontractors_setPolicyBrokerContact_example
package main

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

func main() {

	url := "https://api.tradeguardins.com/v1/subcontractors/subcontractorId/policies/policyId/broker-contact"

	payload := strings.NewReader("{\n  \"personName\": \"Franklin Tyrer\",\n  \"agencyName\": \"American Family Insurance - Franklin A Tyrer Agency\",\n  \"email\": \"ftyrer@amfam.com\",\n  \"phone\": \"(816) 555-0142\"\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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 Subcontractors_setPolicyBrokerContact_example
require 'uri'
require 'net/http'

url = URI("https://api.tradeguardins.com/v1/subcontractors/subcontractorId/policies/policyId/broker-contact")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"personName\": \"Franklin Tyrer\",\n  \"agencyName\": \"American Family Insurance - Franklin A Tyrer Agency\",\n  \"email\": \"ftyrer@amfam.com\",\n  \"phone\": \"(816) 555-0142\"\n}"

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

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

HttpResponse<String> response = Unirest.put("https://api.tradeguardins.com/v1/subcontractors/subcontractorId/policies/policyId/broker-contact")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"personName\": \"Franklin Tyrer\",\n  \"agencyName\": \"American Family Insurance - Franklin A Tyrer Agency\",\n  \"email\": \"ftyrer@amfam.com\",\n  \"phone\": \"(816) 555-0142\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.tradeguardins.com/v1/subcontractors/subcontractorId/policies/policyId/broker-contact', [
  'body' => '{
  "personName": "Franklin Tyrer",
  "agencyName": "American Family Insurance - Franklin A Tyrer Agency",
  "email": "ftyrer@amfam.com",
  "phone": "(816) 555-0142"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Subcontractors_setPolicyBrokerContact_example
using RestSharp;

var client = new RestClient("https://api.tradeguardins.com/v1/subcontractors/subcontractorId/policies/policyId/broker-contact");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"personName\": \"Franklin Tyrer\",\n  \"agencyName\": \"American Family Insurance - Franklin A Tyrer Agency\",\n  \"email\": \"ftyrer@amfam.com\",\n  \"phone\": \"(816) 555-0142\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Subcontractors_setPolicyBrokerContact_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "personName": "Franklin Tyrer",
  "agencyName": "American Family Insurance - Franklin A Tyrer Agency",
  "email": "ftyrer@amfam.com",
  "phone": "(816) 555-0142"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.tradeguardins.com/v1/subcontractors/subcontractorId/policies/policyId/broker-contact")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```