Teable
Quick Start
Update Records
Path
PATCH /table/{tableId}/record/{recordId}
Request
Path Parameters
- tableId (string): The unique identifier of the table (how to get).
- recordId (string): The unique identifier of the record to update (how to get).
Request Body
- record (required)
- Description: The record data to update
- Type: Object
- Example:
- Note: The
fields
object contains field names and their corresponding new values. Each field type has a different value structure, see Record Field Value Types for details.
To clear a field’s value, explicitly pass null
. If a field name is not included, no update will be performed for that field.
- fieldKeyType (optional)
- Description: Specifies the type of field key
- Type: String
- Possible values:
- “name”: Use field name as key
- “id”: Use field ID as key
- Example:
"name"
or"id"
- Note: If not specified, field name is used as key by default.
- Usage:
- When set to “name”:
- When set to “id”:
- When set to “name”:
- typecast (optional)
- Description: Whether to automatically convert field value types. By default, strict validation is enforced, requiring input values to match the current field’s data type. If enabled, the system will attempt automatic conversion.
- Type: Boolean
- Possible values: true or false
- Example:
true
- Note: If set to true, the system will attempt to convert input values to the correct field value type.
- Usage examples:
- Link field: Can directly use primary key text for linking
- Date field: Can use non-standard format date strings
- User field: Can directly use username
- Link field: Can directly use primary key text for linking
For uploading new files to attachment fields, please refer to the Upload Attachment section.
Response
Success Response
- Status code: 200 OK
- Response body: Returns the updated record data.
Example Response Body
Error Responses
- Status code: 400 Bad Request: Request body format error or missing required fields.
- Status code: 404 Not Found: Specified tableId or recordId does not exist.