PATCH /api/v2/custom_objects/{custom_object_key}/fields/{custom_object_field_key_or_id}

Updates individual custom object fields. The updating rules are as follows:

Updating drop-down field options

You can also use the update endpoint to add, update, or remove options in a drop-down custom field. Updating field options for multi-select fields works exactly the same as drop-down field options.

Important: Unless you want to remove some options, you must specify all existing options in any update request. Omitting an option removes it from the drop-down field, which removes its values from any tickets or macros.

Use the custom_field_options attribute to update the options. The attribute consists of an array of option objects, with each object consisting of an id, name, and value property. The name and value properties correspond to the "Title" and "Tag" text boxes in the admin interface respectively. For new drop-down options, specify "id":"null". Example request body:

{"custom_object_field": {
    "custom_field_options": [
      {"id": "null", "name": "Apple Pie", "value": "apple"},
      {"id": "null", "name": "Pecan Pie", "value": "pecan"}
    ]
  }
}

Example Request

curl https://{subdomain}.zendesk.com/api/v2/custom_objects/{custom_object_key}/fields/{custom_object_field_key_or_id}
  -d '{"ticket_field": {"custom_field_options": [{"name": "Apple Pie", "value": "apple"}, {"name": "Pecan Pie", "value": "pecan"}]}}' \
  -H "Content-Type: application/json" -X PUT \
  -v -u {email_address}/token:{api_token}

Allowed For

Servers

Path parameters

Name Type Required Description
custom_object_field_key_or_id String Yes

The key or id of a custom object field

custom_object_key String Yes

The key of a custom object

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.