Amend records using API

#1

Is it possible to amend records using API without losing linked fields?

#2

There are different ways to update a record – PUT and PATCH. PUT will update all fields in a record. So if you do not include certain fields in the request, that is equivalent to setting them to null (clearing their value).

A PATCH request will only update the fields that you include in the request. Any fields you leave out will keep their existing value.

So it sounds like you want to issue a PATCH request to update some values of an existing record, but not all of them.

curl -v -XPATCH https://api.airtable.com/v0/{BASE_ID}/{TABLE_NAME}/{RECORD_ID} \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
      "fields": {
        "field1": "some new value",
        "field4": "a different value"
      }
    }'
1 Like
#3

Very helpful thank you.