# Update Single/Multiple Select Options

Use this request to update existing single/multiple select options by changing their name and/or color.

In the request body:

`table_name` is the name of your table, required;  
`column` is the name of the column, required;  
`options` is a list of option objects that you would like to update, in which:

*   `id` is the ID of that option, which you can retrive with the call "List Columns in A View in A Table", required;
*   `color` is the label's new color, optional;
*   `name` is the label's new name, optional.
    

`return_options` gives you the possibility to get an overview of all the options you just updated, optional, `false` by default.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Base Operations",
    "description": "The official SeaTable API Reference (OpenAPI 3.0).",
    "version": "6.2"
  },
  "servers": [
    {
      "url": "https://{server}",
      "variables": {
        "server": {
          "default": "cloud.seatable.io"
        }
      }
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "metrics-enabled": false,
    "proxy-enabled": false
  },
  "tags": [
    {
      "name": "Columns",
      "description": "Create and manipulate columns inside a table"
    }
  ],
  "components": {
    "securitySchemes": {
      "BaseTokenAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This is the [Base-Token](/reference/authentication)."
      }
    },
    "parameters": {
      "base_uuid": {
        "name": "base_uuid",
        "in": "path",
        "schema": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$"
        },
        "required": true,
        "description": "The unique identifier of a base. Sometimes also called dtable_uuid.",
        "example": "5c264e76-0e5a-448a-9f34-580b551364ca"
      }
    },
    "schemas": {
      "table_name": {
        "type": "string",
        "description": "The name of the table to perform the operation on. Alternatively, you can use the `table_id` instead of `table_name`. If using `table_id`, ensure that the key in the request body is replaced accordingly.",
        "example": "Table1"
      },
      "column_name": {
        "type": "string",
        "pattern": "^[^.}{`]*$",
        "description": "The name of the column."
      },
      "update_single__multiple_select_options": {
        "type": "object",
        "properties": {
          "table_name": {
            "$ref": "#/components/schemas/table_name"
          },
          "column": {
            "$ref": "#/components/schemas/column_name"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "119376"
                },
                "color": {
                  "type": "string",
                  "example": "#4ECCCB"
                },
                "textColor": {
                  "type": "string",
                  "example": "#1DDD1D"
                },
                "name": {
                  "type": "string",
                  "example": "Finished"
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "return_options": {
            "type": "boolean"
          }
        }
      }
    }
  },
  "paths": {
    "/api-gateway/api/v2/dtables/{base_uuid}/column-options/": {
      "put": {
        "tags": [
          "Columns"
        ],
        "summary": "Update Single/Multiple Select Options",
        "operationId": "updateSelectOption",
        "description": "Use this request to update existing single/multiple select options by changing their name and/or color.\n\nIn the request body:\n\n`table_name` is the name of your table, required;  \n`column` is the name of the column, required;  \n`options` is a list of option objects that you would like to update, in which:\n\n*   `id` is the ID of that option, which you can retrive with the call \"List Columns in A View in A Table\", required;\n*   `color` is the label's new color, optional;\n*   `name` is the label's new name, optional.\n    \n\n`return_options` gives you the possibility to get an overview of all the options you just updated, optional, `false` by default.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/update_single__multiple_select_options"
              }
            }
          }
        },
        "security": [
          {
            "BaseTokenAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/base_uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "options": [
                    {
                      "name": "Finished",
                      "color": "#4ECCCB",
                      "textColor": "#FFFFFF",
                      "id": "119376"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "_id": {
    "buffer": {
      "0": 105,
      "1": 212,
      "2": 220,
      "3": 12,
      "4": 20,
      "5": 34,
      "6": 131,
      "7": 31,
      "8": 141,
      "9": 111,
      "10": 187,
      "11": 150
    }
  }
}
```