---
title: "Edit custom field"
method: PATCH
path: "/customfields/{entity}/{id}"
tags: ["Custom Fields"]
---

# Edit custom field

`PATCH /customfields/{entity}/{id}`

## Path parameters

- `id` integer, required
- `entity` 'assets' | 'locations' | 'parts' | 'workOrders' | 'vendors' | 'purchaseOrders' | 'lineItemPurchaseOrders', required

## Query parameters

- `skipWebhook` boolean

## Request body

- object — The custom field data
  - `field` object, required
    - `label` string
    - `type` 'oneline' | 'multiline' | 'number' | 'singleSelect' | 'date' | 'datetime' | 'link'
    - `options` string[], nullable
    - `includeInRecurrence` boolean, nullable — Only relevent in the context of Work Orders
    - `sortIndex` integer — Represents the actual index (zero based) that you wish the element to be set at. For example, if you have 6 custom fields, and would like to set the field as the second element, you would pass sortIndex: 1. This would in turn affect the sortOrder weight.
    - `required` boolean, nullable — Mark this custom field as required
    - `unlisted` boolean, nullable — Mark this custom field as unlisted

## Response `204`

Successfully edited the custom field

## Other responses

- `400` — Failed to edit the custom field
- `401` — Invalid token
- `403` — Failed to edit the custom field
- `404` — Could not find the specified custom field.

---

[API](https://skmtc.net/getmaintainx/apis/maintainx-api.md) · [All operations](https://skmtc.net/getmaintainx/apis/maintainx-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getmaintainx/maintainx-api/revisions/ef9153fcac7c/schema)
