Files
2023-02-28 11:06:44 +00:00

188 lines
10 KiB
Plaintext

---
title: Update Record
sidebarTitle: Update Record
description: Updates a single record.
---
## Params
<ParamField path="key" type="string" required={true}>
A unique string. Please see the [Keys and Resumability](/guides/resumability)
doc for more info.
</ParamField><ParamField path="params" type="object" required={true}>
Update Record Input
<Expandable title="properties" defaultOpen={true}><ParamField path="baseId" type="string" required={true}>
The ID of the base
</ParamField><ParamField path="tableIdOrName" type="string" required={true}>
The name or id of the table
</ParamField><ParamField path="recordId" type="string" required={true}>
The ID of the record
</ParamField><ParamField path="fields" type="object" required={true}>
Fields
<Expandable title="properties" defaultOpen={false}><ParamField path="fields[key]" type="string | number | boolean | object | array" required={false}>
Field Value
*Please note that this object is one of the following possible types*
<Expandable title="possible types for fields[key]" defaultOpen={false}><ParamField path="StringValue" type="string" required={false}>
String Value
</ParamField><ParamField path="NumberValue" type="number" required={false}>
Number Value
</ParamField><ParamField path="BooleanValue" type="boolean" required={false}>
Boolean Value
</ParamField><ParamField path="ACollaborator" type="object" required={false}>
A Collaborator
<Expandable title="properties" defaultOpen={false}><ParamField path="id" type="string" required={true}>
Collaborator ID
</ParamField><ParamField path="email" type="string" required={true}>
Collaborator Email
</ParamField><ParamField path="name" type="string" required={true}>
Collaborator Name
</ParamField></Expandable></ParamField><ParamField path="Collaborators" type="array" required={false}>
Collaborators
<Expandable title="items" defaultOpen={false}><ParamField path="Collaborators[n]" type="object" required={false}>
A Collaborator
<Expandable title="properties" defaultOpen={false}><ParamField path="id" type="string" required={true}>
Collaborator ID
</ParamField><ParamField path="email" type="string" required={true}>
Collaborator Email
</ParamField><ParamField path="name" type="string" required={true}>
Collaborator Name
</ParamField></Expandable></ParamField></Expandable></ParamField><ParamField path="StringValues" type="array" required={false}>
String Values
<Expandable title="items" defaultOpen={false}><ParamField path="StringValues[n]" type="string" required={false}>
String Value
</ParamField></Expandable></ParamField><ParamField path="Attachments" type="array" required={false}>
Attachments
<Expandable title="items" defaultOpen={false}><ParamField path="Attachments[n]" type="object" required={false}>
An Attachment
<Expandable title="properties" defaultOpen={false}><ParamField path="id" type="string" required={true}>
Attachment ID
</ParamField><ParamField path="url" type="string" required={true}>
Attachment URL
</ParamField><ParamField path="filename" type="string" required={true}>
Attachment Filename
</ParamField><ParamField path="size" type="number" required={true}>
Attachment Size
</ParamField><ParamField path="type" type="string" required={true}>
Attachment Type
</ParamField><ParamField path="height" type="number" required={false}>
Attachment Height
</ParamField><ParamField path="width" type="number" required={false}>
Attachment Width
</ParamField><ParamField path="thumbnails" type="object" required={false}>
Thumbnails
<Expandable title="properties" defaultOpen={false}><ParamField path="small" type="object" required={true}>
A Thumbnail
<Expandable title="properties" defaultOpen={false}><ParamField path="url" type="string" required={true}>
Thumbnail URL
</ParamField><ParamField path="width" type="number" required={true}>
Thumbnail Width
</ParamField><ParamField path="height" type="number" required={true}>
Thumbnail Height
</ParamField></Expandable></ParamField><ParamField path="large" type="object" required={true}>
A Thumbnail
<Expandable title="properties" defaultOpen={false}><ParamField path="url" type="string" required={true}>
Thumbnail URL
</ParamField><ParamField path="width" type="number" required={true}>
Thumbnail Width
</ParamField><ParamField path="height" type="number" required={true}>
Thumbnail Height
</ParamField></Expandable></ParamField><ParamField path="full" type="object" required={true}>
A Thumbnail
<Expandable title="properties" defaultOpen={false}><ParamField path="url" type="string" required={true}>
Thumbnail URL
</ParamField><ParamField path="width" type="number" required={true}>
Thumbnail Width
</ParamField><ParamField path="height" type="number" required={true}>
Thumbnail Height
</ParamField></Expandable></ParamField></Expandable></ParamField></Expandable></ParamField></Expandable></ParamField></Expandable></ParamField></Expandable></ParamField><ParamField path="typecast" type="boolean" required={false}>
If set to true, Airtable will try to convert string values into the appropriate cell value. This conversion is only performed on a best-effort basis. To ensure your data's integrity, this should only be used when necessary. Defaults to false when unset.
</ParamField></Expandable></ParamField>
## Response
<ResponseField path="response" type="object" required={true}>
Update Record Output
<Expandable title="properties" defaultOpen={false}><ResponseField path="id" type="string" required={true}>
Record ID
</ResponseField><ResponseField path="createdTime" type="string" required={true}>
A date timestamp in the ISO format, eg:"2018-01-01T00:00:00.000Z"
</ResponseField><ResponseField path="fields" type="object" required={true}>
Fields
<Expandable title="properties" defaultOpen={false}><ResponseField path="fields[key]" type="string | number | boolean | object | array" required={false}>
Field Value
*Please note that this object is one of the following possible types*
<Expandable title="possible types for fields[key]" defaultOpen={false}><ResponseField path="StringValue" type="string" required={false}>
String Value
</ResponseField><ResponseField path="NumberValue" type="number" required={false}>
Number Value
</ResponseField><ResponseField path="BooleanValue" type="boolean" required={false}>
Boolean Value
</ResponseField><ResponseField path="ACollaborator" type="object" required={false}>
A Collaborator
<Expandable title="properties" defaultOpen={false}><ResponseField path="id" type="string" required={true}>
Collaborator ID
</ResponseField><ResponseField path="email" type="string" required={true}>
Collaborator Email
</ResponseField><ResponseField path="name" type="string" required={true}>
Collaborator Name
</ResponseField></Expandable></ResponseField><ResponseField path="Collaborators" type="array" required={false}>
Collaborators
<Expandable title="items" defaultOpen={false}><ResponseField path="Collaborators[n]" type="object" required={false}>
A Collaborator
<Expandable title="properties" defaultOpen={false}><ResponseField path="id" type="string" required={true}>
Collaborator ID
</ResponseField><ResponseField path="email" type="string" required={true}>
Collaborator Email
</ResponseField><ResponseField path="name" type="string" required={true}>
Collaborator Name
</ResponseField></Expandable></ResponseField></Expandable></ResponseField><ResponseField path="StringValues" type="array" required={false}>
String Values
<Expandable title="items" defaultOpen={false}><ResponseField path="StringValues[n]" type="string" required={false}>
String Value
</ResponseField></Expandable></ResponseField><ResponseField path="Attachments" type="array" required={false}>
Attachments
<Expandable title="items" defaultOpen={false}><ResponseField path="Attachments[n]" type="object" required={false}>
An Attachment
<Expandable title="properties" defaultOpen={false}><ResponseField path="id" type="string" required={true}>
Attachment ID
</ResponseField><ResponseField path="url" type="string" required={true}>
Attachment URL
</ResponseField><ResponseField path="filename" type="string" required={true}>
Attachment Filename
</ResponseField><ResponseField path="size" type="number" required={true}>
Attachment Size
</ResponseField><ResponseField path="type" type="string" required={true}>
Attachment Type
</ResponseField><ResponseField path="height" type="number" required={false}>
Attachment Height
</ResponseField><ResponseField path="width" type="number" required={false}>
Attachment Width
</ResponseField><ResponseField path="thumbnails" type="object" required={false}>
Thumbnails
<Expandable title="properties" defaultOpen={false}><ResponseField path="small" type="object" required={true}>
A Thumbnail
<Expandable title="properties" defaultOpen={false}><ResponseField path="url" type="string" required={true}>
Thumbnail URL
</ResponseField><ResponseField path="width" type="number" required={true}>
Thumbnail Width
</ResponseField><ResponseField path="height" type="number" required={true}>
Thumbnail Height
</ResponseField></Expandable></ResponseField><ResponseField path="large" type="object" required={true}>
A Thumbnail
<Expandable title="properties" defaultOpen={false}><ResponseField path="url" type="string" required={true}>
Thumbnail URL
</ResponseField><ResponseField path="width" type="number" required={true}>
Thumbnail Width
</ResponseField><ResponseField path="height" type="number" required={true}>
Thumbnail Height
</ResponseField></Expandable></ResponseField><ResponseField path="full" type="object" required={true}>
A Thumbnail
<Expandable title="properties" defaultOpen={false}><ResponseField path="url" type="string" required={true}>
Thumbnail URL
</ResponseField><ResponseField path="width" type="number" required={true}>
Thumbnail Width
</ResponseField><ResponseField path="height" type="number" required={true}>
Thumbnail Height
</ResponseField></Expandable></ResponseField></Expandable></ResponseField></Expandable></ResponseField></Expandable></ResponseField></Expandable></ResponseField></Expandable></ResponseField></Expandable></ResponseField>