Skip to Content
FunctionsCreate and Use MiniUp Functions
On this page

Create and Use MiniUp Functions

A MiniUp Function runs server-side JavaScript when an HTTP request arrives. Use a Function to validate input, enforce member permissions, transform data, or call services using private credentials.

Choose a Function workflow

  • Open API: publish a Public Function for data or logic that anyone may call.
  • Trusted integration: protect a Function with an API Key and call it from a trusted server.
  • Paid API (optional): enable x402 payments alongside any access setting and charge compatible callers per successful request.
  • Authenticated app: link a Site Members Function to one MiniUp Site and use the Site’s members and roles.
ModeBest forBrowser secret needed
PublicOpen APIsNo
MiniUp UsersAny authenticated MiniUp account with its own caller identity and caller memoryNo — uses the signed-in MiniUp session
API KeyTrusted external/server callsYes — caller needs a key; keep it out of browsers
Site MembersAuthenticated members of one linked MiniUp appNo
Combined authenticated accessEnable MiniUp Users, API Keys, and Site Members together as neededDepends on the enabled path
x402 PaidOptional payment per successful requestNo Function key; an x402-compatible client satisfies payment

Create your first Function

  1. Open Functions in the main navigation and choose New Function.
  2. Enter a display name and globally unique stable slug.
  3. Write a JavaScript request handler in Code and save the draft.
  4. Use Test to run a preview request, inspect the result, and repair errors.
  5. Configure access, methods, and any Secrets.
  6. Select Publish and test the resulting endpoint in its intended calling context.

Start with the step-by-step Function guide and its minimal handler.

What belongs in a Function?

Functions handle requests and return responses. Keep frontend files in the Site and small persistent JSON in Function Memory, and queryable application records in a Table or service. Do not treat a Function’s in-memory variables as a persistent database. Use browser-safe code for the frontend and a standard JavaScript fetch handler for Function code.

Review availability and usage

Open Functions to see your Function count, API calls this month, remaining calls, and reset date. Account allowances and feature availability can differ. Check Plans and your signed-in usage before depending on a particular limit. Understand limits and usage →

Use persistent Function Memory to save JSON without setting up a database.

Explore all Function features

FeatureGuide
Shared and caller-isolated JSON, quotas, pagination, and lifecycleFunction Memory
Customer keys, tenant boundaries, and MINIUP_CALLERCallers and tenants
Member identity, MINIUP_USER, and role authorizationSite Members
Named keys, rotation, revocation, methods, and browser originsAccess and authentication
Private third-party credentialsFunction Secrets
Preview, publish, and request examplesCreate and test
Routes, public documentation, and Explorer listingAPI documentation
Route pricing, payment fallback, and Bazaar discoveryx402 payments
Approved library importsTrusted ESM

In your Function dashboard, search and sort the catalog to find an integration. Open a Function’s Usage tab to review recorded activity, API to manage access and keys, and Code for implementation. A documentation listing does not change endpoint authorization.

function · backend · JavaScript · API · Test · Preview · Publish