MultiPaaS

The generated API and API versions

The generated API is a GraphQL API that MultiPaaS builds from your model. An API version is a snapshot of that API at one point in the model's history.

What the API contains

For each entity, the API has a query for one record by its id, a query for a list of records, and mutations to delete and restore a record. It also has mutations to create and update records, with exceptions. A create mutation is left out when a required field with no default is not available through the API. An update mutation is left out when none of the entity's fields can be set.

The list queries return a page at a time. A page holds at most 100 records. A list shows live records only, newest first unless you order it. To show the children of one record, use a related field on the parent.

A list can be filtered, ordered and counted. where keeps the records that match every condition you give. A condition can check a field's value, its id, or when it was created or updated. Text can also be matched by how it starts, ends or what it contains, ignoring case. orderBy sorts by one of the record's own fields (not a reference), in either direction, and records with no value come last. where, orderBy and aggregate read each field that is not a list or a reference the way a query returns it. A value stored as another type, which can happen once the field's type has changed, reads converted to the field's type. A record that stores no value in a field that is non-null at the app's API version reads that field's default. A record's field returns an error in a query when its value can't be converted, or when the app's API version can't represent it, such as an enum value added later. where, orderBy and aggregate read the first as no value. The second counts as a value to isNull and notIn, and orderBy sorts it last. totalCount is how many records match across every page, and asking for only the count fetches no records. aggregate totals a list the same way: it has one entry per number or timestamp field, plus createdAt and updatedAt, holding min and max (and sum for a number) over every record that matches, ignoring paging. A record that reads no value in the field is skipped. With no matching value, sum is 0 and min and max are null. A sum is worked out exactly from the values as read and rounded once, to the nearest Float, when it is returned, so it can differ from adding the same Float values one at a time in the app, sometimes by far more than a rounding error. A sum of whole numbers is exact up to 2^53. aggregate needs an API version minted after it shipped. An app on an older version has none until it upgrades. A list only ever matches records the caller may read, so a filter, a count or an aggregate never reveals anything else. A list field reads and writes as an array and is filtered with has, an exact, case-sensitive match on one of its values. It can't be used in orderBy. A reference to a record the caller cannot read counts as no value: isNull: true matches it, eq and in do not, and notIn does.

On an API version with cursor paging, a list is ordered by its orderBy field, records with no value last, then newest first, then by record id. With no orderBy it is newest first, then by record id. To walk a whole list, page by cursor: each page's pageInfo.nextCursor is passed back as cursor, with page.page 0 and the same orderBy, until hasMore is false. A record is in the list while it exists, the caller can read it, and it meets the list's arguments: its where, a top-level list's scope, and, in a related list, pointing at the parent record. Each page lists, in the list's order, the first pageSize of the records that are in the list when that page is read and sort after the walk's position. The first page, read without a cursor, starts at the beginning of the list. After that, the position is the place the previous page's last record held when that page was read, and it stays there whatever later happens to that record. So a cursor walk lists each record that is in the list for the whole walk exactly once, unless its orderBy field changes mid-walk: it then moves to its new place, so the walk can miss it or list it twice. Ordered by UPDATED_AT, any change to a record moves it. A record that is in the list for only part of the walk is listed if it is in the list when the walk reaches its place. With no orderBy, a record's place is its creation time, which updates, restores and imports keep, and a newly created record is normally newer than anything the walk has reached, so it is normally not listed. With no orderBy, nothing a record can change moves it. Page numbers still work, for jumping to a page. Cursor paging needs an API version minted after it shipped. An app on an older version pages by number until it upgrades.

A list can also keep records by their related records and by the record they point at. These conditions need an API version made after they were added: an app pinned to an older version keeps the filters it had, and moving to a newer version gets them. On a related field, some keeps records with at least one related record meeting the conditions you give, and none keeps records with none. On a reference, is keeps records whose referenced record meets them. The conditions inside use the other entity's fields, so a flashcards app lists the words a learner hasn't started with where: {cards: {none: {}}}. Conditions nest at most three levels deep, and each where holds at most 100 conditions in all, counting nested ones and each some, none and is. A related or referenced record the caller cannot read counts as absent. some, none and is are refused when null: use {} for any record, or isNull to test the reference itself.

An app pinned to an API version made before lists could be filtered keeps the lists it had. To filter, move the app to a newer version. When your model has not changed since, make one with the newest API features first. List fields need an API version made after they were added: an app pinned to an older version does not have them, and moving to a newer version gets them.

A field that points at another record is set by that record's id. Each enum becomes a GraphQL enum.

The schema is the reference for exact names. The CLI can write it to a file for your code generator.

Two mutations share and unshare records: shareRecords and unshareRecords. They act on many records of any entities at once, and need an API version made after they were added. See sharing from your app.

Updating safely

Every record has a version, which changes each time the record is updated. An update can pass the version it last read as expectedVersion. If the record has changed since then, the update writes nothing and fails with the code CONFLICT, so your app can read the record again and retry. Without expectedVersion, an update writes what it is given, even over a change it never saw, so a record is protected only when every update to it passes expectedVersion.

This lets two requests change the same record at the same time without losing either change, such as a counter that enforces a daily limit. Both read the counter, and both write it back with the version they read. One succeeds. The other gets CONFLICT, reads the new count, and stops if the limit is reached. If the re-read shows deletedAt set, the record was deleted; if it returns null, the caller can no longer read it. Either way, stop and report it, never recreate it or write the change somewhere else.

An update of a record that was already deleted, that the caller cannot read, or that the caller can read but may not change, is refused with NOT_FOUND: stop and report it the same way. A record the caller cannot read never reports CONFLICT. version and expectedVersion need an API version made after they were added: an app pinned to an older version keeps updating as before.

API versions

Every change to the model makes a new API version. So does multipaas versions create (CLI 1.10.0 or later) when MultiPaaS has newer API features than your newest version: it makes a version of the same model with them. There is no default version. Your app pins one, and sends it with every request in the X-MultiPaaS-App-Api-Version header. A request without the header is refused with HTTP 400. A request for a version that does not exist is refused with 404.

Because of the pin, a model change never breaks an app already built. Your app keeps working on its pinned version.

If you rename a field in the API, only the new version has the new name. An app on an earlier version keeps the old name. Its records carry over.

Moving to a newer version

Your app moves to a newer version only when you decide. Before you do, you can compare two versions. The comparison sorts the differences into four lists:

When all four lists are empty, nothing in your app needs to change.

Who can call it

Every request carries a bearer access token. The token comes from sign-in. A refused request returns an error with a code. A request that breaks a rule of the model returns the code VALIDATION, with the fields at fault. An update whose expectedVersion is out of date returns CONFLICT. A request over the account's API limit returns LIMIT_REACHED; see Limits. A refused share or unshare returns the ids at fault in extensions.ids, except VALIDATION, which names fields, and a request with no app-tenant selected, which carries none.

Limits

An account's plan can limit how many requests its apps make to the generated API and over MCP: per minute, per day and per month, each counted in UTC. Every request counts, whoever sends it: an end user, an app identity running a background job, or an agent connected over MCP, in every app and app-tenant of the account. An MCP tool call is one request. Connecting and listing tools don't count, and neither does a request refused for its token or its API version.

A request over a limit gets HTTP 429 with a Retry-After header, the number of seconds until the limit resets, and this body:

{
  "errors": [
    {
      "message": "This account reached its API requests per minute limit.",
      "extensions": {
        "code": "LIMIT_REACHED",
        "measure": "api_requests_minute",
        "limit": 1000,
        "resetsAt": "2026-11-24T03:41:00Z"
      }
    }
  ]
}

measure is api_requests_minute, api_requests_day or api_requests_month. resetsAt is when it resets: the start of the next minute, the next midnight, or the first of the next month, in UTC. A request over more than one limit names the one that resets last. Over MCP, the tool call gets the same status and body.

A refused request still counts toward the day and the month, so retrying in a loop uses up the rest of the day's limit. The limit is the account's, so send no request to the API from any part of your app until resetsAt, not only the refused one. Every app and MCP client on the account shares the limit, so they use it up during the pause too. The daily and monthly counts can trail the requests by about half a minute, so a burst can pass those two limits by that much before it is refused. A 429 without LIMIT_REACHED comes from the network in front of the API, not from a limit: retry it after as long as its Retry-After header says when it carries one (a number of seconds or an HTTP date), otherwise after a short wait, backing off each time and stopping after a few tries.

An account's plan can also limit its storage. Database storage counts every record with its full history (each saved version, deleted records included), the model (its entities, fields, enums and unique constraints, every version), the account's memberships and role assignments, its apps' app identities and deployers, and a fixed amount for each app. A person's own sign-in account counts toward no account's storage. File storage is measured separately and counts each file's size from the time its upload is requested. Both are measured about once an hour. Deleted data counts until it is erased: a deleted record keeps counting, with its history, until its app-tenant, environment or app is erased, and a deleted app, app-tenant or environment counts until it is erased after its retention period. A record's files are kept for its history, so they count toward file storage until its app-tenant, environment or app is erased. An import's files are kept too: once the import has run or been deleted, they count toward file storage until its environment or app is erased. A file taken off an import before it runs stops counting at the next measurement, and so does an upload never attached to a record, once it is removed a day after it was requested.

Once an account is 10% or more past a storage limit, a request that adds data is refused with this error:

{
  "errors": [
    {
      "message": "This account reached its database storage limit.",
      "extensions": {
        "code": "LIMIT_REACHED",
        "measure": "db_storage_bytes",
        "limit": 5368709120,
        "resetsAt": null
      }
    }
  ]
}

measure is db_storage_bytes for creating, updating or restoring a record, or file_storage_bytes (with "This account reached its file storage limit.") for requesting a file upload. Builder operations are refused the same way: changing the model (adding or changing an entity, field or enum, or adding a unique constraint), adding a member, accepting an invitation, creating an app identity or a deployer, and starting an import with db_storage_bytes, and adding a file to an import, or starting an import that copies files, with file_storage_bytes. limit is the plan's limit in bytes. resetsAt is null, because a storage limit doesn't reset on a schedule, so retrying won't help. Reads, deletes and retiring still work. Over MCP, the tool call fails with the message and the code. Storage is measured about once an hour, so after data changes a refusal starts or lifts at the next measurement, usually within about an hour. More storage comes from a larger plan. A plan change takes effect within a minute: a plan with a lower limit can start a refusal, and one with a higher limit lifts it once the account is less than 10% past the new limit.

An account's plan can also limit the bytes of its apps' files that are downloaded each month, counted in UTC. A download of an app's file counts the bytes sent, whichever link it was made through. Downloads are counted from the file store's access logs, which S3 delivers on a best-effort basis, mostly within a few hours, so the count trails the downloads, and a refusal starts some time after the limit is passed, not the moment it is reached. Once the month's downloads reach the limit, a file field comes back null, with an error at that field's path:

{
  "data": { "recipe": { "title": "Soup", "photo": null } },
  "errors": [
    {
      "message": "This account reached its monthly file download limit. It resets at 2026-12-01 00:00 UTC.",
      "path": ["recipe", "photo"],
      "extensions": {
        "code": "LIMIT_REACHED",
        "measure": "file_download_bytes",
        "limit": 10737418240,
        "resetsAt": "2026-12-01T00:00:00Z"
      }
    }
  ]
}

The rest of the response is served, so the record and its other fields still read. limit is the plan's limit in bytes, and resetsAt is the start of next month in UTC. Over MCP, a tool that reads records returns them with the file field null, followed by a second text block that starts "Some fields are null because they could not be read:" and gives the message and the code. Uploads aren't refused by this limit, and the files the console shows aren't refused either. More downloads come from a larger plan. Adding a file to an import can also be refused by the account's monthly import limit; see Import existing data.

The account's Usage page in the console shows each limit for the current minute, day and month, broken down by app and app-tenant, with each app's app-wide requests on their own line, and requests per day for this month and the eleven before it. It also shows the account's AI units for today and this month against its plan's AI limits, broken down the same way, and AI units per day. It also shows the account's database and file storage at their latest measurement against its plan's storage limits, broken down the same way, with the time they were measured, and storage per day. The database storage tab notes that deleted data counts until it is erased. It also shows the account's file downloads and imports this month against its plan's limits, in bytes, broken down the same way, and each per day. It also shows the workflow runs the account started this month against its plan's Workflow runs per month limit, as one total for the account, not broken down by app. It is shown to account members whose role includes client.usage.view, which the Client manager role has.