Change a custom field (tenant:forge:write and maintainer, or tenant:forge:admin)
PATCH /api/forge/v1/projects/{key}/custom-fields/{id}
Module: Forge · operationId: patchForgeCustomField · Tag: Configuration · Auth: access token (Authorization: Bearer <accessToken>)
Same permission as creating. version is required (409 version_conflict); keys never change.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key |
path | string | yes | Project key (e.g. APP) |
id |
path | string (uuid) | yes |
Request body
application/json (required)
key(string): Create: field key; fixed afterwardskind(string): Create: value type; fixed afterwards (one oftext,longtext,number,date,datetime,bool,select,multiselect,user,url)label(string): Display label (max length 80)options(array of FieldOption): Choices of select and multiselect fieldslabel(string, required): Display labelvalue(string, required): Stored valuecolor(string): Color token or #rrggbb (optional)
required(boolean): Items need a valuetypeKeys(array of string): Item type keys the field applies to; empty = every typeversion(integer): PATCH: the version the change is based on
Example:
{
"required": true,
"typeKeys": [
"story"
],
"version": 1
}
Responses
- 200 Changed (
application/json) - 400 Error (
application/json) - 403 Error (
application/json) - 404 Error (
application/json) - 409 Error (
application/json)
Fields of the 200 answer:
id(string (uuid), required): Field idkey(string, required): Field key: the key incustomFieldsof an item; never changeskind(string, required): Value type; never changes (one oftext,longtext,number,date,datetime,bool,select,multiselect,user,url)label(string, required): Display labeloptions(array of FieldOption, required): Choices of select and multiselect fieldslabel(string, required): Display labelvalue(string, required): Stored valuecolor(string): Color token or #rrggbb (optional)
position(integer, required): Order in the configurationrequired(boolean, required): Items of the types the field applies to need a valuetypeKeys(array of string, required): Item type keys; empty = every typeversion(integer, required): Optimistic-locking version; send it with PATCH
Example 200 answer:
{
"id": "9b5c6d7e-8f9a-4b0c-9dbe-5f6a7b8c9d01",
"key": "story_points",
"kind": "number",
"label": "Story Points",
"options": [],
"position": 0,
"required": false,
"typeKeys": [
"story",
"aufgabe",
"fehler"
],
"version": 1
}
Example request
curl -X PATCH 'https://api.mbcom.cloud/api/forge/v1/projects/string/custom-fields/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"required":true,"typeKeys":["story"],"version":1}'