Skip to main content
The Records API provides endpoints for creating, reading, updating, and deleting records in your collections.

List records

Retrieve a paginated list of records from a collection.
string
required
The name or ID of the collection
number
default:"1"
Page number
number
default:"30"
Number of records per page (max 500)
string
Sort order (e.g., -created,title). Prefix with - for descending order
string
Filter expression (e.g., status='active' && created>'2023-01-01')
string
Comma-separated relation fields to expand
string
Comma-separated fields to return
Authentication: Required if the collection’s listRule is not empty. Superusers can access all records.

Response

number
Current page number
number
Records per page
number
Total number of records
number
Total number of pages
array
Array of record objects

View record

Retrieve a single record by ID.
string
required
The name or ID of the collection
string
required
The record ID
string
Comma-separated relation fields to expand
string
Comma-separated fields to return
Authentication: Required if the collection’s viewRule is not empty.

Response

Returns the record object with all its fields.
string
Record ID
string
Creation timestamp (ISO 8601)
string
Last update timestamp (ISO 8601)
string
ID of the parent collection
string
Name of the parent collection
Additional fields depend on your collection schema.

Create record

Create a new record in a collection.
string
required
The name or ID of the collection
Authentication: Required if the collection’s createRule is not empty. The rule determines whether the user can create records.

Request body

The request body should contain the field values for the new record. Use multipart/form-data for file uploads.

Response

Returns the created record object (200 OK).

Common errors

Update record

Update an existing record.
string
required
The name or ID of the collection
string
required
The record ID to update
Authentication: Required if the collection’s updateRule is not empty.

Request body

Provide only the fields you want to update. Use multipart/form-data for file uploads. Field modifiers:
  • Append + suffix to add values: tags+
  • Append - suffix to remove values: tags-
  • Prefix with + to prepend: +items

Response

Returns the updated record object (200 OK).

Common errors

Delete record

Delete a record from a collection.
string
required
The name or ID of the collection
string
required
The record ID to delete
Authentication: Required if the collection’s deleteRule is not empty.

Response

Returns 204 No Content on success.

Common errors

Working with files

When creating or updating records with file fields, use multipart/form-data encoding.

Upload files

Update files

To replace files, submit new file(s):
To append files without removing existing ones:
To remove specific files:

API rules

Each collection has API rules that control access:
  • listRule - Controls who can list records
  • viewRule - Controls who can view individual records
  • createRule - Controls who can create records
  • updateRule - Controls who can update records
  • deleteRule - Controls who can delete records
When a rule is null, only superusers can perform the action. An empty string "" allows anyone (including guests).
Rules use a filter expression syntax similar to the filter parameter:
This rule allows authenticated users to only access their own records.

Filter syntax

The filter parameter supports a rich expression syntax:

Operators

  • =, != - Equality
  • >, >=, <, <= - Comparison
  • ~ - LIKE operator
  • !~ - NOT LIKE
  • ?=, ?!= - Array contains/not contains
  • &&, || - Logical AND/OR

Examples

Special @request fields

In API rules and filters, you can access request context:
  • @request.auth.id - ID of the authenticated user
  • @request.auth.* - Any field from the auth record
  • @request.method - HTTP method (GET, POST, etc.)
  • @request.query.* - Query parameters
  • @request.data.* - Request body data

Response enrichment

All record responses include these system fields:
  • id - Unique record identifier
  • created - Creation timestamp
  • updated - Last update timestamp
  • collectionId - Parent collection ID
  • collectionName - Parent collection name
For auth collections, additional fields:
  • email - User email (respects emailVisibility)
  • verified - Email verification status
  • emailVisibility - Whether email is public