create_record
Add new records to PocketBase collections by specifying collection name and field data, with options to control returned fields and expand related records.
Instructions
Create a new record in a collection
Input Schema
Name | Required | Description | Default |
---|---|---|---|
collection | Yes | Collection name | |
data | Yes | Record data with field values matching the collection schema | |
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') |
Input Schema (JSON Schema)
{
"properties": {
"collection": {
"description": "Collection name",
"type": "string"
},
"data": {
"description": "Record data with field values matching the collection schema",
"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"
}
},
"required": [
"collection",
"data"
],
"type": "object"
}