# Add new option to "Single select" field when creating new row via API

**URL:** https://community.baserow.io/t/add-new-option-to-single-select-field-when-creating-new-row-via-api/4241
**Category:** Baserow Help
**Tags:** api
**Created:** [January 10, 2024, 1:50am UTC](https://community.baserow.io/t/add-new-option-to-single-select-field-when-creating-new-row-via-api/4241 "2024-01-10T01:50:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![brandondasilva](https://community.baserow.io/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@brandondasilva](https://community.baserow.io/u/brandondasilva)
#### Post date: [January 10, 2024, 1:50am UTC](https://community.baserow.io/t/add-new-option-to-single-select-field-when-creating-new-row-via-api/4241/1 "2024-01-10T01:50:14Z")

</div>

Hello,  
Apologies if this has already been addressed. I’m trying to create a new row in a Baserow table in my self-hosted instance via the REST API. I keep getting an error when I try to use a new value for a “Select” dropdown field. It appears that if it isn’t in the existing list of options for that dropdown, the API will return an error.

Some info on the error I’m getting:

- “ERROR\_REQUEST\_BODY\_VALIDATION” - “The provided select option value ‘sample new value’ is not a valid select option.”

Is there a way to dynamically add new options to that Single select field as rows are being created?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![kamille\_parks](https://community.baserow.io/user_avatar/community.baserow.io/kamille_parks/32/1674_2.png) [@kamille\_parks](https://community.baserow.io/u/kamille_parks)
#### Post date: [January 10, 2024, 7:22am UTC](https://community.baserow.io/t/add-new-option-to-single-select-field-when-creating-new-row-via-api/4241/2 "2024-01-10T07:22:25Z")

</div>

As far as I’m aware this can’t be done directly with the create/update row queries.

You could do a separate query first to update the field with the missing options using this endpoint: [https://api.baserow.io/api/redoc/#tag/Database-table-fields/operation/update\_database\_table\_field](https://api.baserow.io/api/redoc/#tag/Database-table-fields/operation/update_database_table_field)

---

<div class="post-metadata">

### Author: ![brandondasilva](https://community.baserow.io/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@brandondasilva](https://community.baserow.io/u/brandondasilva)
#### Post date: [January 10, 2024, 10:09pm UTC](https://community.baserow.io/t/add-new-option-to-single-select-field-when-creating-new-row-via-api/4241/3 "2024-01-10T22:09:05Z")

</div>

Ah okay that makes sense.

I guess I’ll do some sort of check to see if that select option exists, if not add it via that endpoint, then continue on with creating a new row.

Thanks for your help!

---

<div class="post-metadata">

### Author: ![brandondasilva](https://community.baserow.io/letter_avatar_proxy/v4/letter/b/cc9497/32.png) [@brandondasilva](https://community.baserow.io/u/brandondasilva)
#### Post date: [January 17, 2024, 1:51am UTC](https://community.baserow.io/t/add-new-option-to-single-select-field-when-creating-new-row-via-api/4241/4 "2024-01-17T01:51:49Z")

</div>

Quick note for anyone who also wants to do this for a “select\_option” field: you need to include the full array of options, then push your new value to that array, _then_ take that modified array with everything and use that in your PATCH request.

I tried sending a PATCH of the new value I wanted to add and it wiped all of the previous options I had for that field and replaced it with the pnly single option value I was trying to add.

Hope this helps!
