> 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 custom field

PATCH https://api-dev.houseofapps.ai/v1/integrations/custom-fields/{field_id}
Content-Type: application/json

External update custom field endpoint.

Reference: https://docs.houseofapps.ai/api-reference/overview/platform/custom-fields/external-update-custom-field-v-1-integrations-custom-fields-field-id-patch

## Request

### Path parameters

- `field_id` (string, required) — Custom field ID

### Headers

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

### Body (application/json)

This endpoint expects an UpdateCustomFieldRequest.

- `field_name` (string, optional, nullable) — Root field name
- `description` (string, optional, nullable) — Root field description
- `field_type` (enum, optional, nullable) — Root field type
  - Allowed values: `text`, `number`, `date`, `yes_no`, `url`, `email`, `phone`, `long_text`, `rich_text`, `dropdown`, `multi_select`, `range_slider`, `currency`, `file_upload`, `image`, `address`, `object`, `list`, `api`
- `type_config` (map from string to any, optional, nullable) — Root field type-specific configuration
- `show_on_create` (boolean, optional, nullable) — Root field show on create form
- `show_on_detail` (boolean, optional, nullable) — Root field show on detail page
- `is_required` (boolean, optional, nullable) — Root field is required
- `searchable` (boolean, optional, nullable) — Include in free-text search
- `filterable` (boolean, optional, nullable) — Expose as list filter
- `visibility_logic` (VisibilityLogic, optional, nullable) — Replace root visibility logic. Omit to leave unchanged.
- `clear_visibility_logic` (boolean, optional, default: false) — When true, clears visibility_logic on the root field.
- `sort_order` (integer, optional, nullable) — Root field sort order
- `update` (list of FlatFieldUpdateRequest, optional, nullable) — Fields to update (flat array with id)
- `remove` (list of string, optional, nullable) — Field IDs to remove (deletes all descendants)
- `add` (list of CreateCustomFieldRequest, optional, nullable) — New fields to add

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

### VisibilityLogic

Conditional UI logic for a root custom field (when rules match → actions).

- `rules` (list of VisibilityLogicRulesItems, required) — Filter rules (same shape as dynamic list filters).
- `actions` (list of enum, required) — Actions to apply when rules match (hide and/or disable).
  - Allowed values: `hide`, `disable`
- `match` (enum, optional) — Combine rules with AND (all) or OR (any).
  - Allowed values: `all`, `any`

### FlatFieldUpdateRequest

Request schema for updating a field (flat ID-based design). All fields are optional except id. Only provided fields will be updated. Parent reassignment is not allowed.

- `id` (string, required) — Field ID to update
- `field_name` (string, optional, nullable) — Field name
- `description` (string, optional, nullable) — Field description
- `field_type` (enum, optional, nullable) — Field type
  - Allowed values: `text`, `number`, `date`, `yes_no`, `url`, `email`, `phone`, `long_text`, `rich_text`, `dropdown`, `multi_select`, `range_slider`, `currency`, `file_upload`, `image`, `address`, `object`, `list`, `api`
- `type_config` (map from string to any, optional, nullable) — Type-specific configuration
- `show_on_create` (boolean, optional, nullable) — Show on create form
- `show_on_detail` (boolean, optional, nullable) — Show on detail page
- `is_required` (boolean, optional, nullable) — Field is required
- `searchable` (boolean, optional, nullable) — Include in free-text search
- `filterable` (boolean, optional, nullable) — Expose as list filter
- `visibility_logic` (VisibilityLogic, optional, nullable) — Replace visibility logic (root fields only). Omit to leave unchanged.
- `sort_order` (integer, optional, nullable) — Sort order for field

### CreateCustomFieldRequest

Request schema for creating a custom field. Supports creating: - Top-level fields (with entity_type) - Object parent fields with nested sub-fields recursively (with entity_type, field_type='object', sub_fields array) - List fields with a single child field (with entity_type, field_type='list', sub_fields array with exactly one item) This model is recursive - sub_fields can themselves contain sub_fields for nested object structures. List fields can contain any field type as their child, including object types which can have their own sub_fields.

- `field_name` (string, required) — Field name
- `field_type` (enum, required) — Field type
  - Allowed values: `text`, `number`, `date`, `yes_no`, `url`, `email`, `phone`, `long_text`, `rich_text`, `dropdown`, `multi_select`, `range_slider`, `currency`, `file_upload`, `image`, `address`, `object`, `list`, `api`
- `description` (string, optional, nullable) — Field description
- `field_key` (string, optional, nullable) — Optional stable key; auto-generated from field_name when omitted
- `show_on_create` (boolean, optional, default: true) — Show on create form
- `show_on_detail` (boolean, optional, default: false) — Show on detail page
- `is_required` (boolean, optional, default: false) — Field is required
- `searchable` (boolean, optional, default: false) — Include field values in entity free-text search
- `filterable` (boolean, optional, default: false) — Expose field as a list filter
- `type_config` (map from string to any, optional) — Type-specific configuration
- `visibility_logic` (VisibilityLogic, optional, nullable) — Optional conditional hide/disable rules (root fields only; same rule shape as dynamic filters).
- `sort_order` (integer, optional, default: 0) — Sort order for field
- `entity_type` (enum, optional, nullable) — Entity type (required for top-level fields, inherited for nested fields)
  - Allowed values: `company`, `contact`, `lead`, `prospect`, `project`, `user`, `cp_board`, `cp_task`, `ticket`
- `parent_id` (string, optional, nullable) — Parent field ID (required when adding via update endpoint)
- `sub_fields` (list of CreateCustomFieldRequest, optional) — Sub-fields for object type (multiple allowed) or list type (exactly one required)

### SuccessResponseData

Payload for this endpoint

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

### VisibilityLogicRulesItems

- DropdownCustomFieldFilter: DropdownCustomFieldFilter
- FilterGroup: FilterGroup

### DropdownCustomFieldFilter

A single filter rule. Backward compatible with `{field_id, values}` (implied operator `eq`).

- `field_id` (string, required) — Standard field key or custom field UUID.
- `operator` (enum, optional) — Comparison operator. Defaults to eq for legacy payloads.
  - Allowed values: `eq`, `neq`, `contains`, `not_contains`, `starts_with`, `is_set`, `is_not_set`, `gt`, `gte`, `lt`, `lte`, `between`, `before`, `after`
- `values` (list of string, optional) — Selected values (IN for eq). Ignored for is_set / is_not_set.

### FilterGroup

Nested boolean group (one extra level under the top-level match).

- `rules` (list of FilterGroupRulesItems, required)
- `match` (enum, optional) — Boolean combinator for a rule list.
  - Allowed values: `all`, `any`

### FilterGroupRulesItems

- DropdownCustomFieldFilter: DropdownCustomFieldFilter
- FilterGroup: FilterGroup

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "status": "success",
  "message": "OK",
  "statusCode": 200,
  "code": "2000",
  "data": {}
}
```

**SDK Code**

```python OK
import requests

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