> 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 contact

PATCH https://api-dev.houseofapps.ai/v1/integrations/clients/contacts/{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/contacts/external-update-contact-v-1-integrations-clients-contacts-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 UpdateContactRequest.

- `status` (enum, optional, nullable) — Client status enumeration.
  - Allowed values: `active`, `inactive`, `prospect`, `deleted`
- `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)
- `phones` (PhonesUpdate, optional, nullable) — Batch phone operations: add, update, and/or remove (primary contact).
- `tags` (list of string, optional, nullable)
- `social_pages` (SocialPagesUpdate, optional, nullable) — Batch social page operations: add, update, and/or remove.
- `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)
- `description` (string, optional, nullable)
- `owner_id` (string, optional, nullable) — Owning user. Send null to clear. Omit to leave unchanged.
- `notes` (list of NoteItemInput, optional, nullable)
- `email_opt_out` (boolean, optional, nullable) — Opted out of marketing email
- `do_not_call` (boolean, optional, nullable) — Does not want to be called
- `work_history` (WorkHistoryUpdate, optional, nullable) — Batch work history operations: add, update, and/or remove (person type).
- `educational_history` (EducationalHistoryUpdate, optional, nullable) — Batch educational history operations: add, update, and/or remove (person type).
- `skills` (list of string, optional, nullable)
- `addresses` (AddressesUpdate, optional, nullable) — Batch address operations: add, update, and/or remove.
- `company_association` (ContactCompanyUpdate, optional, nullable) — Batch company association changes for a contact (developer-friendly, low round trips). Supports in one request: - remove association with N companies - add association with N existing companies (optionally setting primary per company) - create exactly 1 new company and link it (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)

### 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

### NoteItemInput

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

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

### WorkHistoryUpdate

Batch work history operations: add, update, and/or remove (person type).

- `add` (list of WorkHistoryInput, optional, nullable)
- `update` (list of WorkHistoryUpdateItem, optional, nullable)
- `remove` (list of string, optional, nullable)

### EducationalHistoryUpdate

Batch educational history operations: add, update, and/or remove (person type).

- `add` (list of EducationalHistoryInput, optional, nullable)
- `update` (list of EducationalHistoryUpdateItem, optional, nullable)
- `remove` (list of string, optional, nullable)

### 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

### ContactCompanyUpdate

Batch company association changes for a contact (developer-friendly, low round trips). Supports in one request: - remove association with N companies - add association with N existing companies (optionally setting primary per company) - create exactly 1 new company and link it (optional primary)

- `remove_associations` (list of string, optional) — Company ids to unlink from the contact
- `add_associations` (list of ContactCompanyAssociationAdd, optional) — Associate the contact with existing companies (by id)
- `update_associations` (list of ContactCompanyAssociationUpdate, optional) — Update primary status per company without unlinking
- `create_and_associate` (ContactCompanyAssociationCreate, optional, nullable) — Create exactly one new company and associate it to the contact

### 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)

### 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)

### WorkHistoryInput

Work history input for add operation.

- `job_title` (string, optional, nullable)
- `company` (string, optional, nullable)
- `start_date` (string, optional, nullable) — e.g. Jan 2023
- `end_date` (string, optional, nullable) — e.g. Feb 2023
- `current` (boolean, optional, nullable)

### WorkHistoryUpdateItem

Work history update item; only provided fields are updated.

- `id` (string, required) — Work history item ID to update
- `job_title` (string, optional, nullable)
- `company` (string, optional, nullable)
- `start_date` (string, optional, nullable)
- `end_date` (string, optional, nullable)
- `current` (boolean, optional, nullable)

### EducationalHistoryInput

Educational history input for add operation.

- `university` (string, optional, nullable)
- `degree` (string, optional, nullable)
- `field_of_study` (string, optional, nullable)
- `start_date` (string, optional, nullable)
- `end_date` (string, optional, nullable)

### EducationalHistoryUpdateItem

Educational history update item; only provided fields are updated.

- `id` (string, required) — Educational history item ID to update
- `university` (string, optional, nullable)
- `degree` (string, optional, nullable)
- `field_of_study` (string, optional, nullable)
- `start_date` (string, optional, nullable)
- `end_date` (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)

### 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.

### ContactCompanyAssociationUpdate

Update per-company attributes for this contact relationship.

- `company_id` (string, required) — Company id to update relationship for
- `is_primary` (boolean, required) — If true, set this contact as the company's primary contact. If false, unset this contact as primary for that company (keeps membership).

### ContactCompanyAssociationCreate

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

- `name` (string, required) — New company name to create
- `is_primary` (boolean, optional, default: false) — If true, set this contact as the new company's primary contact.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "status": "success",
  "message": "Contact updated successfully",
  "statusCode": 200,
  "code": "2000",
  "data": {
    "contact_id": "c1a2b3c4-1111-2222-3333-444455556666",
    "email": "ada@acme.com"
  }
}
```

**SDK Code**

```python OK
import requests

url = "https://api-dev.houseofapps.ai/v1/integrations/clients/contacts/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/contacts/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/contacts/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/contacts/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/contacts/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/contacts/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/contacts/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/contacts/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()
```