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

# Update a company

PATCH https://api-dev.houseofapps.ai/v1/integrations/clients/companies/{client_id}
Content-Type: application/json

Updates the fields you send. Other fields stay as they are.

Reference: https://docs.houseofapps.ai/api-reference/overview/crm/companies/external-update-company-v-1-integrations-clients-companies-client-id-patch

## Request

### Path parameters

- `client_id` (string, required) — Client ID

### Headers

- `licenseKey` (string, required)
- `appSecret` (string, required)

### Body (application/json)

This endpoint expects an UpdateCompanyRequest.

- `status` (enum, optional, nullable) — Client status enumeration.
  - Allowed values: `active`, `inactive`, `prospect`, `deleted`
- `name` (string, optional, nullable)
- `industry` (string, optional, nullable)
- `profile_photo_url` (string, optional, nullable)
- `portal_access` (boolean, optional, nullable)
- `email` (string, optional, nullable)
- `phones` (PhonesUpdate, optional, nullable) — Batch phone operations: add, update, and/or remove (primary contact).
- `tags` (list of string, optional, nullable)
- `websites` (WebsitesUpdate, optional, nullable) — Batch website operations: add, update, and/or remove.
- `billing_preferences` (BillingPreferencesUpdate, optional, nullable) — Partial billing preferences; merged with existing.
- `social_pages` (SocialPagesUpdate, optional, nullable) — Batch social page operations: add, update, and/or remove.
- `addresses` (AddressesUpdate, optional, nullable) — Batch address operations: add, update, and/or remove.
- `target_market_segments` (list of string, optional, nullable)
- `current_tech_stack` (list of string, optional, nullable)
- `preferred_communication_channels` (list of string, optional, nullable)
- `industry_specific_terminologies` (list of string, optional, nullable)
- `description` (string, optional, nullable)
- `owner_id` (string, optional, nullable) — Owning user. Send null to clear. Omit to leave unchanged.
- `custom_fields` (list of map from string to any, optional, nullable)
- `additional_data` (map from string to any, optional, nullable)
- `sales_intelligence` (map from string to any, optional, nullable)
- `notes` (list of NoteItemInput, optional, nullable)
- `linked_pages` (LinkedPagesUpdate, optional, nullable) — Batch linked page operations: add, update, and/or remove (company type).
- `products` (ProductsUpdate, optional, nullable) — Batch product operations: add, update, and/or remove (company type).
- `key_people` (KeyPeopleUpdate, optional, nullable) — Batch key people operations: add, update, and/or remove (company type).
- `contact_association` (CompanyContactUpdate, optional, nullable) — Batch contact association changes for a company. Mirrors ``ContactCompaniesUpdate`` on PATCH ``/contacts``. In one request: - remove membership for N contacts - add membership for N existing contacts (optional primary per contact; only one may be primary) - update primary flag per contact without unlinking - create exactly one new contact and link (optional primary)

## Response

### 200

OK

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable success message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `data` (SuccessResponseData, optional, nullable) — Payload for this endpoint

## Errors

### 400 Bad Request Error

Bad Request

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 401 Unauthorized Error

Unauthorized

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 404 Not Found Error

Not Found

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 409 Conflict Error

Conflict

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 422 Unprocessable Entity Error

Unprocessable Entity

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 429 Too Many Requests Error

Too Many Requests

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 500 Internal Server Error

Internal Server Error

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

### 503 Service Unavailable Error

Service Unavailable

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

## Types

### PhonesUpdate

Batch phone operations: add, update, and/or remove (primary contact).

- `add` (list of PhoneInput, optional, nullable)
- `update` (list of PhoneUpdateItem, optional, nullable)
- `remove` (list of string, optional, nullable)

### WebsitesUpdate

Batch website operations: add, update, and/or remove.

- `add` (list of WebsiteInput, optional, nullable) — New websites to add
- `update` (list of WebsiteUpdateItem, optional, nullable) — Existing websites to update (must include id)
- `remove` (list of string, optional, nullable) — Website IDs to remove

### BillingPreferencesUpdate

Partial billing preferences; merged with existing.

- `method` (string, optional, nullable)
- `terms` (string, optional, nullable)

### SocialPagesUpdate

Batch social page operations: add, update, and/or remove.

- `add` (list of SocialPageInput, optional, nullable) — New social pages to add
- `update` (list of SocialPageUpdateItem, optional, nullable) — Existing social pages to update (must include id)
- `remove` (list of string, optional, nullable) — Social page IDs to remove

### AddressesUpdate

Batch address operations: add, update, and/or remove.

- `add` (list of AddressInput, optional, nullable) — New addresses to add
- `update` (list of AddressUpdateItem, optional, nullable) — Existing addresses to update (must include id)
- `remove` (list of string, optional, nullable) — Address record IDs to remove

### NoteItemInput

Client input for a structured note (title and content only).

- `title` (string, required)
- `content` (string, required)

### LinkedPagesUpdate

Batch linked page operations: add, update, and/or remove (company type).

- `add` (list of LinkedPageInput, optional, nullable)
- `update` (list of LinkedPageUpdateItem, optional, nullable)
- `remove` (list of string, optional, nullable)

### ProductsUpdate

Batch product operations: add, update, and/or remove (company type).

- `add` (list of ProductInput, optional, nullable)
- `update` (list of ProductUpdateItem, optional, nullable)
- `remove` (list of string, optional, nullable)

### KeyPeopleUpdate

Batch key people operations: add, update, and/or remove (company type).

- `add` (list of KeyPersonInput, optional, nullable)
- `update` (list of KeyPersonUpdateItem, optional, nullable)
- `remove` (list of string, optional, nullable)

### CompanyContactUpdate

Batch contact association changes for a company. Mirrors ``ContactCompaniesUpdate`` on PATCH ``/contacts``. In one request: - remove membership for N contacts - add membership for N existing contacts (optional primary per contact; only one may be primary) - update primary flag per contact without unlinking - create exactly one new contact and link (optional primary)

- `remove_associations` (list of string, optional) — Contact ids to unlink from the company
- `add_associations` (list of CompanyContactAssociationAdd, optional) — Associate existing contacts with this company (by id)
- `update_associations` (list of CompanyContactAssociationUpdate, optional) — Update primary status per contact without unlinking
- `create_and_associate` (CompanyContactAssociationCreate, optional, nullable) — Create exactly one new contact and associate it to the company

### SuccessResponseData

Payload for this endpoint

- map from string to any
- list of any
- string
- double
- boolean

### PhoneInput

Phone input for add operation (no id).

- `phone_number` (string, required) — Phone number
- `phone_isd_code` (string, required) — Phone ISD code
- `label` (string, optional, nullable) — Label (e.g. mobile, work)
- `is_primary` (boolean, optional, default: false) — Primary phone flag

### PhoneUpdateItem

Phone update item; only provided fields are updated.

- `id` (string, required) — Phone item ID to update
- `phone_number` (string, optional, nullable)
- `phone_isd_code` (string, optional, nullable)
- `label` (string, optional, nullable)
- `is_primary` (boolean, optional, nullable)

### WebsiteInput

Website input for add operation.

- `url` (string, required) — Website URL
- `type` (string, required) — Website type
- `is_primary` (boolean, optional, default: false) — Primary website flag

### WebsiteUpdateItem

Website update item; only provided fields are updated.

- `id` (string, required) — Website ID to update
- `url` (string, optional, nullable)
- `type` (string, optional, nullable)
- `is_primary` (boolean, optional, nullable)

### SocialPageInput

Social page input for add operation.

- `platform` (string, required) — Platform name
- `url` (string, required) — Profile/page URL

### SocialPageUpdateItem

Social page update item; only provided fields are updated.

- `id` (string, required) — Social page ID to update
- `platform` (string, optional, nullable)
- `url` (string, optional, nullable)

### AddressInput

Address input for add operation.

- `place_id` (string, optional, nullable)
- `address_line1` (string, optional, nullable) — Primary address line
- `address_line2` (string, optional, nullable)
- `city` (string, optional, nullable)
- `state` (string, optional, nullable)
- `postal_code` (string, optional, nullable)
- `country` (string, optional, nullable)
- `latitude` (double, optional, nullable)
- `longitude` (double, optional, nullable)
- `address_type` (enum, optional, nullable) — Address type enumeration.
  - Allowed values: `work`, `home`, `billing`, `shipping`, `other`
- `address_data` (map from string to any, optional) — Extra address metadata (e.g. formatted line). Defaults to when omitted.
- `is_primary` (boolean, optional, default: false) — Primary address flag

### AddressUpdateItem

Address update item; only provided fields are updated.

- `id` (string, required) — Address record ID to update
- `place_id` (string, optional, nullable)
- `address_line1` (string, optional, nullable)
- `address_line2` (string, optional, nullable)
- `city` (string, optional, nullable)
- `state` (string, optional, nullable)
- `postal_code` (string, optional, nullable)
- `country` (string, optional, nullable)
- `latitude` (double, optional, nullable)
- `longitude` (double, optional, nullable)
- `address_type` (enum, optional, nullable) — Address type enumeration.
  - Allowed values: `work`, `home`, `billing`, `shipping`, `other`
- `address_data` (map from string to any, optional, nullable)
- `is_primary` (boolean, optional, nullable)

### LinkedPageInput

Linked page input for add operation.

- `page_name` (string, required)
- `page_url` (string, required)

### LinkedPageUpdateItem

Linked page update item; only provided fields are updated.

- `id` (string, required) — Linked page ID to update
- `page_name` (string, optional, nullable)
- `page_url` (string, optional, nullable)

### ProductInput

Product input for add operation.

- `name` (string, required) — Product name
- `url` (string, optional, nullable) — Product URL
- `description` (string, optional, nullable) — Product description

### ProductUpdateItem

Product update item; only provided fields are updated.

- `id` (string, required) — Product item ID to update
- `name` (string, optional, nullable)
- `url` (string, optional, nullable)
- `description` (string, optional, nullable)

### KeyPersonInput

Key person input for add operation.

- `name` (string, required) — Person name
- `title` (string, optional, nullable) — Job title
- `linkedin` (string, optional, nullable) — LinkedIn profile URL

### KeyPersonUpdateItem

Key person update item; only provided fields are updated.

- `id` (string, required) — Key person item ID to update
- `name` (string, optional, nullable)
- `title` (string, optional, nullable)
- `linkedin` (string, optional, nullable)

### CompanyContactAssociationAdd

Add an existing contact membership for a company.

- `contact_id` (string, required) — Existing contact id to link
- `is_primary` (boolean, optional, default: false) — If true, set this contact as the company's primary contact.

### CompanyContactAssociationUpdate

Update primary status for a contact on this company (membership unchanged).

- `contact_id` (string, required) — Contact id to update relationship for
- `is_primary` (boolean, required) — If true, set this contact as the company's primary contact. If false, clear primary when this contact is currently primary (keeps membership).

### CompanyContactAssociationCreate

Create exactly one new contact and link it to the company.

- `contact` (CreateContactRequest, required) — New contact payload (same shape as POST /contacts).
- `is_primary` (boolean, optional, default: false) — If true, set the new contact as the company's primary contact.

### CreateContactRequest

Create a contact. Supports the operations from ADR: - contact only - contact + link to existing company (optionally primary) - contact + create new company + link (optionally primary)

- `email` (string, required) — Contact email address (required).
- `owner_id` (string, optional, nullable) — Owning user; defaults to the caller on internal create when omitted.
- `portal_access` (boolean, optional, default: false) — If true, provisions a portal user for this contact and sends an invite email.
- `prefix` (string, optional, nullable)
- `first_name` (string, optional, nullable)
- `middle_name` (string, optional, nullable)
- `last_name` (string, optional, nullable)
- `title` (string, optional, nullable)
- `date_of_birth` (date, optional, nullable)
- `profile_photo_url` (string, optional, nullable)
- `external_contact_id` (string, optional, nullable) — Optional identifier from an external system (immutable after create).
- `phones` (list of PhoneInput, optional)
- `tags` (list of string, optional)
- `social_pages` (list of SocialPage, optional)
- `websites` (list of Website, optional) — Websites for the contact (stored in additional_data.websites).
- `custom_fields` (list of map from string to any, optional) — Custom fields root cells payload (validated and stored as JSONB).
- `additional_data` (map from string to any, optional) — Free-form JSONB payload stored on the contact.
- `notes` (list of NoteItemInput, optional) — Structured notes
- `lead` (ContactLeadAssociation, optional, nullable) — Optional lead creation. When provided, creates a lead and associates it with this contact (and the linked company if provided).
- `company_association` (ContactCompaniesCreate, optional, nullable) — Optional company association (add existing OR create+associate).
- `addresses` (list of AddressInput, optional)

### SocialPage

Social media page schema: platform (e.g. linkedin, instagram, twitter) and URL.

- `platform` (string, required) — Platform name
- `url` (string, required) — Profile/page URL
- `id` (string, optional, nullable) — Social page ID

### Website

Website schema.

- `url` (string, required) — Website URL
- `type` (string, required) — Website type
- `id` (string, optional, nullable) — Website ID
- `is_primary` (boolean, optional, default: false) — Primary website flag

### ContactLeadAssociation

Optional lead creation/linking on contact create. This creates a new lead (v2 `public.leads`) and associates it with the created contact, and also with the linked/created company when present on the same request.

- `stage_id` (string, required) — Lead pipeline stage id (UUID).
- `name` (string, optional, nullable) — Optional lead display title. When omitted or blank, the lead name is derived from the contact first/last name (or email).
- `intake_stage` (string, optional, nullable) — Optional intake stage label.
- `lead_score` (string, optional, nullable) — Optional lead score label/tier.

### ContactCompaniesCreate

Company association payload used during contact create. Mirrors the update naming, but allows only a single operation: - add an existing company membership (optional primary) - OR create exactly one new company and associate it (optional primary)

- `add_association` (ContactCompanyAssociationAdd, optional, nullable) — Associate the contact with an existing company (single).
- `create_and_associate` (ContactCompanyAssociationCreateInline, optional, nullable) — Create exactly one new company and associate it to the contact (single).

### ContactCompanyAssociationAdd

Add an existing company membership for a contact.

- `company_id` (string, required) — Existing company id to link
- `is_primary` (boolean, optional, default: false) — If true, set this contact as the company's primary contact.

### ContactCompanyAssociationCreateInline

Create a new company inline and link it during contact create.

- `company` (CreateCompanyRequest, required) — New company payload (same shape as POST /companies).
- `is_primary` (boolean, optional, default: false) — If true, set this contact as the company's primary contact.

### CreateCompanyRequest

Create a company. Supports ADR operations: - company only - company + link existing contact (primary/non-primary) - company + create new contact + link (primary/non-primary)

- `name` (string, required)
- `owner_id` (string, optional, nullable) — Owning user; defaults to the caller on internal create when omitted.
- `industry` (string, optional, nullable)
- `profile_photo_url` (string, optional, nullable)
- `portal_access` (boolean, optional, default: false)
- `email` (string, optional, nullable)
- `phones` (list of Phone, optional)
- `tags` (list of string, optional)
- `websites` (list of Website, optional)
- `billing_preferences` (BillingPreferences, optional, nullable) — Billing preferences (defaults to empty preferences).
- `social_pages` (list of SocialPage, optional)
- `target_market_segments` (list of string, optional)
- `current_tech_stack` (list of string, optional)
- `preferred_communication_channels` (list of string, optional)
- `industry_specific_terminologies` (list of string, optional)
- `description` (string, optional, nullable)
- `custom_fields` (list of map from string to any, optional)
- `additional_data` (map from string to any, optional)
- `notes` (list of NoteItemInput, optional) — Structured notes
- `lead` (CompanyLeadAssociation, optional, nullable) — Optional lead creation. When provided, creates a lead and associates it with this company (and the linked contact if provided).
- `contact_association` (CompanyContactsCreate, optional, nullable) — Optional contact association (add existing OR create+associate).
- `addresses` (list of AddressInput, optional)

### Phone

Phone number item: id, phone_number, phone_isd_code, label, is_primary.

- `phone_number` (string, required) — Phone number
- `phone_isd_code` (string, required) — Phone ISD code
- `id` (string, optional, nullable) — Phone item ID
- `label` (string, optional, nullable) — Label (e.g. mobile, work)
- `is_primary` (boolean, optional, default: false) — Primary phone flag

### BillingPreferences

Billing preferences schema.

- `method` (string, optional, nullable) — Billing method
- `terms` (string, optional, nullable) — Payment terms

### CompanyLeadAssociation

Optional lead creation/linking on company create. Creates a new lead (v2 `public.leads`) and associates it with the created company, and also with the linked/created contact when present on the same request.

- `stage_id` (string, required) — Lead pipeline stage id (UUID).
- `intake_stage` (string, optional, nullable) — Optional intake stage label.
- `lead_score` (string, optional, nullable) — Optional lead score label/tier.

### CompanyContactsCreate

Contact association payload used during company create. Mirrors the update naming, but allows only a single operation: - add an existing contact membership (optional primary) - OR create exactly one new contact and associate it (optional primary)

- `add_association` (CompanyContactAssociationAdd, optional, nullable) — Associate an existing contact to this company (single).
- `create_and_associate` (CompanyContactAssociationCreate, optional, nullable) — Create exactly one new contact and associate it to the company (single).

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "status": "success",
  "message": "Company updated successfully",
  "statusCode": 200,
  "code": "2000",
  "data": {
    "company_id": "co12b3c4-1111-2222-3333-444455556666",
    "name": "Acme Inc"
  }
}
```

**SDK Code**

```python OK
import requests

url = "https://api-dev.houseofapps.ai/v1/integrations/clients/companies/client_id"

payload = {}
headers = {
    "appSecret": "appSecret",
    "licenseKey": "licenseKey",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript OK
const url = 'https://api-dev.houseofapps.ai/v1/integrations/clients/companies/client_id';
const options = {
  method: 'PATCH',
  headers: {
    appSecret: 'appSecret',
    licenseKey: 'licenseKey',
    '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 OK
package main

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

func main() {

	url := "https://api-dev.houseofapps.ai/v1/integrations/clients/companies/client_id"

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

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

	req.Header.Add("appSecret", "appSecret")
	req.Header.Add("licenseKey", "licenseKey")
	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 OK
require 'uri'
require 'net/http'

url = URI("https://api-dev.houseofapps.ai/v1/integrations/clients/companies/client_id")

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

request = Net::HTTP::Patch.new(url)
request["appSecret"] = 'appSecret'
request["licenseKey"] = 'licenseKey'
request["Content-Type"] = 'application/json'
request.body = "{}"

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

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

HttpResponse<String> response = Unirest.patch("https://api-dev.houseofapps.ai/v1/integrations/clients/companies/client_id")
  .header("appSecret", "appSecret")
  .header("licenseKey", "licenseKey")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api-dev.houseofapps.ai/v1/integrations/clients/companies/client_id', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'appSecret' => 'appSecret',
    'licenseKey' => 'licenseKey',
  ],
]);

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

```csharp OK
using RestSharp;

var client = new RestClient("https://api-dev.houseofapps.ai/v1/integrations/clients/companies/client_id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("appSecret", "appSecret");
request.AddHeader("licenseKey", "licenseKey");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift OK
import Foundation

let headers = [
  "appSecret": "appSecret",
  "licenseKey": "licenseKey",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-dev.houseofapps.ai/v1/integrations/clients/companies/client_id")! 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()
```