Update a custom field
Request to update an existing custom field:
PUT /api/v2/custom_fields/<field-id>.json
The request body contains the attributes of the custom field object to change. Attributes that are not included keep their values, including the attributes inside a fieldset.
For example:
{
"custom_field": {
"name": "New name",
"fieldset_dropdown_value_settings": {
"options": [
{"value": "Sales call", "color": "#00AA00"},
{"value": "Support call", "color": ""}
]
}
}
}
When options or thresholds are included, they replace the whole list.
Response contains HTTP status code as shown in the following table.
| Response | Description |
|---|---|
| 200 OK | The custom field has been successfully updated. The response body contains the complete custom field object after the update |
| 400 Bad Request | The request cannot be completed because the supplied JSON object has invalid data. The response contains a detailed description of the error, like: |
| 403 Forbidden | The request cannot be completed because API user has no permission to edit custom fields |
| 404 Not Found | Custom field with such ID does not exist, or the API user has no permission to edit it |