# Update custom field

> Change a custom field's label, type, options, required flag or order.

Source: https://docs.mycrmsim.com/docs/custom-fields/update-custom-field

```http
PATCH https://backend.mysmsgateway.app/api/v1/ext/custom-fields/{id}
```

- Category: myCRMSIM Contacts / Custom Fields
- Auth: Bearer access token
- Scope: `contacts.write`

Send only what changes. The key never changes, because the values on contacts sit under it — delete the field and create another to rename a key. Switching to `select` / `multi_select` needs `options` in the same call (or already on the field); switching away clears them. Values already on contacts are not rewritten; they are validated against the new type the next time a contact is updated.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | number | yes | The field id. Example: `41` |
| `field_label` | body | string | no | Up to 100 characters. Example: `Source` |
| `field_type` | body | enum | no | The new type. One of: `text`, `number`, `date`, `select`, `multi_select`, `url`, `email`, `phone`. |
| `options` | body | array<string> | no | Replaces the choices of a select / multi_select field. Example: `["Web","Referral","Event","Partner"]` |
| `is_required` | body | boolean | no | true / false. |
| `sort_order` | body | number | no | Display position. |

## Request body

```json
{
  "field_label": "Source",
  "options": [
    "Web",
    "Referral",
    "Event",
    "Partner"
  ]
}
```

## Response 200

OK

```json
{
  "success": true,
  "message": "Custom field updated",
  "data": {
    "id": 41,
    "workspace_id": 7,
    "field_key": "lead_source",
    "field_label": "Source",
    "field_type": "select",
    "options": [
      "Web",
      "Referral",
      "Event",
      "Partner"
    ],
    "is_required": false,
    "sort_order": 1,
    "created_at": "2026-11-04T02:20:00.000Z",
    "updated_at": "2026-11-04T03:05:00.000Z"
  }
}
```

## Response 400

Nothing to change, a key change, a bad type, or a select without options

```json
{
  "success": false,
  "message": "field_key cannot be changed — delete the field and create another."
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): contacts.write. This integration was granted: …"
}
```

## Response 404

Custom field does not exist or is not owned by the installer (same response for both)

```json
{
  "success": false,
  "message": "Custom field not found or not accessible to this token"
}
```
