Skip to main content

I want to use server-side Airtable API calls to completely replace all options in a "Multiple Select" field type. Specifically:

  1. Current options: A, B, C
  2. Via API call:
    • First delete all existing options (A, B, C)
    • Then write new options (D, E, F)

Question:​​ What is the correct request body structure for this operation?

I've tried the following JSON structure, but always receive this error:

 

{
"error": {
"type": "INVALID_REQUEST_UNKNOWN",
"message": "Invalid request: parameter validation failed. Check your request data."
}
}

My attempted API call:

--data '{
"options": {
"choices": i
{"name": "D", "color": "blue"},
{"name": "E", "color": "green"},
{"name": "F", "color": "green"}
]
}
}'

Key Points:​

  • Field type: Multiple Select
  • Operation: Complete replacement (not incremental updates)
  • Error persists despite correct authentication and field ID

Could you provide:

  1. The exact JSON structure required for complete option replacement?
  2. Any special parameters needed (like enableSelectFieldChoiceDeletion)?
  3. Confirmation if color specifications are mandatory or optional?

THANK YOU VERY MUCH!

I don’t think you can do that via the web API directly I’m afraid.  The web API doesn’t support option creation or deletion directly, it only allows us to update the name / description of a field

As a workaround for option creation, you can create / update a record with the new options for the multiple select field with ‘typecast: true’, and you’ll then need to clean up that record that was created / updated 

const data = JSON.stringify({
"fields": {
"Multiple Select field": "New option"
},
"typecast": true
});

const requestOptions = {
method: "PATCH",
headers: myHeaders,
body: data
};

As far as I know, there’s no workaround for option deletion, they can only be deleted via Scripting Extensions (where we’d use `updateOptionsAsync`), which currently can’t be triggered via automations. 

---

If it helps, the last time I faced a similar issue I ended up using a linked field + table instead.  Clunky, but worked fine


Reply