Create or Update a User Field Option
POST {{baseUrl}}/api/v2/user_fields/:user_field_id/options
Creates a new option or updates an existing option for the given drop-down user field.
To update an option, include the id of the option in the custom_field_option
object. Example: {"custom_field_option": {"id": 10002, "name": "Pineapples", ... }
. If an option exists for the given ID, the option will be updated. Otherwise, a new option will be created.
Response
Returns one of the following status codes:
- 200 with
Location: /api/v2/user_fields/{user_field_id}/options.json
if the user field option already exists in the database - 201 with
Location: /api/v2/user_fields/{user_field_id}/options.json
if the user field option is new
Allowed For
- Admins
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: Created
{"custom_field_option":{"id":10002,"name":"Grapes","position":2,"raw_name":"Grapes","url":"http://{subdomain}.zendesk.com/api/v2/user_fields/1/options/10002.json","value":"grape"}}