---
title: "Update a Field"
method: PATCH
path: "/fields/{collection}/{id}"
tags: ["Fields"]
---

# Update a Field

`PATCH /fields/{collection}/{id}`

Update an existing field.

## Path parameters

- `collection` string, required
- `id` string, required

## Request body

- object
  - `field` string — Unique name of the field. Field name is unique within the collection.
  - `type` string — Directus specific data type. Used to cast values in the API.
  - `schema` object — The schema info.
    - `name` string — The name of the field.
    - `table` string — The collection of the field.
    - `type` string — The type of the field.
    - `default_value` string, nullable — The default value of the field.
    - `max_length` integer, nullable — The max length of the field.
    - `is_nullable` boolean — If the field is nullable.
    - `is_primary_key` boolean — If the field is primary key.
    - `has_auto_increment` boolean — If the field has auto increment.
    - `foreign_key_column` string, nullable — Related column from the foreign key constraint.
    - `foreign_key_table` string, nullable — Related table from the foreign key constraint.
    - `comment` string, nullable — Comment as saved in the database.
    - `schema` string — Database schema (pg only).
    - `foreign_key_schema` string, nullable — Related schema from the foreign key constraint (pg only).
  - `meta` object, nullable — The meta info.
    - `id` integer — Unique identifier for the field in the `directus_fields` collection.
    - `collection` string — Unique name of the collection this field is in.
    - `field` string — Unique name of the field. Field name is unique within the collection.
    - `special` string[], nullable — Transformation flag for field
    - `system-interface` string, nullable — What interface is used in the admin app to edit the value for this field.
    - `options` object, nullable — Options for the interface that's used. This format is based on the individual interface.
    - `display` string, nullable — What display is used in the admin app to display the value for this field.
    - `display_options` object, nullable — Options for the display that's used. This format is based on the individual display.
    - `locked` boolean — If the field can be altered by the end user. Directus system fields have this value set to `true`.
    - `readonly` boolean — Prevents the user from editing the value in the field.
    - `hidden` boolean — If this field should be hidden.
    - `sort` integer, nullable — Sort order of this field on the edit page of the admin app.
    - `width` 'half' | 'half-left' | 'half-right' | 'full' | 'fill' | 'null', nullable — Width of the field on the edit form.
    - `group` integer, nullable — What field group this field is part of.
    - `translation` object, nullable — Key value pair of `<language>: <translation>` that allows the user to change the displayed name of the field in the admin app.
    - `note` string, nullable — A user provided note for the field. Will be rendered alongside the interface on the edit page.

## Response `200`

Successful request

- object
  - `data` Fields
    - `id` integer
    - `collection` string — Unique name of the collection this field is in.
    - `field` string — Unique name of the field. Field name is unique within the collection.
    - `special` string[], nullable
    - `interface` string, nullable
    - `options` unknown
    - `display` string, nullable
    - `display_options` unknown
    - `readonly` boolean
    - `hidden` boolean
    - `sort` integer, nullable
    - `width` string, nullable
    - `translations` unknown
    - `note` string, nullable
    - `conditions` unknown
    - `required` boolean, nullable
    - `group` union
      - integer
      - Fields — recursive
    - `validation` unknown
    - `validation_message` string, nullable
    - `searchable` boolean

## Other responses

- `401` — Error: Unauthorized request
- `404` — Error: Not found.

---

[API](https://skmtc.dev/utomic-media/apis/dynamic-api-specification.md) · [All operations](https://skmtc.dev/utomic-media/apis/dynamic-api-specification/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/utomic-media/dynamic-api-specification/revisions/4a0ccd34700e/schema)
