Docs

HTTP API: functions

Call functions, invoke them asynchronously, read invocations and logs, and manage functions: deploys, versions, rollback, bindings, caller rules, limits, cron schedules, triggers, workflows and builds.

Updated Nov 25, 2026

Call, deploy and manage functions over HTTP. Guides: Functions, Deploying and running functions, Event triggers, Durable workflows; SDK: JavaScript: Functions.

Base URLhttps://<project-ref>.sovarias.in — your project URL from Connect.
KeysSend the project's key as apikey. Calls made for a signed-in user also send Authorization: Bearer <access token>.
ErrorsA status code and {"detail": …} — a sentence, or {code, message} for errors your code may branch on (HTTP API).

#Call functions

Apps call POST /functions/v1/{name} on the project URL; your backend can also run them with invoke to get the full run record, or queue them.

POST/functions/v1/{fn_name}

Call a function the way your app does: the JSON body is the event, the response is what the function returns.

The function's caller rule decides who may call it: public (no key needed if the function is public), authenticated (a session or key), service_role (server key only). The response body is exactly the function's return value; the run is identified by the headers X-Sovaria-Invocation-Id, X-Sovaria-Duration-Ms and X-Sovaria-Compute-GB-Seconds.

Ask for a stream with Accept: text/event-stream (or ?stream=sse) or Accept: application/x-ndjson (?stream=ndjson) to receive output as it is produced.

Who
Your app: the project's anon key (apikey: <anon key>), with the user's access token once they are signed in.
Also at
/api/v1/fn/functions/{fn_name}

Path parameters

fn_namestringrequired
The function's name.

Headers

Acceptstringoptional
text/event-stream or application/x-ndjson for a streamed response.

Body

(event)any JSONoptional
Passed to your handler as event; empty body = {}.

Responses

  • 200The function's return value, with X-Sovaria-Invocation-Id, X-Sovaria-Duration-Ms and X-Sovaria-Compute-GB-Seconds headers.
  • 400Request body must be JSON.
  • 401The function needs a signed-in caller, or a key (This function needs an API key for keyless calls to a non-public function).
  • 403The caller rule or origin refuses this caller, or a plan limit.
  • 404No function with that name in this environment.
  • 409It was saved but never deployed.
  • 413The body is over the function's max_payload_bytes.
  • 429The function's rate limit, or the organization's concurrent runs (PLAN_LIMIT_REACHED, fn.concurrency) — retry after Retry-After.
  • 500Your code raised an error or ran out of time or memory; the run is logged as FAILED/TIMEOUT.
curl -s -X POST "$URL/functions/v1/send-receipt" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"orderId": 1042}'
Response
{
  "sent": true,
  "to": "ada@example.com"
}

POST/api/v1/fn/{function_name}/invoke

Run a deployed function and get the full run record: result, output, duration and compute.

For your backend, CI and the CLI (sov fn invoke). Apps call /functions/v1/{name}. execution_profile: heavy gives the run more resources where your plan allows.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

function_namestringrequired
The function's name.

Query parameters

project_idstring | nulloptional
Only when calling https://api.sovaria.in.
deploy_idstring | nulloptional
Run a specific deployment instead of the active one.
execution_profilestringoptionaldefault standard
standard or heavy.
One of standard, heavy

Body

(event)any JSONoptional
The event.

Returns

okboolean
The run finished without an error.
invocation_idstring
Find the run in the logs.
deploy_id, versionstring, integer
Which deployment ran.
modestring
invoke or simulate.
profilestring
standard or heavy.
resultany
What the handler returned.
stdout, stderrstring
Captured output.
duration_msnumber
memory_mb, gb_seconds, estimated_cost_usdnumber
The run's memory and compute, as billed.

Responses

  • 200Success.
  • 403The caller rule or origin refuses this caller, or a plan limit.
  • 404No function with that name in this environment.
  • 409It was saved but never deployed.
  • 413The body is over the function's max_payload_bytes.
  • 429The function's rate limit, or the organization's concurrent runs (PLAN_LIMIT_REACHED, fn.concurrency) — retry after Retry-After.
  • 500Your code raised an error or ran out of time or memory; the run is logged as FAILED/TIMEOUT.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/send-receipt/invoke" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"orderId": 1042}'
Response
{
  "ok": true,
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "deploy_id": "dep_7a…",
  "function_name": "send-receipt",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "version": 7,
  "mode": "invoke",
  "profile": "standard",
  "simulation": false,
  "duration_ms": 182.4,
  "result": {
    "sent": true,
    "to": "ada@example.com"
  },
  "stdout": "sending receipt for 1042\n",
  "stderr": "",
  "memory_mb": 256,
  "gb_seconds": 0.0456,
  "estimated_cost_usd": 7.6e-07
}

POST/api/v1/fn/{function_name}/invoke/async

Queue a run and return at once; read the result later.

For long work. Poll GET /api/v1/fn/invocations/{invocation_id} (or list jobs). Failed attempts are retried up to max_attempts.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

function_namestringrequired
The function's name.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.
deploy_idstring | nulloptional
A specific deployment.
execution_profilestringoptionaldefault heavy
standard or heavy.
One of standard, heavy
simulationbooleanoptionaldefault false
Run as a simulation (writes rolled back).

Body

(event)any JSONoptional

Returns

acceptedbooleanoptionaldefault true
invocation_idstringrequired
statusstringrequired
project_idstringrequired
The project id.
function_namestringrequired
The function's name.
deploy_idstringrequired
versionintegerrequired
1.0–2147483647.0
modestringrequired
One of invoke, simulate
profilestringrequired
One of standard, heavy
created_atnumberrequired

Responses

  • 200Success.
  • 403The caller rule or origin refuses this caller, or a plan limit.
  • 404No function with that name in this environment.
  • 409It was saved but never deployed.
  • 413The body is over the function's max_payload_bytes.
  • 429The function's rate limit, or the organization's concurrent runs (PLAN_LIMIT_REACHED, fn.concurrency) — retry after Retry-After.
  • 500Your code raised an error or ran out of time or memory; the run is logged as FAILED/TIMEOUT.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/nightly-report/invoke/async" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"period": "2026-10"}'
Response
{
  "accepted": true,
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "status": "QUEUED",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "nightly-report",
  "deploy_id": "dep_3a…",
  "version": 4,
  "mode": "invoke",
  "profile": "standard",
  "created_at": 1792263000.512
}

GET/api/v1/fn/invocations/{invocation_id}

The status and result of an asynchronous run.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

invocation_idstringrequired
From invoke/async.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.

Returns

statusstring
QUEUED, RUNNING, RETRYING, SUCCEEDED, FAILED, TIMEOUT, DEAD_LETTER (failed every attempt) or DISCARDED.
resultany | null
The return value once it succeeded.
errorstring
Why it failed.
attempts, max_attemptsinteger
created_at, started_at, completed_at, updated_at, available_at, lease_untilnumber | null
Unix seconds.

Responses

  • 200Success.
  • 404No such run.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/invocations/0b7c2e91d4a64f0f9a3e5c1d2b8f7a60" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "status": "SUCCEEDED",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "nightly-report",
  "deploy_id": "dep_3a…",
  "version": 4,
  "mode": "invoke",
  "profile": "standard",
  "created_at": 1792263000.512,
  "updated_at": 1792263009.612,
  "started_at": 1792263000.9120002,
  "completed_at": 1792263009.612,
  "result": {
    "rows": 1043
  },
  "error": "",
  "attempts": 1,
  "max_attempts": 3,
  "available_at": null,
  "lease_until": null,
  "queue_status": "done"
}

POST/api/v1/fn/{function_name}/simulate

Run the function as a simulation: every Sovaria call it makes is checked, then rolled back or refused.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

function_namestringrequired
The function's name.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.
deploy_idstring | nulloptional
A specific deployment.
execution_profilestringoptionaldefault standard
standard or heavy.
One of standard, heavy

Body

(event)any JSONoptional

Returns

okbooleanoptionaldefault true
invocation_idstringrequired
deploy_idstringrequired
function_namestringrequired
The function's name.
project_idstringrequired
The project id.
versionintegerrequired
1.0–2147483647.0
modestringrequired
One of invoke, simulate
profilestringrequired
One of standard, heavy
simulationbooleanoptionaldefault false
duration_msnumberrequired
0.0–…
resultanyrequired
stdoutstringoptional
stderrstringoptional
memory_mbintegeroptionaldefault 0
gb_secondsnumberoptionaldefault 0.0
estimated_cost_usdnumberoptionaldefault 0.0

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/send-receipt/simulate" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"orderId": 1042}'
Response
{
  "ok": true,
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "deploy_id": "dep_7a…",
  "function_name": "send-receipt",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "version": 7,
  "mode": "simulate",
  "profile": "standard",
  "simulation": true,
  "duration_ms": 201.0,
  "result": {
    "sent": true,
    "to": "ada@example.com"
  },
  "stdout": "",
  "stderr": "",
  "memory_mb": 256,
  "gb_seconds": 0.0503,
  "estimated_cost_usd": 8.4e-07
}

POST/api/v1/fn/functions/{fn_name}/invoke

Run a function from the console's editor (team).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Body

payloadobjectoptional
The event.

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/functions/send-receipt/invoke" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"payload": {"orderId": 1042}}'
Response
{
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "function": "send-receipt",
  "status": "ok",
  "exit_code": 0,
  "result": {
    "sent": true
  },
  "stderr": null,
  "duration_ms": 182,
  "error": null
}

#Logs, runs and usage

GET/api/v1/fn/logs

Search invocation logs across the project's functions, newest first.

Kept for your plan's log retention (fn.log_retention_hours). Page with before = the previous page's next_before.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Query parameters

functionstring | nulloptional
One function.
pattern `^[A-Za-z0-9_-]{1,128}$`
statusstring | nulloptional
success, error, timeout or queued.
pattern `^(success|error|timeout|queued)$`
sourcestring | nulloptional
api, async, schedule, trigger, workflow or stream.
pattern `^(api|async|schedule|trigger|workflow|stream|queue)$`
trigger_idstring | nulloptional
Runs from one trigger.
0–64 characters
qstring | nulloptional
Text in the output or error.
0–200 characters
sincenumber | nulloptional
Unix seconds.
0–…
untilnumber | nulloptional
Unix seconds.
0–…
beforenumber | nulloptional
Cursor.
0–…
limitintegeroptionaldefault 50
1–200 (default 50).
1–200

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/logs?function=send-receipt&status=error&limit=20" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "logs": [
    {
      "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
      "function_name": "send-receipt",
      "status": "FAILED",
      "mode": "invoke",
      "source": "api",
      "trigger_id": "",
      "env_id": "",
      "started_at": 1792263000.512,
      "completed_at": 1792263000.7220001,
      "duration_ms": 211.0,
      "version": 7,
      "error": "TypeError: Cannot read properties of undefined (reading 'email')",
      "stdout": "",
      "stderr": "TypeError: Cannot read properties of undefined…",
      "event_preview": "{\"orderId\":9999}",
      "result_preview": "",
      "updated_at": 1792263000.7220001
    }
  ],
  "next_before": null
}

GET/api/v1/fn/logs/stream

Follow invocation logs live (Server-Sent Events).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Query parameters

functionstring | nulloptional
One function.
pattern `^[A-Za-z0-9_-]{1,128}$`
backfillintegeroptionaldefault 20
How many recent entries to send first.
0–100
max_secondsintegeroptionaldefault 1800
Close the stream after this long.
10–3600

Responses

  • 200text/event-stream: one event per finished run, with the same fields as GET /api/v1/fn/logs.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/logs/stream" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/functions/{fn_name}/logs

One function's recent runs.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Query parameters

limitintegeroptionaldefault 50
How many.
offsetintegeroptionaldefault 0
How many to skip.
statusstring | nulloptional
The run status in lowercase: succeeded, failed, timeout…

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/functions/send-receipt/logs" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
[
  {
    "invocation_id": "inv_8c1e…",
    "timestamp": "2026-10-18T09:12:04.120Z",
    "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
    "function": "send-receipt",
    "status": "succeeded",
    "duration_ms": 182,
    "error": null,
    "stderr_preview": "",
    "stdout_preview": "receipt sent to ana@example.com"
  }
]

GET/api/v1/fn/{function_name}/history/invocations

A function's runs with timing, compute and previews.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

function_namestringrequired
The function's name.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.
modestring | nulloptional
invoke or simulate.
One of invoke, simulate
limitintegeroptionaldefault 50
How many.
1–500
offsetintegeroptionaldefault 0
How many to skip.
0–…

Returns

project_idstringrequired
The project id.
function_namestringrequired
The function's name.
entriesarray<object>required
17 fields
invocation_idstringrequired
deploy_idstringrequired
versionintegerrequired
1.0–2147483647.0
modestringrequired
One of invoke, simulate
profilestringrequired
One of standard, heavy
statusstringrequired
started_atnumberrequired
completed_atnumberrequired
duration_msnumberrequired
0.0–…
event_previewstringoptional
result_previewstringoptional
errorstringoptional
stdout_previewstringoptional
stderr_previewstringoptional
memory_mbintegeroptionaldefault 0
gb_secondsnumberoptionaldefault 0.0
estimated_cost_usdnumberoptionaldefault 0.0

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/send-receipt/history/invocations" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "send-receipt",
  "entries": [
    {
      "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
      "deploy_id": "dep_7a…",
      "version": 7,
      "mode": "invoke",
      "profile": "standard",
      "status": "SUCCESS",
      "started_at": 1792263000.512,
      "completed_at": 1792263000.6920002,
      "duration_ms": 182.4,
      "event_preview": "{\"orderId\":1042}",
      "result_preview": "{\"sent\":true}",
      "error": "",
      "memory_mb": 256,
      "gb_seconds": 0.0456,
      "estimated_cost_usd": 7.6e-07
    }
  ]
}

GET/api/v1/fn/{function_name}/jobs

A function's asynchronous runs (queued, running, retried, finished).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

function_namestringrequired
The function's name.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.
statusstring | nulloptional
Filter by status.
limitintegeroptionaldefault 100
How many.
1–500
offsetintegeroptionaldefault 0
How many to skip.
0–…

Returns

project_idstringrequired
The project id.
function_namestringrequired
The function's name.
jobsarray<object>required
18 fields
invocation_idstringrequired
project_idstringrequired
The project id.
function_namestringrequired
The function's name.
deploy_idstringrequired
versionintegerrequired
1.0–2147483647.0
modestringrequired
One of invoke, simulate
profilestringrequired
One of standard, heavy
statusstringrequired
created_atnumberrequired
updated_atnumberrequired
attemptsintegerrequired
0.0–…
max_attemptsintegerrequired
1.0–…
available_atnumber | nulloptional
lease_untilnumber | nulloptional
started_atnumber | nulloptional
completed_atnumber | nulloptional
resultany | nulloptional
errorstringoptional

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/nightly-report/jobs" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "nightly-report",
  "jobs": [
    {
      "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "function_name": "nightly-report",
      "deploy_id": "dep_3a…",
      "version": 4,
      "mode": "invoke",
      "profile": "standard",
      "status": "SUCCEEDED",
      "created_at": 1792263000.512,
      "updated_at": 1792263009.612,
      "attempts": 1,
      "max_attempts": 3,
      "available_at": null,
      "lease_until": null,
      "started_at": 1792263000.9120002,
      "completed_at": 1792263009.612,
      "result": {
        "rows": 1043
      },
      "error": ""
    }
  ]
}

GET/api/v1/fn/{function_name}/history/simulation-diff

Compare two runs' results (for example before and after a change).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

function_namestringrequired
The function's name.

Query parameters

left_invocation_idstringrequired
The first run.
right_invocation_idstringrequired
The second run.
project_idstring | nulloptional
Only on https://api.sovaria.in.

Returns

project_idstringrequired
The project id.
function_namestringrequired
The function's name.
left_invocation_idstringrequired
right_invocation_idstringrequired
left_versionintegerrequired
1.0–2147483647.0
right_versionintegerrequired
1.0–2147483647.0
diffstringrequired
changedbooleanrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/send-receipt/history/simulation-diff" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "send-receipt",
  "left_invocation_id": "0b7c…",
  "right_invocation_id": "9d1e…",
  "left_version": 6,
  "right_version": 7,
  "diff": "--- v6\n+++ v7\n-  \"sent\": false\n+  \"sent\": true",
  "changed": true
}

GET/api/v1/fn/{function_name}/usage

A function's runs, errors, latency and compute over the last days.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

function_namestringrequired
The function's name.

Query parameters

daysintegeroptionaldefault 30
How many days back.
1–90
project_idstring | nulloptional
Only on https://api.sovaria.in.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/send-receipt/usage?days=7" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "days": 7,
  "invocations": 3120,
  "errors": 4,
  "avg_ms": 176.2,
  "p50_ms": 161.0,
  "p95_ms": 402.5,
  "compute_gb_seconds": 141.6,
  "estimated_cost_usd": 0.0024,
  "rates": {
    "gb_second_usd": 1.66667e-05
  }
}

#Deploy and versions

POST/api/v1/fn/functions

Create or replace a function from source code (one file) and deploy it.

The console's editor uses this. For folders with several files or dependencies, deploy a bundle with plan + deploy (what sov fn deploy does). Each deploy is a new version; a failed deploy never replaces the serving one.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Body

namestringrequired
Letters, digits, -, _.
1–128 characters, pattern `^[a-zA-Z0-9_-]+$`
sourcestringrequired
The code.
at least 1 characters
runtimestringoptionaldefault python3
python3 (Python 3.12), node18 (JavaScript on Node.js 20), bun (TypeScript on Bun 1.2, no build step) or go (Go 1.24, compiled when deployed). deno is accepted but can't run on Sovaria yet.
pattern `^(python3|node18|bun|go|deno)$`
entrypointstringoptionaldefault handler
The exported function to call.
env_varsobject<string, string>optional
Plain environment variables (secrets go in bindings).
regionstring | nulloptional
Kept for reference.
descriptionstringoptional
Shown in the console.
verify_jwtbooleanoptionaldefault true
Calls need a valid session or key.
httpbooleanoptionaldefault false

Returns

name, idstring
runtimestring
python3 (Python 3.12), node18 (JavaScript on Node.js 20), bun (TypeScript on Bun 1.2) or go (Go 1.24, compiled at deploy). It follows the entry file: main.py, index.mjs/index.js, index.ts, main.go.
entrypointstring
The exported function called (handler).
descriptionstring
verify_jwtboolean
Calls need a valid session or key.
publicboolean
Keyless calls are allowed.
versioninteger
Active version.
statusstring
active.
regionstring
source_hashstring
created_at, updated_atstring

Responses

  • 201Created.
  • 400Invalid name, runtime or source.
  • 403A plan limit (functions per project, dependencies…).
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/functions" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"name": "send-receipt", "runtime": "node18", "source": "export async function handler(event, context) {\n  return { sent: true, order: event.orderId }\n}", "description": "Email a receipt after payment"}'
Response
{
  "id": "fn_5d1a0c3e",
  "name": "send-receipt",
  "runtime": "node18",
  "entrypoint": "handler",
  "region": "us-east-1",
  "description": "Email a receipt after payment",
  "verify_jwt": true,
  "public": false,
  "version": 7,
  "source_hash": "3f9c1e…",
  "status": "active",
  "created_at": "2026-10-02T09:14:07Z",
  "updated_at": "2026-10-17T11:20:45Z"
}

POST/api/v1/fn/plan

Check a bundle before deploying it: returns a signed plan to apply.

Send the token as the X-Sovaria-Deploy-Plan header with POST /api/v1/fn/deploy to deploy exactly this bundle.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Body (multipart/form-data)

bundlestringrequired
The function folder as a base64 zip.
namestringrequired
The function's name.
project_idstring | nulloptional
Only on https://api.sovaria.in.
entrypointstringoptionaldefault main.py
Entry file (main.py, index.mjs…).
handlerstringoptionaldefault handler
Exported function.

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/plan" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "plan_id": "pln_41c…",
  "token": "eyJwaWQiOi….sig",
  "bundle_sha256": "e3b0c442…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "send-receipt",
  "entrypoint": "index.mjs",
  "handler": "handler",
  "checks": [
    {
      "check": "zip_archive",
      "ok": true
    },
    {
      "check": "entrypoint_present",
      "ok": true,
      "entrypoint": "index.mjs"
    },
    {
      "check": "size_limits",
      "ok": true
    }
  ],
  "expires_at": 1792263900,
  "apply": {
    "header": "X-Sovaria-Deploy-Plan"
  }
}

POST/api/v1/fn/deploy

Deploy a bundle (a zip of the function folder) as a new version.

The entry file picks the runtime: main.py (Python 3.12), index.mjs/index.js (Node.js 20), index.ts (TypeScript on Bun 1.2, no build step), main.go (Go 1.24). Go is compiled once here, in the sandbox without network access: dependencies must be vendored (vendor/, a paid-plan feature), and each build counts against fn.go_builds_month.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Body (multipart/form-data)

bundlestringrequired
The function folder as a base64 zip.
namestringrequired
The function's name.
project_idstring | nulloptional
Only on https://api.sovaria.in.
entrypointstringoptionaldefault main.py
Entry file.
handlerstringoptionaldefault handler
Exported function.
change_notestringoptional
Shown in the version history.
httpstring | nulloptional

Returns

deploy_idstringrequired
project_idstringrequired
The project id.
function_namestringrequired
The function's name.
versionintegerrequired
1.0–2147483647.0
statusstringoptionaldefault READY
invoke_urlstringrequired
change_notestringoptional
env_idstringoptional

Responses

  • 200Success.
  • 422Go build failed: with the compiler output and a hint (vendor your modules, export Handler…).
  • 413The compiled Go function is over 64 MB.
  • 403A plan limit: functions per project, fn.go_builds_month, or dependencies on the Free plan.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/deploy" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "deploy_id": "dep_7a…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "send-receipt",
  "version": 7,
  "status": "READY",
  "invoke_url": "https://<project-ref>.sovarias.in/functions/v1/send-receipt",
  "change_note": "retry on 5xx",
  "env_id": ""
}

GET/api/v1/fn/{deploy_id}/status

One deployment's status.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

deploy_idstringrequired
From deploy.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.

Returns

deploy_idstringrequired
project_idstringrequired
The project id.
function_namestringrequired
The function's name.
versionintegerrequired
1.0–2147483647.0
statusstringrequired
invoke_urlstringrequired
change_notestringoptional
created_bystringoptional
errorstringoptional
created_atnumberrequired
updated_atnumberrequired
is_activebooleanoptionaldefault false
promoted_atnumber | nulloptional
promoted_bystringoptional

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/<deploy_id>/status" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "deploy_id": "dep_7a…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "send-receipt",
  "version": 7,
  "status": "READY",
  "invoke_url": "https://<project-ref>.sovarias.in/functions/v1/send-receipt",
  "change_note": "retry on 5xx",
  "created_by": "6e19c0a2-…",
  "error": null,
  "created_at": 1792263000.512,
  "updated_at": 1792263000.512,
  "is_active": true,
  "promoted_at": 1792263000.512,
  "promoted_by": "6e19c0a2-…"
}

GET/api/v1/fn/{function_name}/versions

A function's versions, newest first.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

function_namestringrequired
The function's name.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.
limitintegeroptionaldefault 50
How many.
1–500
offsetintegeroptionaldefault 0
How many to skip.
0–…

Returns

project_idstringrequired
The project id.
function_namestringrequired
The function's name.
versionsarray<object>required
11 fields
versionintegerrequired
1.0–2147483647.0
deploy_idstringrequired
statusstringrequired
change_notestringoptional
created_bystringoptional
created_atnumberrequired
updated_atnumberrequired
bundle_sha256stringoptional
is_activebooleanoptionaldefault false
promoted_atnumber | nulloptional
promoted_bystringoptional

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/send-receipt/versions" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "send-receipt",
  "versions": [
    {
      "version": 7,
      "deploy_id": "dep_7a…",
      "status": "READY",
      "change_note": "retry on 5xx",
      "created_by": "6e19c0a2-…",
      "created_at": 1792263000.512,
      "updated_at": 1792263000.512,
      "bundle_sha256": "e3b0c442…",
      "is_active": true,
      "promoted_at": 1792263000.512,
      "promoted_by": "6e19c0a2-…"
    }
  ]
}

POST/api/v1/fn/{function_name}/rollback

Go back to an earlier version (the previous one by default).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

function_namestringrequired
The function's name.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.

Body

versioninteger | nulloptional
Version to go back to; leave out for the previous.
1.0–2147483647.0
reasonstringoptional
Recorded with the change.

Returns

project_idstringrequired
The project id.
function_namestringrequired
The function's name.
from_versioninteger | nulloptional
1.0–2147483647.0
from_deploy_idstring | nulloptional
to_versionintegerrequired
1.0–2147483647.0
to_deploy_idstringrequired
updated_atnumberrequired
0.0–…
reasonstringoptional
rollbackbooleanoptionaldefault false

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/send-receipt/rollback" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"reason": "receipt template broke"}'
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "send-receipt",
  "from_version": 7,
  "from_deploy_id": "dep_7a…",
  "to_version": 6,
  "to_deploy_id": "dep_6c…",
  "updated_at": 1792263000.512,
  "reason": "receipt template broke",
  "rollback": true
}

POST/api/v1/fn/{function_name}/promote

Make a specific version (or deployment) the active one.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

function_namestringrequired
The function's name.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.

Body

versioninteger | nulloptional
Version to activate.
1.0–2147483647.0
deploy_idstring | nulloptional
Or a deployment id.
reasonstringoptional
Recorded with the change.

Returns

project_idstringrequired
The project id.
function_namestringrequired
The function's name.
from_versioninteger | nulloptional
1.0–2147483647.0
from_deploy_idstring | nulloptional
to_versionintegerrequired
1.0–2147483647.0
to_deploy_idstringrequired
updated_atnumberrequired
0.0–…
reasonstringoptional
rollbackbooleanoptionaldefault false

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/send-receipt/promote" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"version": 7, "reason": "fixed"}'
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "send-receipt",
  "from_version": 6,
  "from_deploy_id": "dep_6c…",
  "to_version": 7,
  "to_deploy_id": "dep_7a…",
  "updated_at": 1792263000.512,
  "reason": "fixed",
  "rollback": false
}

#Settings, callers and secrets

GET/api/v1/fn/functions

The project's functions.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Returns

functionsarray<object>
Per function: active and latest version, last deploy and call, queued jobs, runtime; inherited when an environment uses production's copy.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/functions" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "functions": [
    {
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "function_name": "send-receipt",
      "function_key": "send-receipt",
      "active_version": 7,
      "active_deploy_id": "dep_7a…",
      "latest_version": 7,
      "latest_status": "READY",
      "last_deployed_at": 1792263000.512,
      "last_invoked_at": 1792266600.512,
      "deploy_count": 7,
      "queued_jobs": 0,
      "origin": "cli",
      "runtime": "node18",
      "description": "Email a receipt after payment",
      "env_id": "",
      "inherited": false
    }
  ]
}

GET/api/v1/fn/functions/{fn_name}

One function's settings.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Returns

name, idstring
runtimestring
python3 (Python 3.12), node18 (JavaScript on Node.js 20), bun (TypeScript on Bun 1.2) or go (Go 1.24, compiled at deploy). It follows the entry file: main.py, index.mjs/index.js, index.ts, main.go.
entrypointstring
The exported function called (handler).
descriptionstring
verify_jwtboolean
Calls need a valid session or key.
publicboolean
Keyless calls are allowed.
versioninteger
Active version.
statusstring
active.
regionstring
source_hashstring
created_at, updated_atstring

Responses

  • 200Success.
  • 404No such function.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/functions/send-receipt" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "id": "fn_5d1a0c3e",
  "name": "send-receipt",
  "runtime": "node18",
  "entrypoint": "handler",
  "region": "us-east-1",
  "description": "Email a receipt after payment",
  "verify_jwt": true,
  "public": false,
  "version": 7,
  "source_hash": "3f9c1e…",
  "status": "active",
  "created_at": "2026-10-02T09:14:07Z",
  "updated_at": "2026-10-17T11:20:45Z"
}

PATCH/api/v1/fn/functions/{fn_name}

Change a function's source or settings (redeploys when the source changes).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

fn_namestringrequired
The function's name.

Body

sourcestring | nulloptional
New code.
env_varsobject<string, string> | nulloptional
Plain variables.
runtimestring | nulloptional
python3, node18, bun or go.
entrypointstring | nulloptional
Exported function.
regionstring | nulloptional
Kept for reference.
httpboolean | nulloptional
descriptionstring | nulloptional
Shown in the console.
verify_jwtboolean | nulloptional
Require a session or key.

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PATCH "$URL/api/v1/fn/functions/send-receipt" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"description": "Email a receipt (with PDF)"}'
Response
{
  "id": "fn_5d1a0c3e",
  "name": "send-receipt",
  "runtime": "node18",
  "entrypoint": "handler",
  "region": "us-east-1",
  "description": "Email a receipt (with PDF)",
  "verify_jwt": true,
  "public": false,
  "version": 7,
  "source_hash": "3f9c1e…",
  "status": "active",
  "created_at": "2026-10-02T09:14:07Z",
  "updated_at": "2026-10-17T11:20:45Z"
}

DELETE/api/v1/fn/functions/{fn_name}

Delete a function and its versions; its URL stops working.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/functions/send-receipt" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "status": "deleted",
  "name": "send-receipt"
}

GET/api/v1/fn/functions/{fn_name}/source

The active version's source code (single-file functions).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/functions/send-receipt/source" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "name": "send-receipt",
  "source": "export async function handler(event, context) {\n  …\n}",
  "runtime": "node18"
}

PUT/api/v1/fn/functions/{fn_name}/access

Allow or stop keyless (public) calls.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Body

publicbooleanrequired
true: anyone can call it without a key.

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/fn/functions/status-badge/access" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"public": true}'
Response
{
  "name": "status-badge",
  "public": true
}

GET/api/v1/fn/functions/{fn_name}/policy

Who may call the function, its rate limit, body limit, origins and timeout.

saved: false means the function still uses the defaults shown.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/functions/send-receipt/policy" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "invoke_permission": "authenticated",
  "rate_limit_per_minute": 60,
  "max_payload_bytes": 1048576,
  "allowed_origins": "*",
  "timeout": 30,
  "saved": true
}

PUT/api/v1/fn/functions/{fn_name}/policy

Set who may call the function and its call limits.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Body

invoke_permissionstringoptionaldefault authenticated
public (anyone who can reach it), authenticated (signed-in users, team members, service key), service_role (service key and team only).
pattern `^(public|authenticated|service_role)$`
rate_limit_per_minuteintegeroptionaldefault 60
Calls per minute (1–10,000).
1.0–10000.0
max_payload_bytesintegeroptionaldefault 1048576
Largest request body (1 KB – 10 MB).
1024.0–10485760.0
allowed_originsstringoptionaldefault *
Browser origins allowed to call it, comma-separated, or *.
timeoutintegeroptionaldefault 30
Seconds (1–300).
1.0–300.0

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/fn/functions/send-receipt/policy" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"invoke_permission": "authenticated", "rate_limit_per_minute": 120, "max_payload_bytes": 65536, "allowed_origins": "https://app.example.com", "timeout": 20}'
Response
{
  "invoke_permission": "authenticated",
  "rate_limit_per_minute": 120,
  "max_payload_bytes": 65536,
  "allowed_origins": "https://app.example.com",
  "timeout": 20
}

GET/api/v1/fn/functions/{fn_name}/limits

The function's memory and timeout, and what your plan allows.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Returns

timeout_sec, memory_mbinteger | null
What you set (null = plan maximum).
effectiveobject
What runs use.
planobject
Your plan's maximums.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/functions/send-receipt/limits" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "timeout_sec": 60,
  "memory_mb": 256,
  "min_instances": 1,
  "effective": {
    "timeout_sec": 60,
    "memory_mb": 256,
    "min_instances": 1
  },
  "plan": {
    "timeout_sec": 150,
    "memory_mb": 1024,
    "min_instances": 1
  }
}

PUT/api/v1/fn/functions/{fn_name}/limits

Set the function's memory and timeout (within your plan) and its minimum warm instances.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Body

timeout_secinteger | nulloptional
1–900 seconds, capped by the plan; null for the plan maximum.
1.0–900.0
memory_mbinteger | nulloptional
64–4,096 MB, capped by the plan.
64.0–4096.0
min_instancesinteger | nulloptional
Sandboxes kept started for this function so its calls skip the cold start (0–8, capped by fn.min_instances; left out = unchanged).
0.0–8.0

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/fn/functions/send-receipt/limits" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"timeout_sec": 60, "memory_mb": 256, "min_instances": 1}'
Response
{
  "timeout_sec": 60,
  "memory_mb": 256,
  "min_instances": 1,
  "effective": {
    "timeout_sec": 60,
    "memory_mb": 256,
    "min_instances": 1
  },
  "plan": {
    "timeout_sec": 150,
    "memory_mb": 1024,
    "min_instances": 1
  }
}

GET/api/v1/fn/functions/{fn_name}/network

The hosts the function may call.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/functions/send-receipt/network" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "egress_hosts": [
    "api.stripe.com",
    "k3v9x2.sovarias.in"
  ],
  "max_hosts": 20
}

PUT/api/v1/fn/functions/{fn_name}/network

Set the hosts the function may call; requests to others are refused.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Body

egress_hostsarray<string>optional
Host names (no scheme or path), up to the plan's fn.egress_hosts.

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/fn/functions/send-receipt/network" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"egress_hosts": ["api.stripe.com", "k3v9x2.sovarias.in"]}'
Response
{
  "egress_hosts": [
    "api.stripe.com",
    "k3v9x2.sovarias.in"
  ],
  "max_hosts": 20
}

GET/api/v1/fn/functions/{fn_name}/bindings

The secrets and variables bound to the function (values masked).

Secret values are always masked; database and url values are shown.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/functions/send-receipt/bindings" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
[
  {
    "name": "STRIPE_KEY",
    "type": "secret",
    "value": "••••••••"
  },
  {
    "name": "ORDERS_DB",
    "type": "database",
    "value": "postgresql://…"
  },
  {
    "name": "WEBHOOK_URL",
    "type": "url",
    "value": "https://hooks.example.com/orders"
  }
]

PUT/api/v1/fn/functions/{fn_name}/bindings

Replace the function's bindings (secrets are stored encrypted).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Body

bindingsarray<object>required
The full list of {name, type, value}: name in UPPER_SNAKE_CASE, type secret (default), database or url.
3 fields
namestringrequired
1–64 characters, pattern `^[A-Z][A-Z0-9_]*$`
typestringoptionaldefault secret
pattern `^(secret|database|url)$`
valuestringrequired
at least 1 characters

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/fn/functions/send-receipt/bindings" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"bindings": [{"name": "STRIPE_KEY", "type": "secret", "value": "sk_live_…"}]}'
Response
[
  {
    "name": "STRIPE_KEY",
    "type": "secret",
    "value": "••••••••"
  }
]

GET/api/v1/fn/functions/{fn_name}/resources

Which Sovaria resources the function's code uses (static analysis).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/functions/send-receipt/resources" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "name": "send-receipt",
  "runtime": "node18",
  "resource_accesses": [
    {
      "engine": "sql",
      "resource": "orders",
      "actions": [
        "select"
      ]
    }
  ],
  "analysis": "static"
}

GET/api/v1/fn/env-secrets

Secret names set for every function in the environment (values never returned).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/env-secrets" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": null,
  "secrets": [
    "STRIPE_KEY",
    "OPENAI_API_KEY"
  ]
}

PUT/api/v1/fn/env-secrets

Set secrets for every function in the environment.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Body

secretsobject<string, string>required
Name to value.

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/fn/env-secrets" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"secrets": {"STRIPE_KEY": "sk_test_…"}}'
Response
{
  "set": [
    "STRIPE_KEY"
  ],
  "env_id": null
}

DELETE/api/v1/fn/env-secrets/{name}

Remove an environment secret.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

namestringrequired
The secret's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/env-secrets/STRIPE_KEY" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "deleted": true,
  "name": "STRIPE_KEY"
}

GET/api/v1/fn/templates

Starter templates for new functions.

Each template lists the hosts to allow and the secrets to set.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/templates" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
[
  {
    "id": "openai-chat",
    "name": "OpenAI chat",
    "brand": "openai",
    "category": "AI",
    "description": "Send a prompt to an OpenAI model and return the answer. Your key stays server-side.",
    "hosts": [
      "api.openai.com"
    ],
    "secrets": [
      "OPENAI_API_KEY"
    ],
    "source": "def handler(event):\n    …",
    "example": {
      "prompt": "Hello"
    }
  }
]

#Multi-file functions

GET/api/v1/fn/{function_name}/files

The files of the active version.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

function_namestringrequired
The function's name.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/send-receipt/files" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "function_name": "send-receipt",
  "version": 7,
  "deploy_id": "dep_7a…",
  "entrypoint": "index.mjs",
  "handler": "handler",
  "files": [
    {
      "path": "index.mjs",
      "size": 812
    },
    {
      "path": "lib/email.mjs",
      "size": 1904
    }
  ]
}

GET/api/v1/fn/{function_name}/files/raw

One file's content.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

function_namestringrequired
The function's name.

Query parameters

pathstringrequired
The file.
1–300 characters
project_idstring | nulloptional
Only on https://api.sovaria.in.

Responses

  • 200The file's text.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/send-receipt/files/raw" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PUT/api/v1/fn/{function_name}/files

Write one file and deploy a new version.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

function_namestringrequired
The function's name.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.

Body

pathstringrequired
The file.
1–300 characters
contentstringrequired
Its new content.
change_notestringoptional
Shown in the version history.
0–200 characters

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/fn/send-receipt/files" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"path": "lib/email.mjs", "content": "export const from = 'receipts@skolist.com'\n", "change_note": "new sender"}'
Response
{
  "status": "deployed",
  "version": 8,
  "deploy_id": "dep_8b…",
  "path": "lib/email.mjs"
}

DELETE/api/v1/fn/{function_name}/files

Delete one file and deploy a new version.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

function_namestringrequired
The function's name.

Query parameters

pathstringrequired
The file.
1–300 characters
project_idstring | nulloptional
Only on https://api.sovaria.in.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/send-receipt/files" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "status": "deployed",
  "version": 9,
  "deploy_id": "dep_9c…",
  "deleted": "lib/old.mjs"
}

#Cron schedules

GET/api/v1/fn/schedules

The cron schedules of the project's environment (function, HTTPS and SQL targets).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.
functionstring | nulloptional
Only one function's schedules.
0–128 characters

Returns

project_idstringrequired
The project id.
schedulesarray<object>required
20 fields
schedule_idstringrequired
project_idstringrequired
The project id.
function_namestringrequired
The function's name.
cron_expressionstringrequired
timezonestringoptionaldefault UTC
summarystringoptional
enabledbooleanrequired
payloadany | nulloptional
env_idstringoptional
namestringoptional
descriptionstringoptional
overlapstringoptionaldefault allow
max_attemptsinteger | nulloptional
timeout_secinteger | nulloptional
target_typestringoptionaldefault function
targetobject | nulloptional
next_run_atnumber | nulloptional
last_run_atnumber | nulloptional
created_atnumberrequired
0.0–…
updated_atnumberrequired
0.0–…

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/schedules" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "schedules": [
    {
      "schedule_id": "6f1c2b9a4d3e4f5a8b7c6d5e4f3a2b1c",
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "function_name": "nightly-report",
      "cron_expression": "0 2 * * *",
      "timezone": "Asia/Kolkata",
      "summary": "At 02:00 (Asia/Kolkata)",
      "enabled": true,
      "payload": {
        "period": "yesterday",
        "api_key": {
          "$secret": "REPORT_KEY"
        }
      },
      "env_id": "",
      "name": "Nightly report",
      "description": "",
      "overlap": "skip",
      "max_attempts": 3,
      "timeout_sec": null,
      "target_type": "function",
      "target": null,
      "next_run_at": 1792292400.0,
      "last_run_at": 1792206000.0,
      "created_at": 1791800000.0,
      "updated_at": 1791800000.0
    }
  ]
}

POST/api/v1/fn/schedules

Run a function, call an HTTPS URL or run SQL on a cron schedule.

Five fields or a macro (@hourly, @daily, …), names like MON-FRI; day of month and day of week together mean either. Matched in timezone (DST-aware). Values may be {"$secret": NAME} references. Each run counts as an invocation.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.

Body

function_namestringoptional
The function (function target).
0–128 characters
cron_expressionstringrequired
minute hour day month weekday or a macro, e.g. 0 2 * * *.
0–255 characters
enabledbooleanoptionaldefault true
Start enabled (default true).
payloadany | nulloptional
The event each run receives (function target; ≤ 256 KB).
namestringoptional
A label.
0–128 characters
descriptionstringoptional
A note.
0–500 characters
timezonestringoptionaldefault UTC
IANA time zone (default UTC).
0–64 characters
overlapstringoptionaldefault allow
allow (default) or skip (skip a slot while the previous run is going).
One of allow, skip
max_attemptsinteger | nulloptional
Tries per run (≤ plan fn.trigger_max_attempts).
1.0–50.0
timeout_secinteger | nulloptional
Lower the run's timeout (≤ plan fn.timeout_sec).
1.0–3600.0
target_typestringoptionaldefault function
function (default), http or sql.
One of function, http, sql, agent
targetobject | nulloptional
http: {url, method, headers, body, timeout_sec}; sql: {sql, params, key_secret}.

Returns

schedule_idstring
timezone, summarystring
IANA zone the fields are matched in; plain-English description.
target_type, targetstring, object | null
function (uses function_name, payload), http or sql (uses target; secret values show as references or [redacted]).
overlap, max_attempts, timeout_secstring, integer | null
allow / skip; tries per run; seconds.
next_run_at, last_run_at, created_at, updated_atnumber | null
Unix seconds.

Responses

  • 201Created.
  • 400Invalid or impossible expression, unknown time zone, bad target (IP / internal URL, non-DML SQL) or malformed secret reference.
  • 403The plan's cron job limit (fn.cron_jobs), tries or timeout.
  • 404No such function in this environment.
  • 413Payload over 256 KB.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/schedules" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"cron_expression": "0 2 * * *", "timezone": "Asia/Kolkata", "function_name": "nightly-report", "overlap": "skip", "payload": {"period": "yesterday", "api_key": {"$secret": "REPORT_KEY"}}}'
Response
{
  "schedule_id": "6f1c2b9a4d3e4f5a8b7c6d5e4f3a2b1c",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "nightly-report",
  "cron_expression": "0 2 * * *",
  "timezone": "Asia/Kolkata",
  "summary": "At 02:00 (Asia/Kolkata)",
  "enabled": true,
  "payload": {
    "period": "yesterday",
    "api_key": {
      "$secret": "REPORT_KEY"
    }
  },
  "env_id": "",
  "name": "Nightly report",
  "description": "",
  "overlap": "skip",
  "max_attempts": 3,
  "timeout_sec": null,
  "target_type": "function",
  "target": null,
  "next_run_at": 1792292400.0,
  "last_run_at": 1792206000.0,
  "created_at": 1791800000.0,
  "updated_at": 1791800000.0
}

GET/api/v1/fn/schedules/{schedule_id}

One schedule.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

schedule_idstringrequired
The schedule.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.

Returns

schedule_idstringrequired
project_idstringrequired
The project id.
function_namestringrequired
The function's name.
cron_expressionstringrequired
timezonestringoptionaldefault UTC
summarystringoptional
enabledbooleanrequired
payloadany | nulloptional
env_idstringoptional
namestringoptional
descriptionstringoptional
overlapstringoptionaldefault allow
max_attemptsinteger | nulloptional
timeout_secinteger | nulloptional
target_typestringoptionaldefault function
targetobject | nulloptional
next_run_atnumber | nulloptional
last_run_atnumber | nulloptional
created_atnumberrequired
0.0–…
updated_atnumberrequired
0.0–…

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/schedules/<schedule_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "schedule_id": "6f1c2b9a4d3e4f5a8b7c6d5e4f3a2b1c",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "nightly-report",
  "cron_expression": "0 2 * * *",
  "timezone": "Asia/Kolkata",
  "summary": "At 02:00 (Asia/Kolkata)",
  "enabled": true,
  "payload": {
    "period": "yesterday",
    "api_key": {
      "$secret": "REPORT_KEY"
    }
  },
  "env_id": "",
  "name": "Nightly report",
  "description": "",
  "overlap": "skip",
  "max_attempts": 3,
  "timeout_sec": null,
  "target_type": "function",
  "target": null,
  "next_run_at": 1792292400.0,
  "last_run_at": 1792206000.0,
  "created_at": 1791800000.0,
  "updated_at": 1791800000.0
}

PATCH/api/v1/fn/schedules/{schedule_id}

Change a schedule (send only what changes).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

schedule_idstringrequired
The schedule.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.

Body

function_namestring | nulloptional
Another function.
0–128 characters
cron_expressionstring | nulloptional
New timing.
0–255 characters
enabledboolean | nulloptional
Pause or resume.
payloadany | nulloptional
New event; null clears it; [redacted] values keep what is stored.
namestring | nulloptional
Label.
0–128 characters
descriptionstring | nulloptional
Note.
0–500 characters
timezonestring | nulloptional
New time zone.
0–64 characters
overlapstring | nulloptional
allow or skip.
One of allow, skip
max_attemptsinteger | nulloptional
Tries (null = default).
1.0–50.0
timeout_secinteger | nulloptional
Seconds (null = plan's).
1.0–3600.0
target_typestring | nulloptional
Switch target.
One of function, http, sql, agent
targetobject | nulloptional
New HTTP / SQL target.

Returns

schedule_idstringrequired
project_idstringrequired
The project id.
function_namestringrequired
The function's name.
cron_expressionstringrequired
timezonestringoptionaldefault UTC
summarystringoptional
enabledbooleanrequired
payloadany | nulloptional
env_idstringoptional
namestringoptional
descriptionstringoptional
overlapstringoptionaldefault allow
max_attemptsinteger | nulloptional
timeout_secinteger | nulloptional
target_typestringoptionaldefault function
targetobject | nulloptional
next_run_atnumber | nulloptional
last_run_atnumber | nulloptional
created_atnumberrequired
0.0–…
updated_atnumberrequired
0.0–…

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PATCH "$URL/api/v1/fn/schedules/<schedule_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"enabled": false}'
Response
{
  "schedule_id": "6f1c2b9a4d3e4f5a8b7c6d5e4f3a2b1c",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "function_name": "nightly-report",
  "cron_expression": "0 2 * * *",
  "timezone": "Asia/Kolkata",
  "summary": "At 02:00 (Asia/Kolkata)",
  "enabled": false,
  "payload": {
    "period": "yesterday",
    "api_key": {
      "$secret": "REPORT_KEY"
    }
  },
  "env_id": "",
  "name": "Nightly report",
  "description": "",
  "overlap": "skip",
  "max_attempts": 3,
  "timeout_sec": null,
  "target_type": "function",
  "target": null,
  "next_run_at": null,
  "last_run_at": 1792206000.0,
  "created_at": 1791800000.0,
  "updated_at": 1791800000.0
}

DELETE/api/v1/fn/schedules/{schedule_id}

Delete a schedule.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

schedule_idstringrequired
The schedule.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/schedules/<schedule_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "deleted": true,
  "schedule_id": "sch_2b91…"
}

GET/api/v1/fn/schedules/{schedule_id}/runs

A schedule's runs, newest first, including skipped and missed slots.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

schedule_idstringrequired
The schedule.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.
limitintegeroptionaldefault 50
How many (≤ 200).
1–200
beforenumber | nulloptional
Page: started_at of the last run shown.

Returns

statusstring
SUCCEEDED, FAILED, TIMEOUT, QUEUED, RUNNING, RETRYING, SKIPPED or MISSED.
response_previewstring
HTTP targets: the first 2 KB of the answer; SQL: row count and first rows.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/schedules/<schedule_id>/runs" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "schedule_id": "6f1c2b9a4d3e4f5a8b7c6d5e4f3a2b1c",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "next_before": null,
  "runs": [
    {
      "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
      "status": "SUCCEEDED",
      "started_at": 1792206000.1,
      "completed_at": 1792206009.4,
      "duration_ms": 9300.0,
      "error": "",
      "function_name": "nightly-report",
      "version": 4,
      "attempts": 1,
      "response_preview": ""
    },
    {
      "invocation_id": "7d1e0c4b2a9f4e3d8c7b6a5f4e3d2c1b",
      "status": "SKIPPED",
      "started_at": 1792119600.0,
      "completed_at": 1792119600.2,
      "duration_ms": 0.0,
      "error": "Skipped: the previous run was still in progress (overlap: skip)",
      "function_name": "nightly-report",
      "version": 4,
      "attempts": 0,
      "response_preview": ""
    }
  ]
}

POST/api/v1/fn/schedules/preview

The next run times of an expression in a time zone, with a readable summary (nothing is saved).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Body

cron_expressionstringrequired
The expression.
0–255 characters
timezonestringoptionaldefault UTC
IANA zone (default UTC).
0–64 characters
countintegeroptionaldefault 5
How many runs (1–20, default 5).
1.0–20.0

Returns

cron_expressionstringrequired
timezonestringrequired
summarystringrequired
next_runsarray<number>required
next_runs_localarray<string>required

Responses

  • 200Success.
  • 400Invalid or impossible expression, or unknown time zone.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/schedules/preview" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"cron_expression": "0 9 * * MON-FRI", "timezone": "Asia/Kolkata", "count": 3}'
Response
{
  "cron_expression": "0 9 * * MON-FRI",
  "timezone": "Asia/Kolkata",
  "summary": "At 09:00 on Monday through Friday (Asia/Kolkata)",
  "next_runs": [
    1792468800.0,
    1792555200.0,
    1792641600.0
  ],
  "next_runs_local": [
    "2026-10-27T09:00:00+05:30",
    "2026-10-28T09:00:00+05:30",
    "2026-10-29T09:00:00+05:30"
  ]
}

POST/api/v1/fn/schedules/{schedule_id}/run

Run a schedule now (its regular times don't change).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

schedule_idstringrequired
The schedule.

Query parameters

project_idstring | nulloptional
Only on https://api.sovaria.in.

Returns

schedule_idstringrequired
invocation_idstringrequired
statusstringrequired
queued_atnumberrequired

Responses

  • 202Accepted — the work continues in the background.
  • 403Background runs are switched off for the organization.
  • 409A run is still going and the schedule skips overlaps.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/schedules/<schedule_id>/run" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "schedule_id": "6f1c2b9a4d3e4f5a8b7c6d5e4f3a2b1c",
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "status": "QUEUED",
  "queued_at": 1792206000.0
}

#Event triggers and dead letters

GET/api/v1/fn/triggers

The project's event triggers, the plan's limits and every event type.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Query parameters

functionstring | nulloptional
One function's triggers.
pattern `^[A-Za-z0-9_-]{1,128}$`

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/triggers" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "triggers": [
    {
      "trigger_id": "4c1f9e2b7a0d4e8f9b6c3a2d1e0f5b7c",
      "org_id": "b2f4a1c8-…",
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "env_id": "",
      "name": "receipt on paid order",
      "function_name": "send-receipt",
      "source": "db.row",
      "event_types": [
        "row.updated"
      ],
      "resource": "orders",
      "subject_prefix": "",
      "enabled": true,
      "max_attempts": 5,
      "created_by": "6e19c0a2-…",
      "created_at": 1792263000.5,
      "updated_at": 1792263000.5,
      "last_event_at": null
    }
  ],
  "limits": {
    "triggers": 50,
    "max_attempts": 10,
    "dead_letter_days": 7
  },
  "sources": {
    "db.document": [
      "document.created",
      "document.updated",
      "document.deleted"
    ],
    "db.row": [
      "row.inserted",
      "row.updated",
      "row.deleted"
    ],
    "auth.user": [
      "user.created",
      "user.deleted"
    ],
    "storage.object": [
      "object.created",
      "object.deleted"
    ],
    "realtime.message": [
      "message.published"
    ]
  }
}

POST/api/v1/fn/triggers

Run a function when something happens in the project.

Each matching event runs the function once with the event as event; failed runs are retried up to max_attempts, then kept in the dead-letter queue. A trigger run has no user session (Event triggers).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Body

function_namestringrequired
The function.
pattern `^[A-Za-z0-9_-]{1,128}$`
sourcestringrequired
db.document, db.row, auth.user, storage.object or realtime.message.
One of db.document, db.row, auth.user, storage.object, realtime.message
event_typesarray<string> | nulloptional
Which events of the source (default: all).
0–5 items
resourcestringoptionaldefault *
Collection, table, bucket or channel; globs orders_*, *.
1–255 characters
subject_prefixstringoptional
Only subjects starting with this (e.g. a document path prefix).
0–512 characters
namestringoptional
A label.
0–128 characters
enabledbooleanoptionaldefault true
Start enabled.
max_attemptsinteger | nulloptional
Retries before dead-lettering (1–50, capped by the plan).
1.0–50.0

Responses

  • 201Created.
  • 400Unknown source or event type.
  • 403The plan's trigger limit (fn.triggers).
  • 404No such function.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/triggers" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"function_name": "send-receipt", "source": "db.row", "event_types": ["row.updated"], "resource": "orders", "name": "receipt on paid order", "max_attempts": 5}'
Response
{
  "trigger_id": "4c1f9e2b7a0d4e8f9b6c3a2d1e0f5b7c",
  "org_id": "b2f4a1c8-…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": "",
  "name": "receipt on paid order",
  "function_name": "send-receipt",
  "source": "db.row",
  "event_types": [
    "row.updated"
  ],
  "resource": "orders",
  "subject_prefix": "",
  "enabled": true,
  "max_attempts": 5,
  "created_by": "6e19c0a2-…",
  "created_at": 1792263000.5,
  "updated_at": 1792263000.5,
  "last_event_at": null
}

GET/api/v1/fn/triggers/{trigger_id}

One trigger.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

trigger_idstringrequired
The trigger.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/triggers/<trigger_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "trigger_id": "4c1f9e2b7a0d4e8f9b6c3a2d1e0f5b7c",
  "org_id": "b2f4a1c8-…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": "",
  "name": "receipt on paid order",
  "function_name": "send-receipt",
  "source": "db.row",
  "event_types": [
    "row.updated"
  ],
  "resource": "orders",
  "subject_prefix": "",
  "enabled": true,
  "max_attempts": 5,
  "created_by": "6e19c0a2-…",
  "created_at": 1792263000.5,
  "updated_at": 1792263000.5,
  "last_event_at": null
}

PATCH/api/v1/fn/triggers/{trigger_id}

Change a trigger (send only what changes).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

trigger_idstringrequired
The trigger.

Body

function_namestring | nulloptional
Another function.
pattern `^[A-Za-z0-9_-]{1,128}$`
event_typesarray<string> | nulloptional
Events.
0–5 items
resourcestring | nulloptional
Resource glob.
1–255 characters
subject_prefixstring | nulloptional
Subject prefix.
0–512 characters
namestring | nulloptional
Label.
0–128 characters
enabledboolean | nulloptional
Pause or resume.
max_attemptsinteger | nulloptional
Retries.
1.0–50.0

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PATCH "$URL/api/v1/fn/triggers/<trigger_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"enabled": false}'
Response
{
  "trigger_id": "4c1f9e2b7a0d4e8f9b6c3a2d1e0f5b7c",
  "org_id": "b2f4a1c8-…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": "",
  "name": "receipt on paid order",
  "function_name": "send-receipt",
  "source": "db.row",
  "event_types": [
    "row.updated"
  ],
  "resource": "orders",
  "subject_prefix": "",
  "enabled": false,
  "max_attempts": 5,
  "created_by": "6e19c0a2-…",
  "created_at": 1792263000.5,
  "updated_at": 1792263000.5,
  "last_event_at": null
}

DELETE/api/v1/fn/triggers/{trigger_id}

Delete a trigger.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

trigger_idstringrequired
The trigger.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/triggers/<trigger_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "deleted": true,
  "trigger_id": "4c1f9e2b7a0d4e8f9b6c3a2d1e0f5b7c"
}

POST/api/v1/fn/triggers/{trigger_id}/test

Send a sample event through a trigger (counts as one invocation).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

trigger_idstringrequired
The trigger.

Responses

  • 202Accepted — the work continues in the background.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/triggers/<trigger_id>/test" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "queued": true,
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "event": {
    "event_id": "evt_test_…",
    "source": "db.row",
    "type": "row.updated",
    "resource": "orders",
    "subject": "orders",
    "occurred_at": 1792263000.512
  }
}

GET/api/v1/fn/dead-letters

Trigger runs that failed every attempt.

Kept for the plan's fn.dead_letter_days.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Query parameters

functionstring | nulloptional
One function.
pattern `^[A-Za-z0-9_-]{1,128}$`
trigger_idstring | nulloptional
One trigger.
0–64 characters
limitintegeroptionaldefault 50
1–200.
1–200
offsetintegeroptionaldefault 0
How many to skip.
0–…

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/dead-letters" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "dead_letters": [
    {
      "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
      "function_name": "send-receipt",
      "trigger_id": "4c1f…",
      "source": "trigger",
      "status": "DEAD_LETTER",
      "attempts": 5,
      "max_attempts": 5,
      "error": "Error: SMTP 421 try later",
      "created_at": 1792263000.512,
      "dead_letter_at": 1792263640.512,
      "event": {
        "event_id": "evt_81…",
        "source": "db.row",
        "type": "row.updated",
        "resource": "orders",
        "subject": "orders",
        "occurred_at": 1792263000.512
      },
      "payload": {
        "…": "…"
      },
      "stderr": "Error: SMTP 421 try later",
      "env_id": ""
    }
  ]
}

POST/api/v1/fn/dead-letters/{invocation_id}/replay

Run a dead-lettered event again.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

invocation_idstringrequired
The failed run.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/dead-letters/<invocation_id>/replay" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "status": "QUEUED",
  "function_name": "send-receipt"
}

POST/api/v1/fn/dead-letters/replay

Replay several dead-lettered events (up to 100).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Body

idsarray<string>required
Invocation ids.
1–100 items

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/dead-letters/replay" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"ids": ["0b7c2e91d4a64f0f9a3e5c1d2b8f7a60", "9d1e…"]}'
Response
{
  "replayed": [
    "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
    "9d1e…"
  ],
  "failed": []
}

DELETE/api/v1/fn/dead-letters/{invocation_id}

Discard a dead-lettered event.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

invocation_idstringrequired
The failed run.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/dead-letters/<invocation_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "status": "DISCARDED",
  "function_name": "send-receipt"
}

#Workflows

POST/api/v1/fn/workflows

Start a durable workflow run of a function.

The function's steps run once each and survive restarts; runs can sleep and wait for signals (Durable workflows). With a key, starting the same key again returns the existing run.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Body

function_namestringrequired
The workflow function.
pattern `^[A-Za-z0-9_-]{1,128}$`
inputanyoptional
Its input.
keystring | nulloptional
Idempotency key (1–200 characters).
1–200 characters
max_attemptsinteger | nulloptional
Retries per step (1–50).
1.0–50.0

Responses

  • 201Created.
  • 403The plan's active runs limit (fn.workflow_runs_active).
  • 404No such function.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/workflows" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"function_name": "onboard-customer", "input": {"customer": "6e19c0a2-…"}, "key": "onboard-6e19c0a2"}'
Response
{
  "run_id": "wfr_9c3e…",
  "org_id": "b2f4a1c8-…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": "",
  "function_name": "onboard-customer",
  "deploy_id": "dep_3a…",
  "version": 4,
  "status": "RUNNING",
  "input": {
    "customer": "6e19c0a2-…"
  },
  "output": null,
  "error": "",
  "wait_step": null,
  "wait_signal": null,
  "wake_at": null,
  "tick": 3,
  "state_bytes": 812,
  "max_attempts": 3,
  "max_steps": 1000,
  "max_sleep_seconds": 2592000,
  "history_days": 30,
  "created_by": "6e19c0a2-…",
  "created_at": 1792263000.512,
  "step_count": 0,
  "pending_signals": [],
  "steps": []
}

GET/api/v1/fn/workflows

Workflow runs, newest first, with the plan's limits.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Query parameters

functionstring | nulloptional
One function.
pattern `^[A-Za-z0-9_-]{1,128}$`
statusstring | nulloptional
RUNNING, SLEEPING, WAITING, SUCCEEDED, FAILED or CANCELLED.
One of RUNNING, SLEEPING, WAITING, SUCCEEDED, FAILED, CANCELLED
beforenumber | nulloptional
Cursor.
limitintegeroptionaldefault 50
How many.
1–200

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/workflows" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "runs": [
    {
      "run_id": "wfr_9c3e…",
      "org_id": "b2f4a1c8-…",
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "env_id": "",
      "function_name": "onboard-customer",
      "deploy_id": "dep_3a…",
      "version": 4,
      "status": "WAITING",
      "input": {
        "customer": "6e19c0a2-…"
      },
      "output": null,
      "error": "",
      "wait_step": "approve",
      "wait_signal": "approved",
      "wake_at": null,
      "tick": 3,
      "state_bytes": 812,
      "max_attempts": 3,
      "max_steps": 1000,
      "max_sleep_seconds": 2592000,
      "history_days": 30,
      "created_by": "6e19c0a2-…",
      "created_at": 1792263000.512,
      "step_count": 2,
      "pending_signals": []
    }
  ],
  "next_before": null,
  "limits": {
    "active_runs": 100,
    "steps": 1000,
    "sleep_days": 30,
    "history_days": 30
  }
}

GET/api/v1/fn/workflows/{run_id}

One run with its steps.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

run_idstringrequired
The run.

Returns

statusstring
RUNNING, SLEEPING, WAITING (for a signal), SUCCEEDED, FAILED, CANCELLED.
wait_step, wait_signal, wake_atstring | number | null
What it is waiting for.
input, output, errorany
stepsarray<object>
Steps that ran.
pending_signalsarray<string>
Signals received but not used yet.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/workflows/<run-id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "run_id": "wfr_9c3e…",
  "org_id": "b2f4a1c8-…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": "",
  "function_name": "onboard-customer",
  "deploy_id": "dep_3a…",
  "version": 4,
  "status": "WAITING",
  "input": {
    "customer": "6e19c0a2-…"
  },
  "output": null,
  "error": "",
  "wait_step": "approve",
  "wait_signal": "approved",
  "wake_at": null,
  "tick": 3,
  "state_bytes": 812,
  "max_attempts": 3,
  "max_steps": 1000,
  "max_sleep_seconds": 2592000,
  "history_days": 30,
  "created_by": "6e19c0a2-…",
  "created_at": 1792263000.512,
  "step_count": 2,
  "pending_signals": [],
  "steps": [
    {
      "name": "create-account",
      "status": "done"
    },
    {
      "name": "send-welcome",
      "status": "done"
    }
  ]
}

POST/api/v1/fn/workflows/{run_id}/signal

Send a named signal (with data) to a waiting run.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

run_idstringrequired
The run.

Body

namestringrequired
The signal the run waits for.
1–128 characters
dataanyoptional
Data it receives.

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/workflows/<run-id>/signal" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"name": "approved", "data": {"by": "grace"}}'
Response
{
  "run_id": "wfr_9c3e…",
  "org_id": "b2f4a1c8-…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": "",
  "function_name": "onboard-customer",
  "deploy_id": "dep_3a…",
  "version": 4,
  "status": "RUNNING",
  "input": {
    "customer": "6e19c0a2-…"
  },
  "output": null,
  "error": "",
  "wait_step": null,
  "wait_signal": null,
  "wake_at": null,
  "tick": 3,
  "state_bytes": 812,
  "max_attempts": 3,
  "max_steps": 1000,
  "max_sleep_seconds": 2592000,
  "history_days": 30,
  "created_by": "6e19c0a2-…",
  "created_at": 1792263000.512,
  "step_count": 2,
  "pending_signals": [],
  "steps": [
    {
      "name": "create-account",
      "status": "done"
    },
    {
      "name": "send-welcome",
      "status": "done"
    }
  ]
}

POST/api/v1/fn/workflows/{run_id}/cancel

Cancel a run.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

run_idstringrequired
The run.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/workflows/<run-id>/cancel" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "run_id": "wfr_9c3e…",
  "org_id": "b2f4a1c8-…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": "",
  "function_name": "onboard-customer",
  "deploy_id": "dep_3a…",
  "version": 4,
  "status": "CANCELLED",
  "input": {
    "customer": "6e19c0a2-…"
  },
  "output": null,
  "error": "Cancelled",
  "wait_step": "approve",
  "wait_signal": "approved",
  "wake_at": null,
  "tick": 3,
  "state_bytes": 812,
  "max_attempts": 3,
  "max_steps": 1000,
  "max_sleep_seconds": 2592000,
  "history_days": 30,
  "created_by": "6e19c0a2-…",
  "created_at": 1792263000.512,
  "step_count": 2,
  "pending_signals": [],
  "steps": [
    {
      "name": "create-account",
      "status": "done"
    },
    {
      "name": "send-welcome",
      "status": "done"
    }
  ]
}

POST/api/v1/fn/workflows/{run_id}/retry

Retry a failed run from its failed step.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

run_idstringrequired
The run.

Body

latestbooleanoptionaldefault false
Use the latest version of the function instead of the one it started with.

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/workflows/<run-id>/retry" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"latest": true}'
Response
{
  "run_id": "wfr_9c3e…",
  "org_id": "b2f4a1c8-…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": "",
  "function_name": "onboard-customer",
  "deploy_id": "dep_3a…",
  "version": 4,
  "status": "RUNNING",
  "input": {
    "customer": "6e19c0a2-…"
  },
  "output": null,
  "error": "",
  "wait_step": "approve",
  "wait_signal": "approved",
  "wake_at": null,
  "tick": 3,
  "state_bytes": 812,
  "max_attempts": 3,
  "max_steps": 1000,
  "max_sleep_seconds": 2592000,
  "history_days": 30,
  "created_by": "6e19c0a2-…",
  "created_at": 1792263000.512,
  "step_count": 2,
  "pending_signals": [],
  "steps": [
    {
      "name": "create-account",
      "status": "done"
    },
    {
      "name": "send-welcome",
      "status": "done"
    }
  ]
}

#GitHub and app builds

POST/api/v1/fn/github/repositories

Repositories the GitHub token can reach.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Body

tokenstring | nulloptional
A GitHub token (the connected one when left out).
20–512 characters
limitintegeroptionaldefault 40
How many.
1.0–100.0

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/github/repositories" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "repositories": [
    {
      "full_name": "skolist/shop",
      "default_branch": "main",
      "private": true
    }
  ],
  "count": 1,
  "auth_source": "connected"
}

POST/api/v1/fn/github/import

Create or update a function from a file in a GitHub repository.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Body

repositorystringrequired
owner/repo.
3–200 characters, pattern `^[A-Za-z0-9][A-Za-z0-9-]{0,38}/[A-Za-z0-9_.-]*[A-Za-z0-9_-][A-Za-z0-9_.-]*$`
pathstringrequired
File path in the repo.
1–512 characters
refstringoptionaldefault main
Branch, tag or commit.
1–128 characters
tokenstring | nulloptional
A GitHub token (the connected one when left out).
20–512 characters
function_namestringrequired
Name for the function.
1–128 characters, pattern `^[a-zA-Z0-9_-]+$`
runtimestringoptionaldefault python3
python3, node18, bun or go.
pattern `^(python3|node18|bun|go)$`
entrypointstringoptionaldefault handler
Exported function.
descriptionstringoptional
Shown in the console.
verify_jwtbooleanoptionaldefault true
Require a session or key.

Responses

  • 201Created.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/github/import" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"repository": "skolist/shop", "path": "functions/send-receipt", "ref": "main", "function_name": "send-receipt", "runtime": "node18"}'
Response
{
  "status": "imported",
  "function": {
    "name": "send-receipt",
    "version": 8,
    "deploy_id": "dep_8b…",
    "files": [
      "index.mjs",
      "lib/email.mjs"
    ]
  },
  "github": {
    "repository": "skolist/shop",
    "path": "functions/send-receipt",
    "ref": "main",
    "auth_source": "connected"
  }
}

POST/api/v1/fn/github/commit

Commit a function's current source to its GitHub repository.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Body

repositorystringrequired
owner/repo.
3–200 characters, pattern `^[A-Za-z0-9][A-Za-z0-9-]{0,38}/[A-Za-z0-9_.-]*[A-Za-z0-9_-][A-Za-z0-9_.-]*$`
pathstringrequired
File path.
1–512 characters
refstringoptionaldefault main
Branch.
1–128 characters
tokenstring | nulloptional
GitHub token.
20–512 characters
function_namestringrequired
The function.
1–128 characters, pattern `^[a-zA-Z0-9_-]+$`
messagestringrequired
Commit message.
3–200 characters
committer_namestring | nulloptional
Committer.
0–120 characters
committer_emailstring | nulloptional
Committer email.
0–200 characters

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/github/commit" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"repository": "skolist/shop", "path": "functions/send-receipt/index.mjs", "ref": "main", "function_name": "send-receipt", "message": "Update send-receipt from Sovaria"}'
Response
{
  "status": "committed",
  "function": "send-receipt",
  "repository": "skolist/shop",
  "path": "functions/send-receipt/index.mjs",
  "ref": "main",
  "sha": "9f2c…",
  "commit_sha": "a1b2c3d…",
  "commit_url": "https://github.com/skolist/shop/commit/a1b2c3d",
  "auth_source": "connected"
}

POST/api/v1/fn/github/sync

Deploy from the linked repository now.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Body

tokenstring | nulloptional
GitHub token (the connected one when left out).
0–400 characters

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/github/sync" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "sha": "a1b2c3d…",
  "deployed": [
    "send-receipt"
  ],
  "unchanged": [
    "nightly-report"
  ],
  "skipped": [],
  "migrations_fetched": []
}

GET/api/v1/fn/github/migrations

Migration files fetched from the linked repository.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/github/migrations" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "migrations": [
    {
      "path": "sovaria/migrations/20261017143005_add_orders_status.sql",
      "version": "20261017143005",
      "name": "add_orders_status",
      "blob_sha": "9b2c…",
      "up_sql": "alter table orders add column status text;",
      "down_sql": "alter table orders drop column status;",
      "fetched_at": "2026-10-18T08:00:00+00:00"
    }
  ]
}

GET/api/v1/fn/github/previews

Preview environments of the linked repository's open pull requests.

Each pull request into the linked branch (not from a fork, not a draft) gets an environment pr-<number>: its functions deployed and new migrations applied; deleted when the pull request closes. Environments, staging and deploying to production

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Returns

previews[].statusstring
creating, deploying, ready, partial (something was skipped: see error) or error.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/github/previews" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "previews": [
    {
      "pr_number": 42,
      "env_id": "5d0f…",
      "title": "Add discounts",
      "head_ref": "feature/discounts",
      "head_sha": "c0ffee1…",
      "status": "ready",
      "error": "",
      "api_url": "https://7b1e2c3d4f5a.sovarias.in",
      "created_at": 1761300000.0,
      "updated_at": 1761300045.0,
      "functions": [
        "apply-discount",
        "checkout"
      ],
      "migrations": [
        "sovaria/migrations/20261024_discounts.sql"
      ]
    }
  ]
}

POST/api/v1/fn/github/webhook/{project_id}

GitHub's push webhook (called by GitHub, signed).

Who
GitHub, with the webhook secret.

Path parameters

project_idstringrequired
The project.

Responses

  • 200Accepted.
curl -s -X POST "$URL/api/v1/fn/github/webhook/<project-id>" \
  -H "apikey: $ANON_KEY"

GET/api/v1/fn/builds

App builds checked against the project (from Sovariq or templates).

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Query parameters

limitintegeroptionaldefault 20
How many.
1–50

Returns

builds[].statusstring
checked, failed or pr_opened.
checks[].statusstring
passed, warning or failed.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/builds" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "builds": [
    {
      "id": "bld_5e…",
      "title": "Order receipts",
      "status": "checked",
      "pr_url": null,
      "pr_number": null,
      "branch": null,
      "created_by": "ana@skolist.com",
      "created_at": 1792310000.0,
      "updated_at": 1792310000.0,
      "checks": [
        {
          "name": "Migration",
          "status": "passed"
        },
        {
          "name": "Access rules",
          "status": "warning"
        }
      ]
    }
  ]
}

POST/api/v1/fn/builds/check

Check a generated app build against the project before opening a pull request.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Body

buildobjectrequired
The build: title and files.

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/builds/check" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "id": "bld_5e…",
  "title": "Order tracking page",
  "ok": true,
  "checks": [
    {
      "name": "tables exist",
      "status": "passed"
    }
  ],
  "checked_at": "2026-10-17T12:00:00Z",
  "files": [
    {
      "path": "src/pages/Orders.tsx",
      "bytes": 2210
    }
  ],
  "repository": "skolist/shop",
  "can_open_pull_request": true
}

GET/api/v1/fn/builds/{build_id}

One checked build.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

build_idstringrequired
The build.

Responses

  • 200The build: its bundle (files, migration, rules), the full check report and, once opened, pr_url, pr_number and branch.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/builds/<build-id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

DELETE/api/v1/fn/builds/{build_id}

Delete a checked build.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

build_idstringrequired
The build.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/builds/<build-id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "id": "bld_5e…",
  "deleted": true
}

POST/api/v1/fn/builds/{build_id}/pull-request

Open a pull request with a checked build in the linked repository.

Who
A project team member's session (the console, or a token from sov login) as Authorization: Bearer <token>. The member's role must allow the action.

Path parameters

build_idstringrequired
The build.

Body

tokenstring | nulloptional
GitHub token.
0–400 characters

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/builds/<build-id>/pull-request" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
Response
{
  "id": "bld_5e…",
  "pull_request": {
    "url": "https://github.com/skolist/shop/pull/42",
    "number": 42,
    "branch": "sovaria/order-tracking"
  },
  "checks": [],
  "files": [
    "src/pages/Orders.tsx"
  ]
}

#More endpoints

GET/api/v1/connections

List connections.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Query parameters

providerstring | nulloptional
0–32 characters

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/connections" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/connections

Create connection.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Body

providerstringrequired
2–32 characters
namestring | nulloptional
0–100 characters
fieldsobjectoptional
testbooleanoptionaldefault true

Responses

  • 201Created.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/connections" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/connections/oauth/callback

Oauth callback.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Query parameters

statestringoptional
0–200 characters
codestringoptional
0–4,000 characters
errorstringoptional
0–200 characters

Responses

  • 200Success.
curl -s "$URL/api/v1/connections/oauth/callback" \
  -H "apikey: $ANON_KEY"

POST/api/v1/connections/oauth/complete

Oauth complete.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Body

pendingstringrequired
16–200 characters

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/connections/oauth/complete" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/connections/oauth/start

Oauth start.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Body

providerstringrequired
2–32 characters
scopesarray<string> | nulloptional
Scope group ids (see providers)
0–20 items
redirectstringoptionaldefault console
pattern `^(console|desktop)$`
return_tostring | nulloptional
0–2,000 characters
namestring | nulloptional
0–100 characters
fieldsobject | nulloptional
Generic OAuth2 only: client id/secret, URLs, scopes
reconnect_idstring | nulloptional
0–40 characters
appstring | nulloptional
Which OAuth app: Sovaria's or the project's own (default: own when set)
pattern `^(sovaria|own)$`

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/connections/oauth/start" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/connections/oauth/state/{state}

Oauth state.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

statestringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/connections/oauth/state/<state>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/connections/providers

Providers.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/connections/providers" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

DELETE/api/v1/connections/providers/{provider}/oauth-app

Delete oauth app.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

providerstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/connections/providers/<provider>/oauth-app" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PUT/api/v1/connections/providers/{provider}/oauth-app

Save oauth app.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

providerstringrequired

Body

client_idstringrequired
3–300 characters
client_secretstringrequired
8–500 characters

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/connections/providers/<provider>/oauth-app" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

DELETE/api/v1/connections/{connection_id}

Delete connection.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

connection_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/connections/<connection_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PATCH/api/v1/connections/{connection_id}

Rename connection.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

connection_idstringrequired

Body

namestringrequired
1–100 characters

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PATCH "$URL/api/v1/connections/<connection_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/connections/{connection_id}/test

Test connection.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

connection_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/connections/<connection_id>/test" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/api-versions

Every API version of the project.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/api-versions" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/api-versions

Pin every function's live code as a named API version (apps send X-Sovaria-Api-Version).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Body

namestringrequired
1–32 characters
notestringoptional
0–500 characters
functionsarray<string> | nulloptional
0–500 items
pinsobject<string, integer> | nulloptional

Responses

  • 201Created.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/api-versions" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

DELETE/api/v1/fn/api-versions/{name}

Delete an API version (refused while apps still call it).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

namestringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/api-versions/welcome" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/api-versions/{name}

One API version and its pins.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

namestringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/api-versions/welcome" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PATCH/api/v1/fn/api-versions/{name}

Change an API version: note, status (active|deprecated|retired), sunset, pins.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

namestringrequired

Body

notestring | nulloptional
0–500 characters
statusstring | nulloptional
One of active, deprecated, retired
sunset_atnumber | string | nulloptional
clear_sunsetbooleanoptionaldefault false
pinsobject<string, integer> | nulloptional
removearray<string> | nulloptional
0–500 items

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PATCH "$URL/api/v1/fn/api-versions/welcome" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

DELETE/api/v1/fn/call/{fn_name}

Public call: `{METHOD} /functions/v1/{name} (the gateway rewrites it here)

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/call/send-receipt" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/call/{fn_name}

Public call: `{METHOD} /functions/v1/{name} (the gateway rewrites it here)

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/call/send-receipt" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

HEAD /api/v1/fn/call/{fn_name}

Public call: `{METHOD} /functions/v1/{name} (the gateway rewrites it here)

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X HEAD "$URL/api/v1/fn/call/send-receipt" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

OPTIONS /api/v1/fn/call/{fn_name}

Public call: `{METHOD} /functions/v1/{name} (the gateway rewrites it here)

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X OPTIONS "$URL/api/v1/fn/call/send-receipt" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PATCH/api/v1/fn/call/{fn_name}

Public call: `{METHOD} /functions/v1/{name} (the gateway rewrites it here)

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X PATCH "$URL/api/v1/fn/call/send-receipt" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/call/{fn_name}

Public call: `{METHOD} /functions/v1/{name} (the gateway rewrites it here)

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/call/send-receipt" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PUT/api/v1/fn/call/{fn_name}

Public call: `{METHOD} /functions/v1/{name} (the gateway rewrites it here)

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}

Path parameters

fn_namestringrequired
The function's name.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X PUT "$URL/api/v1/fn/call/send-receipt" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

DELETE/api/v1/fn/call/{fn_name}/{sub_path}

Public call with a sub-path: `{METHOD} /functions/v1/{name}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}/{sub_path}

Path parameters

fn_namestringrequired
The function's name.
sub_pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/call/send-receipt/<sub_path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/call/{fn_name}/{sub_path}

Public call with a sub-path: `{METHOD} /functions/v1/{name}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}/{sub_path}

Path parameters

fn_namestringrequired
The function's name.
sub_pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/call/send-receipt/<sub_path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

HEAD /api/v1/fn/call/{fn_name}/{sub_path}

Public call with a sub-path: `{METHOD} /functions/v1/{name}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}/{sub_path}

Path parameters

fn_namestringrequired
The function's name.
sub_pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X HEAD "$URL/api/v1/fn/call/send-receipt/<sub_path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

OPTIONS /api/v1/fn/call/{fn_name}/{sub_path}

Public call with a sub-path: `{METHOD} /functions/v1/{name}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}/{sub_path}

Path parameters

fn_namestringrequired
The function's name.
sub_pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X OPTIONS "$URL/api/v1/fn/call/send-receipt/<sub_path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PATCH/api/v1/fn/call/{fn_name}/{sub_path}

Public call with a sub-path: `{METHOD} /functions/v1/{name}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}/{sub_path}

Path parameters

fn_namestringrequired
The function's name.
sub_pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X PATCH "$URL/api/v1/fn/call/send-receipt/<sub_path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/call/{fn_name}/{sub_path}

Public call with a sub-path: `{METHOD} /functions/v1/{name}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}/{sub_path}

Path parameters

fn_namestringrequired
The function's name.
sub_pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/call/send-receipt/<sub_path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PUT/api/v1/fn/call/{fn_name}/{sub_path}

Public call with a sub-path: `{METHOD} /functions/v1/{name}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/functions/v1/{fn_name}/{sub_path}

Path parameters

fn_namestringrequired
The function's name.
sub_pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X PUT "$URL/api/v1/fn/call/send-receipt/<sub_path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/code-mode/run

Run round.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Body

codestringrequired
The body of an async function; sovaria.request(method, path, {query, body}) is its API
1–20,000 characters
journalobjectoptional
Answers to the calls of earlier rounds, in order, plus seed and now

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/code-mode/run" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows

Flows of the project with status, triggers, last run, runs today and success rate (with the plan's flow limits: flows, executions_active, nodes_per_run, history_days, executions_month, schedule_min_minutes, form_per_visitor_per_min).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows

Create a flow (empty, from a graph, or from a template).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Body

namestring | nulloptional
0–200 characters
descriptionstring | nulloptional
0–4,000 characters
graphobject | nulloptional
template_idstring | nulloptional
0–64 characters
settingsobject | nulloptional

Responses

  • 201Created.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/flows" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/approvals

Approval requests of the project (pending by default).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Query parameters

statusstringoptionaldefault pending
One of pending, approved, rejected, expired, canceled, all
limitintegeroptionaldefault 100
How many to return.
1–500

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/approvals" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/catalog

Every node type: parameters (JSON schema + x-ui hints), inputs, outputs, credentials, docs.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/catalog" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/executions

Executions of every flow in the project.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Query parameters

flow_idstring | nulloptional
pattern `^flw_[a-f0-9]{32}$`
statusstring | nulloptional
One of queued, running, waiting, success, error, canceled
modestring | nulloptional
One of trigger, manual, test_node, retry, webhook, schedule, form, subflow, error
cursorstring | nulloptional
The next_cursor from the previous page.
0–200 characters
limitintegeroptionaldefault 50
How many to return.
1–200

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/executions" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/executions/{execution_id}

One execution with every node's input count, output (capped), timing and errors.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

execution_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/executions/<execution_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/executions/{execution_id}/approve

Approve or reject a waiting Approval node.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

execution_idstringrequired

Body

node_idstringrequired
pattern `^[A-Za-z0-9_.:-]{1,128}$`
decisionstringrequired
One of approve, reject
commentstring | nulloptional
0–2,000 characters

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/flows/executions/<execution_id>/approve" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/executions/{execution_id}/cancel

Cancel an unfinished execution (and its sub-flow executions).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

execution_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/flows/executions/<execution_id>/cancel" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/executions/{execution_id}/nodes/{node_id}/output

Every item of one node output in an execution (the execution view keeps the first 50): {items, total, offset, next_offset}.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

execution_idstringrequired
node_idstringrequired

Query parameters

runinteger | nulloptional
0–100000
outputintegeroptionaldefault 0
0–63
offsetintegeroptionaldefault 0
How many to skip.
0–10000000
limitintegeroptionaldefault 100
How many to return.
1–500

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/executions/<execution_id>/nodes/<node_id>/output" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/executions/{execution_id}/retry

Retry a failed or canceled execution from its failed node or any node (latest: the current version).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

execution_idstringrequired

Body

from_nodestring | nulloptional
pattern `^[A-Za-z0-9_.:-]{1,128}$`
latestbooleanoptionaldefault false

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/flows/executions/<execution_id>/retry" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/executions/{execution_id}/signal

Wake a Wait node waiting for this signal (kept if the execution isn't waiting yet).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

execution_idstringrequired

Body

namestringrequired
1–128 characters
dataanyoptional

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/flows/executions/<execution_id>/signal" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/executions/{execution_id}/stream

Server-sent events for a live canvas: `node (a node finished, is retrying or waits), status and done (the final summary). Ends when the execution does (or after 10 minutes)

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

execution_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/executions/<execution_id>/stream" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/expressions/preview

Evaluate an expression against an execution's or the draft's data.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Body

expressionstringrequired
0–20,000 characters
flow_idstring | nulloptional
pattern `^flw_[a-f0-9]{32}$`
context_executionstring | nulloptional
pattern `^fex_[a-f0-9]{32}$`
node_idstring | nulloptional
pattern `^[A-Za-z0-9_.:-]{1,128}$`
item_indexintegeroptionaldefault 0
0.0–100000.0

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/flows/expressions/preview" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/public/forms/{flow_id}/{form_id}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/forms/{flow_id}/{form_id}

Path parameters

flow_idstringrequired
form_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/public/forms/<flow_id>/<form_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/public/forms/{flow_id}/{form_id}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/forms/{flow_id}/{form_id}

Path parameters

flow_idstringrequired
form_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/flows/public/forms/<flow_id>/<form_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

DELETE/api/v1/fn/flows/public/hooks/{flow_id}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/hooks/flows/{flow_id}/{path}

Path parameters

flow_idstringrequired
pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/flows/public/hooks/<flow_id>/<path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/public/hooks/{flow_id}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/hooks/flows/{flow_id}/{path}

Path parameters

flow_idstringrequired
pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/public/hooks/<flow_id>/<path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

HEAD /api/v1/fn/flows/public/hooks/{flow_id}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/hooks/flows/{flow_id}/{path}

Path parameters

flow_idstringrequired
pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X HEAD "$URL/api/v1/fn/flows/public/hooks/<flow_id>/<path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PATCH/api/v1/fn/flows/public/hooks/{flow_id}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/hooks/flows/{flow_id}/{path}

Path parameters

flow_idstringrequired
pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X PATCH "$URL/api/v1/fn/flows/public/hooks/<flow_id>/<path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/public/hooks/{flow_id}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/hooks/flows/{flow_id}/{path}

Path parameters

flow_idstringrequired
pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/flows/public/hooks/<flow_id>/<path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PUT/api/v1/fn/flows/public/hooks/{flow_id}/{path}

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/hooks/flows/{flow_id}/{path}

Path parameters

flow_idstringrequired
pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X PUT "$URL/api/v1/fn/flows/public/hooks/<flow_id>/<path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/public/test-forms/{flow_id}/{form_id}

Test page of a Form trigger (gateway: `/forms-test/… on the project API host, no key) while a listener waits for it: shows the DRAFT's form; the first submission starts the listening test execution

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/forms-test/{flow_id}/{form_id}

Path parameters

flow_idstringrequired
form_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/public/test-forms/<flow_id>/<form_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/public/test-forms/{flow_id}/{form_id}

Test page of a Form trigger (gateway: `/forms-test/… on the project API host, no key) while a listener waits for it: shows the DRAFT's form; the first submission starts the listening test execution

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/forms-test/{flow_id}/{form_id}

Path parameters

flow_idstringrequired
form_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/flows/public/test-forms/<flow_id>/<form_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

DELETE/api/v1/fn/flows/public/test-hooks/{flow_id}/{path}

Test URL of a Webhook trigger (gateway: `/hooks/flows-test/… on the project API host, no key): starts the test execution that is listening for it (POST /fn/flows/{id}/test {listen: true}), once

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/hooks/flows-test/{flow_id}/{path}

Path parameters

flow_idstringrequired
pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/flows/public/test-hooks/<flow_id>/<path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/public/test-hooks/{flow_id}/{path}

Test URL of a Webhook trigger (gateway: `/hooks/flows-test/… on the project API host, no key): starts the test execution that is listening for it (POST /fn/flows/{id}/test {listen: true}), once

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/hooks/flows-test/{flow_id}/{path}

Path parameters

flow_idstringrequired
pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/public/test-hooks/<flow_id>/<path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

HEAD /api/v1/fn/flows/public/test-hooks/{flow_id}/{path}

Test URL of a Webhook trigger (gateway: `/hooks/flows-test/… on the project API host, no key): starts the test execution that is listening for it (POST /fn/flows/{id}/test {listen: true}), once

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/hooks/flows-test/{flow_id}/{path}

Path parameters

flow_idstringrequired
pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X HEAD "$URL/api/v1/fn/flows/public/test-hooks/<flow_id>/<path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PATCH/api/v1/fn/flows/public/test-hooks/{flow_id}/{path}

Test URL of a Webhook trigger (gateway: `/hooks/flows-test/… on the project API host, no key): starts the test execution that is listening for it (POST /fn/flows/{id}/test {listen: true}), once

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/hooks/flows-test/{flow_id}/{path}

Path parameters

flow_idstringrequired
pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X PATCH "$URL/api/v1/fn/flows/public/test-hooks/<flow_id>/<path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/public/test-hooks/{flow_id}/{path}

Test URL of a Webhook trigger (gateway: `/hooks/flows-test/… on the project API host, no key): starts the test execution that is listening for it (POST /fn/flows/{id}/test {listen: true}), once

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/hooks/flows-test/{flow_id}/{path}

Path parameters

flow_idstringrequired
pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/flows/public/test-hooks/<flow_id>/<path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PUT/api/v1/fn/flows/public/test-hooks/{flow_id}/{path}

Test URL of a Webhook trigger (gateway: `/hooks/flows-test/… on the project API host, no key): starts the test execution that is listening for it (POST /fn/flows/{id}/test {listen: true}), once

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.
Also at
/hooks/flows-test/{flow_id}/{path}

Path parameters

flow_idstringrequired
pathstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X PUT "$URL/api/v1/fn/flows/public/test-hooks/<flow_id>/<path>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/templates

Flow templates.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Query parameters

categorystring | nulloptional
0–40 characters

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/templates" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/templates/{template_id}

Get template.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

template_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/templates/<template_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/templates/{template_id}/use

Create a flow from a template.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

template_idstringrequired

Body

namestring | nulloptional
0–200 characters

Responses

  • 201Created.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/flows/templates/<template_id>/use" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

DELETE/api/v1/fn/flows/{flow_id}

Delete a flow: deactivates it, cancels its unfinished executions and removes its history.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X DELETE "$URL/api/v1/fn/flows/<flow_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/{flow_id}

One flow with its draft graph and current problems.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/<flow_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PATCH/api/v1/fn/flows/{flow_id}

Rename a flow or change its settings (error flow, time zone, saved executions, timeout, concurrency, variables, webhook_rate_per_min, form_per_visitor_per_min: a public form's submissions a minute per visitor, 20 by default, up to the plan's flow.form_per_visitor_per_min).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired

Body

namestring | nulloptional
0–200 characters
descriptionstring | nulloptional
0–4,000 characters
settingsobject | nulloptional

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PATCH "$URL/api/v1/fn/flows/<flow_id>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/{flow_id}/activate

Turn the published version's triggers on (schedules, events, queues, webhooks, forms).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/flows/<flow_id>/activate" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/{flow_id}/deactivate

Turn the flow's triggers off.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/flows/<flow_id>/deactivate" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PUT/api/v1/fn/flows/{flow_id}/draft

Save the draft graph; 409 FLOW_DRAFT_CONFLICT when base_rev is stale.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired

Body

graphobjectrequired
base_revintegerrequired
0.0–…
namestring | nulloptional
0–200 characters

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/fn/flows/<flow_id>/draft" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/{flow_id}/executions

Executions of a flow, newest first (cursor paging).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired

Query parameters

statusstring | nulloptional
One of queued, running, waiting, success, error, canceled
modestring | nulloptional
One of trigger, manual, test_node, retry, webhook, schedule, form, subflow, error
cursorstring | nulloptional
The next_cursor from the previous page.
0–200 characters
limitintegeroptionaldefault 50
How many to return.
1–200

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/<flow_id>/executions" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/{flow_id}/nodes/{node_id}/test

Run one node of the draft on its parents' last data (or input_items) and get its output.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired
node_idstringrequired

Body

input_itemsarray<any> | nulloptional
0–10000 items

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/flows/<flow_id>/nodes/<node_id>/test" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/{flow_id}/publish

Publish the draft as a new version (422 FLOW_INVALID with detail.issues).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired

Body

notestring | nulloptional
0–2,000 characters

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/flows/<flow_id>/publish" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/{flow_id}/test

Run the draft now (manual mode) with sample trigger items, pinned data, from or until a node; or listen=true: wait (ttl_s, default 120) for one real request on the Webhook trigger's test URL → {execution_id, test_url, expires_at}.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired

Body

start_nodestring | nulloptional
pattern `^[A-Za-z0-9_.:-]{1,128}$`
until_nodestring | nulloptional
pattern `^[A-Za-z0-9_.:-]{1,128}$`
trigger_itemsarray<any> | nulloptional
0–10000 items
use_pinnedbooleanoptionaldefault true
listenbooleanoptionaldefault false
trigger_nodestring | nulloptional
pattern `^[A-Za-z0-9_.:-]{1,128}$`
ttl_sinteger | nulloptional
10.0–600.0

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X POST "$URL/api/v1/fn/flows/<flow_id>/test" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/{flow_id}/versions

Published versions, newest first.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/<flow_id>/versions" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

GET/api/v1/fn/flows/{flow_id}/versions/{version}

Get version.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired
versionintegerrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s "$URL/api/v1/fn/flows/<flow_id>/versions/<version>" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/{flow_id}/versions/{version}/restore

Copy a published version into the draft.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired
versionintegerrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/flows/<flow_id>/versions/<version>/restore" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

POST/api/v1/fn/flows/{flow_id}/webhook-token/rotate

New URL token for the flow's token-protected webhooks (auth: token); the old URLs stop working at once. Returns the flow with its new urls.

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

flow_idstringrequired

Responses

  • 200Success.
  • 401No valid session or key.
curl -s -X POST "$URL/api/v1/fn/flows/<flow_id>/webhook-token/rotate" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

PUT/api/v1/fn/functions/{fn_name}/http

Turn HTTP mode on (handler gets the Request, returns a Response) or off (JSON event in, JSON out).

Who
Your team or your backend: a member's session, or a server key (apikey: <service role or custom key>). Never from a browser or app.

Path parameters

fn_namestringrequired
The function's name.

Body

httpbooleanrequired

Responses

  • 200Success.
  • 401No valid session or key.
  • 422The body is missing a required field or has a field of the wrong type.
curl -s -X PUT "$URL/api/v1/fn/functions/send-receipt/http" \
  -H "apikey: $ANON_KEY" \
  -H "Authorization: Bearer $ACCESS_TOKEN"