rls. The entity endpoints let you read and change those schemas, read and change the records they hold, and count the records and users an app holds.
Use these endpoints to:
- Read an app’s entity schemas, one at a time or all together.
- Add, replace, or remove an entity.
- Make an app’s live data model match its source in one call. This one is limited to apps whose source code you manage yourself.
- Read, add, change, or remove an entity’s records.
- Count an entity’s records, or the app’s users.
Schema writes don’t change your code
Every write here changes the app’s live data model, so it takes effect immediately. It doesn’t change the entities configuration file that defines that model in the app’s source code, atbase44/entities/<EntityName>.jsonc. Base44 rebuilds the live model from those files whenever one of them is written or the app’s code is pulled from GitHub, so a change made only through this API is reverted at that point.
To change the model for good, change the file. If the app is connected to a GitHub repository, commit the change there and call Pull changes from GitHub, which rebuilds the live model from your file. Otherwise ask the AI to add or edit the entity with Send chat message, which writes the file the same way the Base44 online app editor does.
That makes the write endpoints a good fit for pushing a schema Base44 should serve right now, and a poor fit for a lasting schema edit.
The User entity
User is built in, so it doesn’t behave like an entity you defined:
- You can’t create it. Use Update entity schema with
Userto add custom fields to it, which also creates those fields the first time. - Reading it returns only the custom fields you added, not the built-in ones, and returns a 404 when there are none.
- Custom fields can’t redeclare
emailorfull_name, which Base44 manages. - Its stored schema carries no
namekey, unlike the schema of an entity you defined. - Counting users has its own endpoint, Count app users. Don’t pass
Userto Count entity records. - The record endpoints don’t reject it either. List, Create, Get, Update, and Delete entity record all accept
Useras anentity_name, but they read and write a separate, disconnected set of records stored under that name, not the app’s real user accounts.
Filtering, sorting, and paging
List entity records accepts these query parameters.Filter
Two ways to filter:- Pass one of the entity’s own field names directly as a query parameter, for an exact match.
?status=paidmatches records wherestatusis"paid". - Pass
qas a JSON object, for anything beyond an exact match, for example{"amount": {"$gt": 100}}.qaccepts:- Compare:
$eq,$ne,$gt,$gte,$lt,$lte - Match a set:
$in,$nin - Combine conditions:
$and,$or,$nor,$not - Check presence or type:
$exists,$type - Arrays:
$all,$elemMatch,$size - Substring or pattern:
$regex - Geospatial and full-text, if the field actually holds that kind of data:
$near,$nearSphere,$geoIntersects,$geoWithin,$text,$search
- Compare:
q, limit, skip, sort, or fields, and isn’t one of the entity’s own field names, is still read as a filter on that name. A misspelled field name matches nothing rather than returning an error.
Base44 wraps every filter in the entity’s own row-level-security conditions before checking nesting depth, so how deep you can nest q depends on the entity’s rls rules.
Sort
Sort with a single field name insort, prefixed with - for descending, for example -created_date. Sorting by more than one field isn’t supported.
Page
Page withlimit (1 to 5000, defaults to 5000) and skip (defaults to 0). Base44 caps every call at 5000 records, whether you leave limit out or ask for more, and the response doesn’t indicate when it was cut short.
Select fields
Reduce the response size withfields, a comma-separated list of field names. Reach into an object with dots, as in customer.email. Every record still carries its id.
Rate limits
Each entity endpoint states its base rate limit in its429 response. List entity records and Count entity records share one allowance, scoped to one app rather than shared across the workspace’s other apps, and also drawn down by version-history activity in the Base44 online app editor. A paid plan gets a multiple of the base number. See Rate limits for the multiplier table.
Endpoints
Schemas
- List entity schemas: List every entity the app defines.
- Get entity schema: Read one entity’s JSON Schema.
- Create entity schema: Add a new entity to the app.
- Update entity schema: Replace an entity’s JSON Schema.
- Sync entity schemas: Replace the app’s entire set of entities in one call.
- Delete entity schema: Remove an entity that has no records.
Records
- List entity records: Read one page of an entity’s records, with a cursor for the next page.
- Count entity records: Count an entity’s records, optionally narrowed by a filter.
- Get entity record: Read one record.
- Create entity record: Add a record to an entity.
- Update entity record: Change the fields you send on one record.
- Delete entity record: Delete one record.
Bulk operations
- Create entity records: Add several records in one call.
- Update entity records: Change up to 500 records, each with its own fields.
- Update entity records by filter: Apply the same change to up to 500 records that match a filter.
- Import entity records from CSV: Create records from a CSV file.
- Delete entity records: Delete every record that matches a filter.
Trash
- List deleted entity records: List the deleted records still in an entity’s trash.
- Restore entity record: Bring one deleted record back.
- Restore entity records: Bring back every deleted record that matches a filter.
- Permanently delete entity record: Erase one record from the trash for good.
Data checkpoints
- Get data version history status: Check whether the app has version history for its data, and how far back it goes.
- List data checkpoints: List the points in the data history you can download or restore to.
- Download data checkpoint: Read every record one entity held at a checkpoint.
- Restore data to checkpoint: Start putting the entities you name back the way they were.
- Get data restore status: Check where each entity in a restore has got to.