Manage custom field options.
Single- and multi-select custom fields have a list of all available options, which have a value, and a sort key. The value must be unique to the custom field. For example, you might have an Incident Type custom field, with options "Data breach", "Performance degradation", "API downtime", etc.
Show custom field options for a custom field
OK response.
{- "custom_field_options": [
- {
- "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0",
- "id": "01FCNDV6P870EA6S7TK1DSYDG0",
- "sort_key": 10,
- "value": "Product"
}
], - "pagination_meta": {
- "after": "01FCNDV6P870EA6S7TK1DSYDG0",
- "page_size": 25
}
}
Create a custom field option. If the sort key is not supplied, it'll default to 1000, so the option appears near the end of the list.
Created response.
{- "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0",
- "sort_key": 10,
- "value": "Product"
}
{- "custom_field_option": {
- "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0",
- "id": "01FCNDV6P870EA6S7TK1DSYDG0",
- "sort_key": 10,
- "value": "Product"
}
}
{- "custom_field_option": {
- "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0",
- "id": "01FCNDV6P870EA6S7TK1DSYDG0",
- "sort_key": 10,
- "value": "Product"
}
}
Update a custom field option
OK response.
{- "sort_key": 10,
- "value": "Product"
}
{- "custom_field_option": {
- "custom_field_id": "01FCNDV6P870EA6S7TK1DSYDG0",
- "id": "01FCNDV6P870EA6S7TK1DSYDG0",
- "sort_key": 10,
- "value": "Product"
}
}