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
API KeyTrusted external/server callsYes — caller needs a key; keep it out of browsers
Site MembersAuthenticated MiniUp appsNo
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 persistent 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 →

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