Create record
create_recordAdd a new record to a PocketBase collection by providing field values, with support for file uploads, related record IDs, and auth fields requiring password confirmation.
Instructions
Create a new record in a collection. Pass field values in data. For auth collections, include 'password' and 'passwordConfirm' (and usually 'email'). To upload files, list them in files (each maps a field name to a local file path). Relation fields accept a record id or an array of ids.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Field values for the new record. | |
| files | No | Optional list of local files to upload into file fields. | |
| expand | No | Comma-separated relations to expand in the response. | |
| fields | No | Comma-separated fields to return. | |
| collection | Yes | Collection id or name. |