# PUT /companies/:company_id/accounting-contact

**Resource:** [Companies](./companies.md)  
**MCP tool:** `set_company_accounting_contact`  
**Scopes:** `companies:write`, `opportunities:write`  
**Write operation:** yes

Change which Xero contact a company is billed as (xero_contact_id), or unlink it (unlink: true). The contact must exist in the connected Xero (find it with query_integration, query "contacts"). The company's opportunities that carried the old contact move to the new one, so the next invoice and the invoice sync follow it. Existing invoices in Xero are not changed. With several Xero organisations connected, pass xero_integration_id: each organisation keeps its own contact for the company.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `company_id` | path | string | yes |  |
| `xero_integration_id` | body | string | no | Xero organisation - the id of the Xero organisation (connection) this applies to. Only needed when the workspace has more than one Xero organisation connected; each organisation has its own contact for the company. |
| `xero_contact_id` | body | string | no | The Xero ContactID to bill this company as (find one with query_integration, query "contacts", args { search }). Send this or unlink, not both. |
| `unlink` | body | boolean | no | true unlinks the company from its Xero contact, so the next invoice finds or creates the contact again. Send this or xero_contact_id, not both. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X PUT   "https://api.trustpager.com/functions/v1/api/v1/companies/:company_id/accounting-contact"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"xero_contact_id":"...","unlink":"...","require_approval":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`