# PUT /integrations/:integration_id/xero-organisation

**Resource:** [Integrations](./integrations.md)  
**MCP tool:** `update_xero_organisation`  
**Scopes:** `integrations:write`  
**Write operation:** yes

Set up one connected Xero organisation: the bank account its card payments are recorded into (card_payments_account_id), the account code its invoice lines post to (sales_account_code), and whether it is the workspace default for new invoices (make_default). A workspace can connect several Xero organisations (a group of companies), and each has its own bank accounts and chart of accounts, so these are set per organisation. Find the organisation ids with list_integrations (platform_type xero) and its bank accounts with query_integration (query xero_accounts, type BANK). With one Xero connected, the older workspace-wide settings in update_crm_settings still work.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `integration_id` | path | string | yes |  |
| `card_payments_account_id` | body | string | no | Bank account for card payments - the Xero bank account (its AccountID) that card payments taken in TrustPager on this organisation’s invoices are recorded into, as a payment against the invoice. Each Xero organisation has its own bank accounts, so set it per organisation. List the choices with query_integration (query xero_accounts, type BANK) on this organisation. null clears it. Checked live with Xero. |
| `sales_account_code` | body | string | no | Xero account - the account code (for example 200 for Sales) every invoice line posts to when the invoice goes into this Xero organisation. Each organisation has its own chart of accounts. null clears it. |
| `make_default` | body | boolean | no | Default Xero organisation - true makes this the organisation new invoices go into when nothing else names one (the invoice, its design). Needed only when the workspace has more than one Xero organisation connected. |
| `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/integrations/:integration_id/xero-organisation"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"card_payments_account_id":"...","sales_account_code":"...","make_default":"..."}'
```

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