Skip to content
PraxivaraPraxivaraDocs
Websites API Calling functions

Calling backend functions

Run one of your website's backend functions from your own server: the request, what the function receives, what comes back, and which keys may call it.

Updated Dec 2, 2026 ET 1 min read
On this page

POST /api/functions/<name> runs one of your website's backend functions. The JSON body, if any, is handed to the function as its event.

Shell
curl -X POST https://<your app address>/api/functions/send_reminders \
  -H "X-Api-Key: pxa_sk_..." -H "Content-Type: application/json" \
  -d '{"before": "2026-06-13"}'
JSON
{ "ok": true, "result": { "sent": 14 }, "run_id": "r_9c2..." }
  • The function's own return value comes back as result; run_id names the run as the Automations tab lists it. The answer's status is 200, or the 2xx status the function returned.
  • event.user, event.ip, event.request and event.api_key are set by the platform and cannot be supplied in the body. Over the API, event.user is null and event.api_key is { key_id, name }.
  • Needs a secret key with full access and no table limit.
  • A function that runs as the website may read and write every table; any other runs with no signed-in user and reaches only what a signed-out visitor could.
  • Functions that are switched off or marked internal answer no_such_function.
  • Add an Idempotency-Key header to make a retry safe.

Which functions are listed

Your website's /api/openapi.json lists the callable functions under the Functions tag, with each one's description, when fetched with a key that may call them.

Failures

A function that throws or is stopped answers 500 function_failed, or 504 when it timed out. The body adds function_error (the run's error code) and run_id. The run's console output and stack are on the Automations tab. A function that could not be started answers 503 function_unavailable with a Retry-After header and a function_error that says why.

Was this page helpful?

Related articles