---
title: "Update a contact field"
method: PATCH
path: "/v1/sites/{site_id}/contact-fields/{field_id}"
tags: ["Contact fields"]
---

# Update a contact field

`PATCH /v1/sites/{site_id}/contact-fields/{field_id}`

## Request

- Base URL: `https://api.getsitecontrol.com`
- URL: `https://api.getsitecontrol.com/v1/sites/{site_id}/contact-fields/{field_id}`
- Auth: HTTP bearer

Changes the name of the field and returns it. Only the name changes; the id
and the values of contacts stay. Changing the case of the field's own name is
allowed.

The name needs at least three latin letters or digits, and the id made from
it must fit 100 characters. It must differ, without case, from the names of
the other fields of the site, system fields such as "Email" or "First name"
included.

## Path parameters

- `site_id` integer, required
- `field_id` string, required: Field id from `list_contact_fields`

## Request body

- ContactFieldPatch
  - `name` string, required: The new name; the id stays

## Response `200`

Successful Response

- ContactField
  - `id` string, required: Derived from the name on creation; kept on rename
  - `name` string, required: Display name
  - `type` 'text' | 'integer' | 'number' | 'datetime' | 'date' | 'boolean' | 'other', required: `text`: a string; `integer`: a whole number; `number`: a number, decimals allowed; `datetime`: a moment, ISO 8601 in UTC; `date`: a day, YYYY-MM-DD; `boolean`: true or false; `other`: a field kept from older versions of the admin, read-only on contacts.
  - `created_at` string, date-time, nullable: Null for fields created before the date was recorded

## Other responses

- `400`: Unsupported GSC-Version
- `401`: Missing or invalid API key or access token
- `403`: Access denied
- `404`: `field_not_found`: no custom field with this id on the site; system fields are not found here
- `409`: `field_name_taken`: another field of the site has this name, compared without case
- `413`: Request body too large
- `422`: `field_name_invalid`: the name has fewer than three latin letters or digits, or the id made from it is too long. `validation_failed`: the body is invalid
- `429`: Rate limited
- `503`: Temporarily unavailable; retry later

---

[API](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api.md) - [All operations](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api/revisions/084fcad80e75?raw)
