# PATCH /companies/:company_id

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

Update a CRM company (customer/account). Pass only the fields you want to change. Set archived=true to archive (hide from active lists) or archived=false to restore. This edits a CRM account record — NOT the workspace org profile (use update_our_company for that).

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `company_id` | path | string | yes |  |
| `name` | body | string | no |  |
| `email` | body | string | no |  |
| `alternate_emails` | body | array | no | Other email addresses this record uses. Bookings, public forms and inbound email match on ANY of them, so a person or business with two addresses resolves to this one record instead of creating a duplicate. Stored lowercased; the main `email` is never duplicated in here. RECOGNITION ONLY - outbound email always goes to `email`. Replaces the whole list, so read the record and merge first. |
| `phone` | body | string | no | Mobile in E.164, e.g. +61412345678. |
| `landline` | body | string | no | Landline in E.164, e.g. +61299991234. Set null to clear. |
| `website` | body | string | no |  |
| `industry` | body | string | no |  |
| `account_type` | body | string | no | Account/organisation type (e.g. Client, Trustee-Liquidator). Get options from get_crm_settings.account_type_options. Set null to clear. |
| `is_customer` | body | boolean | no | Is this a customer/client. |
| `is_supplier` | body | boolean | no | Is this a supplier/vendor. |
| `tax_number` | body | string | no | Tax number (e.g. ABN). |
| `relationship_started_at` | body | string | no | When the real-world relationship began (YYYY-MM-DD or ISO 8601). Set null to clear. Cannot be in the future. |
| `address_line1` | body | string | no |  |
| `address_line2` | body | string | no |  |
| `city` | body | string | no |  |
| `state` | body | string | no |  |
| `postal_code` | body | string | no |  |
| `country` | body | string | no |  |
| `timezone` | body | string | no |  |
| `notes` | body | string | no |  |
| `metadata` | body | object | no | Custom field values keyed by field_id (get ids from get_crm_settings.custom_fields.account). Replaces the whole object — read with get_company and merge first. |
| `archived` | body | boolean | no | true = archive, false = restore. Archived companies stay searchable and API-accessible but drop out of active lists. |
| `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 PATCH   "https://api.trustpager.com/functions/v1/api/v1/companies/:company_id"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"name":"...","email":"...","phone":"..."}'
```

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