Help

Trouble Updating Multi-Select Field

Topic Labels: API
946 0
cancel
Showing results for 
Search instead for 
Did you mean: 
shubham
4 - Data Explorer
4 - Data Explorer

I'm issuing the following request to Airtable from Retool via the Sequin Proxy:

{
    "request": {
        "url": "https://proxy.sequin.io/api.airtable.com/v0/{BASE_ID}/sample_requests_raw/{RECORD_ID}",
        "method": "PATCH",
        "body": "{\n \"fields\": {\n \"Status\": \"my_status\",\n \"my_multiselect_field\": [{name: \"my_multiselect_field_value\"}],\n }\n}",
        "headers": {
            "User-Agent": "Retool/2.0 (+https://docs.tryretool.com/docs/apis)",
            "Authorization": "---sanitized---",
            "Content-Type": "application/json",
            "X-Retool-Forwarded-For": "49.37.243.51",
            "x-datadog-trace-id": "2270676987214102529",
            "x-datadog-parent-id": "1683543301097941794",
            "x-datadog-sampling-priority": "1",
            "ot-baggage-requestId": "undefined"
        }
    }
}

This gives me the following response:

{    
"response": {
        "data": {
            "errors": {
                "detail": "Bad Request"
            }
        },
        "headers": {
            "date": [
                "Thu, 02 Mar 2023 12:51:04 GMT"
            ],
            "content-type": [
                "application/json; charset=utf-8"
            ],
            "content-length": [
                "35"
            ],
            "connection": [
                "keep-alive"
            ],
            "cache-control": [
                "max-age=0, private, must-revalidate"
            ],
            "server": [
                "Cowboy"
            ]
        },
        "status": 400,
        "statusText": "Bad Request"
    }
}

 However, if I change the value of my_multiselect_field from [{name: \"my_multiselect_field_value\"}] to [], then the request is successful.

What am I doing incorrectly? I followed the Airtable Docs to check how to update the multiselect field.

0 Replies 0