---
title: "Create or Update a User Field Option"
method: POST
path: "/api/v2/user_fields/{user_field_id}/options"
tags: ["User Fields"]
---

# Create or Update a User Field Option

`POST /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

## Response `200`

Success response

- CustomFieldOptionResponse
  - `custom_field_option` CustomFieldOptionObject
    - `id` integer — Automatically assigned upon creation
    - `name` string, required — Name of the dropdown option
    - `position` integer — Position of the dropdown option
    - `raw_name` string — Raw name of the dropdown option
    - `url` string — URL of the dropdown option
    - `value` string, required — Value of the dropdown option

## Other responses

- `201` — Created response

---

[API](https://skmtc.dev/botbrains-io/apis/support-api.md) · [All operations](https://skmtc.dev/botbrains-io/apis/support-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/botbrains-io/support-api/revisions/d53eac07ba68/schema)
