---
title: "Update a custom contact field"
method: PATCH
path: "/contact-fields/{id}"
tags: ["Contact fields"]
---

# Update a custom contact field

`PATCH /contact-fields/{id}`

## Request

- Base URL: `https://www.unitpost.com/api/v1`
- URL: `https://www.unitpost.com/api/v1/contact-fields/{id}`
- Auth: HTTP bearer

Update a custom field's editable metadata, such as its display label or `default_value`. A changed default takes effect at once, for sends and for segment membership, because it is never stored on contacts. The `key` and `type` are immutable here — to change the key (and migrate every contact's stored value) use [Rename a custom field's key](#post-contact-fields-id-rename) instead. Requires the `contacts:write` capability.

## Request body

- ContactFieldUpdate
  - `label` string
  - `type` 'text' | 'number' | 'boolean' | 'date'
  - `position` integer
  - `default_value` string, nullable: The value used for any contact that has none for this field (key missing or null): when an email is sent (merge tags) and when segments are evaluated. It's never written onto contacts, so changing it takes effect everywhere at once. Stored as a string and coerced to the field's type; null means no default. In segment filters, is_set / is_not_set check whether the contact itself has a value.

## Response `200`

The updated contact field.

- ContactField
  - `object` 'contact_field', required
  - `id` string, required
  - `key` string, required
  - `label` string, required
  - `type` 'text' | 'number' | 'boolean' | 'date', required
  - `default_value` string, nullable, required: The value used for any contact that has none for this field (key missing or null): when an email is sent (merge tags) and when segments are evaluated. It's never written onto contacts, so changing it takes effect everywhere at once. Stored as a string and coerced to the field's type; null means no default. In segment filters, is_set / is_not_set check whether the contact itself has a value.
  - `position` number, required
  - `created_at` string, required
  - `updated_at` string, required

## Other responses

- `401`: Missing or invalid API key.
- `404`: Contact field not found.
- `422`: Validation error.

---

[API](https://skmtc.dev/unitpost/apis/unitpost-api.md) · [All operations](https://skmtc.dev/unitpost/apis/unitpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/unitpost/apis/unitpost-api/revisions/86ff7c890967?raw)
