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.
| Mode | Best for | Browser secret needed |
|---|---|---|
| Public | Open APIs | No |
| MiniUp Users | Any authenticated MiniUp account with its own caller identity and caller memory | No — uses the signed-in MiniUp session |
| API Key | Trusted external/server calls | Yes — caller needs a key; keep it out of browsers |
| Site Members | Authenticated members of one linked MiniUp app | No |
| Combined authenticated access | Enable MiniUp Users, API Keys, and Site Members together as needed | Depends on the enabled path |
| x402 Paid | Optional payment per successful request | No Function key; an x402-compatible client satisfies payment |
Create your first Function
- Open Functions in the main navigation and choose New Function.
- Enter a display name and globally unique stable slug.
- Write a JavaScript request handler in Code and save the draft.
- Use Test to run a preview request, inspect the result, and repair errors.
- Configure access, methods, and any Secrets.
- 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 →
Related guides
Use persistent Function Memory to save JSON without setting up a database.
Explore all Function features
| Feature | Guide |
|---|---|
| Shared and caller-isolated JSON, quotas, pagination, and lifecycle | Function Memory |
Customer keys, tenant boundaries, and MINIUP_CALLER | Callers and tenants |
Member identity, MINIUP_USER, and role authorization | Site Members |
| Named keys, rotation, revocation, methods, and browser origins | Access and authentication |
| Private third-party credentials | Function Secrets |
| Preview, publish, and request examples | Create and test |
| Routes, public documentation, and Explorer listing | API documentation |
| Route pricing, payment fallback, and Bazaar discovery | x402 payments |
| Approved library imports | Trusted 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