Updates up to 10 records, or upserts them when performUpsert
is set (see below).
The URL path accepts both table names and table IDs. We recommend using table IDs so you don't need to modify your API request when your table name changes.
A PATCH
request will only update the fields included in the request. Fields not included in the request will be unchanged.
A PUT
request will perform a destructive update and clear all unincluded cell values.
Upserts
Set the performUpsert
property in your request to enable upsert behavior. When upserting is enabled, the id
property
of records becomes optional. Records that do not include id
will use the fields chosen by fieldsToMergeOn
as an external ID to match with existing records.
- If zero matches are found, a new record will be created.
- If one match is found, that record will be updated.
- If multiple matches are found, the request will fail.
Records that include id
will ignore fieldsToMergeOn
and behave as normal updates. If no record with the given id
exists,
the request will fail and will not create a new record.
The API response for upsert requests will additionally include updatedRecords
and createdRecords
arrays, indicating which records
in the records
array already existed and were updated, or did not exist and were created, respectively.
Airtable reserves the right to throttle upsert requests differently from the standard rate limit throttling policy.
Typecasting
Set the typecast
parameter to true
to enable typecasting. When typecasting is enabled, Airtable will try to convert string values
in a record's fields
object to the appropriate cell value. This conversion is only performed on a best-effort basis.
Typecasting is disabled by default to ensure your data's integrity, but it may be helpful when integrating with third-party services.