List collections
Retrieve a list of all collections.number
default:"1"
Page number
number
default:"30"
Records per page
string
Sort fields (e.g.,
-created,name)string
Filter expression (e.g.,
type='base', system=true)Response
Returns paginated list of collection objects.View collection
Get a single collection by name or ID.string
required
Collection name or ID
Response
Returns the collection object with full configuration.string
Collection unique identifier
string
Creation timestamp
string
Last update timestamp
string
Collection name (must be unique)
string
Collection type:
base, auth, or viewboolean
Whether this is a system collection
array
Array of field definitions
array
Database indexes configuration
string | null
API rule for listing records
string | null
API rule for viewing individual records
string | null
API rule for creating records
string | null
API rule for updating records
string | null
API rule for deleting records
Create collection
Create a new collection.Request body
string
required
Collection name (alphanumeric and underscores only)
string
required
Collection type:
base, auth, or viewarray
Field definitions
array
Index definitions
string | null
List API rule
string | null
View API rule
string | null
Create API rule
string | null
Update API rule
string | null
Delete API rule
Response
Returns the created collection object (200 OK).Update collection
Update an existing collection.string
required
Collection name or ID to update
Request body
Same as create collection. Only include fields you want to update.Response
Returns the updated collection object (200 OK).Delete collection
Delete a collection and all its records.string
required
Collection name or ID to delete
Response
Returns 204 No Content on success.Truncate collection
Delete all records from a collection without deleting the collection itself.string
required
Collection name or ID to truncate
Response
Returns 204 No Content on success.View collections cannot be truncated since they don’t store their own records.
Import collections
Bulk import/update collections from JSON.Request body
array
required
Array of collection objects to import
boolean
default:"false"
Whether to delete collections not present in the import
Response
Returns 204 No Content on success.Get collection scaffolds
Get empty collection templates for each type.Response
Returns scaffold objects forbase, auth, and view collection types.
Collection types
Base collection
Standard collection for storing records.Auth collection
Collection for user authentication with built-in auth fields.email- User email addressverified- Email verification statusemailVisibility- Whether email is publicly visiblepassword- Hashed password
View collection
Virtual collection based on SQL query.View collections are read-only. Create, update, and delete operations are not supported.
Field types
Supported field types:text- Single line texteditor- Rich text editornumber- Numeric valuebool- Boolean (true/false)email- Email addressurl- URLdate- Date onlyselect- Single select dropdownjson- JSON datafile- File uploadrelation- Relation to another collectionautodate- Auto-updated timestamp