---
title: "Update a custom field definition"
description: "Updates editable custom field definition settings, including the display label, field type, options, and workspace-level default value."
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.channelautomations.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Channel Automation API › Contacts

`PUT /api/custom-fields/{id}`

Updates editable custom field definition settings, including the display label, field type, options, and workspace-level default value.

## Path parameters

- `id` (`put/api/custom-fields/id.path.id`; string, required) — Custom field definition ID.

## Request body

_Required._

- `label` (`put/api/custom-fields/id.label`; string, optional)
- `field_type` (`put/api/custom-fields/id.field_type`; string, optional)
  - one of `"text"`, `"url"`, `"number"`, `"date"`, `"datetime"`, `"boolean"`, `"select"`, `"multi_select"`, `"json"`
- `options` (`put/api/custom-fields/id.options`; array<object>, optional)
- `is_required` (`put/api/custom-fields/id.is_required`; boolean, optional)
- `description` (`put/api/custom-fields/id.description`; string, optional)
- `display_order` (`put/api/custom-fields/id.display_order`; integer, optional)
- `is_active` (`put/api/custom-fields/id.is_active`; boolean, optional)
- `default_value` (`put/api/custom-fields/id.default_value`; unknown, optional) — Workspace-level default value for workspace custom fields.

## Example request

```json
{
  "label": "string",
  "field_type": "text",
  "options": [
    {}
  ],
  "is_required": true,
  "description": "string",
  "display_order": 0,
  "is_active": true,
  "default_value": null
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://api.channelautomation.com/api/custom-fields/<id>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "string",
  "field_type": "text",
  "options": [
    {}
  ],
  "is_required": true,
  "description": "string",
  "display_order": 0,
  "is_active": true,
  "default_value": null
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/custom-fields/<id>';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    label: 'string',
    field_type: 'text',
    options: [{}],
    is_required: true,
    description: 'string',
    display_order: 0,
    is_active: true,
    default_value: null
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/custom-fields/<id>"

payload = {
    "label": "string",
    "field_type": "text",
    "options": [{}],
    "is_required": True,
    "description": "string",
    "display_order": 0,
    "is_active": True,
    "default_value": None
}
headers = {"Content-Type": "application/json"}

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

print(response.text)
```

## Responses

### 200

Custom field updated successfully

### 400

Invalid custom field parameters

### 404

Custom field not found

### 500

Internal server error

#### Example

```json
{
  "error": "Internal server error",
  "details": "string",
  "success": false
}
```

- `error` (`put/api/custom-fields/id.response.500.error`; string, optional)
  - example `"Internal server error"`
- `details` (`put/api/custom-fields/id.response.500.details`; string, optional)
- `success` (`put/api/custom-fields/id.response.500.success`; boolean, optional)
  - example `false`


Source: https://developer.channelautomations.com/api/put-api-custom-fields-id/index.md
