Skip to main content
PUT
/
v1
/
custom_fields
/
{id}
Update
curl --request PUT \
  --url https://api.incident.io/v1/custom_fields/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "Which team is impacted by this issue",
  "name": "Affected Team",
  "required": "never",
  "required_v2": "never",
  "show_before_closure": true,
  "show_before_creation": true,
  "show_before_update": true,
  "show_in_announcement_post": true
}
'
{
  "custom_field": {
    "catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0",
    "created_at": "2021-08-17T13:28:57.801578Z",
    "description": "Which team is impacted by this issue",
    "field_type": "single_select",
    "id": "01FCNDV6P870EA6S7TK1DSYDG0",
    "name": "Affected Team",
    "options": [
      {
        "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0",
        "id": "01FCNDV6P870EA6S7TK1DSYDG0",
        "sort_key": 10,
        "value": "Product"
      }
    ],
    "required": "never",
    "required_v2": "never",
    "show_before_closure": true,
    "show_before_creation": true,
    "show_before_update": true,
    "show_in_announcement_post": true,
    "updated_at": "2021-08-17T13:28:57.801578Z"
  }
}

Path Parameters

id
string
required

Unique identifier for the custom field

Example:

"01FCNDV6P870EA6S7TK1DSYDG0"

Body

application/json
description
string
required

Description of the custom field

Example:

"Which team is impacted by this issue"

name
string
required

Human readable name for the custom field

Maximum string length: 50
Example:

"Affected Team"

show_before_closure
boolean
required

Whether a custom field should be shown in the incident resolve modal. If this custom field is required before resolution, but no value has been set for it, the field will be shown in the resolve modal whatever the value of this setting.

Example:

true

show_before_creation
boolean
required

Whether a custom field should be shown in the incident creation modal. This must be true if the field is always required.

Example:

true

show_before_update
boolean
required

Whether a custom field should be shown in the incident update modal.

Example:

true

required
enum<string>

When this custom field must be set during the incident lifecycle. [DEPRECATED: please use required_v2 instead].

Available options:
never,
before_closure,
always
Example:

"never"

required_v2
enum<string>

When this custom field must be set during the incident lifecycle.

Available options:
never,
before_resolution,
always
Example:

"never"

show_in_announcement_post
boolean

Whether a custom field should be shown in the list of fields as part of the announcement post when set.

Example:

true

Response

200 - application/json

OK response.

custom_field
object
required
Example:
{
"catalog_type_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"created_at": "2021-08-17T13:28:57.801578Z",
"description": "Which team is impacted by this issue",
"field_type": "single_select",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Affected Team",
"options": [
{
"custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"sort_key": 10,
"value": "Product"
}
],
"required": "never",
"required_v2": "never",
"show_before_closure": true,
"show_before_creation": true,
"show_before_update": true,
"show_in_announcement_post": true,
"updated_at": "2021-08-17T13:28:57.801578Z"
}