update_record
Modify existing records in PocketBase collections by specifying the record ID and updated field values, with options to control response fields and expand related data.
Instructions
Update an existing record
Input Schema
Name | Required | Description | Default |
---|---|---|---|
collection | Yes | Collection name | |
data | Yes | Updated record data with field values matching the collection schema. Can use field modifiers like fieldName+, +fieldName, fieldName-. | |
expand | No | Comma-separated list of relation fields to expand in the response (e.g. 'author,comments.user') | |
fields | No | Comma-separated fields to return in the response (e.g. 'id,title,author') | |
id | Yes | Record ID |
Input Schema (JSON Schema)
{
"properties": {
"collection": {
"description": "Collection name",
"type": "string"
},
"data": {
"description": "Updated record data with field values matching the collection schema. Can use field modifiers like fieldName+, +fieldName, fieldName-.",
"type": "object"
},
"expand": {
"description": "Comma-separated list of relation fields to expand in the response (e.g. 'author,comments.user')",
"type": "string"
},
"fields": {
"description": "Comma-separated fields to return in the response (e.g. 'id,title,author')",
"type": "string"
},
"id": {
"description": "Record ID",
"type": "string"
}
},
"required": [
"collection",
"id",
"data"
],
"type": "object"
}