Docs

JavaScript: Low-level API client

sovaria.api — every Sovaria REST endpoint as a typed method, generated from the API contract, for calls the area methods don't cover.

Updated Nov 24, 2026

sovaria.api exposes every REST endpoint as a typed method, generated from the API contract. Prefer the area methods (sovaria.auth, sovaria.data, …) — they add sessions, defaults and friendlier shapes — and use sovaria.api for endpoints they don't cover.

#sovaria.api.ai

sovaria.api.ai.gatewayOverview

Model-gateway routes, the models they may use, plan limits and cache size.

sovaria.api.ai.gatewayOverview(): Promise<JsonValue>

GET /api/v1/sovariq/gateway

Returns

Promise<JsonValue>

sovaria.api.ai.saveGatewayRoute

Create or change a route: models in order (fallbacks), retry_on, cache {enabled, ttl_s}, access, daily_requests_per_user.

sovaria.api.ai.saveGatewayRoute(
  args: { name: string; body: JsonObject },
): Promise<JsonValue>

PUT /api/v1/sovariq/gateway/routes/{name}

Parameters

args{ name: string; body: JsonObject }required

Returns

Promise<JsonValue>

sovaria.api.ai.deleteGatewayRoute

Delete a route (refused while an agent uses it).

sovaria.api.ai.deleteGatewayRoute(
  args: { name: string },
): Promise<JsonValue>

DELETE /api/v1/sovariq/gateway/routes/{name}

Parameters

args{ name: string }required

Returns

Promise<JsonValue>

sovaria.api.ai.gatewayComplete

One completion on a route: the first model that answers (fallbacks), or the cache.

sovaria.api.ai.gatewayComplete(
  args: { route: string; messages: JsonValue; system?: JsonValue; maxTokens?: JsonValue; cache?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/gateway/{route}/complete

Parameters

args{ route: string; messages: JsonValue; system?: JsonValue; maxTokens?: JsonValue; cache?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.ai.gatewayUsage

Requests, errors, fallbacks, cache hits, tokens and latency per model and route.

sovaria.api.ai.gatewayUsage(
  args?: { days?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/sovariq/gateway/usage

Parameters

args{ days?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.ai.sovariqUsage

Sovariq usage per day: tokens, prompt-cache hit rate and Sovariq credits, by project, model and job (scope project or org; org owners and admins).

sovaria.api.ai.sovariqUsage(
  args?: { days?: JsonValue; scope?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/sovariq/usage

Parameters

args{ days?: JsonValue; scope?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.ai.clearGatewayCache

Drop every cached model response of the project.

sovaria.api.ai.clearGatewayCache(): Promise<JsonValue>

POST /api/v1/sovariq/gateway/cache/clear

Returns

Promise<JsonValue>

sovaria.api.ai.listAgentVersions

An agent's published version and kept versions.

sovaria.api.ai.listAgentVersions(
  args: { agentId: string },
): Promise<JsonValue>

GET /api/v1/sovariq/agents/{agent_id}/versions

Parameters

args{ agentId: string }required

Returns

Promise<JsonValue>

sovaria.api.ai.agentStats

Runs per project agent since a time (default the last 24 hours, at most 31 days back).

sovaria.api.ai.agentStats(
  args?: { since?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/sovariq/agents/stats

Parameters

args{ since?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.ai.publishAgentVersion

Publish the agent's draft as its next version.

sovaria.api.ai.publishAgentVersion(
  args: { agentId: string; note?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/agents/{agent_id}/versions

Parameters

args{ agentId: string; note?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.ai.getAgentVersion

One version's definition (secrets hidden).

sovaria.api.ai.getAgentVersion(
  args: { agentId: string; version: string },
): Promise<JsonValue>

GET /api/v1/sovariq/agents/{agent_id}/versions/{version}

Parameters

args{ agentId: string; version: string }required

Returns

Promise<JsonValue>

sovaria.api.ai.compareAgentVersions

What changed between two versions (or a version and the draft).

sovaria.api.ai.compareAgentVersions(
  args: { agentId: string; a: JsonValue; b?: JsonValue },
): Promise<JsonValue>

GET /api/v1/sovariq/agents/{agent_id}/versions/compare

Parameters

args{ agentId: string; a: JsonValue; b?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.ai.rollbackAgentVersion

Republish an older version as a new version and make it the draft.

sovaria.api.ai.rollbackAgentVersion(
  args: { agentId: string; version: string; note?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/agents/{agent_id}/versions/{version}/rollback

Parameters

args{ agentId: string; version: string; note?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.ai.credits

Your Sovariq credits now: left today and this month, grants and packs, the caps that apply to you (member, project, org) with a sentence for each, whether you may use Sovariq, and ok/low/out.

sovaria.api.ai.credits(): Promise<JsonValue>

Credits, never dollars. GET /api/v1/sovariq/credits

Returns

Promise<JsonValue>

sovaria.api.ai.sovariqSettings

The organization's Sovariq settings: cheaper models for small jobs (in effect, the org's choice, the default).

sovaria.api.ai.sovariqSettings(): Promise<JsonValue>

GET /api/v1/sovariq/settings

Returns

Promise<JsonValue>

sovaria.api.ai.setSovariqSettings

Turn cheaper models for small jobs on or off for the organization (null follows the default); owners and admins.

sovaria.api.ai.setSovariqSettings(
  args?: { cheapModels?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/sovariq/settings

Parameters

args{ cheapModels?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.ai.sovariqPrefs

Your build preferences (applied to your future Sovariq builds).

sovaria.api.ai.sovariqPrefs(): Promise<JsonValue>

GET /api/v1/sovariq/prefs

Returns

Promise<JsonValue>

sovaria.api.ai.addSovariqPref

Add a build preference (≤200 characters, ≤30 per user).

sovaria.api.ai.addSovariqPref(
  args: { text: JsonValue; scope?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/prefs

Parameters

args{ text: JsonValue; scope?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.ai.deleteSovariqPref

Remove a build preference.

sovaria.api.ai.deleteSovariqPref(
  args: { prefId: string },
): Promise<JsonValue>

DELETE /api/v1/sovariq/prefs/{pref_id}

Parameters

args{ prefId: string }required

Returns

Promise<JsonValue>

sovaria.api.ai.sovariqMemoryFiles

The project's Sovariq memory files (spec, decisions, design, page registry, schema, issues, repo map, acceptance) per app.

sovaria.api.ai.sovariqMemoryFiles(
  args?: { frontendId?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/sovariq/memory/files

Parameters

args{ frontendId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.ai.sovariqMemoryFile

One memory file of an app (its content and the Markdown/JSON text mirrored in .sovariq/).

sovaria.api.ai.sovariqMemoryFile(
  args: { name: string; frontendId?: JsonValue },
): Promise<JsonValue>

GET /api/v1/sovariq/memory/files/{name}

Parameters

args{ name: string; frontendId?: JsonValue }required

Returns

Promise<JsonValue>

#sovaria.api.analytics

sovaria.api.analytics.overview

DAU, WAU, MAU, events, new users, top events, platforms and countries over the last days (capped by analytics.retention_days).

sovaria.api.analytics.overview(
  args?: { days?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/analytics/overview

Parameters

args{ days?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.analytics.listEvents

Event names with counts over the last days.

sovaria.api.analytics.listEvents(
  args?: { days?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/analytics/events

Parameters

args{ days?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.analytics.eventTrend

Daily count and distinct users of one event, and its common properties.

sovaria.api.analytics.eventTrend(
  args: { name: string; days?: JsonValue },
): Promise<JsonValue>

GET /api/v1/analytics/events/{name}/trend

Parameters

args{ name: string; days?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.analytics.funnel

Ordered funnel: users who did each step after the previous one within window_hours of step 1 (steps: [{name, where?}]).

sovaria.api.analytics.funnel(
  args: { steps: JsonValue; windowHours?: JsonValue; days?: JsonValue },
): Promise<JsonValue>

POST /api/v1/analytics/funnel

Parameters

args{ steps: JsonValue; windowHours?: JsonValue; days?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.analytics.retention

Retention cohorts by first activity (or start_event), share active (or doing return_event) in each later week or day.

sovaria.api.analytics.retention(
  args?: { startEvent?: JsonValue; returnEvent?: JsonValue; period?: JsonValue; periods?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/analytics/retention

Parameters

args{ startEvent?: JsonValue; returnEvent?: JsonValue; period?: JsonValue; periods?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.analytics.listUsers

Recently seen app users with their properties (q: prefix of user key or id).

sovaria.api.analytics.listUsers(
  args?: { q?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/analytics/users

Parameters

args{ q?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.analytics.getUser

One app user: profile, consent and their latest events.

sovaria.api.analytics.getUser(
  args: { userKey: string; limit?: JsonValue },
): Promise<JsonValue>

GET /api/v1/analytics/users/{user_key}

Parameters

args{ userKey: string; limit?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.analytics.eraseUser

Erase one app user's analytics (events, properties, activity) and record that they opted out.

sovaria.api.analytics.eraseUser(
  args: { userKey: string },
): Promise<JsonValue>

DELETE /api/v1/analytics/users/{user_key}

Parameters

args{ userKey: string }required

Returns

Promise<JsonValue>

sovaria.api.analytics.live

Newest events received (debug view), optionally since an ISO time.

sovaria.api.analytics.live(
  args?: { since?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/analytics/live

Parameters

args{ since?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.analytics.usage

Analytics events accepted and dropped this month, and the plan's limits.

sovaria.api.analytics.usage(): Promise<JsonValue>

GET /api/v1/analytics/usage

Returns

Promise<JsonValue>

sovaria.api.analytics.getSettings

Project analytics settings (require consent) and whether staff turned analytics off.

sovaria.api.analytics.getSettings(): Promise<JsonValue>

GET /api/v1/analytics/settings

Returns

Promise<JsonValue>

sovaria.api.analytics.putSettings

Require consent: only app users who said yes (PUT /analytics/v1/consent) are recorded.

sovaria.api.analytics.putSettings(
  args: { requireConsent: JsonValue },
): Promise<JsonValue>

PUT /api/v1/analytics/settings

Parameters

args{ requireConsent: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.analytics.export

Export.

sovaria.api.analytics.export(
  args?: { format?: JsonValue; limit?: JsonValue; names?: JsonValue; since?: JsonValue; until?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/analytics/export

Parameters

args{ format?: JsonValue; limit?: JsonValue; names?: JsonValue; since?: JsonValue; until?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

#sovaria.api.attestation

sovaria.api.attestation.getConfig

App attestation settings, credentials (metadata only), debug tokens and the last 7 days.

sovaria.api.attestation.getConfig(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/attestation

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "mode": "monitor",
  "tokenTtlSeconds": 3600,
  "providers": {
    "play_integrity": true,
    "app_attest": true,
    "device_check": false
  },
  "playIntegrity": {
    "requirePlayRecognized": true,
    "requireDeviceIntegrity": true
  },
  "appAttest": {
    "allowDevelopment": false
  },
  "debugTokens": [
    {
      "id": "d9e1…",
      "name": "Simulator",
      "created_at": "2026-10-07T12:00:00+00:00",
      "created_by": "ana@skolist.com"
    }
  ],
  "credentials": {
    "google": {
      "project_id": "skolist-shop-1a2b3",
      "client_email": "integrity@skolist-shop-1a2b3.iam.gserviceaccount.com",
      "uploaded_at": "2026-10-07T11:00:00+00:00"
    },
    "apple": null
  },
  "effectiveMode": "monitor",
  "available": true
}

sovaria.api.attestation.updateConfig

Set mode (off | monitor | enforce), tokenTtlSeconds, providers, playIntegrity, appAttest.

sovaria.api.attestation.updateConfig(
  args: { projectId?: string; body: JsonObject },
): Promise<JsonValue>

PUT /api/v1/projects/{project_id}/attestation

Parameters

args{ projectId?: string; body: JsonObject }required

Returns

Promise<JsonValue>

{
  "mode": "enforce",
  "tokenTtlSeconds": 3600,
  "providers": {
    "play_integrity": true,
    "app_attest": true,
    "device_check": false
  },
  "playIntegrity": {
    "requirePlayRecognized": true,
    "requireDeviceIntegrity": true
  },
  "appAttest": {
    "allowDevelopment": false
  },
  "debugTokens": [
    {
      "id": "d9e1…",
      "name": "Simulator",
      "created_at": "2026-10-07T12:00:00+00:00",
      "created_by": "ana@skolist.com"
    }
  ],
  "credentials": {
    "google": {
      "project_id": "skolist-shop-1a2b3",
      "client_email": "integrity@skolist-shop-1a2b3.iam.gserviceaccount.com",
      "uploaded_at": "2026-10-07T11:00:00+00:00"
    },
    "apple": null
  },
  "effectiveMode": "enforce",
  "available": true
}

sovaria.api.attestation.setGoogleCredentials

Google service account for Play Integrity (encrypted, write-only).

sovaria.api.attestation.setGoogleCredentials(
  args: { projectId?: string; serviceAccount: JsonValue },
): Promise<JsonValue>

PUT /api/v1/projects/{project_id}/attestation/credentials/google

Parameters

args{ projectId?: string; serviceAccount: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.attestation.setAppleCredentials

Apple key with DeviceCheck enabled (encrypted, write-only).

sovaria.api.attestation.setAppleCredentials(
  args: { projectId?: string; p8: JsonValue; keyId: JsonValue; teamId: JsonValue },
): Promise<JsonValue>

PUT /api/v1/projects/{project_id}/attestation/credentials/apple

Parameters

args{ projectId?: string; p8: JsonValue; keyId: JsonValue; teamId: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.attestation.deleteCredentials

Remove the google or apple attestation credentials.

sovaria.api.attestation.deleteCredentials(
  args: { projectId?: string; which: string },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/attestation/credentials/{which}

Parameters

args{ projectId?: string; which: string }required

Returns

Promise<JsonValue>

sovaria.api.attestation.createDebugToken

Create a debug token for simulators and CI (shown once).

sovaria.api.attestation.createDebugToken(
  args?: { projectId?: string; name?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/attestation/debug-tokens

Parameters

args{ projectId?: string; name?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "id": "d9e2…",
  "name": "CI simulator",
  "token": "0b1c…(shown once)",
  "created_at": "2026-10-18T09:00:00+00:00"
}

sovaria.api.attestation.deleteDebugToken

Delete a debug token.

sovaria.api.attestation.deleteDebugToken(
  args: { projectId?: string; tokenId: string },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/attestation/debug-tokens/{token_id}

Parameters

args{ projectId?: string; tokenId: string }required

Returns

Promise<JsonValue>

sovaria.api.attestation.challenge

One-time challenge to bind attestation evidence to (anon key).

sovaria.api.attestation.challenge(): Promise<JsonValue>

POST /api/v1/attest/challenge

Returns

Promise<JsonValue>

{
  "challenge": "c2Fs…",
  "expires_in": 300
}

sovaria.api.attestation.exchange

Exchange Play Integrity / App Attest / DeviceCheck / debug evidence for an attestation token.

sovaria.api.attestation.exchange(
  args: { provider: JsonValue; appId?: JsonValue; challenge?: JsonValue; token?: JsonValue; keyId?: JsonValue; attestation?: JsonValue; assertion?: JsonValue; development?: JsonValue; limitedUse?: JsonValue },
): Promise<JsonValue>

POST /api/v1/attest/exchange

Parameters

args{ provider: JsonValue; appId?: JsonValue; challenge?: JsonValue; token?: JsonValue; keyId?: JsonValue; attestation?: JsonValue; assertion?: JsonValue; development?: JsonValue; limitedUse?: JsonValue }required

Returns

Promise<JsonValue>

{
  "attestation_token": "eyJhbGciOiJIUzI1NiIs…",
  "expires_in": 3600,
  "provider": "play_integrity"
}

sovaria.api.attestation.attestationPublicConfig

Attestation public config.

sovaria.api.attestation.attestationPublicConfig(): Promise<JsonValue>

GET /api/v1/attest/config

Returns

Promise<JsonValue>

#sovaria.api.audit

sovaria.api.audit.exportEntries

Export entries.

sovaria.api.audit.exportEntries(
  args?: { actorId?: JsonValue; afterSeq?: JsonValue; envId?: JsonValue; eventType?: JsonValue; eventTypePrefix?: JsonValue; format?: JsonValue; orgId?: JsonValue; phiOnly?: JsonValue; projectId?: JsonValue; resourceId?: JsonValue; since?: JsonValue; source?: JsonValue; staffAccessOnly?: JsonValue; until?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/audit/export

Parameters

args{ actorId?: JsonValue; afterSeq?: JsonValue; envId?: JsonValue; eventType?: JsonValue; eventTypePrefix?: JsonValue; format?: JsonValue; orgId?: JsonValue; phiOnly?: JsonValue; projectId?: JsonValue; resourceId?: JsonValue; since?: JsonValue; source?: JsonValue; staffAccessOnly?: JsonValue; until?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.audit.hideEntries

Hide entries.

sovaria.api.audit.hideEntries(
  args: { hidden?: JsonValue; seqs: JsonValue },
): Promise<JsonValue>

POST /api/v1/audit/hide

Parameters

args{ hidden?: JsonValue; seqs: JsonValue }required

Returns

Promise<JsonValue>

{
  "hidden": 2
}

#sovaria.api.auth

sovaria.api.auth.confirmVerificationEmail

Confirm an email verification token.

sovaria.api.auth.confirmVerificationEmail(
  args: { token: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/verify-email/confirm

Parameters

args{ token: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "verified",
  "user_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51"
}

sovaria.api.auth.disableMfa

DELETE /api/v1/auth/mfa

sovaria.api.auth.disableMfa(
  args: { totpCode: JsonValue },
): Promise<JsonValue>

Parameters

args{ totpCode: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "disabled",
  "message": "MFA has been removed"
}

sovaria.api.auth.enrollMfa

POST /api/v1/auth/mfa/enroll

sovaria.api.auth.enrollMfa(): Promise<JsonValue>

Returns

Promise<JsonValue>

{
  "secret": "JBSWY3DPEHPK3PXP",
  "totp_uri": "otpauth://totp/skolist-shop:ada%40example.com?secret=JBSWY3DPEHPK3PXP&issuer=skolist-shop",
  "qr_data": "otpauth://totp/skolist-shop:ada%40example.com?secret=JBSWY3DPEHPK3PXP&issuer=skolist-shop",
  "backup_codes": [
    "f3Kx9_q2Lw8",
    "Qm7-pT2vX0a",
    "…"
  ]
}

sovaria.api.auth.getMfaStatus

GET /api/v1/auth/mfa/status

sovaria.api.auth.getMfaStatus(): Promise<JsonValue>

Returns

Promise<JsonValue>

{
  "mfa_enabled": true,
  "phone_mfa_enabled": false,
  "enrolled_at": "2026-10-02T09:14:07Z"
}

sovaria.api.auth.getProvidersConfig

GET /api/v1/auth/providers/config

sovaria.api.auth.getProvidersConfig(): Promise<JsonValue>

Returns

Promise<JsonValue>

{
  "providers": [
    {
      "id": "email",
      "label": "Email + Password",
      "enabled": true,
      "requested_enabled": true,
      "available": true,
      "managed_by": "core",
      "description": "Built-in credential authentication.",
      "setup_required": []
    },
    {
      "id": "magic_link",
      "label": "Magic Link",
      "enabled": true,
      "requested_enabled": true,
      "available": true,
      "managed_by": "core",
      "description": "…",
      "setup_required": []
    }
  ],
  "database_link": {
    "enabled": false,
    "engine": "postgresql",
    "host": "",
    "port": 5432,
    "database": "",
    "schema": "public",
    "username": "",
    "ssl": true
  },
  "sms_config": {
    "provider": "twilio",
    "account_sid": "AC5f…",
    "from_number": "+14155550123",
    "auth_token_set": true,
    "auth_token_hint": "8c…f2"
  }
}

sovaria.api.auth.getSessionsConfig

GET /api/v1/auth/sessions/config

sovaria.api.auth.getSessionsConfig(): Promise<JsonValue>

Returns

Promise<JsonValue>

{
  "timeout_minutes": 15,
  "refresh_days": 7,
  "max_concurrent": 0,
  "single_session": false
}

sovaria.api.auth.listConsoleProductUsers

GET /api/v1/auth/product-users

sovaria.api.auth.listConsoleProductUsers(): Promise<JsonValue>

Returns

Promise<JsonValue>

[
  {
    "id": "a71d0c5e-2f84-4b9a-9e13-6c5d8f2b1a47",
    "node_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
    "email": "ana@example.com",
    "is_active": true,
    "created_at": "2026-10-02T08:14:22.481Z",
    "updated_at": "2026-10-16T19:03:51.112Z",
    "mfa_enabled": false,
    "phone_mfa_enabled": false,
    "any_mfa_enabled": false,
    "last_sign_in_at": "2026-10-17T09:41:05.330Z",
    "roles": [
      "staff"
    ],
    "role_sources": [
      "project_settings"
    ],
    "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07"
  }
]

sovaria.api.auth.listSessions

GET /api/v1/auth/sessions

sovaria.api.auth.listSessions(): Promise<JsonValue>

Returns

Promise<JsonValue>

[
  {
    "id": "sess_8f2…",
    "device": "Chrome on macOS",
    "ip": "203.0.113.24",
    "last_active_at": "2026-10-17T12:30:01Z",
    "expires_in_seconds": 600391,
    "current": true
  },
  {
    "id": "sess_1c7…",
    "device": "Safari on iPhone",
    "ip": "198.51.100.7",
    "last_active_at": "2026-10-15T08:11:40Z",
    "expires_in_seconds": 412044,
    "current": false
  }
]

sovaria.api.auth.revokeOtherSessions

Sign out every other device.

sovaria.api.auth.revokeOtherSessions(
  args?: { refreshToken?: JsonValue } = {},
): Promise<JsonValue>

The SDK wrappers send this session's refresh token so the server knows which session to keep. POST /api/v1/auth/sessions/revoke-others

Parameters

args{ refreshToken?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.auth.revokeSession

DELETE /api/v1/auth/sessions/{session_id}

sovaria.api.auth.revokeSession(
  args: { sessionId: string },
): Promise<JsonValue>

Parameters

args{ sessionId: string }required

Returns

Promise<JsonValue>

sovaria.api.auth.sendVerificationEmail

Trigger a verification email for the authenticated user.

sovaria.api.auth.sendVerificationEmail(): Promise<JsonValue>

POST /api/v1/auth/verify-email/send

Returns

Promise<JsonValue>

{
  "status": "sent"
}

sovaria.api.auth.updateProvidersConfig

PUT /api/v1/auth/providers/config

sovaria.api.auth.updateProvidersConfig(
  args: { body: JsonObject },
): Promise<JsonValue>

Parameters

args{ body: JsonObject }required

Returns

Promise<JsonValue>

sovaria.api.auth.updateSessionsConfig

PUT /api/v1/auth/sessions/config

sovaria.api.auth.updateSessionsConfig(
  args: { body: JsonObject },
): Promise<JsonValue>

Parameters

args{ body: JsonObject }required

Returns

Promise<JsonValue>

{
  "timeout_minutes": 30,
  "refresh_days": 14,
  "max_concurrent": 5,
  "single_session": false
}

sovaria.api.auth.listDevices

Devices the signed-in user is signed in on (current = this one).

sovaria.api.auth.listDevices(): Promise<JsonValue>

GET /api/v1/auth/devices

Returns

Promise<JsonValue>

{
  "devices": [
    {
      "device_id": "d_5a1…",
      "platform": "ios",
      "name": "Ada's iPhone",
      "app_version": "2.4.0",
      "user_agent": "SkolistShop/2.4.0 CFNetwork",
      "ip": "198.51.100.7",
      "last_active_at": "2026-10-15T08:11:40Z",
      "session_ids": [
        "sess_1c7…"
      ],
      "current": false
    }
  ]
}

sovaria.api.auth.signOutDevice

Sign one device out: its sessions end and push tokens are removed.

sovaria.api.auth.signOutDevice(
  args: { deviceId: string },
): Promise<JsonValue>

DELETE /api/v1/auth/devices/{device_id}

Parameters

args{ deviceId: string }required

Returns

Promise<JsonValue>

{
  "sessions_ended": 1,
  "push_tokens_removed": 1
}

sovaria.api.auth.passkeyRegisterStart

Registration options for a new passkey for the signed-in user.

sovaria.api.auth.passkeyRegisterStart(
  args?: { name?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/auth/passkeys/register/start

Parameters

args{ name?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "options": {
    "challenge": "x9H3…",
    "rp": {
      "id": "skolist-shop.sovarias.in",
      "name": "skolist-shop"
    },
    "user": {
      "id": "bmUxOWMw…",
      "name": "ada@example.com",
      "displayName": "Ada Lovelace"
    },
    "pubKeyCredParams": [
      {
        "type": "public-key",
        "alg": -7
      }
    ],
    "timeout": 60000,
    "attestation": "none"
  }
}

sovaria.api.auth.passkeyRegisterFinish

Save a passkey from the authenticator's WebAuthn JSON.

sovaria.api.auth.passkeyRegisterFinish(
  args: { credential: JsonValue; name?: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/passkeys/register/finish

Parameters

args{ credential: JsonValue; name?: JsonValue }required

Returns

Promise<JsonValue>

{
  "passkey_id": "9c1d…",
  "name": "MacBook",
  "created_at": "2026-10-17T11:02:44Z"
}

sovaria.api.auth.passkeyAuthenticateStart

Passkey sign-in options: challenge_id and options.

sovaria.api.auth.passkeyAuthenticateStart(
  args?: { userId?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/auth/passkeys/authenticate/start

Parameters

args{ userId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "challenge_id": "pkc_41b…",
  "options": {
    "challenge": "Yk2…",
    "rpId": "skolist-shop.sovarias.in",
    "timeout": 60000,
    "userVerification": "preferred"
  }
}

sovaria.api.auth.passkeyAuthenticateFinish

Verify a signed passkey challenge and return a session.

sovaria.api.auth.passkeyAuthenticateFinish(
  args: { challengeId: JsonValue; credential: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/passkeys/authenticate/finish

Parameters

args{ challengeId: JsonValue; credential: JsonValue }required

Returns

Promise<JsonValue>

{
  "access_token": "eyJhbGciOiJFUzI1NiIsImtpZCI6InByai0xIn0.eyJzdWIiOiI2ZTE5YzBhMi0…",
  "refresh_token": "eyJhbGciOiJFUzI1NiIsImtpZCI6InByai0xIn0.eyJ0eXAiOiJyZWZyZXNoIi…",
  "token_type": "bearer",
  "expires_in": 900,
  "mfa_required": false,
  "actor_lane": "product",
  "auth_subject_type": "product_user",
  "aal": "aal2"
}

sovaria.api.auth.listPasskeys

The signed-in user's passkeys.

sovaria.api.auth.listPasskeys(): Promise<JsonValue>

GET /api/v1/auth/passkeys

Returns

Promise<JsonValue>

[
  {
    "id": "9c1d…",
    "name": "MacBook",
    "aaguid": "adce0002-35bc-c60a-648b-0b25f1f05503",
    "transports": [
      "internal",
      "hybrid"
    ],
    "created_at": "2026-10-17T11:02:44Z",
    "last_used_at": "2026-10-17T12:30:01Z"
  }
]

sovaria.api.auth.deletePasskey

Remove one of the signed-in user's passkeys.

sovaria.api.auth.deletePasskey(
  args: { passkeyId: string },
): Promise<JsonValue>

DELETE /api/v1/auth/passkeys/{passkey_id}

Parameters

args{ passkeyId: string }required

Returns

Promise<JsonValue>

sovaria.api.auth.emailChangeSend

Start an email change: a confirmation goes to the new address.

sovaria.api.auth.emailChangeSend(
  args: { newEmail: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/email-change/send

Parameters

args{ newEmail: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "sent"
}

sovaria.api.auth.emailChangeConfirm

Confirm the new address with the emailed token.

sovaria.api.auth.emailChangeConfirm(
  args: { token: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/email-change/confirm

Parameters

args{ token: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "confirmation_sent",
  "new_email": "ada@newmail.com"
}

sovaria.api.auth.emailChangeFinalize

Finish the change (when the old address must approve too).

sovaria.api.auth.emailChangeFinalize(
  args: { token: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/email-change/finalize

Parameters

args{ token: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "email_updated",
  "user_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "email": "ada@newmail.com"
}

sovaria.api.auth.mfaBackupCodes

How many unused MFA backup codes are left (never the codes).

sovaria.api.auth.mfaBackupCodes(): Promise<JsonValue>

GET /api/v1/auth/mfa/backup-codes

Returns

Promise<JsonValue>

{
  "unused_count": 8,
  "codes": null
}

sovaria.api.auth.regenerateMfaBackupCodes

Issue 10 new backup codes (needs a session verified with MFA); old ones stop working.

sovaria.api.auth.regenerateMfaBackupCodes(): Promise<JsonValue>

POST /api/v1/auth/mfa/backup-codes/regenerate

Returns

Promise<JsonValue>

{
  "unused_count": 10,
  "codes": [
    "f3Kx9_q2Lw8",
    "Qm7-pT2vX0a",
    "…"
  ]
}

sovaria.api.auth.privacy

The signed-in user's consent record (terms, age group, product updates).

sovaria.api.auth.privacy(): Promise<JsonValue>

GET /api/v1/auth/me/privacy

Returns

Promise<JsonValue>

{
  "notice_version": "2026-10-25",
  "consent_required": false,
  "age_status": "adult",
  "consents": {
    "terms": {
      "granted": true,
      "notice_version": "2026-10-25",
      "at": "2026-10-25T08:01:12Z",
      "source": "signup"
    },
    "adult": {
      "granted": true,
      "notice_version": "2026-10-25",
      "at": "2026-10-25T08:01:12Z",
      "source": "signup"
    },
    "product_updates": {
      "granted": false,
      "notice_version": "2026-10-25",
      "at": "2026-10-25T08:01:12Z",
      "source": "signup"
    }
  },
  "product_updates": false,
  "guardian_request": null,
  "wards": [],
  "history": [
    {
      "purpose": "terms",
      "granted": true,
      "notice_version": "2026-10-25",
      "source": "signup",
      "at": "2026-10-25T08:01:12Z"
    }
  ]
}

sovaria.api.auth.updatePrivacyConsent

Record consent choices.

sovaria.api.auth.updatePrivacyConsent(
  args?: { acceptTerms?: JsonValue; adult?: JsonValue; ageGroup?: JsonValue; guardianEmail?: JsonValue; productUpdates?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/auth/me/privacy/consent

Parameters

args{ acceptTerms?: JsonValue; adult?: JsonValue; ageGroup?: JsonValue; guardianEmail?: JsonValue; productUpdates?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "notice_version": "2026-10-25",
  "consent_required": false,
  "age_status": "adult",
  "consents": {
    "terms": {
      "granted": true,
      "notice_version": "2026-10-25",
      "at": "2026-10-25T08:01:12Z",
      "source": "signup"
    },
    "adult": {
      "granted": true,
      "notice_version": "2026-10-25",
      "at": "2026-10-25T08:01:12Z",
      "source": "signup"
    },
    "product_updates": {
      "granted": false,
      "notice_version": "2026-10-25",
      "at": "2026-10-25T08:01:12Z",
      "source": "signup"
    }
  },
  "product_updates": false,
  "guardian_request": null,
  "wards": [],
  "history": [
    {
      "purpose": "terms",
      "granted": true,
      "notice_version": "2026-10-25",
      "source": "signup",
      "at": "2026-10-25T08:01:12Z"
    }
  ]
}

sovaria.api.auth.getJwtEnrichmentHook

The project's JWT enrichment hook (URL, enabled, timeout).

sovaria.api.auth.getJwtEnrichmentHook(): Promise<JsonValue>

GET /api/v1/auth/jwt-enrichment-hook

Returns

Promise<JsonValue>

{
  "url": "https://api.skolist.com/claims",
  "enabled": true
}

sovaria.api.auth.setJwtEnrichmentHook

Register the HTTPS hook that adds claims to every token issued.

sovaria.api.auth.setJwtEnrichmentHook(
  args: { url: JsonValue; secret?: JsonValue; enabled?: JsonValue; timeoutMs?: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/jwt-enrichment-hook

Parameters

args{ url: JsonValue; secret?: JsonValue; enabled?: JsonValue; timeoutMs?: JsonValue }required

Returns

Promise<JsonValue>

{
  "url": "https://api.skolist.com/claims",
  "enabled": true
}

sovaria.api.auth.deleteJwtEnrichmentHook

Remove the JWT enrichment hook.

sovaria.api.auth.deleteJwtEnrichmentHook(): Promise<JsonValue>

DELETE /api/v1/auth/jwt-enrichment-hook

Returns

Promise<JsonValue>

sovaria.api.auth.signingKeys

The project's token signing keys (active, standby, revoked).

sovaria.api.auth.signingKeys(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/auth/signing-keys

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.auth.createStandbySigningKey

Publish a standby key (verifiers learn it before it signs).

sovaria.api.auth.createStandbySigningKey(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/auth/signing-keys/standby

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.auth.rotateSigningKey

Sign with the standby key from now on.

sovaria.api.auth.rotateSigningKey(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/auth/signing-keys/rotate

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.auth.revokeSigningKey

Revoke a key: tokens it signed stop working.

sovaria.api.auth.revokeSigningKey(
  args: { projectId?: string; kid: string },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/auth/signing-keys/{kid}/revoke

Parameters

args{ projectId?: string; kid: string }required

Returns

Promise<JsonValue>

sovaria.api.auth.thirdPartyProviders

Third-party auth providers whose tokens the project accepts (Firebase, Auth0, Clerk, Cognito, WorkOS, OIDC).

sovaria.api.auth.thirdPartyProviders(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/auth/third-party

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.auth.addThirdPartyProvider

Accept tokens from a third-party auth provider.

sovaria.api.auth.addThirdPartyProvider(
  args: { projectId?: string; kind: JsonValue; name?: JsonValue; firebaseProjectId?: JsonValue; domain?: JsonValue; region?: JsonValue; userPoolId?: JsonValue; issuer?: JsonValue; jwksUrl?: JsonValue; audiences?: JsonValue; roleClaim?: JsonValue; enabled?: JsonValue },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/auth/third-party

Parameters

args{ projectId?: string; kind: JsonValue; name?: JsonValue; firebaseProjectId?: JsonValue; domain?: JsonValue; region?: JsonValue; userPoolId?: JsonValue; issuer?: JsonValue; jwksUrl?: JsonValue; audiences?: JsonValue; roleClaim?: JsonValue; enabled?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.auth.updateThirdPartyProvider

Change a third-party provider.

sovaria.api.auth.updateThirdPartyProvider(
  args: { projectId?: string; providerId: string; name?: JsonValue; audiences?: JsonValue; roleClaim?: JsonValue; enabled?: JsonValue },
): Promise<JsonValue>

PATCH /api/v1/projects/{project_id}/auth/third-party/{provider_id}

Parameters

args{ projectId?: string; providerId: string; name?: JsonValue; audiences?: JsonValue; roleClaim?: JsonValue; enabled?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.auth.deleteThirdPartyProvider

Stop accepting a third-party provider's tokens.

sovaria.api.auth.deleteThirdPartyProvider(
  args: { projectId?: string; providerId: string },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/auth/third-party/{provider_id}

Parameters

args{ projectId?: string; providerId: string }required

Returns

Promise<JsonValue>

sovaria.api.auth.exchangeThirdPartyToken

Swap a third-party provider's token for a Sovaria session.

sovaria.api.auth.exchangeThirdPartyToken(
  args: { token: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/third-party/exchange

Parameters

args{ token: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.auth.securityActivity

Security activity.

sovaria.api.auth.securityActivity(
  args?: { limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/auth/security/activity

Parameters

args{ limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "events": [
    {
      "event": "auth.login",
      "title": "Signed in",
      "at": "2026-10-17T12:29:58Z",
      "ip": "203.0.113.24",
      "device": "Chrome on macOS",
      "method": "Password",
      "risk": false
    },
    {
      "event": "auth.login.failed",
      "title": "Failed sign-in",
      "at": "2026-10-17T12:29:31Z",
      "ip": "203.0.113.24",
      "device": "Chrome on macOS",
      "method": "Password",
      "risk": true
    }
  ]
}

sovaria.api.auth.getProductUserRoles

Get product user roles.

sovaria.api.auth.getProductUserRoles(
  args: { userId: string },
): Promise<JsonValue>

GET /api/v1/auth/users/{user_id}/roles

Parameters

args{ userId: string }required

Returns

Promise<JsonValue>

{
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "roles": [
    "staff"
  ]
}

sovaria.api.auth.replaceProductUserRoles

Replace product user roles.

sovaria.api.auth.replaceProductUserRoles(
  args: { userId: string; roles?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/auth/users/{user_id}/roles

Parameters

args{ userId: string; roles?: JsonValue }required

Returns

Promise<JsonValue>

{
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "roles": [
    "billing",
    "staff"
  ]
}

sovaria.api.auth.getProductUserMfaStatus

Get product user mfa status.

sovaria.api.auth.getProductUserMfaStatus(
  args: { userId: string },
): Promise<JsonValue>

GET /api/v1/auth/users/{user_id}/mfa

Parameters

args{ userId: string }required

Returns

Promise<JsonValue>

{
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "mfa_enabled": true,
  "phone_mfa_enabled": false,
  "totp_enrolled": true,
  "any_mfa_enabled": true
}

sovaria.api.auth.getProductUserMfaStatusScoped

Get product user mfa status scoped.

sovaria.api.auth.getProductUserMfaStatusScoped(
  args: { userId: string },
): Promise<JsonValue>

GET /api/v1/auth/product-users/{user_id}/mfa

Parameters

args{ userId: string }required

Returns

Promise<JsonValue>

{
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "mfa_enabled": true,
  "phone_mfa_enabled": false,
  "totp_enrolled": true,
  "any_mfa_enabled": true
}

sovaria.api.auth.resetProductUserMfa

Reset product user mfa.

sovaria.api.auth.resetProductUserMfa(
  args: { userId: string },
): Promise<JsonValue>

POST /api/v1/auth/users/{user_id}/mfa/reset

Parameters

args{ userId: string }required

Returns

Promise<JsonValue>

{
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "status": "reset",
  "message": "MFA has been reset for this user",
  "mfa_enabled": false,
  "phone_mfa_enabled": false,
  "totp_enrolled": false,
  "any_mfa_enabled": false
}

sovaria.api.auth.getUserAuthTimeline

Get user auth timeline.

sovaria.api.auth.getUserAuthTimeline(
  args: { userId: string; at?: JsonValue; eventType?: JsonValue; limit?: JsonValue; offset?: JsonValue },
): Promise<JsonValue>

GET /api/v1/auth/users/{user_id}/timeline

Parameters

args{ userId: string; at?: JsonValue; eventType?: JsonValue; limit?: JsonValue; offset?: JsonValue }required

Returns

Promise<JsonValue>

{
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "at": null,
  "events": [
    {
      "id": "5d2f…",
      "event_type": "auth.login.success",
      "meta": {
        "method": "password",
        "aal": "aal1",
        "ip": "203.0.113.24",
        "device": "Chrome on macOS"
      },
      "created_at": "2026-10-17T09:41:05.330Z"
    }
  ],
  "count": 1,
  "limit": 20,
  "offset": 0
}

sovaria.api.auth.getUserAuthStateAt

Get user auth state at.

sovaria.api.auth.getUserAuthStateAt(
  args: { userId: string; at: JsonValue },
): Promise<JsonValue>

GET /api/v1/auth/users/{user_id}/timeline/state

Parameters

args{ userId: string; at: JsonValue }required

Returns

Promise<JsonValue>

{
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "at": "2026-10-10T00:00:00+00:00",
  "last_login": "2026-10-09T18:22:10.004Z",
  "last_method": "password",
  "last_aal": "aal2",
  "was_mfa_enrolled": true,
  "had_passkey": false,
  "is_active": true,
  "active_sessions": [
    "9f1c2e…"
  ],
  "mfa_factors": [
    {
      "type": "totp",
      "enrolled_at": "2026-10-03T11:00:12.551Z"
    }
  ],
  "passkeys_registered": [],
  "total_events_at": 41
}

sovaria.api.auth.getProjectProductUserMfaStatus

Get project product user mfa status.

sovaria.api.auth.getProjectProductUserMfaStatus(
  args: { projectId?: string; userId: string },
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/auth/users/{user_id}/mfa

Parameters

args{ projectId?: string; userId: string }required

Returns

Promise<JsonValue>

{
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "mfa_enabled": true,
  "phone_mfa_enabled": false,
  "totp_enrolled": true,
  "any_mfa_enabled": true
}

sovaria.api.auth.resetProjectProductUserMfa

Reset project product user mfa.

sovaria.api.auth.resetProjectProductUserMfa(
  args: { projectId?: string; userId: string },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/auth/users/{user_id}/mfa/reset

Parameters

args{ projectId?: string; userId: string }required

Returns

Promise<JsonValue>

{
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "status": "reset",
  "message": "MFA has been reset for this user",
  "mfa_enabled": false,
  "phone_mfa_enabled": false,
  "totp_enrolled": false,
  "any_mfa_enabled": false
}

sovaria.api.auth.getJwtSettings

Get jwt settings.

sovaria.api.auth.getJwtSettings(): Promise<JsonValue>

GET /api/v1/project-settings/jwt

Returns

Promise<JsonValue>

{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "algorithm": "RS256",
  "kid": "Wq2fH6…(RFC 7638 thumbprint)",
  "jwks_url": "https://api.sovaria.in/api/v1/auth/jwks",
  "issuer": "sovaria.axis",
  "audience": "sovaria.axis.api",
  "access_token_ttl_seconds": 900,
  "refresh_token_ttl_days": 7,
  "claims": [
    "sub",
    "iss",
    "aud",
    "exp",
    "iat",
    "jti",
    "aal",
    "amr",
    "ctx.org_id",
    "ctx.project_id",
    "ctx.roles"
  ]
}

sovaria.api.auth.phoneMfaEnroll

Phone mfa enroll.

sovaria.api.auth.phoneMfaEnroll(): Promise<JsonValue>

POST /api/v1/auth/mfa/phone/enroll

Returns

Promise<JsonValue>

{
  "status": "otp_sent",
  "phone_hint": "+1***4567"
}

sovaria.api.auth.phoneMfaVerifyEnrollment

Phone mfa verify enrollment.

sovaria.api.auth.phoneMfaVerifyEnrollment(
  args: { code: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/mfa/phone/verify-enrollment

Parameters

args{ code: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "enrolled",
  "message": "Phone MFA is now enabled for your account"
}

sovaria.api.auth.phoneMfaChallenge

Phone mfa challenge.

sovaria.api.auth.phoneMfaChallenge(): Promise<JsonValue>

POST /api/v1/auth/mfa/phone/challenge

Returns

Promise<JsonValue>

{
  "status": "otp_sent",
  "phone_hint": "+1***4567",
  "method": "phone"
}

sovaria.api.auth.phoneMfaDisable

Phone mfa disable.

sovaria.api.auth.phoneMfaDisable(
  args: { code: JsonValue },
): Promise<JsonValue>

DELETE /api/v1/auth/mfa/phone

Parameters

args{ code: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "disabled",
  "message": "Phone MFA has been disabled"
}

sovaria.api.auth.getSmtpConfig

Get smtp config.

sovaria.api.auth.getSmtpConfig(): Promise<JsonValue>

GET /api/v1/auth/smtp-config

Returns

Promise<JsonValue>

{
  "enabled": true,
  "host": "smtp.postmarkapp.com",
  "port": 587,
  "user": "pm-user",
  "from_address": "Skolist <no-reply@skolist.com>",
  "password_set": true,
  "password_hint": "Xy…9q",
  "customSmtpEnabled": true
}

sovaria.api.auth.updateSmtpConfig

Update smtp config.

sovaria.api.auth.updateSmtpConfig(
  args?: { customSmtpEnabled?: JsonValue; fromAddress?: JsonValue; host?: JsonValue; password?: JsonValue; port?: JsonValue; user?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/auth/smtp-config

Parameters

args{ customSmtpEnabled?: JsonValue; fromAddress?: JsonValue; host?: JsonValue; password?: JsonValue; port?: JsonValue; user?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.auth.getCaptchaConfig

Get captcha config.

sovaria.api.auth.getCaptchaConfig(): Promise<JsonValue>

GET /api/v1/auth/captcha-config

Returns

Promise<JsonValue>

{
  "captchaProvider": "turnstile",
  "captchaSiteKey": "0x4AAAAAAA…"
}

sovaria.api.auth.updateCaptchaConfig

Update captcha config.

sovaria.api.auth.updateCaptchaConfig(
  args?: { captchaProvider?: JsonValue; captchaSecretKey?: JsonValue; captchaSiteKey?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/auth/captcha-config

Parameters

args{ captchaProvider?: JsonValue; captchaSecretKey?: JsonValue; captchaSiteKey?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "captchaProvider": "turnstile",
  "captchaSiteKey": "0x4AAAAAAA…"
}

sovaria.api.auth.listRoles

List roles.

sovaria.api.auth.listRoles(): Promise<JsonValue>

GET /api/v1/roles/list

Returns

Promise<JsonValue>

[
  {
    "name": "admin",
    "description": "Default admin role",
    "is_system": true
  },
  {
    "name": "editor",
    "description": "Default editor role",
    "is_system": true
  }
]

sovaria.api.auth.resendGuardianRequest

Resend guardian request.

sovaria.api.auth.resendGuardianRequest(
  args: { guardianEmail: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/me/privacy/guardian

Parameters

args{ guardianEmail: JsonValue }required

Returns

Promise<JsonValue>

{
  "notice_version": "2026-10-25",
  "consent_required": true,
  "age_status": "minor_pending",
  "consents": {
    "terms": {
      "granted": true,
      "notice_version": "2026-10-25",
      "at": "2026-10-25T08:01:12Z",
      "source": "signup"
    },
    "adult": {
      "granted": true,
      "notice_version": "2026-10-25",
      "at": "2026-10-25T08:01:12Z",
      "source": "signup"
    },
    "product_updates": {
      "granted": false,
      "notice_version": "2026-10-25",
      "at": "2026-10-25T08:01:12Z",
      "source": "signup"
    }
  },
  "product_updates": false,
  "guardian_request": {
    "guardian_email": "parent@example.com",
    "status": "pending",
    "requested_at": "2026-10-25T08:00:00+00:00",
    "expires_at": "2026-11-01T08:00:00+00:00",
    "decided_at": null
  },
  "wards": [],
  "history": [
    {
      "purpose": "terms",
      "granted": true,
      "notice_version": "2026-10-25",
      "source": "signup",
      "at": "2026-10-25T08:01:12Z"
    }
  ]
}

sovaria.api.auth.withdrawGuardianConsent

Withdraw guardian consent.

sovaria.api.auth.withdrawGuardianConsent(
  args: { minorId: string },
): Promise<JsonValue>

POST /api/v1/auth/me/privacy/wards/{minor_id}/withdraw

Parameters

args{ minorId: string }required

Returns

Promise<JsonValue>

{
  "notice_version": "2026-10-25",
  "consent_required": false,
  "age_status": "adult",
  "consents": {
    "terms": {
      "granted": true,
      "notice_version": "2026-10-25",
      "at": "2026-10-25T08:01:12Z",
      "source": "signup"
    },
    "adult": {
      "granted": true,
      "notice_version": "2026-10-25",
      "at": "2026-10-25T08:01:12Z",
      "source": "signup"
    },
    "product_updates": {
      "granted": false,
      "notice_version": "2026-10-25",
      "at": "2026-10-25T08:01:12Z",
      "source": "signup"
    }
  },
  "product_updates": false,
  "guardian_request": null,
  "wards": [],
  "history": [
    {
      "purpose": "terms",
      "granted": true,
      "notice_version": "2026-10-25",
      "source": "signup",
      "at": "2026-10-25T08:01:12Z"
    }
  ]
}

sovaria.api.auth.guardianPreview

Guardian preview.

sovaria.api.auth.guardianPreview(
  args: { token: string },
): Promise<JsonValue>

GET /api/v1/auth/guardian-consent/{token}

Parameters

args{ token: string }required

Returns

Promise<JsonValue>

{
  "minor_name": "Ravi",
  "minor_email": "ravi@example.com",
  "guardian_email": "parent@example.com",
  "notice_version": "2026-10-25",
  "expires_at": "2026-11-01T08:00:00Z"
}

sovaria.api.auth.guardianDecide

Guardian decide.

sovaria.api.auth.guardianDecide(
  args: { token: string; approve: JsonValue; relationship: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/guardian-consent/{token}

Parameters

args{ token: string; approve: JsonValue; relationship: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "approved"
}

sovaria.api.auth.listIdentities

List identities.

sovaria.api.auth.listIdentities(): Promise<JsonValue>

GET /api/v1/auth/me/identities

Returns

Promise<JsonValue>

sovaria.api.auth.linkIdentityComplete

Link identity complete.

sovaria.api.auth.linkIdentityComplete(
  args: { code: JsonValue; codeVerifier?: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/me/identities/complete

Parameters

args{ code: JsonValue; codeVerifier?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.auth.unlinkIdentity

Unlink identity.

sovaria.api.auth.unlinkIdentity(
  args: { identityId: string; nonce?: JsonValue },
): Promise<JsonValue>

DELETE /api/v1/auth/me/identities/{identity_id}

Parameters

args{ identityId: string; nonce?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.auth.rotate

Rotate.

sovaria.api.auth.rotate(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/a2a/signing-keys/rotate

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.auth.projectOrgs

Project orgs.

sovaria.api.auth.projectOrgs(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/auth/orgs

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.auth.projectDeleteOrg

Project delete org.

sovaria.api.auth.projectDeleteOrg(
  args?: { projectId?: string; orgId?: string } = {},
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/auth/orgs/{org_id}

Parameters

args{ projectId?: string; orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.auth.exportUserData

Export user data.

sovaria.api.auth.exportUserData(
  args: { userId: string },
): Promise<JsonValue>

POST /api/v1/auth/users/{user_id}/data-export

Parameters

args{ userId: string }required

Returns

Promise<JsonValue>

{
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "exported_at": "2026-10-18T10:02:11.900Z",
  "profile": {
    "email": "ana@example.com",
    "is_active": true,
    "email_verified": true,
    "mfa_enabled": false,
    "created_at": "2026-10-02T08:14:22.481Z",
    "updated_at": "2026-10-16T19:03:51.112Z"
  },
  "auth_methods": [
    {
      "email": "ana@example.com",
      "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "env_id": null,
      "mfa_enabled": false,
      "created_at": "2026-10-02T08:14:22.481Z"
    }
  ],
  "api_keys": [],
  "webhooks": [],
  "auth_events": [
    {
      "event_type": "auth.login.success",
      "meta": {
        "method": "password"
      },
      "created_at": "2026-10-17T09:41:05.330Z"
    }
  ]
}

sovaria.api.auth.requestUserDeletion

Request user deletion.

sovaria.api.auth.requestUserDeletion(
  args: { userId: string },
): Promise<JsonValue>

POST /api/v1/auth/users/{user_id}/delete-request

Parameters

args{ userId: string }required

Returns

Promise<JsonValue>

{
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "status": "scheduled",
  "scheduled_at": "2026-10-18T10:05:00.000Z",
  "hard_delete_at": "2026-11-17T10:05:00.000Z",
  "message": "Account deactivated. Permanent deletion scheduled in 30 days."
}

sovaria.api.auth.putAttestationRecaptcha

Put attestation recaptcha.

sovaria.api.auth.putAttestationRecaptcha(
  args: { projectId?: string; secret: JsonValue },
): Promise<JsonValue>

PUT /api/v1/projects/{project_id}/attestation/credentials/recaptcha

Parameters

args{ projectId?: string; secret: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.auth.listOauthApps

List oauth apps.

sovaria.api.auth.listOauthApps(): Promise<JsonValue>

GET /api/v1/auth/oauth-apps

Returns

Promise<JsonValue>

{
  "server_enabled": true,
  "apps": [
    {
      "id": "7f2c…",
      "name": "Skolist Analytics",
      "client_id": "sov_3f9a1c0b7e2d4a6f8c1e",
      "redirect_uris": [
        "https://analytics.skolist.com/callback"
      ],
      "scopes": [
        "email",
        "openid",
        "profile"
      ],
      "enabled": true,
      "created_at": "2026-10-11T09:00:00+00:00",
      "client_secret_set": true
    }
  ]
}

sovaria.api.auth.updateOauthServerConfig

Update oauth server config.

sovaria.api.auth.updateOauthServerConfig(
  args: { enabled: JsonValue },
): Promise<JsonValue>

PUT /api/v1/auth/oauth-server

Parameters

args{ enabled: JsonValue }required

Returns

Promise<JsonValue>

{
  "enabled": true
}

sovaria.api.auth.createOauthApp

Create oauth app.

sovaria.api.auth.createOauthApp(
  args: { enabled?: JsonValue; name: JsonValue; redirectUris: JsonValue; scopes?: JsonValue },
): Promise<JsonValue>

POST /api/v1/auth/oauth-apps

Parameters

args{ enabled?: JsonValue; name: JsonValue; redirectUris: JsonValue; scopes?: JsonValue }required

Returns

Promise<JsonValue>

{
  "id": "7f2c…",
  "name": "Skolist Analytics",
  "client_id": "sov_3f9a1c0b7e2d4a6f8c1e",
  "redirect_uris": [
    "https://analytics.skolist.com/callback"
  ],
  "scopes": [
    "openid",
    "profile",
    "email"
  ],
  "enabled": true,
  "created_at": "2026-10-18T10:20:00+00:00",
  "client_secret_set": true,
  "client_secret": "q3Zr…(43 characters)"
}

sovaria.api.auth.updateOauthApp

Update oauth app.

sovaria.api.auth.updateOauthApp(
  args: { appId: string; enabled?: JsonValue; name?: JsonValue; redirectUris?: JsonValue; scopes?: JsonValue },
): Promise<JsonValue>

PATCH /api/v1/auth/oauth-apps/{app_id}

Parameters

args{ appId: string; enabled?: JsonValue; name?: JsonValue; redirectUris?: JsonValue; scopes?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.auth.deleteOauthApp

Delete oauth app.

sovaria.api.auth.deleteOauthApp(
  args: { appId: string },
): Promise<JsonValue>

DELETE /api/v1/auth/oauth-apps/{app_id}

Parameters

args{ appId: string }required

Returns

Promise<JsonValue>

#sovaria.api.billing

sovaria.api.billing.buildInvoice

POST /api/v1/invoices/{org_id}/build

sovaria.api.billing.buildInvoice(
  args?: { orgId?: string; period?: JsonValue } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string; period?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "id": 311,
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "period": "2026-10",
  "plan": "pro",
  "plan_fee_cents": 2900,
  "compute_fee_cents": 1000,
  "overage_fee_cents": 412,
  "credit_cents": 1000,
  "total_cents": 3312,
  "line_items": [
    {
      "kind": "plan_fee",
      "description": "Pro plan (monthly)",
      "amount_cents": 2900
    },
    {
      "kind": "compute",
      "description": "Compute micro × 720 h",
      "amount_cents": 1000
    },
    {
      "kind": "compute_credit",
      "description": "Included compute credit (Pro)",
      "amount_cents": -1000
    },
    {
      "kind": "overage",
      "description": "Function invocations: 206,000 over",
      "amount_cents": 412
    }
  ],
  "status": "draft",
  "issued_at": null,
  "created_at": "2026-10-01T00:05:00+00:00",
  "stripe_invoice_id": null,
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51"
}

sovaria.api.billing.cancelAccount

POST /api/v1/accounts/{account_id}/cancel

sovaria.api.billing.cancelAccount(
  args: { accountId: string },
): Promise<JsonValue>

Parameters

args{ accountId: string }required

Returns

Promise<JsonValue>

{
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "plan": "pro",
  "billing_cycle": "monthly",
  "status": "active",
  "renewal_status": "cancel_scheduled",
  "autopay_enabled": false,
  "grace_until": null,
  "current_period_start": "2026-10-01T00:00:00+00:00",
  "current_period_end": "2026-11-01T00:00:00+00:00",
  "payment_provider": "razorpay",
  "provider_customer_id": "cust_…",
  "metadata": {},
  "created_at": "2026-09-01T10:00:00+00:00"
}

sovaria.api.billing.checkout

POST /api/v1/billing/checkout

sovaria.api.billing.checkout(
  args: { body: JsonObject },
): Promise<JsonValue>

Parameters

args{ body: JsonObject }required

Returns

Promise<JsonValue>

{
  "checkout_session_id": "order_PbX…",
  "url": null,
  "provider": "razorpay",
  "mode": "razorpay_standard",
  "order_id": "order_PbX…",
  "amount": 2341900,
  "currency": "INR",
  "key_id": "rzp_live_…",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "plan": "pro",
  "billing_cycle": "annual"
}

sovaria.api.billing.getAccount

GET /api/v1/accounts/{account_id}

sovaria.api.billing.getAccount(
  args: { accountId: string },
): Promise<JsonValue>

Parameters

args{ accountId: string }required

Returns

Promise<JsonValue>

{
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "plan": "pro",
  "billing_cycle": "monthly",
  "status": "active",
  "renewal_status": "active",
  "autopay_enabled": true,
  "grace_until": null,
  "current_period_start": "2026-10-01T00:00:00+00:00",
  "current_period_end": "2026-11-01T00:00:00+00:00",
  "payment_provider": "razorpay",
  "provider_customer_id": "cust_…",
  "metadata": {},
  "created_at": "2026-09-01T10:00:00+00:00",
  "plan_detail": {
    "name": "pro",
    "display_name": "Pro",
    "monthly_price_cents": 2900,
    "annual_price_cents": 27840,
    "description": "Production projects with light scale.",
    "limits": {
      "max_projects": 3,
      "max_team_members": 5,
      "max_organizations": 3,
      "max_storage_gb": 50,
      "max_function_invocations_per_month": 2000000,
      "…": "…"
    },
    "features": {
      "cli_access": true,
      "sdk_access": true,
      "custom_domains": true,
      "priority_support": false,
      "image_transforms": true,
      "…": "…"
    },
    "entitlements": {
      "org.projects": 3,
      "db.read_replicas": 0,
      "fn.invocations_month": 2000000,
      "…": "…"
    },
    "soft_limits": [
      "fn.invocations_month",
      "storage.bytes",
      "…"
    ]
  }
}

sovaria.api.billing.getAccountOverage

GET /api/v1/billing/accounts/{account_id}/overage

sovaria.api.billing.getAccountOverage(
  args: { accountId: string },
): Promise<JsonValue>

Parameters

args{ accountId: string }required

Returns

Promise<JsonValue>

{
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "plan": "pro",
  "period_start": "2026-10-01T00:00:00+00:00",
  "period_end": "2026-11-01T00:00:00+00:00",
  "projected_overage_cents": 412,
  "accrued_cents": 412,
  "lines": [
    {
      "kind": "overage",
      "metric": "function_invocations",
      "label": "Function invocations",
      "over_units": 206000,
      "amount_cents": 412
    }
  ],
  "source": "accrual",
  "org_ids": [
    "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90"
  ]
}

sovaria.api.billing.getAccountOveragePrefs

GET /api/v1/billing/accounts/{account_id}/overage-prefs

sovaria.api.billing.getAccountOveragePrefs(
  args: { accountId: string },
): Promise<JsonValue>

Parameters

args{ accountId: string }required

Returns

Promise<JsonValue>

{
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "services": [
    {
      "metric": "function_invocations",
      "label": "Function invocations",
      "enabled": true,
      "billable": true
    }
  ],
  "enabled_map": {
    "function_invocations": true
  }
}

sovaria.api.billing.getOrgOveragePrefs

The org's overage switches (one setting for the whole org) GET /api/v1/billing/orgs/{org_id}/overage-prefs

sovaria.api.billing.getOrgOveragePrefs(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "services": [
    {
      "metric": "function_invocations",
      "label": "Function invocations",
      "enabled": true,
      "billable": true
    },
    {
      "metric": "email_sends",
      "label": "Emails (Sovaria sender)",
      "enabled": false,
      "billable": true
    }
  ],
  "enabled_map": {
    "function_invocations": true,
    "email_sends": false
  },
  "bound": true
}

sovaria.api.billing.getCompute

GET /api/v1/compute/{org_id}

sovaria.api.billing.getCompute(
  args?: { orgId?: string; period?: JsonValue } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string; period?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "period": "2026-10",
  "total_hours": 432,
  "fee_cents": 600,
  "projects": [
    {
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "compute_size": "micro",
      "hours": 432,
      "billable_hours": 432,
      "fee_cents": 600
    }
  ]
}

sovaria.api.billing.getFx

GET /api/v1/billing/fx

sovaria.api.billing.getFx(): Promise<JsonValue>

Returns

Promise<JsonValue>

{
  "base": "USD",
  "quote": "INR",
  "rate": 84.12,
  "fetched_at": "2026-10-18T06:00:00+00:00",
  "source": "live",
  "stale": false
}

sovaria.api.billing.getOpenInvoice

GET /api/v1/billing/invoices/open

sovaria.api.billing.getOpenInvoice(): Promise<JsonValue>

Returns

Promise<JsonValue>

{
  "invoice": {
    "id": 311,
    "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
    "period": "2026-09",
    "plan": "pro",
    "plan_fee_cents": 2900,
    "compute_fee_cents": 1000,
    "overage_fee_cents": 412,
    "credit_cents": 1000,
    "total_cents": 3312,
    "line_items": [
      {
        "kind": "plan_fee",
        "description": "Pro plan (monthly)",
        "amount_cents": 2900
      },
      {
        "kind": "compute",
        "description": "Compute micro × 720 h",
        "amount_cents": 1000
      },
      {
        "kind": "compute_credit",
        "description": "Included compute credit (Pro)",
        "amount_cents": -1000
      },
      {
        "kind": "overage",
        "description": "Function invocations: 206,000 over",
        "amount_cents": 412
      }
    ],
    "status": "issued",
    "issued_at": "2026-10-01T00:05:00+00:00",
    "created_at": "2026-10-01T00:05:00+00:00",
    "stripe_invoice_id": null,
    "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51"
  }
}

sovaria.api.billing.getOverage

GET /api/v1/billing/overage/{org_id}

sovaria.api.billing.getOverage(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "plan": "pro",
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "period_start": "2026-10-01T00:00:00+00:00",
  "period_end": "2026-11-01T00:00:00+00:00",
  "projected_overage_cents": 412,
  "accrued_cents": 412,
  "lines": [
    {
      "kind": "overage",
      "metric": "function_invocations",
      "label": "Function invocations",
      "over_units": 206000,
      "amount_cents": 412
    }
  ],
  "source": "accrual"
}

sovaria.api.billing.getPlan

Fetch a billing plan by name.

sovaria.api.billing.getPlan(args: { name: string }): Promise<JsonValue>

GET /api/v1/plans/{name}

Parameters

args{ name: string }required

Returns

Promise<JsonValue>

{
  "name": "pro",
  "display_name": "Pro",
  "monthly_price_cents": 2900,
  "annual_price_cents": 27840,
  "description": "Production projects with light scale.",
  "limits": {
    "max_projects": 3,
    "max_team_members": 5,
    "max_organizations": 3,
    "max_storage_gb": 50,
    "max_function_invocations_per_month": 2000000,
    "…": "…"
  },
  "features": {
    "cli_access": true,
    "sdk_access": true,
    "custom_domains": true,
    "priority_support": false,
    "image_transforms": true,
    "…": "…"
  },
  "entitlements": {
    "org.projects": 3,
    "db.read_replicas": 0,
    "fn.invocations_month": 2000000,
    "…": "…"
  },
  "soft_limits": [
    "fn.invocations_month",
    "storage.bytes",
    "…"
  ]
}

sovaria.api.billing.getProvider

GET /api/v1/billing/provider

sovaria.api.billing.getProvider(): Promise<JsonValue>

Returns

Promise<JsonValue>

{
  "provider": "razorpay",
  "configured": true,
  "providers": {
    "stripe": false,
    "razorpay": true
  },
  "razorpay_key_id": "rzp_live_…",
  "checkout_mode": "razorpay_standard"
}

sovaria.api.billing.getSubscription

Fetch the active subscription for an organisation.

sovaria.api.billing.getSubscription(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/subscriptions/{org_id}

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "plan": "pro",
  "billing_cycle": "monthly",
  "status": "active",
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "autopay_enabled": true,
  "renewal_status": "active",
  "current_period_end": "2026-11-01T00:00:00+00:00",
  "plan_detail": {
    "name": "pro",
    "display_name": "Pro",
    "monthly_price_cents": 2900,
    "annual_price_cents": 27840,
    "description": "Production projects with light scale.",
    "limits": {
      "max_projects": 3,
      "max_team_members": 5,
      "max_organizations": 3,
      "max_storage_gb": 50,
      "max_function_invocations_per_month": 2000000,
      "…": "…"
    },
    "features": {
      "cli_access": true,
      "sdk_access": true,
      "custom_domains": true,
      "priority_support": false,
      "image_transforms": true,
      "…": "…"
    },
    "entitlements": {
      "org.projects": 3,
      "db.read_replicas": 0,
      "fn.invocations_month": 2000000,
      "…": "…"
    },
    "soft_limits": [
      "fn.invocations_month",
      "storage.bytes",
      "…"
    ]
  }
}

sovaria.api.billing.getUsage

Fetch usage counters for an organisation.

sovaria.api.billing.getUsage(
  args?: { orgId?: string; period?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/usage/{org_id}

Parameters

args{ orgId?: string; period?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "period": "2026-10",
  "plan": "pro",
  "totals": {
    "api_calls": 812345,
    "function_invocations": 2206000,
    "realtime_messages": 41200,
    "egress_bytes": 3221225472,
    "storage_bytes": 1073741824,
    "mau": 1840
  },
  "limits": {
    "api_calls": 10000000,
    "function_invocations": 2000000,
    "realtime_messages": 5000000,
    "egress_bytes": 268435456000,
    "storage_bytes": 53687091200,
    "mau": 100000
  },
  "metrics": {
    "…": "same as totals"
  },
  "gauges": {
    "mau": 1840
  },
  "compute": {
    "total_hours": 432,
    "fee_cents": 600,
    "projects": [
      {
        "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
        "compute_size": "micro",
        "hours": 432,
        "billable_hours": 432,
        "fee_cents": 600
      }
    ]
  }
}

sovaria.api.billing.getUsageHistory

Fetch historical usage for an organisation.

sovaria.api.billing.getUsageHistory(
  args?: { orgId?: string; months?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/usage/{org_id}/history

Parameters

args{ orgId?: string; months?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

[
  {
    "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
    "period": "2026-09",
    "totals": {
      "api_calls": 1904211,
      "function_invocations": 1302000
    },
    "metrics": {
      "…": "same as totals"
    }
  }
]

sovaria.api.billing.listInvoices

GET /api/v1/invoices/{org_id}

sovaria.api.billing.listInvoices(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

[
  {
    "id": 311,
    "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
    "period": "2026-09",
    "plan": "pro",
    "plan_fee_cents": 2900,
    "compute_fee_cents": 1000,
    "overage_fee_cents": 412,
    "credit_cents": 1000,
    "total_cents": 3312,
    "line_items": [
      {
        "kind": "plan_fee",
        "description": "Pro plan (monthly)",
        "amount_cents": 2900
      },
      {
        "kind": "compute",
        "description": "Compute micro × 720 h",
        "amount_cents": 1000
      },
      {
        "kind": "compute_credit",
        "description": "Included compute credit (Pro)",
        "amount_cents": -1000
      },
      {
        "kind": "overage",
        "description": "Function invocations: 206,000 over",
        "amount_cents": 412
      }
    ],
    "status": "issued",
    "issued_at": "2026-10-01T00:05:00+00:00",
    "created_at": "2026-10-01T00:05:00+00:00",
    "stripe_invoice_id": null,
    "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51"
  }
]

sovaria.api.billing.listPlans

List public billing plans.

sovaria.api.billing.listPlans(): Promise<JsonValue>

GET /api/v1/plans

Returns

Promise<JsonValue>

[
  {
    "name": "free",
    "display_name": "Free",
    "monthly_price_cents": 0,
    "annual_price_cents": 0,
    "description": "Production projects with light scale.",
    "limits": {
      "max_projects": 3,
      "max_team_members": 5,
      "max_organizations": 3,
      "max_storage_gb": 50,
      "max_function_invocations_per_month": 2000000,
      "…": "…"
    },
    "features": {
      "cli_access": true,
      "sdk_access": true,
      "custom_domains": true,
      "priority_support": false,
      "image_transforms": true,
      "…": "…"
    },
    "entitlements": {
      "org.projects": 3,
      "db.read_replicas": 0,
      "fn.invocations_month": 2000000,
      "…": "…"
    },
    "soft_limits": [
      "fn.invocations_month",
      "storage.bytes",
      "…"
    ]
  },
  {
    "name": "pro",
    "display_name": "Pro",
    "monthly_price_cents": 2900,
    "annual_price_cents": 27840,
    "description": "Production projects with light scale.",
    "limits": {
      "max_projects": 3,
      "max_team_members": 5,
      "max_organizations": 3,
      "max_storage_gb": 50,
      "max_function_invocations_per_month": 2000000,
      "…": "…"
    },
    "features": {
      "cli_access": true,
      "sdk_access": true,
      "custom_domains": true,
      "priority_support": false,
      "image_transforms": true,
      "…": "…"
    },
    "entitlements": {
      "org.projects": 3,
      "db.read_replicas": 0,
      "fn.invocations_month": 2000000,
      "…": "…"
    },
    "soft_limits": [
      "fn.invocations_month",
      "storage.bytes",
      "…"
    ]
  }
]

sovaria.api.billing.listSubscriptions

List subscriptions visible to the authenticated caller.

sovaria.api.billing.listSubscriptions(): Promise<JsonValue>

GET /api/v1/subscriptions

Returns

Promise<JsonValue>

HTTP
GET /api/v1/subscriptions

sovaria.api.billing.payInvoice

POST /api/v1/billing/invoices/{org_id}/{period}/pay

sovaria.api.billing.payInvoice(
  args: { orgId?: string; period: string },
): Promise<JsonValue>

Parameters

args{ orgId?: string; period: string }required

Returns

Promise<JsonValue>

{
  "mode": "razorpay_standard",
  "provider": "razorpay",
  "order_id": "order_…",
  "amount": 278600,
  "currency": "INR",
  "key_id": "rzp_live_…",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "period": "2026-10",
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "plan": "pro",
  "total_cents": 3312
}

sovaria.api.billing.razorpayCreateOrder

POST /api/v1/billing/razorpay/create-order

sovaria.api.billing.razorpayCreateOrder(
  args: { body: JsonObject },
): Promise<JsonValue>

Parameters

args{ body: JsonObject }required

Returns

Promise<JsonValue>

{
  "order_id": "order_PbX…",
  "amount": 195100,
  "currency": "INR",
  "key_id": "rzp_live_…",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "plan": "pro",
  "billing_cycle": "monthly"
}

sovaria.api.billing.razorpayVerifyPayment

POST /api/v1/billing/razorpay/verify-payment

sovaria.api.billing.razorpayVerifyPayment(
  args: { body: JsonObject },
): Promise<JsonValue>

Parameters

args{ body: JsonObject }required

Returns

Promise<JsonValue>

{
  "verified": true,
  "kind": "checkout",
  "duplicate": false,
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "plan": "pro",
  "billing_cycle": "monthly",
  "payment_id": "pay_PbY…",
  "order_id": "order_PbX…"
}

sovaria.api.billing.resumeAccount

POST /api/v1/accounts/{account_id}/resume

sovaria.api.billing.resumeAccount(
  args: { accountId: string },
): Promise<JsonValue>

Parameters

args{ accountId: string }required

Returns

Promise<JsonValue>

{
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "plan": "pro",
  "billing_cycle": "monthly",
  "status": "active",
  "renewal_status": "active",
  "autopay_enabled": true,
  "grace_until": null,
  "current_period_start": "2026-10-01T00:00:00+00:00",
  "current_period_end": "2026-11-01T00:00:00+00:00",
  "payment_provider": "razorpay",
  "provider_customer_id": "cust_…",
  "metadata": {},
  "created_at": "2026-09-01T10:00:00+00:00"
}

sovaria.api.billing.setAccountOveragePrefs

PUT /api/v1/billing/accounts/{account_id}/overage-prefs

sovaria.api.billing.setAccountOveragePrefs(
  args: { accountId: string; services: JsonValue },
): Promise<JsonValue>

Parameters

args{ accountId: string; services: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.billing.setOrgOveragePrefs

Change the org's overage switches (org owners and admins) PUT /api/v1/billing/orgs/{org_id}/overage-prefs

sovaria.api.billing.setOrgOveragePrefs(
  args: { orgId?: string; services: JsonValue },
): Promise<JsonValue>

Parameters

args{ orgId?: string; services: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.billing.listAccountAddons

Add-ons on the billing account: price, paid units, what renews, paid-through date, and the autopay mandate GET /api/v1/accounts/{account_id}/addons

sovaria.api.billing.listAccountAddons(
  args: { accountId: string },
): Promise<JsonValue>

Parameters

args{ accountId: string }required

Returns

Promise<JsonValue>

{
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "plan": "pro",
  "current_period_end": "2026-11-09T00:00:00+00:00",
  "billing_cycle": "monthly",
  "addons": [
    {
      "id": "extra_project",
      "label": "Extra project",
      "scope": "org",
      "price_cents": 1000,
      "max_quantity": 10,
      "available": true,
      "included_in_plan": false,
      "quantity": 2,
      "paid_quantity": 2,
      "renew_quantity": 1,
      "comp_quantity": 0,
      "paid_through": "2026-11-09T00:00:00+00:00",
      "prorated_unit_cents": 650,
      "enabled": true
    },
    {
      "id": "custom_domains",
      "label": "Custom domain",
      "scope": "project",
      "price_cents": 1000,
      "max_quantity": 10,
      "available": true,
      "included_in_plan": false,
      "quantity": 1,
      "paid_quantity": 1,
      "renew_quantity": 1,
      "comp_quantity": 0,
      "paid_through": "2026-11-09T00:00:00+00:00",
      "prorated_unit_cents": 650,
      "enabled": true
    },
    {
      "id": "extra_environment",
      "label": "Extra environment per project",
      "scope": "project",
      "price_cents": 500,
      "max_quantity": 10,
      "available": true,
      "included_in_plan": false,
      "quantity": 0,
      "paid_quantity": 0,
      "renew_quantity": 0,
      "comp_quantity": 0,
      "paid_through": null,
      "prorated_unit_cents": 325,
      "enabled": false
    }
  ],
  "autopay": {
    "mandate": "active",
    "method": "card",
    "label": "Visa •••• 4242",
    "max_amount_paise": 1500000,
    "set_at": "2026-10-20T09:12:00+00:00",
    "renews_automatically": true,
    "last_charge": null
  }
}

sovaria.api.billing.addonCheckout

Start paying for more add-on units (prorated to the period end); they count once the payment is verified POST /api/v1/accounts/{account_id}/addons/{addon_id}/checkout

sovaria.api.billing.addonCheckout(
  args: { accountId: string; addonId: string; quantity: JsonValue; projectId?: JsonValue },
): Promise<JsonValue>

Parameters

args{ accountId: string; addonId: string; quantity: JsonValue; projectId?: JsonValue }required

Returns

Promise<JsonValue>

{
  "mode": "razorpay_standard",
  "order_id": "order_PcA…",
  "amount": 57200,
  "currency": "INR",
  "key_id": "rzp_live_…",
  "addon_id": "custom_domains",
  "quantity": 1,
  "usd_cents": 650,
  "paid_through": "2026-11-09T00:00:00+00:00",
  "monthly_price_cents": 1000
}

sovaria.api.billing.setAddonRenewal

How many units renew at the period end (0 cancels); paid units keep working until then PUT /api/v1/accounts/{account_id}/addons/{addon_id}/renewal

sovaria.api.billing.setAddonRenewal(
  args: { accountId: string; addonId: string; renewQuantity: JsonValue },
): Promise<JsonValue>

Parameters

args{ accountId: string; addonId: string; renewQuantity: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.billing.setAccountAddon

Older switch: lowering schedules at the period end; more units than are paid for answer 402 (use addonCheckout) POST /api/v1/accounts/{account_id}/addons/{addon_id}

sovaria.api.billing.setAccountAddon(
  args: { accountId: string; addonId: string; enabled: JsonValue; quantity?: JsonValue },
): Promise<JsonValue>

Parameters

args{ accountId: string; addonId: string; enabled: JsonValue; quantity?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.billing.setAccountAutopay

Renew automatically (true) or end the plan with the paid period (false) POST /api/v1/accounts/{account_id}/autopay

sovaria.api.billing.setAccountAutopay(
  args: { accountId: string; enabled: JsonValue },
): Promise<JsonValue>

Parameters

args{ accountId: string; enabled: JsonValue }required

Returns

Promise<JsonValue>

{
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "plan": "pro",
  "billing_cycle": "monthly",
  "status": "active",
  "renewal_status": "cancel_scheduled",
  "autopay_enabled": false,
  "grace_until": null,
  "current_period_start": "2026-10-01T00:00:00+00:00",
  "current_period_end": "2026-11-01T00:00:00+00:00",
  "payment_provider": "razorpay",
  "provider_customer_id": "cust_…",
  "metadata": {},
  "created_at": "2026-09-01T10:00:00+00:00"
}

sovaria.api.billing.autopaySetup

Start a ₹1 (refunded) authorisation that saves a card or UPI mandate for automatic renewals POST /api/v1/accounts/{account_id}/autopay/setup

sovaria.api.billing.autopaySetup(
  args: { accountId: string; customerEmail?: JsonValue; name?: JsonValue },
): Promise<JsonValue>

Parameters

args{ accountId: string; customerEmail?: JsonValue; name?: JsonValue }required

Returns

Promise<JsonValue>

{
  "mode": "razorpay_recurring",
  "order_id": "order_PcM…",
  "amount": 100,
  "currency": "INR",
  "key_id": "rzp_live_…",
  "customer_id": "cust_PcK…",
  "recurring": "1",
  "max_amount_paise": 1500000
}

sovaria.api.billing.removeAutopayMandate

Remove the saved mandate; renewals become invoices to pay by hand DELETE /api/v1/accounts/{account_id}/autopay/mandate

sovaria.api.billing.removeAutopayMandate(
  args: { accountId: string },
): Promise<JsonValue>

Parameters

args{ accountId: string }required

Returns

Promise<JsonValue>

{
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "autopay": {
    "mandate": "removed",
    "method": null,
    "label": null,
    "max_amount_paise": null,
    "set_at": null,
    "renews_automatically": false,
    "last_charge": null
  }
}

sovaria.api.billing.billingListAddonPrices

Add-on prices (USD per month per unit) and the plans each is sold on, as staff set them.

sovaria.api.billing.billingListAddonPrices(): Promise<JsonValue>

GET /api/v1/plans/addons

Returns

Promise<JsonValue>

sovaria.api.billing.getAiLimits

The org's Sovariq limits: who can use Sovariq, the default cap for members, daily/monthly caps per member and per project, and this month's use.

sovaria.api.billing.getAiLimits(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/billing/ai-limits/{org_id}

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.setAiMemberCap

A member's daily and/or monthly Sovariq credit cap (owners and admins; null = no cap of that kind).

sovaria.api.billing.setAiMemberCap(
  args: { orgId?: string; userId: string; creditsDay?: JsonValue; creditsMonth?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/billing/ai-limits/{org_id}/members/{user_id}

Parameters

args{ orgId?: string; userId: string; creditsDay?: JsonValue; creditsMonth?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.billing.removeAiMemberCap

Remove a member's own cap (the default for members applies again).

sovaria.api.billing.removeAiMemberCap(
  args: { orgId?: string; userId: string },
): Promise<JsonValue>

DELETE /api/v1/billing/ai-limits/{org_id}/members/{user_id}

Parameters

args{ orgId?: string; userId: string }required

Returns

Promise<JsonValue>

sovaria.api.billing.setAiProjectCap

A project's daily and/or monthly Sovariq credit cap, whoever asks (project agents included).

sovaria.api.billing.setAiProjectCap(
  args: { orgId?: string; projectId: string; creditsDay?: JsonValue; creditsMonth?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/billing/ai-limits/{org_id}/projects/{project_id}

Parameters

args{ orgId?: string; projectId: string; creditsDay?: JsonValue; creditsMonth?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.billing.removeAiProjectCap

Remove a project's Sovariq cap.

sovaria.api.billing.removeAiProjectCap(
  args: { orgId?: string; projectId: string },
): Promise<JsonValue>

DELETE /api/v1/billing/ai-limits/{org_id}/projects/{project_id}

Parameters

args{ orgId?: string; projectId: string }required

Returns

Promise<JsonValue>

sovaria.api.billing.setAiDefaultCap

The cap for every member without their own, including people who join later (both null removes it).

sovaria.api.billing.setAiDefaultCap(
  args?: { orgId?: string; creditsDay?: JsonValue; creditsMonth?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/billing/ai-limits/{org_id}/default

Parameters

args{ orgId?: string; creditsDay?: JsonValue; creditsMonth?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.setAiAccess

Who can use Sovariq: everyone, admins (owners and admins only) or selected (owners, admins and allowed_users).

sovaria.api.billing.setAiAccess(
  args: { orgId?: string; mode: JsonValue; allowedUsers?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/billing/ai-limits/{org_id}/access

Parameters

args{ orgId?: string; mode: JsonValue; allowedUsers?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.billing.getWallet

The org's wallet: cash and promotional credit (USD cents, rupees in India), runway, the zero state, auto-recharge and recent entries.

sovaria.api.billing.getWallet(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/billing/orgs/{org_id}/wallet

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.walletCheckout

Start a wallet top-up: a Razorpay order (usd_cents, or inr_paise in India).

sovaria.api.billing.walletCheckout(
  args?: { orgId?: string; usdCents?: JsonValue; inrPaise?: JsonValue } = {},
): Promise<JsonValue>

Credited only after the verified payment. POST /api/v1/billing/orgs/{org_id}/wallet/checkout

Parameters

args{ orgId?: string; usdCents?: JsonValue; inrPaise?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.getBalance

The prepaid balance (cash + promo), the top-up range and recent movements.

sovaria.api.billing.getBalance(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/billing/orgs/{org_id}/balance

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.getAutoRecharge

Wallet auto-recharge settings, the pre-debit notice and recent runs.

sovaria.api.billing.getAutoRecharge(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/billing/orgs/{org_id}/auto-recharge

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.setAutoRecharge

Turn auto-recharge on or off with its threshold and amount (needs an autopay mandate; at most Rs 15,000 a debit).

sovaria.api.billing.setAutoRecharge(
  args?: { orgId?: string; enabled?: JsonValue; thresholdCents?: JsonValue; amountCents?: JsonValue; maxPerMonth?: JsonValue; maxMonthCents?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/billing/orgs/{org_id}/auto-recharge

Parameters

args{ orgId?: string; enabled?: JsonValue; thresholdCents?: JsonValue; amountCents?: JsonValue; maxPerMonth?: JsonValue; maxMonthCents?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.listCreditPacks

Sovariq credit packs for sale (paying currency), the Sovariq wallet cap and the org's packs.

sovaria.api.billing.listCreditPacks(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/billing/orgs/{org_id}/ai-credits/packs

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.creditPackCheckout

Buy a credit pack by card / UPI: a Razorpay order; granted once the payment is verified.

sovaria.api.billing.creditPackCheckout(
  args?: { orgId?: string; packId?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/billing/orgs/{org_id}/ai-credits/packs/checkout

Parameters

args{ orgId?: string; packId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.creditPackFromBalance

Buy a credit pack from the wallet (promo first, then cash), within the Sovariq wallet cap.

sovaria.api.billing.creditPackFromBalance(
  args?: { orgId?: string; packId?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/billing/orgs/{org_id}/ai-credits/packs/from-balance

Parameters

args{ orgId?: string; packId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.setSovariqWalletCap

The monthly cap on Sovariq credits bought from the wallet (null = the plan default).

sovaria.api.billing.setSovariqWalletCap(
  args?: { orgId?: string; capCents?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/billing/orgs/{org_id}/sovariq-wallet-cap

Parameters

args{ orgId?: string; capCents?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.requestRefund

Ask for unused wallet cash back (promotional credit is never refundable).

sovaria.api.billing.requestRefund(
  args?: { orgId?: string; amountCents?: JsonValue; reason?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/billing/orgs/{org_id}/balance/refund-request

Parameters

args{ orgId?: string; amountCents?: JsonValue; reason?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.getUsageForecast

Period-to-date pay-as-you-go spend and where it lands by the period's end.

sovaria.api.billing.getUsageForecast(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/billing/orgs/{org_id}/usage/forecast

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.getStatement

The wallet statement for a period: draws, packs, recharges, top-ups, refunds, opening and closing balance.

sovaria.api.billing.getStatement(
  args?: { orgId?: string; periodStart?: JsonValue; periodEnd?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/billing/orgs/{org_id}/statement

Parameters

args{ orgId?: string; periodStart?: JsonValue; periodEnd?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.setGstin

The customer's GSTIN and state of supply for tax invoices.

sovaria.api.billing.setGstin(
  args?: { orgId?: string; gstin?: JsonValue; stateOfSupply?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/billing/orgs/{org_id}/gstin

Parameters

args{ orgId?: string; gstin?: JsonValue; stateOfSupply?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.getSpendCap

The monthly spend cap, period-to-date overage and whether usage beyond the plan is stopped.

sovaria.api.billing.getSpendCap(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/billing/orgs/{org_id}/spend-cap

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "bound": true,
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "plan": "pro",
  "plan_name": "Pro",
  "applies": true,
  "period_start": "2026-10-01T00:00:00+00:00",
  "period_end": "2026-11-01T00:00:00+00:00",
  "spent_cents": 412,
  "cap_cents": 8700,
  "cap_source": "plan_default",
  "default_cap_cents": 8700,
  "percent": 4.7,
  "capped": false,
  "mode": "plan_default",
  "owner_cap_cents": null,
  "alert_thresholds": [
    50,
    80,
    100
  ],
  "alerts_sent": [],
  "staff_override": null,
  "updated_by": null,
  "updated_at": null,
  "lines": [
    {
      "kind": "overage",
      "metric": "function_invocations",
      "label": "Function invocations",
      "over_units": 206000,
      "amount_cents": 412
    }
  ]
}

sovaria.api.billing.getBillingSummary

Plan, renewal date and state, payment method (details for the paying account only) and the newest invoices.

sovaria.api.billing.getBillingSummary(
  args?: { orgId?: string; invoices?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/billing/orgs/{org_id}/summary

Parameters

args{ orgId?: string; invoices?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "plan": "pro",
  "plan_name": "Pro",
  "billing_cycle": "monthly",
  "status": "active",
  "renewal": {
    "date": "2026-12-01T00:00:00+00:00",
    "status": "active",
    "cancel_at_period_end": false,
    "grace_until": null,
    "period_start": "2026-11-01T00:00:00+00:00"
  },
  "seat_limit": 5,
  "payment_method": {
    "autopay": true,
    "mandate": "active",
    "visible": true,
    "method": "card",
    "label": "Visa •••• 4242",
    "set_at": "2026-11-01T09:12:00+00:00",
    "max_amount_paise": 1500000
  },
  "is_payer": true,
  "invoices": [
    {
      "id": 7,
      "period": "2026-10",
      "plan": "pro",
      "total_cents": 2500,
      "status": "paid",
      "issued_at": "2026-11-01T00:05:00+00:00"
    }
  ]
}

sovaria.api.billing.setSpendCap

Set the spend cap: plan_default, custom (cap_cents) or none; alert thresholds in percent.

sovaria.api.billing.setSpendCap(
  args?: { orgId?: string; mode?: JsonValue; capCents?: JsonValue; alertThresholds?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/billing/orgs/{org_id}/spend-cap

Parameters

args{ orgId?: string; mode?: JsonValue; capCents?: JsonValue; alertThresholds?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "bound": true,
  "account_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "plan": "pro",
  "plan_name": "Pro",
  "applies": true,
  "period_start": "2026-10-01T00:00:00+00:00",
  "period_end": "2026-11-01T00:00:00+00:00",
  "spent_cents": 412,
  "cap_cents": 10000,
  "cap_source": "owner",
  "default_cap_cents": 8700,
  "percent": 4.1,
  "capped": false,
  "mode": "custom",
  "owner_cap_cents": 10000,
  "alert_thresholds": [
    50,
    90,
    100
  ],
  "alerts_sent": [],
  "staff_override": null,
  "updated_by": null,
  "updated_at": null,
  "lines": [
    {
      "kind": "overage",
      "metric": "function_invocations",
      "label": "Function invocations",
      "over_units": 206000,
      "amount_cents": 412
    }
  ]
}

sovaria.api.billing.getAiCredits

The org's Sovariq credits this month and today (credits only; one credit is $0.01 of AI use).

sovaria.api.billing.getAiCredits(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/billing/ai-credits/{org_id}

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.billing.listCreditPackPrices

Public: the Sovariq credit pack catalogue (USD and INR).

sovaria.api.billing.listCreditPackPrices(): Promise<JsonValue>

GET /api/v1/plans/credit-packs

Returns

Promise<JsonValue>

sovaria.api.billing.listUsageRates

Public: pay-as-you-go prices past the plan (what billing sells).

sovaria.api.billing.listUsageRates(): Promise<JsonValue>

GET /api/v1/plans/usage-rates

Returns

Promise<JsonValue>

{
  "currency": "USD",
  "rates": [
    {
      "metric": "storage_bytes",
      "label": "Object storage",
      "price": 0.025,
      "unit": "per GB"
    },
    {
      "metric": "function_invocations",
      "label": "Function invocations",
      "price": 2,
      "unit": "per million"
    },
    {
      "metric": "mau",
      "label": "Monthly active users",
      "price": 0.00025,
      "unit": "per unit"
    }
  ]
}

sovaria.api.billing.getEntitlements

Get entitlements.

sovaria.api.billing.getEntitlements(
  args?: { orgId?: string; projectId?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/entitlements/{org_id}

Parameters

args{ orgId?: string; projectId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "plan": "pro",
  "plan_display_name": "Pro",
  "entitlements": {
    "org.projects": 3,
    "storage.bytes": 53687091200,
    "fn.invocations_month": 2000000,
    "…": "…"
  },
  "soft_limits": [
    "fn.invocations_month"
  ],
  "labels": {
    "org.projects": "Projects",
    "storage.bytes": "Storage",
    "…": "…"
  },
  "required_plan": {
    "org.projects": "Ultra",
    "…": "…"
  },
  "usage": {
    "fn.invocations_month": {
      "used": 2206000,
      "scope": "org",
      "period": "2026-10"
    },
    "org.projects": {
      "used": 2,
      "scope": "org"
    }
  },
  "period": "2026-10",
  "resets_at": "2026-11-01T00:00:00+00:00"
}

sovaria.api.billing.checkCoupon

Check coupon.

sovaria.api.billing.checkCoupon(
  args: { billingCycle?: JsonValue; code: JsonValue; plan: JsonValue },
): Promise<JsonValue>

POST /api/v1/billing/coupons/check

Parameters

args{ billingCycle?: JsonValue; code: JsonValue; plan: JsonValue }required

Returns

Promise<JsonValue>

{
  "valid": true,
  "code": "LAUNCH20",
  "description": "20% off the first payment",
  "percent_off": 20,
  "amount_off_cents": null,
  "list_usd_cents": 2900,
  "discount_usd_cents": 580,
  "final_usd_cents": 2320,
  "amount": 195100,
  "currency": "INR"
}

sovaria.api.billing.getBillingCountry

Get billing country.

sovaria.api.billing.getBillingCountry(
  args: { accountId: string },
): Promise<JsonValue>

GET /api/v1/billing/accounts/{account_id}/country

Parameters

args{ accountId: string }required

Returns

Promise<JsonValue>

sovaria.api.billing.putBillingCountry

Put billing country.

sovaria.api.billing.putBillingCountry(
  args: { accountId: string; country: JsonValue },
): Promise<JsonValue>

PUT /api/v1/billing/accounts/{account_id}/country

Parameters

args{ accountId: string; country: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.billing.orgBalanceCheckout

Org balance checkout.

sovaria.api.billing.orgBalanceCheckout(
  args?: { orgId?: string; inrPaise?: JsonValue; usdCents?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/billing/orgs/{org_id}/balance/checkout

Parameters

args{ orgId?: string; inrPaise?: JsonValue; usdCents?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

#sovaria.api.builds

sovaria.api.builds.check

Check an app build Sovariq wrote (title, description, migration {name, up_sql, down_sql}, policies [{id, spl}], functions [{name, runtime, files}], tests [rules test cases]) against the project — nothing changes: the migration is dry-run up, down and up again, rules are simulated, rules tests run with the build's rules.

sovaria.api.builds.check(args: { build: JsonValue }): Promise<JsonValue>

Returns the build id and the report. POST /api/v1/fn/builds/check

Parameters

args{ build: JsonValue }required

Returns

Promise<JsonValue>

{
  "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
}

sovaria.api.builds.list

Recent app builds of the project: title, status (checked, failed, pr_opened), each check's result and the pull request.

sovaria.api.builds.list(
  args?: { limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/fn/builds

Parameters

args{ limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "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,
      "updated_at": 1792310000,
      "checks": [
        {
          "name": "Migration",
          "status": "passed"
        },
        {
          "name": "Access rules",
          "status": "warning"
        }
      ]
    }
  ]
}

sovaria.api.builds.get

One app build: its files (the bundle), the check report and the pull request.

sovaria.api.builds.get(args: { buildId: string }): Promise<JsonValue>

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

Parameters

args{ buildId: string }required

Returns

Promise<JsonValue>

sovaria.api.builds.pullRequest

Check the build again and open it as a pull request on the project's linked GitHub repository (one commit on a new branch; dev.app_build_prs_month).

sovaria.api.builds.pullRequest(
  args: { buildId: string; token?: JsonValue },
): Promise<JsonValue>

GitHub needs repository access: connect it with repository access or pass a token with repo scope. POST /api/v1/fn/builds/{build_id}/pull-request

Parameters

args{ buildId: string; token?: JsonValue }required

Returns

Promise<JsonValue>

{
  "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"
  ]
}

sovaria.api.builds.delete

Forget an app build (its pull request, if opened, stays on GitHub).

sovaria.api.builds.delete(args: { buildId: string }): Promise<JsonValue>

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

Parameters

args{ buildId: string }required

Returns

Promise<JsonValue>

{
  "id": "bld_5e…",
  "deleted": true
}

#sovaria.api.byok

sovaria.api.byok.get

Your organization's own encryption key (Enterprise): whether it's on, the key, its data key version, whether it is usable now, what it covers, and setup (Sovaria's AWS principal and the key policy statement).

sovaria.api.byok.get(): Promise<JsonValue>

GET /api/v1/byok

Returns

Promise<JsonValue>

{
  "enabled": true,
  "provider": "aws-kms",
  "key_ref": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
  "version": 2,
  "versions": [
    {
      "version": 2,
      "status": "active",
      "key_ref": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-…",
      "created_at": 1792310400,
      "created_by": "6e19c0a2-…"
    },
    {
      "version": 1,
      "status": "retired",
      "key_ref": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-…",
      "created_at": 1792224000,
      "created_by": "6e19c0a2-…"
    }
  ],
  "last_check_at": 1792310460.5,
  "key_usable": true,
  "last_error": null,
  "storage_reencrypt": null,
  "available": true,
  "coverage": [
    {
      "what": "Storage files",
      "covered": true,
      "how": "Written with S3 SSE-KMS under your key; …"
    },
    {
      "what": "Database backups and pause archives",
      "covered": true,
      "how": "AES-256-GCM with your organization's data key, …"
    },
    {
      "what": "Database files of your Postgres",
      "covered": false,
      "how": "Encrypted at rest by the server's disk encryption …"
    }
  ],
  "setup": {
    "provider": "aws-kms",
    "principal_arn": "arn:aws:iam::444455556666:role/sovaria-core",
    "encryption_context": {
      "sovaria:org_id": "org_8f2c…"
    },
    "key_policy_statement": {
      "Sid": "SovariaOrg8f2c…",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::444455556666:role/sovaria-core"
      },
      "Action": [
        "kms:Encrypt",
        "kms:Decrypt",
        "kms:GenerateDataKey"
      ],
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "kms:EncryptionContext:sovaria:org_id": "org_8f2c…"
        }
      }
    },
    "requirements": [
      "A symmetric KMS key (key spec SYMMETRIC_DEFAULT, usage ENCRYPT_DECRYPT), in any region.",
      "…"
    ]
  }
}

sovaria.api.byok.set

Use your AWS KMS key (its ARN) for the organization's storage files and backups.

sovaria.api.byok.set(
  args: { provider?: JsonValue; keyRef: JsonValue },
): Promise<JsonValue>

Checked end to end first (wrap, unwrap, a file written and read with it). Organization owners. PUT /api/v1/byok

Parameters

args{ provider?: JsonValue; keyRef: JsonValue }required

Returns

Promise<JsonValue>

{
  "enabled": true,
  "provider": "aws-kms",
  "key_ref": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
  "version": 2,
  "versions": [
    {
      "version": 2,
      "status": "active",
      "key_ref": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-…",
      "created_at": 1792310400,
      "created_by": "6e19c0a2-…"
    },
    {
      "version": 1,
      "status": "retired",
      "key_ref": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-…",
      "created_at": 1792224000,
      "created_by": "6e19c0a2-…"
    }
  ],
  "last_check_at": 1792310460.5,
  "key_usable": true,
  "last_error": null,
  "storage_reencrypt": null
}

sovaria.api.byok.rotate

A new data key version under the same KMS key; older versions stay to decrypt what they encrypted.

sovaria.api.byok.rotate(): Promise<JsonValue>

Organization owners. POST /api/v1/byok/rotate

Returns

Promise<JsonValue>

{
  "enabled": true,
  "provider": "aws-kms",
  "key_ref": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
  "version": 2,
  "versions": [
    {
      "version": 2,
      "status": "active",
      "key_ref": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-…",
      "created_at": 1792310400,
      "created_by": "6e19c0a2-…"
    },
    {
      "version": 1,
      "status": "retired",
      "key_ref": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-…",
      "created_at": 1792224000,
      "created_by": "6e19c0a2-…"
    }
  ],
  "last_check_at": 1792310460.5,
  "key_usable": true,
  "last_error": null,
  "storage_reencrypt": null
}

sovaria.api.byok.check

Ask your KMS now whether Sovaria can still use the key.

sovaria.api.byok.check(): Promise<JsonValue>

POST /api/v1/byok/check

Returns

Promise<JsonValue>

{
  "enabled": true,
  "provider": "aws-kms",
  "key_ref": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
  "version": 2,
  "versions": [
    {
      "version": 2,
      "status": "active",
      "key_ref": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-…",
      "created_at": 1792310400,
      "created_by": "6e19c0a2-…"
    },
    {
      "version": 1,
      "status": "retired",
      "key_ref": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-…",
      "created_at": 1792224000,
      "created_by": "6e19c0a2-…"
    }
  ],
  "last_check_at": 1792310460.5,
  "key_usable": false,
  "last_error": "KEY_DISABLED: The key is disabled in your KMS",
  "storage_reencrypt": null
}

sovaria.api.byok.reencryptStorage

Rewrite the organization's existing storage files under its key (in the background; progress in byok.get).

sovaria.api.byok.reencryptStorage(): Promise<JsonValue>

Organization owners. POST /api/v1/byok/reencrypt-storage

Returns

Promise<JsonValue>

{
  "status": "running"
}

#sovaria.api.compliance

sovaria.api.compliance.overview

Compliance overview for an organization (owners and admins): audit-log check, encryption, backups, access, regions.

sovaria.api.compliance.overview(
  args?: { orgId?: string; projectId?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/compliance

Parameters

args{ orgId?: string; projectId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "generated_at": "2026-11-07T08:00:00+00:00",
  "scope": "organization",
  "statement": "This pack describes how Sovaria is configured … not a certification.",
  "organization": {
    "id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
    "name": "Skolist",
    "plan": "pro",
    "default_region": "ap-south-1"
  },
  "audit_chain": {
    "status": "ok",
    "chain_valid": true
  },
  "byok": "not_enabled",
  "backup_encryption": {
    "completed": 14,
    "encrypted": 14,
    "unencrypted": 0,
    "algorithms": [
      "aes256gcm-stream-v1"
    ],
    "unreadable_projects": 0
  },
  "data_regions": [
    "ap-south-1"
  ],
  "projects": [
    {
      "id": "5e8d2a1f-3c90-4f0a-9c6b-b2f4a1c87d3e",
      "name": "shop",
      "ref": "abcdefghijkl",
      "data_region": "ap-south-1",
      "backups": "ok",
      "pitr": "ok",
      "pitr_enabled": true,
      "security_advisor": {
        "high": 1
      },
      "security_advisor_status": "ok",
      "backup_encryption": "encrypted"
    }
  ],
  "access": {
    "members": 3,
    "owners": 1,
    "admins": 1,
    "members_without_mfa": 0,
    "active_api_keys": 2,
    "service_role_keys": 1
  },
  "security_advisor": {
    "critical": 0,
    "high": 1,
    "medium": 0,
    "low": 0
  },
  "subprocessors": 9,
  "trust_center": "https://sovaria.in/trust",
  "hipaa": {
    "available": false,
    "plan": "pro",
    "required_plan": "enterprise"
  }
}

sovaria.api.compliance.hipaa

HIPAA status for an organization (owners and admins; Enterprise): HIPAA mode, session limits, retention, PHI projects.

sovaria.api.compliance.hipaa(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/compliance/hipaa

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "available": true,
  "plan": "enterprise",
  "required_plan": "enterprise",
  "mode": true,
  "active": true,
  "baa_signed": true,
  "session_limits": {
    "inactivityMinutes": 15,
    "timeBoxMinutes": 720
  },
  "org_session_limits": null,
  "audit_log_days": 2190,
  "phi_projects": [
    {
      "id": "5e8d2a1f-3c90-4f0a-9c6b-b2f4a1c87d3e",
      "name": "clinic",
      "ref": "abcdefghijkl"
    }
  ],
  "features_outside_baa": [
    {
      "id": "ai",
      "label": "Sovariq AI assistant and project agents",
      "why": "Prompts and data go to an LLM provider that isn't covered by the AWS BAA."
    }
  ],
  "safeguards": []
}

#sovaria.api.connections

sovaria.api.connections.providers

Providers.

sovaria.api.connections.providers(): Promise<JsonValue>

GET /api/v1/connections/providers

Returns

Promise<JsonValue>

sovaria.api.connections.saveOauthApp

Save oauth app.

sovaria.api.connections.saveOauthApp(
  args: { provider: string; clientId: JsonValue; clientSecret: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ provider: string; clientId: JsonValue; clientSecret: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.connections.deleteOauthApp

Delete oauth app.

sovaria.api.connections.deleteOauthApp(
  args: { provider: string },
): Promise<JsonValue>

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

Parameters

args{ provider: string }required

Returns

Promise<JsonValue>

sovaria.api.connections.listConnections

List connections.

sovaria.api.connections.listConnections(
  args?: { provider?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/connections

Parameters

args{ provider?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.connections.createConnection

Create connection.

sovaria.api.connections.createConnection(
  args: { fields?: JsonValue; name?: JsonValue; provider: JsonValue; test?: JsonValue },
): Promise<JsonValue>

POST /api/v1/connections

Parameters

args{ fields?: JsonValue; name?: JsonValue; provider: JsonValue; test?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.connections.renameConnection

Rename connection.

sovaria.api.connections.renameConnection(
  args: { connectionId: string; name: JsonValue },
): Promise<JsonValue>

PATCH /api/v1/connections/{connection_id}

Parameters

args{ connectionId: string; name: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.connections.testConnection

Test connection.

sovaria.api.connections.testConnection(
  args: { connectionId: string },
): Promise<JsonValue>

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

Parameters

args{ connectionId: string }required

Returns

Promise<JsonValue>

sovaria.api.connections.deleteConnection

Delete connection.

sovaria.api.connections.deleteConnection(
  args: { connectionId: string },
): Promise<JsonValue>

DELETE /api/v1/connections/{connection_id}

Parameters

args{ connectionId: string }required

Returns

Promise<JsonValue>

sovaria.api.connections.oauthStart

Oauth start.

sovaria.api.connections.oauthStart(
  args: { app?: JsonValue; fields?: JsonValue; name?: JsonValue; provider: JsonValue; reconnectId?: JsonValue; redirect?: JsonValue; returnTo?: JsonValue; scopes?: JsonValue },
): Promise<JsonValue>

POST /api/v1/connections/oauth/start

Parameters

args{ app?: JsonValue; fields?: JsonValue; name?: JsonValue; provider: JsonValue; reconnectId?: JsonValue; redirect?: JsonValue; returnTo?: JsonValue; scopes?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.connections.oauthCallback

Oauth callback.

sovaria.api.connections.oauthCallback(
  args?: { code?: JsonValue; error?: JsonValue; state?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/connections/oauth/callback

Parameters

args{ code?: JsonValue; error?: JsonValue; state?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.connections.oauthComplete

Oauth complete.

sovaria.api.connections.oauthComplete(
  args: { pending: JsonValue },
): Promise<JsonValue>

POST /api/v1/connections/oauth/complete

Parameters

args{ pending: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.connections.oauthState

Oauth state.

sovaria.api.connections.oauthState(
  args: { state: string },
): Promise<JsonValue>

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

Parameters

args{ state: string }required

Returns

Promise<JsonValue>

#sovaria.api.crashes

sovaria.api.crashes.listIssues

App crash issues of the project (grouped reports from sov.crashes), newest first, filtered by status, release, app environment, platform or text, with a 24-hour trend and the plan's limits.

sovaria.api.crashes.listIssues(
  args?: { status?: JsonValue; limit?: JsonValue; release?: JsonValue; environment?: JsonValue; platform?: JsonValue; q?: JsonValue; sort?: JsonValue; handled?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/crashes/issues

Parameters

args{ status?: JsonValue; limit?: JsonValue; release?: JsonValue; environment?: JsonValue; platform?: JsonValue; q?: JsonValue; sort?: JsonValue; handled?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "issues": [
    {
      "fingerprint": "8c1e4f…",
      "platform": "web",
      "title": "TypeError: Cannot read properties of undefined (reading 'total')",
      "culprit": "at CartSummary (app/cart.tsx",
      "status": "open",
      "first_seen": "2026-10-16T09:12:00+00:00",
      "last_seen": "2026-10-18T07:44:00+00:00",
      "events": 37,
      "users": 12,
      "last_release": "2.4.0"
    }
  ],
  "limits": {
    "events_month": 100000,
    "days": 30
  }
}

sovaria.api.crashes.getIssue

One crash issue: sample report (stack, breadcrumbs, device, release) and its last 50 reports.

sovaria.api.crashes.getIssue(
  args: { fingerprint: string },
): Promise<JsonValue>

GET /api/v1/crashes/issues/{fingerprint}

Parameters

args{ fingerprint: string }required

Returns

Promise<JsonValue>

sovaria.api.crashes.setIssueStatus

Mark a crash issue open, resolved (reopens if it happens again) or ignored.

sovaria.api.crashes.setIssueStatus(
  args: { fingerprint: string; status: JsonValue },
): Promise<JsonValue>

POST /api/v1/crashes/issues/{fingerprint}/status

Parameters

args{ fingerprint: string; status: JsonValue }required

Returns

Promise<JsonValue>

{
  "fingerprint": "8c1e4f…",
  "status": "resolved"
}

sovaria.api.crashes.usage

Crash reports, release-health sessions and debug-file storage used this month, and the plan's limits.

sovaria.api.crashes.usage(): Promise<JsonValue>

GET /api/v1/crashes/usage

Returns

Promise<JsonValue>

{
  "accepted": 1840,
  "dropped": 0,
  "limits": {
    "events_month": 100000,
    "days": 30
  }
}

sovaria.api.crashes.releases

Release health: sessions, crash-free sessions and users, and adoption per release.

sovaria.api.crashes.releases(
  args?: { days?: JsonValue; environment?: JsonValue; platform?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/crashes/releases

Parameters

args{ days?: JsonValue; environment?: JsonValue; platform?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.crashes.listDebugFiles

Uploaded source maps, ProGuard/R8 mappings and Apple symbols, and the storage used.

sovaria.api.crashes.listDebugFiles(
  args?: { kind?: JsonValue; release?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/crashes/debug-files

Parameters

args{ kind?: JsonValue; release?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.crashes.deleteDebugFile

Delete one debug file (frames of that release stay as they were stored).

sovaria.api.crashes.deleteDebugFile(
  args: { fileId: string },
): Promise<JsonValue>

DELETE /api/v1/crashes/debug-files/{file_id}

Parameters

args{ fileId: string }required

Returns

Promise<JsonValue>

#sovaria.api.data

sovaria.api.data.addColumn

Add a column to an existing table.

sovaria.api.data.addColumn(
  args: { tableName: JsonValue; columnName: JsonValue; dataType: JsonValue; isNullable?: JsonValue; isUnique?: JsonValue; defaultValue?: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/column/add

Parameters

args{ tableName: JsonValue; columnName: JsonValue; dataType: JsonValue; isNullable?: JsonValue; isUnique?: JsonValue; defaultValue?: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "table": "orders",
  "column": "status",
  "migration_version": "20261018101500123",
  "reversible": true
}

sovaria.api.data.addForeignKey

Add a foreign-key relation.

sovaria.api.data.addForeignKey(
  args: { tableName: JsonValue; columnName: JsonValue; referencedTable: JsonValue; referencedColumn: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/foreign-key/add

Parameters

args{ tableName: JsonValue; columnName: JsonValue; referencedTable: JsonValue; referencedColumn: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "table": "orders",
  "column": "customer_id",
  "referenced_table": "customers",
  "referenced_column": "id",
  "migration_version": "20261018101500123",
  "reversible": true
}

sovaria.api.data.beginTransaction

Start a table transaction and receive tx/snapshot IDs.

sovaria.api.data.beginTransaction(): Promise<JsonValue>

POST /api/v1/data/rel/transaction/begin

Returns

Promise<JsonValue>

{
  "txid": 81234,
  "snapshot_txid": 81234
}

sovaria.api.data.commitTransaction

Commit a previously opened table transaction.

sovaria.api.data.commitTransaction(
  args: { txid: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/transaction/commit

Parameters

args{ txid: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "txid": 81234,
  "committed": true
}

sovaria.api.data.dropColumn

Drop a column from a table.

sovaria.api.data.dropColumn(
  args: { tableName: JsonValue; columnName: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/column/drop

Parameters

args{ tableName: JsonValue; columnName: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "table": "orders",
  "column": "note",
  "data_restorable": true,
  "migration_version": "20261018101500123",
  "reversible": true
}

sovaria.api.data.dropForeignKey

Drop a foreign-key relation.

sovaria.api.data.dropForeignKey(
  args: { tableName: JsonValue; columnName: JsonValue; referencedTable: JsonValue; referencedColumn: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/foreign-key/drop

Parameters

args{ tableName: JsonValue; columnName: JsonValue; referencedTable: JsonValue; referencedColumn: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "table": "orders",
  "column": "customer_id",
  "referenced_table": "customers",
  "referenced_column": "id"
}

sovaria.api.data.dropTable

Drop a relational table.

sovaria.api.data.dropTable(
  args: { tableName: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/drop

Parameters

args{ tableName: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "table": "orders_old",
  "migration_version": "20261018101500123",
  "reversible": true
}

sovaria.api.data.rollbackTransaction

POST /api/v1/data/rel/transaction/rollback

sovaria.api.data.rollbackTransaction(
  args: { txid: JsonValue },
): Promise<JsonValue>

Parameters

args{ txid: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "txid": 81234,
  "rolled_back": true
}

sovaria.api.data.tableHistory

Tables that keep history (versions, oldest, retention) and the plan's db.history_* limits.

sovaria.api.data.tableHistory(): Promise<JsonValue>

GET /api/v1/data/rel/history

Returns

Promise<JsonValue>

{
  "tables": [
    {
      "table": "orders",
      "keep_days": 7,
      "enabled_at": "2026-10-10T08:00:00+00:00",
      "versions": 18234,
      "oldest": "2026-10-11T08:00:02+00:00"
    }
  ],
  "limits": {
    "tables": 3,
    "days": 7
  }
}

sovaria.api.data.setTableHistory

Turn a table's history on (every row version kept; read with sov_as_of(NULL::table, time)) or off (versions dropped).

sovaria.api.data.setTableHistory(
  args: { tableName: JsonValue; enabled: JsonValue; keepDays?: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/history

Parameters

args{ tableName: JsonValue; enabled: JsonValue; keepDays?: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "table": "orders",
  "enabled": true,
  "keep_days": 7,
  "primary_key": [
    "id"
  ],
  "migration_version": "20261018101500123",
  "reversible": true
}

sovaria.api.data.schemaDigest

The schema as one short line per table: columns with types, keys, →references, allowed values, indexes and owner-only rows.

sovaria.api.data.schemaDigest(
  args?: { tables?: JsonValue; maxChars?: JsonValue; since?: JsonValue } = {},
): Promise<JsonValue>

tables (comma-separated) expands only those in a big schema; since=<version> answers unchanged when nothing changed. GET /api/v1/data/rel/schema/digest

Parameters

args{ tables?: JsonValue; maxChars?: JsonValue; since?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "version": "79d083ae9b31",
  "schema": "public",
  "tables": 3,
  "text": "# !=not null =default pk uniq →fk(table key) in()=allowed values idx()=index rls:owner(col)=owner-only rows updated_at:auto=kept current by a trigger\ncustomers(id uuid pk=gen_random_uuid(), email text! uniq, created_at timestamptz!=now()) ~1.2k rows\norders(id uuid pk=gen_random_uuid(), customer_id uuid →customers cascade, status text!='pending' in(pending|paid|shipped), total numeric(12,2)!, user_id uuid!=caller, created_at timestamptz!=now()) rls:owner(user_id) idx(customer_id) idx(user_id)\norder_items(id uuid pk=gen_random_uuid(), order_id uuid! →orders cascade, qty int!, created_at timestamptz!=now()) check(qty > 0) idx(order_id)"
}

sovaria.api.data.applySchemaPlan

Create or extend tables from one declarative plan ([{name, columns, patterns, unique, indexes}]; columns as objects or short form like "status text!='draft' in(draft|live)" or "customer_id →customers cascade").

sovaria.api.data.applySchemaPlan(
  args: { tables: JsonValue; dryRun?: JsonValue; name?: JsonValue },
): Promise<JsonValue>

Checked first (422 lists every problem, nothing changes), then applied as one reversible migration and verified. dry_run returns the SQL without applying. POST /api/v1/data/rel/schema/plan

Parameters

args{ tables: JsonValue; dryRun?: JsonValue; name?: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "applied",
  "migration_version": "20261018111530412",
  "reversible": true,
  "created": [
    "orders",
    "order_items"
  ],
  "altered": {},
  "notes": [],
  "digest": "orders(id uuid pk=gen_random_uuid(), customer_id uuid →customers cascade, status text!='pending' in(pending|paid|shipped), total numeric(12,2)!, created_at timestamptz!=now(), user_id uuid!=caller) check(total >= 0) rls:owner(user_id) idx(customer_id) idx(user_id)\norder_items(id uuid pk=gen_random_uuid(), order_id uuid →orders cascade, product_id uuid →products, qty int!, created_at timestamptz!=now()) uniq(order_id,product_id) check(qty > 0) idx(product_id)",
  "version": "a41f0c2e9d77",
  "verification": {
    "ok": true,
    "checks": [
      {
        "check": "table orders",
        "ok": true
      },
      {
        "check": "table order_items",
        "ok": true
      }
    ]
  }
}

sovaria.api.data.applyMigration

Apply a migration and record it in the project's history, in one transaction (all or nothing).

sovaria.api.data.applyMigration(
  args: { name: JsonValue; upSql: JsonValue; downSql?: JsonValue; version?: JsonValue },
): Promise<JsonValue>

down_sql makes it reversible; the same version with the same SQL again does nothing, with different SQL it is refused (409). POST /api/v1/data/rel/migrations/apply

Parameters

args{ name: JsonValue; upSql: JsonValue; downSql?: JsonValue; version?: JsonValue }required

Returns

Promise<JsonValue>

{
  "version": "20261018101500123",
  "name": "add orders status",
  "status": "applied",
  "duration_ms": 38,
  "reversible": true
}

sovaria.api.data.dryRunMigration

Run a migration inside a transaction and roll it back: whether it would apply.

sovaria.api.data.dryRunMigration(
  args: { name: JsonValue; upSql: JsonValue; downSql?: JsonValue },
): Promise<JsonValue>

Nothing is kept. POST /api/v1/data/rel/migrations/dry-run

Parameters

args{ name: JsonValue; upSql: JsonValue; downSql?: JsonValue }required

Returns

Promise<JsonValue>

{
  "version": "20261018101500123",
  "status": "dry_run_ok",
  "duration_ms": 35
}

sovaria.api.data.dryRunMigrations

Check several migrations ([{name, up_sql}], up to 500 and 5 MB of SQL) in order inside one transaction that is rolled back, so later ones see what earlier ones create.

sovaria.api.data.dryRunMigrations(
  args: { migrations: JsonValue },
): Promise<JsonValue>

Returns status dry_run_ok, or failed with failed.index, name and error for the first that fails. POST /api/v1/data/rel/migrations/dry-run-sequence

Parameters

args{ migrations: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "dry_run_ok",
  "checked": 2,
  "total": 2,
  "duration_ms": 61
}

sovaria.api.data.rollbackMigration

Undo the most recent migration with its down SQL (or version, with force when it isn't the latest).

sovaria.api.data.rollbackMigration(
  args?: { version?: JsonValue; force?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/data/rel/migrations/rollback

Parameters

args{ version?: JsonValue; force?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "version": "20261018101500123",
  "name": "add orders status",
  "status": "rolled_back"
}

sovaria.api.data.resetMigrations

Drop every user table and forget the migration history, in one transaction (what sov db reset runs).

sovaria.api.data.resetMigrations(
  args?: { dryRun?: JsonValue } = {},
): Promise<JsonValue>

dry_run lists what would be dropped. POST /api/v1/data/rel/migrations/reset

Parameters

args{ dryRun?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.data.docPipeline

Run a document pipeline: where, aggregate, distinct, sort, offset, limit, select, remove_fields, sample.

sovaria.api.data.docPipeline(
  args: { collection: string; stages: JsonValue; collectionGroup?: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/doc/_pipeline/{collection}

Parameters

args{ collection: string; stages: JsonValue; collectionGroup?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.data.schemaDiff

How two environments' databases differ (to_env '' = production): migrations to deploy and only in the target, and the tables, columns, indexes, constraints and row policies that would be added, changed or dropped.

sovaria.api.data.schemaDiff(
  args: { fromEnv: JsonValue; toEnv?: JsonValue },
): Promise<JsonValue>

Read-only. GET /api/v1/data/rel/schema/diff

Parameters

args{ fromEnv: JsonValue; toEnv?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.data.promoteEnvironment

Deploy a branch (or staging environment) into production, or into a staging environment with to_env_id: its migrations, functions, policies and project settings, all checked first with nothing written (dry_run=true returns only the check).

sovaria.api.data.promoteEnvironment(
  args: { fromEnvId: JsonValue; toEnvId?: JsonValue; fromName?: JsonValue; toName?: JsonValue; dryRun?: JsonValue; acceptViolations?: JsonValue },
): Promise<JsonValue>

from_name/to_name label the commit. accept_violations deploys even when production's access simulation finds new write access (deploys into staging aren't simulated). POST /api/v1/data/rel/migrations/promote

Parameters

args{ fromEnvId: JsonValue; toEnvId?: JsonValue; fromName?: JsonValue; toName?: JsonValue; dryRun?: JsonValue; acceptViolations?: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "dry_run_ok",
  "applied": [],
  "pending": [
    "20261018101500123"
  ],
  "changes": [
    {
      "version": "20261018101500123",
      "name": "add orders status"
    }
  ],
  "functions": {
    "status": "ok",
    "dry_run": true,
    "functions": [
      {
        "function_name": "send-receipt",
        "change": "changed",
        "env_version": 4,
        "env_deploy_id": "dep_9a1…",
        "production_version": 3
      }
    ],
    "settings": [],
    "problems": [],
    "names": [
      "send-receipt"
    ]
  },
  "policies": {
    "status": "ok",
    "dry_run": true,
    "policies": [
      {
        "name": "Signed-in users read orders",
        "change": "changed",
        "env_policy_id": "pol_5c…",
        "replaces": "pol_orders_read",
        "spl_source": "ALLOW IF …"
      }
    ],
    "drafts": [
      {
        "policy_id": "Signed-in users read orders",
        "spl_source": "ALLOW IF …",
        "replaces": "pol_orders_read"
      }
    ],
    "problems": []
  },
  "simulation": {
    "kind": "policy",
    "nothing_written": true,
    "cases_checked": 48,
    "changes": [],
    "violations": [],
    "summary": {
      "gains": 0,
      "losses": 0,
      "violations": 0
    },
    "impact": []
  },
  "blocked_by": []
}

sovaria.api.data.getCdcCapture

Whether the database records its own changes (writes over direct connections reach realtime and webhooks), for which tables, and the backlog.

sovaria.api.data.getCdcCapture(): Promise<JsonValue>

GET /api/v1/data/rel/cdc/capture

Returns

Promise<JsonValue>

sovaria.api.data.setCdcCapture

Turn change capture on or off: tables null = every table (team + service key).

sovaria.api.data.setCdcCapture(
  args: { enabled: JsonValue; tables?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/data/rel/cdc/capture

Parameters

args{ enabled: JsonValue; tables?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.data.graphql

Run a GraphQL query or mutation (pg_graphql style) as the caller; row rules apply.

sovaria.api.data.graphql(
  args: { query: JsonValue; variables?: JsonValue; operationName?: JsonValue },
): Promise<JsonValue>

Returns {data, errors?}. POST /graphql/v1

Parameters

args{ query: JsonValue; variables?: JsonValue; operationName?: JsonValue }required

Returns

Promise<JsonValue>

{
  "data": {
    "ordersCollection": {
      "edges": [
        {
          "node": {
            "id": 1042,
            "total": "59.90"
          }
        },
        {
          "node": {
            "id": 1029,
            "total": "18.00"
          }
        }
      ]
    }
  }
}

sovaria.api.data.listenerStats

Listener stats.

sovaria.api.data.listenerStats(): Promise<JsonValue>

GET /api/v1/data/doc/_listeners

Returns

Promise<JsonValue>

{
  "available": true,
  "active_listeners": 12
}

sovaria.api.data.listCollections

List collections.

sovaria.api.data.listCollections(): Promise<JsonValue>

GET /api/v1/data/doc/collections

Returns

Promise<JsonValue>

{
  "collections": [
    {
      "name": "orders",
      "document_count": 1043,
      "sample_fields": [
        "customer",
        "status",
        "total",
        "items"
      ]
    }
  ],
  "total": 1
}

sovaria.api.data.putDocumentsBatch

Put documents batch.

sovaria.api.data.putDocumentsBatch(
  args: { collection: string; body: JsonObject },
): Promise<JsonValue>

POST /api/v1/data/doc/_batch/{collection}

Parameters

args{ collection: string; body: JsonObject }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "collection": "products",
  "written": 2,
  "skipped": [],
  "keys": [
    "tee-black-m",
    "tee-white-m"
  ]
}

sovaria.api.data.schemaSnapshot

Schema snapshot.

sovaria.api.data.schemaSnapshot(): Promise<JsonValue>

GET /api/v1/sql/schema-snapshot

Returns

Promise<JsonValue>

{
  "schemas": [
    "public"
  ],
  "tables": [
    {
      "schema": "public",
      "name": "orders",
      "kind": "table"
    }
  ],
  "columns": [
    {
      "schema": "public",
      "table_name": "orders",
      "column_name": "id",
      "data_type": "bigint",
      "udt_name": "int8",
      "is_nullable": "NO",
      "column_default": null,
      "is_identity": "YES"
    },
    {
      "schema": "public",
      "table_name": "orders",
      "column_name": "total",
      "data_type": "numeric",
      "udt_name": "numeric",
      "is_nullable": "NO",
      "column_default": null,
      "is_identity": "NO"
    }
  ],
  "pks": [
    {
      "schema": "public",
      "table_name": "orders",
      "column_name": "id"
    }
  ],
  "fks": [
    {
      "schema": "public",
      "table_name": "orders",
      "column_name": "customer_id",
      "ref_table": "customers",
      "ref_column": "id"
    }
  ],
  "uniques": [],
  "indexes": [
    {
      "schema": "public",
      "table_name": "orders",
      "name": "orders_customer_idx"
    }
  ],
  "functions": [],
  "triggers": [],
  "fingerprint": "9b1f0c4e7a2d…"
}

sovaria.api.data.rollbackMigrationsTo

Rollback migrations to.

sovaria.api.data.rollbackMigrationsTo(
  args?: { dryRun?: JsonValue; fromVersion?: JsonValue; since?: JsonValue; version?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/data/rel/migrations/rollback-to

Parameters

args{ dryRun?: JsonValue; fromVersion?: JsonValue; since?: JsonValue; version?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "status": "dry_run_ok",
  "rolled_back": [
    {
      "version": "20261018101500123",
      "name": "add orders status"
    },
    {
      "version": "20261017190000000",
      "name": "orders index"
    }
  ]
}

sovaria.api.data.schemaDiffMigration

Schema diff migration.

sovaria.api.data.schemaDiffMigration(
  args: { fromEnv: JsonValue; includeDrops?: JsonValue; toEnv?: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/schema/diff/migration

Parameters

args{ fromEnv: JsonValue; includeDrops?: JsonValue; toEnv?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.data.recordSchemaDiffMigration

Record schema diff migration.

sovaria.api.data.recordSchemaDiffMigration(
  args: { fromEnv: JsonValue; name: JsonValue; sql: JsonValue; toEnv?: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/schema/diff/migration/record

Parameters

args{ fromEnv: JsonValue; name: JsonValue; sql: JsonValue; toEnv?: JsonValue }required

Returns

Promise<JsonValue>

#sovaria.api.deadLetters

sovaria.api.deadLetters.list

Background runs that ran out of tries (trigger events, async calls, schedules), kept for the plan's fn.dead_letter_days.

sovaria.api.deadLetters.list(
  args?: { functionName?: JsonValue; triggerId?: JsonValue; limit?: JsonValue; offset?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/fn/dead-letters

Parameters

args{ functionName?: JsonValue; triggerId?: JsonValue; limit?: JsonValue; offset?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "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": ""
    }
  ]
}

sovaria.api.deadLetters.replay

Run a dead-lettered event again (on the function's live version).

sovaria.api.deadLetters.replay(
  args: { invocationId: string },
): Promise<JsonValue>

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

Parameters

args{ invocationId: string }required

Returns

Promise<JsonValue>

{
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "status": "QUEUED",
  "function_name": "send-receipt"
}

sovaria.api.deadLetters.replayMany

Replay up to 100 dead letters at once; returns replayed and failed ids.

sovaria.api.deadLetters.replayMany(
  args: { ids: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ ids: JsonValue }required

Returns

Promise<JsonValue>

{
  "replayed": [
    "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
    "9d1e…"
  ],
  "failed": []
}

sovaria.api.deadLetters.discard

Discard a dead letter for good.

sovaria.api.deadLetters.discard(
  args: { invocationId: string },
): Promise<JsonValue>

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

Parameters

args{ invocationId: string }required

Returns

Promise<JsonValue>

{
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "status": "DISCARDED",
  "function_name": "send-receipt"
}

#sovaria.api.distribution

sovaria.api.distribution.overview

Tester builds, groups, testers, usage and the plan's limits.

sovaria.api.distribution.overview(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/distribution

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.distribution.createRelease

Start a tester build upload: returns the release and a signed upload URL (PUT the .apk/.aab/.ipa there, then finalize).

sovaria.api.distribution.createRelease(
  args: { projectId?: string; filename: JsonValue; sizeBytes: JsonValue; notes?: JsonValue; groups?: JsonValue; env?: JsonValue; gitRef?: JsonValue; appId?: JsonValue; notify?: JsonValue },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/distribution/releases

Parameters

args{ projectId?: string; filename: JsonValue; sizeBytes: JsonValue; notes?: JsonValue; groups?: JsonValue; env?: JsonValue; gitRef?: JsonValue; appId?: JsonValue; notify?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.distribution.finalizeRelease

Read the uploaded build (package/bundle id, version, build, minimum OS), share it with its groups and email their testers.

sovaria.api.distribution.finalizeRelease(
  args: { projectId?: string; releaseId: string },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/distribution/releases/{release_id}/finalize

Parameters

args{ projectId?: string; releaseId: string }required

Returns

Promise<JsonValue>

sovaria.api.distribution.updateRelease

Change a build's notes or groups.

sovaria.api.distribution.updateRelease(
  args: { projectId?: string; releaseId: string; notes?: JsonValue; groups?: JsonValue },
): Promise<JsonValue>

PATCH /api/v1/projects/{project_id}/distribution/releases/{release_id}

Parameters

args{ projectId?: string; releaseId: string; notes?: JsonValue; groups?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.distribution.deleteRelease

Delete a tester build and its file.

sovaria.api.distribution.deleteRelease(
  args: { projectId?: string; releaseId: string },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/distribution/releases/{release_id}

Parameters

args{ projectId?: string; releaseId: string }required

Returns

Promise<JsonValue>

sovaria.api.distribution.addTesters

Add testers by email to groups and send them install links.

sovaria.api.distribution.addTesters(
  args: { projectId?: string; emails: JsonValue; groups?: JsonValue; sendInvite?: JsonValue },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/distribution/testers

Parameters

args{ projectId?: string; emails: JsonValue; groups?: JsonValue; sendInvite?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.distribution.removeTester

Remove a tester; their install links stop working at once.

sovaria.api.distribution.removeTester(
  args: { projectId?: string; testerId: string },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/distribution/testers/{tester_id}

Parameters

args{ projectId?: string; testerId: string }required

Returns

Promise<JsonValue>

sovaria.api.distribution.resendInvite

Send a tester a new install link (older links stop working).

sovaria.api.distribution.resendInvite(
  args: { projectId?: string; testerId: string },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/distribution/testers/{tester_id}/invite

Parameters

args{ projectId?: string; testerId: string }required

Returns

Promise<JsonValue>

sovaria.api.distribution.deleteGroup

Delete a tester group.

sovaria.api.distribution.deleteGroup(
  args: { projectId?: string; name: string },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/distribution/groups/{name}

Parameters

args{ projectId?: string; name: string }required

Returns

Promise<JsonValue>

#sovaria.api.e2ee

sovaria.api.e2ee.bootstrapKey

Create (or fetch) the active e2ee channel key.

sovaria.api.e2ee.bootstrapKey(
  args: { channel: JsonValue; ttlSeconds?: JsonValue; forceNew?: JsonValue },
): Promise<JsonValue>

POST /api/v1/rt/e2ee/keys/bootstrap

Parameters

args{ channel: JsonValue; ttlSeconds?: JsonValue; forceNew?: JsonValue }required

Returns

Promise<JsonValue>

{
  "channel": "room-42",
  "tenant_scope": "b2f4a1c8…:f0c3e9a2…",
  "key_id": "k_9f3a2c71",
  "key_b64": null,
  "wrapped_key_b64": "Qm9v…",
  "wrapping_alg": "RSA-OAEP-SHA256",
  "status": "active",
  "created_at_ms": 1792262400000,
  "expires_at_ms": 1792348800000
}

sovaria.api.e2ee.getActiveKey

Get the active e2ee key for a channel, wrapped for `client_public_key

sovaria.api.e2ee.getActiveKey(
  args: { channel: string; clientPublicKey?: JsonValue },
): Promise<JsonValue>

GET /api/v1/rt/e2ee/keys/active/{channel}

Parameters

args{ channel: string; clientPublicKey?: JsonValue }required

Returns

Promise<JsonValue>

{
  "channel": "room-42",
  "tenant_scope": "b2f4a1c8…:f0c3e9a2…",
  "key_id": "k_9f3a2c71",
  "key_b64": null,
  "wrapped_key_b64": "Qm9v…",
  "wrapping_alg": "RSA-OAEP-SHA256",
  "status": "active",
  "created_at_ms": 1792262400000,
  "expires_at_ms": 1792348800000
}

sovaria.api.e2ee.getKey

Get key material by channel/key_id, wrapped for `client_public_key

sovaria.api.e2ee.getKey(
  args: { channel: string; keyId: string; clientPublicKey?: JsonValue },
): Promise<JsonValue>

GET /api/v1/rt/e2ee/keys/{channel}/{key_id}

Parameters

args{ channel: string; keyId: string; clientPublicKey?: JsonValue }required

Returns

Promise<JsonValue>

{
  "channel": "room-42",
  "tenant_scope": "b2f4a1c8…:f0c3e9a2…",
  "key_id": "k_9f3a2c71",
  "key_b64": null,
  "wrapped_key_b64": "Qm9v…",
  "wrapping_alg": "RSA-OAEP-SHA256",
  "status": "active",
  "created_at_ms": 1792262400000,
  "expires_at_ms": 1792348800000
}

sovaria.api.e2ee.listKeys

List key metadata for a channel.

sovaria.api.e2ee.listKeys(args: { channel: string }): Promise<JsonValue>

GET /api/v1/rt/e2ee/keys/{channel}

Parameters

args{ channel: string }required

Returns

Promise<JsonValue>

{
  "channel": "room-42",
  "keys": [
    {
      "channel": "room-42",
      "tenant_scope": "b2f4a1c8…:f0c3e9a2…",
      "key_id": "k_1c7e0b44",
      "status": "active",
      "created_at_ms": 1792265000000,
      "expires_at_ms": 1792351400000,
      "revoked_at_ms": null,
      "revocation_reason": null
    },
    {
      "channel": "room-42",
      "tenant_scope": "b2f4a1c8…:f0c3e9a2…",
      "key_id": "k_9f3a2c71",
      "status": "rotated",
      "created_at_ms": 1792262400000,
      "expires_at_ms": 1792348800000,
      "revoked_at_ms": null,
      "revocation_reason": null
    }
  ]
}

sovaria.api.e2ee.revokeKey

Revoke an active or historical channel key.

sovaria.api.e2ee.revokeKey(
  args: { channel: JsonValue; keyId?: JsonValue; reason?: JsonValue },
): Promise<JsonValue>

POST /api/v1/rt/e2ee/keys/revoke

Parameters

args{ channel: JsonValue; keyId?: JsonValue; reason?: JsonValue }required

Returns

Promise<JsonValue>

{
  "channel": "room-42",
  "tenant_scope": "b2f4a1c8…:f0c3e9a2…",
  "key_id": "k_9f3a2c71",
  "status": "revoked",
  "created_at_ms": 1792262400000,
  "expires_at_ms": 1792348800000,
  "revoked_at_ms": 1792266000000,
  "revocation_reason": "device lost"
}

sovaria.api.e2ee.rotateKey

Rotate e2ee key material for a channel.

sovaria.api.e2ee.rotateKey(
  args: { channel: JsonValue; ttlSeconds?: JsonValue },
): Promise<JsonValue>

POST /api/v1/rt/e2ee/keys/rotate

Parameters

args{ channel: JsonValue; ttlSeconds?: JsonValue }required

Returns

Promise<JsonValue>

{
  "channel": "room-42",
  "tenant_scope": "b2f4a1c8…:f0c3e9a2…",
  "key_id": "k_1c7e0b44",
  "key_b64": "q1Z8…",
  "wrapped_key_b64": null,
  "wrapping_alg": null,
  "status": "active",
  "created_at_ms": 1792262400000,
  "expires_at_ms": 1792348800000
}

#sovaria.api.embeddings

sovaria.api.embeddings.getSettings

The project's embedding model, who pays (managed | own_key), dimensions and list price.

sovaria.api.embeddings.getSettings(): Promise<JsonValue>

GET /api/v1/embeddings/settings

Returns

Promise<JsonValue>

{
  "billing": "own_key",
  "provider": "openai",
  "model": "openai/text-embedding-3-small@512",
  "model_name": "text-embedding-3-small",
  "dimensions": 512,
  "semantic": true,
  "usd_per_million_tokens": 0.02,
  "managed": {
    "model": "gemini/gemini-embedding-001@768",
    "semantic": true,
    "dimensions": 768,
    "usd_per_million_tokens": 0.15
  },
  "providers": [
    "openai",
    "gemini",
    "openai_compatible"
  ],
  "base_url": null,
  "has_key": true,
  "updated_by": "7c1e…",
  "updated_at": "2026-10-20T09:00:00+00:00"
}

sovaria.api.embeddings.setSettings

Use the project's own provider key: provider (openai | gemini | openai_compatible), model, dimensions, base_url, api_key.

sovaria.api.embeddings.setSettings(
  args: { body: JsonObject },
): Promise<JsonValue>

Tested before it is saved. PUT /api/v1/embeddings/settings

Parameters

args{ body: JsonObject }required

Returns

Promise<JsonValue>

{
  "billing": "own_key",
  "provider": "openai",
  "model": "openai/text-embedding-3-small@512",
  "model_name": "text-embedding-3-small",
  "dimensions": 512,
  "semantic": true,
  "usd_per_million_tokens": 0.02,
  "managed": {
    "model": "gemini/gemini-embedding-001@768",
    "semantic": true,
    "dimensions": 768,
    "usd_per_million_tokens": 0.15
  },
  "providers": [
    "openai",
    "gemini",
    "openai_compatible"
  ],
  "base_url": null,
  "has_key": true,
  "updated_by": "7c1e…",
  "updated_at": "2026-10-20T09:00:00+00:00"
}

sovaria.api.embeddings.clearSettings

Go back to Sovaria's managed embedding model.

sovaria.api.embeddings.clearSettings(): Promise<JsonValue>

DELETE /api/v1/embeddings/settings

Returns

Promise<JsonValue>

{
  "removed": true,
  "billing": "managed",
  "provider": "gemini",
  "model": "gemini/gemini-embedding-001@768",
  "model_name": "gemini-embedding-001",
  "dimensions": 768,
  "semantic": true,
  "usd_per_million_tokens": 0.15,
  "managed": {
    "model": "gemini/gemini-embedding-001@768",
    "semantic": true,
    "dimensions": 768,
    "usd_per_million_tokens": 0.15
  },
  "providers": [
    "openai",
    "gemini",
    "openai_compatible"
  ],
  "base_url": null,
  "has_key": true,
  "updated_by": "7c1e…",
  "updated_at": "2026-10-20T09:00:00+00:00"
}

sovaria.api.embeddings.usage

Texts, tokens and estimated cost per month, model and who paid.

sovaria.api.embeddings.usage(
  args?: { months?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/embeddings/usage

Parameters

args{ months?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "usage": [
    {
      "month": "2026-10-01",
      "model": "openai/text-embedding-3-small@512",
      "billing": "own_key",
      "texts": 1840,
      "tokens": 412300,
      "cost_usd": 0.008246
    }
  ]
}

#sovaria.api.experiments

sovaria.api.experiments.listExperiments

A/B experiments of an environment and the plan's limits.

sovaria.api.experiments.listExperiments(
  args?: { projectId?: string; env?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/experiments

Parameters

args{ projectId?: string; env?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.experiments.createExperiment

Create an experiment on a parameter: variants [{name, value, weight}], control, condition?, exposure_pct?, goal {type, event|sql, value_prop?}, min_sample?.

sovaria.api.experiments.createExperiment(
  args: { projectId?: string; name: JsonValue; param: JsonValue; variants: JsonValue; control?: JsonValue; condition?: JsonValue; exposurePct?: JsonValue; goal: JsonValue; minSample?: JsonValue; description?: JsonValue; env?: JsonValue },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/experiments

Parameters

args{ projectId?: string; name: JsonValue; param: JsonValue; variants: JsonValue; control?: JsonValue; condition?: JsonValue; exposurePct?: JsonValue; goal: JsonValue; minSample?: JsonValue; description?: JsonValue; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.experiments.getExperiment

One experiment (by id or name).

sovaria.api.experiments.getExperiment(
  args: { projectId?: string; ref: string; env?: JsonValue },
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/experiments/{ref}

Parameters

args{ projectId?: string; ref: string; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.experiments.updateExperiment

Change an experiment: weights and exposure while running (assigned units keep their variant); anything while draft.

sovaria.api.experiments.updateExperiment(
  args: { projectId?: string; ref: string; variants?: JsonValue; control?: JsonValue; exposurePct?: JsonValue; goal?: JsonValue; minSample?: JsonValue; description?: JsonValue; env?: JsonValue },
): Promise<JsonValue>

PATCH /api/v1/projects/{project_id}/experiments/{ref}

Parameters

args{ projectId?: string; ref: string; variants?: JsonValue; control?: JsonValue; exposurePct?: JsonValue; goal?: JsonValue; minSample?: JsonValue; description?: JsonValue; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.experiments.deleteExperiment

Delete a draft or stopped experiment.

sovaria.api.experiments.deleteExperiment(
  args: { projectId?: string; ref: string; env?: JsonValue },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/experiments/{ref}

Parameters

args{ projectId?: string; ref: string; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.experiments.startExperiment

Start an experiment (publishes a config version with it).

sovaria.api.experiments.startExperiment(
  args: { projectId?: string; ref: string; env?: JsonValue },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/experiments/{ref}/start

Parameters

args{ projectId?: string; ref: string; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.experiments.stopExperiment

Stop an experiment (optionally naming the winner).

sovaria.api.experiments.stopExperiment(
  args: { projectId?: string; ref: string; winner?: JsonValue; env?: JsonValue },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/experiments/{ref}/stop

Parameters

args{ projectId?: string; ref: string; winner?: JsonValue; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.experiments.results

Per-variant results: z-test or Welch with 95% intervals, sample-ratio check, winner once every variant has min_sample units.

sovaria.api.experiments.results(
  args: { projectId?: string; ref: string; env?: JsonValue },
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/experiments/{ref}/results

Parameters

args{ projectId?: string; ref: string; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.experiments.rollout

Make a variant (the winner by default) the parameter's default, end the experiment and publish.

sovaria.api.experiments.rollout(
  args: { projectId?: string; ref: string; variant?: JsonValue; env?: JsonValue },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/experiments/{ref}/rollout

Parameters

args{ projectId?: string; ref: string; variant?: JsonValue; env?: JsonValue }required

Returns

Promise<JsonValue>

#sovaria.api.flows

sovaria.api.flows.list

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).

sovaria.api.flows.list(): Promise<JsonValue>

GET /api/v1/fn/flows

Returns

Promise<JsonValue>

sovaria.api.flows.create

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

sovaria.api.flows.create(
  args?: { name?: JsonValue; graph?: JsonValue; templateId?: JsonValue; description?: JsonValue; settings?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/fn/flows

Parameters

args{ name?: JsonValue; graph?: JsonValue; templateId?: JsonValue; description?: JsonValue; settings?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.flows.get

One flow with its draft graph and current problems.

sovaria.api.flows.get(args: { flowId: string }): Promise<JsonValue>

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

Parameters

args{ flowId: string }required

Returns

Promise<JsonValue>

sovaria.api.flows.update

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).

sovaria.api.flows.update(
  args: { flowId: string; name?: JsonValue; description?: JsonValue; settings?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ flowId: string; name?: JsonValue; description?: JsonValue; settings?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.flows.delete

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

sovaria.api.flows.delete(args: { flowId: string }): Promise<JsonValue>

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

Parameters

args{ flowId: string }required

Returns

Promise<JsonValue>

sovaria.api.flows.saveDraft

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

sovaria.api.flows.saveDraft(
  args: { flowId: string; graph: JsonValue; baseRev: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ flowId: string; graph: JsonValue; baseRev: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.flows.publish

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

sovaria.api.flows.publish(
  args: { flowId: string; note?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ flowId: string; note?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.flows.activate

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

sovaria.api.flows.activate(args: { flowId: string }): Promise<JsonValue>

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

Parameters

args{ flowId: string }required

Returns

Promise<JsonValue>

sovaria.api.flows.deactivate

Turn the flow's triggers off.

sovaria.api.flows.deactivate(
  args: { flowId: string },
): Promise<JsonValue>

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

Parameters

args{ flowId: string }required

Returns

Promise<JsonValue>

sovaria.api.flows.rotateWebhookToken

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

sovaria.api.flows.rotateWebhookToken(
  args: { flowId: string },
): Promise<JsonValue>

Returns the flow with its new urls. POST /api/v1/fn/flows/{flow_id}/webhook-token/rotate

Parameters

args{ flowId: string }required

Returns

Promise<JsonValue>

sovaria.api.flows.versions

Published versions, newest first.

sovaria.api.flows.versions(args: { flowId: string }): Promise<JsonValue>

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

Parameters

args{ flowId: string }required

Returns

Promise<JsonValue>

sovaria.api.flows.restoreVersion

Copy a published version into the draft.

sovaria.api.flows.restoreVersion(
  args: { flowId: string; version: string },
): Promise<JsonValue>

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

Parameters

args{ flowId: string; version: string }required

Returns

Promise<JsonValue>

sovaria.api.flows.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}.

sovaria.api.flows.test(
  args: { flowId: string; startNode?: JsonValue; untilNode?: JsonValue; triggerItems?: JsonValue; usePinned?: JsonValue; listen?: JsonValue; triggerNode?: JsonValue; ttlS?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ flowId: string; startNode?: JsonValue; untilNode?: JsonValue; triggerItems?: JsonValue; usePinned?: JsonValue; listen?: JsonValue; triggerNode?: JsonValue; ttlS?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.flows.testNode

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

sovaria.api.flows.testNode(
  args: { flowId: string; nodeId: string; inputItems?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ flowId: string; nodeId: string; inputItems?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.flows.executions

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

sovaria.api.flows.executions(
  args: { flowId: string; status?: JsonValue; mode?: JsonValue; cursor?: JsonValue; limit?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ flowId: string; status?: JsonValue; mode?: JsonValue; cursor?: JsonValue; limit?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.flows.allExecutions

Executions of every flow in the project.

sovaria.api.flows.allExecutions(
  args?: { flowId?: JsonValue; status?: JsonValue; mode?: JsonValue; cursor?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/fn/flows/executions

Parameters

args{ flowId?: JsonValue; status?: JsonValue; mode?: JsonValue; cursor?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.flows.execution

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

sovaria.api.flows.execution(
  args: { executionId: string },
): Promise<JsonValue>

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

Parameters

args{ executionId: string }required

Returns

Promise<JsonValue>

sovaria.api.flows.nodeOutput

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

sovaria.api.flows.nodeOutput(
  args: { executionId: string; nodeId: string; run?: JsonValue; output?: JsonValue; offset?: JsonValue; limit?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ executionId: string; nodeId: string; run?: JsonValue; output?: JsonValue; offset?: JsonValue; limit?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.flows.retry

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

sovaria.api.flows.retry(
  args: { executionId: string; fromNode?: JsonValue; latest?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ executionId: string; fromNode?: JsonValue; latest?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.flows.cancel

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

sovaria.api.flows.cancel(
  args: { executionId: string },
): Promise<JsonValue>

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

Parameters

args{ executionId: string }required

Returns

Promise<JsonValue>

sovaria.api.flows.approve

Approve or reject a waiting Approval node.

sovaria.api.flows.approve(
  args: { executionId: string; nodeId: JsonValue; decision: JsonValue; comment?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ executionId: string; nodeId: JsonValue; decision: JsonValue; comment?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.flows.signal

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

sovaria.api.flows.signal(
  args: { executionId: string; name: JsonValue; data?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ executionId: string; name: JsonValue; data?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.flows.approvals

Approval requests of the project (pending by default).

sovaria.api.flows.approvals(
  args?: { status?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/fn/flows/approvals

Parameters

args{ status?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.flows.catalog

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

sovaria.api.flows.catalog(): Promise<JsonValue>

GET /api/v1/fn/flows/catalog

Returns

Promise<JsonValue>

sovaria.api.flows.previewExpression

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

sovaria.api.flows.previewExpression(
  args: { expression: JsonValue; flowId?: JsonValue; contextExecution?: JsonValue; nodeId?: JsonValue; itemIndex?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ expression: JsonValue; flowId?: JsonValue; contextExecution?: JsonValue; nodeId?: JsonValue; itemIndex?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.flows.templates

Flow templates.

sovaria.api.flows.templates(
  args?: { category?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/fn/flows/templates

Parameters

args{ category?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.flows.useTemplate

Create a flow from a template.

sovaria.api.flows.useTemplate(
  args: { templateId: string; name?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ templateId: string; name?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.flows.getTemplate

Get template.

sovaria.api.flows.getTemplate(
  args: { templateId: string },
): Promise<JsonValue>

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

Parameters

args{ templateId: string }required

Returns

Promise<JsonValue>

sovaria.api.flows.getVersion

Get version.

sovaria.api.flows.getVersion(
  args: { flowId: string; version: string },
): Promise<JsonValue>

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

Parameters

args{ flowId: string; version: string }required

Returns

Promise<JsonValue>

#sovaria.api.frontends

sovaria.api.frontends.list

Frontend apps of the project.

sovaria.api.frontends.list(): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends

sovaria.api.frontends.siteVisitors

Visitors (approximate) and page views of a site's live pages over the last 1-30 days, per day.

sovaria.api.frontends.siteVisitors(
  args: { site: string; days?: JsonValue },
): Promise<JsonValue>

GET /api/v1/fn/hosting/sites/{site}/visitors

Parameters

args{ site: string; days?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/sites/{…}/visitors

sovaria.api.frontends.create

Create a frontend app (name: lowercase slug).

sovaria.api.frontends.create(
  args: { name: JsonValue; title?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends

Parameters

args{ name: JsonValue; title?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends

sovaria.api.frontends.get

One frontend app: settings, live release, URLs.

sovaria.api.frontends.get(
  args: { frontendId: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}

Parameters

args{ frontendId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}

sovaria.api.frontends.update

Rename it or change its settings.

sovaria.api.frontends.update(
  args: { frontendId: string; name?: JsonValue; settings?: JsonValue },
): Promise<JsonValue>

PATCH /api/v1/fn/hosting/frontends/{frontend_id}

Parameters

args{ frontendId: string; name?: JsonValue; settings?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
PATCH /api/v1/fn/hosting/frontends/{…}

sovaria.api.frontends.delete

Delete a frontend app (confirm = its name).

sovaria.api.frontends.delete(
  args: { frontendId: string; confirm?: JsonValue },
): Promise<JsonValue>

DELETE /api/v1/fn/hosting/frontends/{frontend_id}

Parameters

args{ frontendId: string; confirm?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
DELETE /api/v1/fn/hosting/frontends/{…}

sovaria.api.frontends.unpublish

Take the live site down (files and versions stay).

sovaria.api.frontends.unpublish(
  args: { frontendId: string },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/unpublish

Parameters

args{ frontendId: string }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/unpublish

sovaria.api.frontends.config

Builder limits and features for this project's plan.

sovaria.api.frontends.config(): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/config

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/config

sovaria.api.frontends.studio

Everything the studio needs in one call (files, commits, checks, preview).

sovaria.api.frontends.studio(
  args: { frontendId: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/studio

Parameters

args{ frontendId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/studio

sovaria.api.frontends.files

List files, or read one (path) at a commit.

sovaria.api.frontends.files(
  args: { frontendId: string; path?: JsonValue; commit?: JsonValue },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/files

Parameters

args{ frontendId: string; path?: JsonValue; commit?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/files

sovaria.api.frontends.writeFiles

Write/delete files as one version: changes [{path, content | delete}].

sovaria.api.frontends.writeFiles(
  args: { frontendId: string; changes: JsonValue; message?: JsonValue; baseCommit?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/fn/hosting/frontends/{frontend_id}/files

Parameters

args{ frontendId: string; changes: JsonValue; message?: JsonValue; baseCommit?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
PUT /api/v1/fn/hosting/frontends/{…}/files

sovaria.api.frontends.patchFile

Edit one file with find/replace edits [{find, replace}].

sovaria.api.frontends.patchFile(
  args: { frontendId: string; path: JsonValue; edits: JsonValue; message?: JsonValue; baseCommit?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/patch

Parameters

args{ frontendId: string; path: JsonValue; edits: JsonValue; message?: JsonValue; baseCommit?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/patch

sovaria.api.frontends.shell

Run one sandboxed command in the app (npm, tsc …).

sovaria.api.frontends.shell(
  args: { frontendId: string; command: JsonValue; cwd?: JsonValue; timeoutS?: JsonValue; baseCommit?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/shell

Parameters

args{ frontendId: string; command: JsonValue; cwd?: JsonValue; timeoutS?: JsonValue; baseCommit?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/shell

sovaria.api.frontends.shellRuns

Recent sandboxed commands and their output.

sovaria.api.frontends.shellRuns(
  args: { frontendId: string; limit?: JsonValue },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/shell/runs

Parameters

args{ frontendId: string; limit?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/shell/runs

sovaria.api.frontends.commits

Versions of the app, newest first.

sovaria.api.frontends.commits(
  args: { frontendId: string; limit?: JsonValue },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/commits

Parameters

args{ frontendId: string; limit?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/commits

sovaria.api.frontends.restore

Go back to an earlier version (as a new version).

sovaria.api.frontends.restore(
  args: { frontendId: string; commit: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/restore

Parameters

args{ frontendId: string; commit: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/restore

sovaria.api.frontends.typegen

Write TypeScript types for the project's tables into the app.

sovaria.api.frontends.typegen(
  args: { frontendId: string; tables?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/typegen

Parameters

args{ frontendId: string; tables?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/typegen

sovaria.api.frontends.seoBasics

Add title, description, robots.txt and sitemap basics.

sovaria.api.frontends.seoBasics(
  args: { frontendId: string; title?: JsonValue; description?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/seo-basics

Parameters

args{ frontendId: string; title?: JsonValue; description?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/seo-basics

sovaria.api.frontends.seo

The app's SEO report (per page: title, description, headings, links).

sovaria.api.frontends.seo(
  args: { frontendId: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/seo

Parameters

args{ frontendId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/seo

sovaria.api.frontends.setSeo

Write the SEO kit (meta, Open Graph, icons, prerender) into the app.

sovaria.api.frontends.setSeo(
  args: { frontendId: string; title?: JsonValue; description?: JsonValue; archetype?: JsonValue; lang?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/seo

Parameters

args{ frontendId: string; title?: JsonValue; description?: JsonValue; archetype?: JsonValue; lang?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/seo

sovaria.api.frontends.dataClient

Write (or refresh) the app's Sovaria data client.

sovaria.api.frontends.dataClient(
  args: { frontendId: string },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/data-client

Parameters

args{ frontendId: string }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/data-client

sovaria.api.frontends.testPlan

The app's browser test plan (pages, flows, checks).

sovaria.api.frontends.testPlan(
  args: { frontendId: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/test-plan

Parameters

args{ frontendId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/test-plan

sovaria.api.frontends.checks

Run the app checks (types, build, data rules) and return the report.

sovaria.api.frontends.checks(
  args: { frontendId: string; serviceKeyPrefixes?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/checks

Parameters

args{ frontendId: string; serviceKeyPrefixes?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/checks

sovaria.api.frontends.export

Download the app's source as a zip.

sovaria.api.frontends.export(
  args: { frontendId: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/export

Parameters

args{ frontendId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/export

sovaria.api.frontends.safetyCheck

Check the app before it goes live: keys in code, row rules, public data.

sovaria.api.frontends.safetyCheck(
  args: { frontendId: string; serviceKeyPrefixes?: JsonValue; envId?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/safety-check

Parameters

args{ frontendId: string; serviceKeyPrefixes?: JsonValue; envId?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/safety-check

sovaria.api.frontends.safety

The latest safety check, the last safe version and acknowledgements.

sovaria.api.frontends.safety(
  args: { frontendId: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/safety

Parameters

args{ frontendId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/safety

sovaria.api.frontends.safetyRollback

Go back to the last version that passed the safety check.

sovaria.api.frontends.safetyRollback(
  args: { frontendId: string; checkId?: JsonValue; live?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/safety/rollback

Parameters

args{ frontendId: string; checkId?: JsonValue; live?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/safety/rollback

sovaria.api.frontends.acknowledgeSafety

Accept a safety finding on purpose (e.g.

sovaria.api.frontends.acknowledgeSafety(
  args: { frontendId: string; table: JsonValue; kind: JsonValue; reason: JsonValue },
): Promise<JsonValue>

a table that is public_read by design). POST /api/v1/fn/hosting/frontends/{frontend_id}/safety/acknowledgements

Parameters

args{ frontendId: string; table: JsonValue; kind: JsonValue; reason: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/safety/acknowledgements

sovaria.api.frontends.deleteSafetyAcknowledgement

Withdraw an acknowledgement.

sovaria.api.frontends.deleteSafetyAcknowledgement(
  args: { frontendId: string; ackId: string },
): Promise<JsonValue>

DELETE /api/v1/fn/hosting/frontends/{frontend_id}/safety/acknowledgements/{ack_id}

Parameters

args{ frontendId: string; ackId: string }required

Returns

Promise<JsonValue>

HTTP
DELETE /api/v1/fn/hosting/frontends/{…}/safety/acknowledgements/{…}

sovaria.api.frontends.templates

Template gallery: starter apps and sites.

sovaria.api.frontends.templates(
  args?: { category?: JsonValue; tag?: JsonValue; q?: JsonValue; kind?: JsonValue; ready?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/templates

Parameters

args{ category?: JsonValue; tag?: JsonValue; q?: JsonValue; kind?: JsonValue; ready?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/templates

sovaria.api.frontends.template

One template: pages, screenshots, licence.

sovaria.api.frontends.template(
  args: { templateId: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/templates/{template_id}

Parameters

args{ templateId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/templates/{…}

sovaria.api.frontends.useTemplate

Create a frontend app from a template.

sovaria.api.frontends.useTemplate(
  args: { templateId: string; name: JsonValue; title?: JsonValue; connectSovaria?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/templates/{template_id}/use

Parameters

args{ templateId: string; name: JsonValue; title?: JsonValue; connectSovaria?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/templates/{…}/use

sovaria.api.frontends.componentRegistries

Component registries the builder can install from (licence-checked).

sovaria.api.frontends.componentRegistries(): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/components/registries

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/components/registries

sovaria.api.frontends.registryItems

Search one registry's components and blocks.

sovaria.api.frontends.registryItems(
  args: { registry: string; q?: JsonValue; type?: JsonValue; limit?: JsonValue },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/components/registries/{registry}/items

Parameters

args{ registry: string; q?: JsonValue; type?: JsonValue; limit?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/components/registries/{…}/items

sovaria.api.frontends.componentLibrary

The org's own saved components.

sovaria.api.frontends.componentLibrary(): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/components/library

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/components/library

sovaria.api.frontends.libraryComponent

One saved component with its files.

sovaria.api.frontends.libraryComponent(
  args: { ref: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/components/library/{ref}

Parameters

args{ ref: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/components/library/{…}

sovaria.api.frontends.deleteLibraryComponent

Remove a saved component from the org library.

sovaria.api.frontends.deleteLibraryComponent(
  args: { ref: string },
): Promise<JsonValue>

DELETE /api/v1/fn/hosting/frontends/components/library/{ref}

Parameters

args{ ref: string }required

Returns

Promise<JsonValue>

HTTP
DELETE /api/v1/fn/hosting/frontends/components/library/{…}

sovaria.api.frontends.components

Components installed in the app.

sovaria.api.frontends.components(
  args: { frontendId: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/components

Parameters

args{ frontendId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/components

sovaria.api.frontends.addComponent

Install a component into the app (one version).

sovaria.api.frontends.addComponent(
  args: { frontendId: string; registry?: JsonValue; name: JsonValue; overwrite?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/components

Parameters

args{ frontendId: string; registry?: JsonValue; name: JsonValue; overwrite?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/components

sovaria.api.frontends.previewComponent

What installing a component would change (nothing is written).

sovaria.api.frontends.previewComponent(
  args: { frontendId: string; name: JsonValue; registry?: JsonValue; overwrite?: JsonValue },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/components/preview

Parameters

args{ frontendId: string; name: JsonValue; registry?: JsonValue; overwrite?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/components/preview

sovaria.api.frontends.saveComponent

Save files of the app as a reusable component in the org library.

sovaria.api.frontends.saveComponent(
  args: { frontendId: string; name: JsonValue; paths: JsonValue; title?: JsonValue; description?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/components/save

Parameters

args{ frontendId: string; name: JsonValue; paths: JsonValue; title?: JsonValue; description?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/components/save

sovaria.api.frontends.githubRepos

GitHub repositories the connected account can import.

sovaria.api.frontends.githubRepos(): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/github/repos

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/github/repos

sovaria.api.frontends.importGithub

Import a frontend from a GitHub repository.

sovaria.api.frontends.importGithub(
  args: { repository: JsonValue; branch?: JsonValue; root?: JsonValue; name: JsonValue; token?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/import

Parameters

args{ repository: JsonValue; branch?: JsonValue; root?: JsonValue; name: JsonValue; token?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/import

sovaria.api.frontends.resync

Pull the linked repository's latest commit.

sovaria.api.frontends.resync(
  args: { frontendId: string; token?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/resync

Parameters

args{ frontendId: string; token?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/resync

sovaria.api.frontends.pullRequest

Open a pull request with the app's changes on the linked repository.

sovaria.api.frontends.pullRequest(
  args: { frontendId: string; title: JsonValue; body?: JsonValue; token?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/pull-request

Parameters

args{ frontendId: string; title: JsonValue; body?: JsonValue; token?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/pull-request

sovaria.api.frontends.linkGithub

Link the app to a GitHub repository.

sovaria.api.frontends.linkGithub(
  args: { frontendId: string; repository: JsonValue; branch?: JsonValue; root?: JsonValue; pushOnPublish?: JsonValue; replaceExisting?: JsonValue; token?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/fn/hosting/frontends/{frontend_id}/github

Parameters

args{ frontendId: string; repository: JsonValue; branch?: JsonValue; root?: JsonValue; pushOnPublish?: JsonValue; replaceExisting?: JsonValue; token?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
PUT /api/v1/fn/hosting/frontends/{…}/github

sovaria.api.frontends.unlinkGithub

Unlink the GitHub repository.

sovaria.api.frontends.unlinkGithub(
  args: { frontendId: string },
): Promise<JsonValue>

DELETE /api/v1/fn/hosting/frontends/{frontend_id}/github

Parameters

args{ frontendId: string }required

Returns

Promise<JsonValue>

HTTP
DELETE /api/v1/fn/hosting/frontends/{…}/github

sovaria.api.frontends.pushGithub

Push the app's current version to the linked repository.

sovaria.api.frontends.pushGithub(
  args: { frontendId: string; message?: JsonValue; force?: JsonValue; token?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/github/push

Parameters

args{ frontendId: string; message?: JsonValue; force?: JsonValue; token?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/github/push

sovaria.api.frontends.getTemplateBackend

Get template backend.

sovaria.api.frontends.getTemplateBackend(
  args: { templateId: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/templates/{template_id}/backend

Parameters

args{ templateId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/templates/{…}/backend

sovaria.api.frontends.getTemplateBackendIntegrity

Get template backend integrity.

sovaria.api.frontends.getTemplateBackendIntegrity(
  args: { templateId: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/templates/{template_id}/backend/integrity

Parameters

args{ templateId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/templates/{…}/backend/integrity

sovaria.api.frontends.runScript

Run script.

sovaria.api.frontends.runScript(
  args: { frontendId: string; baseCommit?: JsonValue; inputs?: JsonValue; message?: JsonValue; script: JsonValue; timeoutS?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/run

Parameters

args{ frontendId: string; baseCommit?: JsonValue; inputs?: JsonValue; message?: JsonValue; script: JsonValue; timeoutS?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/run

sovaria.api.frontends.inspectApp

Inspect app.

sovaria.api.frontends.inspectApp(
  args: { frontendId: string; inputs?: JsonValue; script: JsonValue; timeoutS?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/script

Parameters

args{ frontendId: string; inputs?: JsonValue; script: JsonValue; timeoutS?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/script

sovaria.api.frontends.checkApp

Check app.

sovaria.api.frontends.checkApp(
  args: { frontendId: string; body: JsonObject },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/check

Parameters

args{ frontendId: string; body: JsonObject }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/check

sovaria.api.frontends.scriptRuns

Script runs.

sovaria.api.frontends.scriptRuns(
  args: { frontendId: string; limit?: JsonValue },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/runs

Parameters

args{ frontendId: string; limit?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/runs

sovaria.api.frontends.runOutput

Run output.

sovaria.api.frontends.runOutput(
  args: { frontendId: string; runId: string; lines?: JsonValue },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/outputs/{run_id}

Parameters

args{ frontendId: string; runId: string; lines?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/outputs/{…}

sovaria.api.frontends.addModel

Add model.

sovaria.api.frontends.addModel(
  args: { frontendId: string; assetId: JsonValue; maxMb?: JsonValue; provider?: JsonValue; resolution?: JsonValue; slug?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/models

Parameters

args{ frontendId: string; assetId: JsonValue; maxMb?: JsonValue; provider?: JsonValue; resolution?: JsonValue; slug?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/models

sovaria.api.frontends.mobileStoreCheck

Mobile store check.

sovaria.api.frontends.mobileStoreCheck(
  args: { frontendId: string },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/mobile/store-check

Parameters

args{ frontendId: string }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/mobile/store-check

sovaria.api.frontends.mobileStatus

Mobile status.

sovaria.api.frontends.mobileStatus(
  args: { frontendId: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/mobile

Parameters

args{ frontendId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/mobile

sovaria.api.frontends.startEasRun

Start eas run.

sovaria.api.frontends.startEasRun(
  args: { frontendId: string; confirm?: JsonValue; kind: JsonValue; platform?: JsonValue; profile?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/mobile/eas/runs

Parameters

args{ frontendId: string; confirm?: JsonValue; kind: JsonValue; platform?: JsonValue; profile?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/mobile/eas/runs

sovaria.api.frontends.easRunStatus

Eas run status.

sovaria.api.frontends.easRunStatus(
  args: { frontendId: string; runId: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/mobile/eas/runs/{run_id}

Parameters

args{ frontendId: string; runId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/mobile/eas/runs/{…}

sovaria.api.frontends.sourceMap

Source map.

sovaria.api.frontends.sourceMap(
  args: { frontendId: string; commit?: JsonValue },
): Promise<JsonValue>

GET /api/v1/fn/hosting/frontends/{frontend_id}/source-map

Parameters

args{ frontendId: string; commit?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/frontends/{…}/source-map

sovaria.api.frontends.edits

Edits.

sovaria.api.frontends.edits(
  args: { frontendId: string; baseCommit: JsonValue; check?: JsonValue; message?: JsonValue; ops: JsonValue; safety?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/frontends/{frontend_id}/edits

Parameters

args{ frontendId: string; baseCommit: JsonValue; check?: JsonValue; message?: JsonValue; ops: JsonValue; safety?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/frontends/{…}/edits

#sovaria.api.functions

sovaria.api.functions.delete

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

sovaria.api.functions.delete(
  args: { functionName: string },
): Promise<JsonValue>

Parameters

args{ functionName: string }required

Returns

Promise<JsonValue>

{
  "status": "deleted",
  "name": "send-receipt"
}

sovaria.api.functions.get

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

sovaria.api.functions.get(
  args: { functionName: string },
): Promise<JsonValue>

Parameters

args{ functionName: string }required

Returns

Promise<JsonValue>

{
  "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"
}

sovaria.api.functions.getBindings

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

sovaria.api.functions.getBindings(
  args: { functionName: string },
): Promise<JsonValue>

Parameters

args{ functionName: string }required

Returns

Promise<JsonValue>

[
  {
    "name": "STRIPE_KEY",
    "type": "secret",
    "value": "••••••••"
  },
  {
    "name": "ORDERS_DB",
    "type": "database",
    "value": "postgresql://…"
  },
  {
    "name": "WEBHOOK_URL",
    "type": "url",
    "value": "https://hooks.example.com/orders"
  }
]

sovaria.api.functions.getPolicy

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

sovaria.api.functions.getPolicy(
  args: { functionName: string },
): Promise<JsonValue>

Parameters

args{ functionName: string }required

Returns

Promise<JsonValue>

{
  "invoke_permission": "authenticated",
  "rate_limit_per_minute": 60,
  "max_payload_bytes": 1048576,
  "allowed_origins": "*",
  "timeout": 30,
  "saved": true
}

sovaria.api.functions.getSource

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

sovaria.api.functions.getSource(
  args: { functionName: string },
): Promise<JsonValue>

Parameters

args{ functionName: string }required

Returns

Promise<JsonValue>

{
  "name": "send-receipt",
  "source": "export async function handler(event, context) {\n  …\n}",
  "runtime": "node18"
}

sovaria.api.functions.githubCommit

POST /api/v1/fn/github/commit

sovaria.api.functions.githubCommit(
  args: { body: JsonObject },
): Promise<JsonValue>

Parameters

args{ body: JsonObject }required

Returns

Promise<JsonValue>

{
  "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"
}

sovaria.api.functions.githubImport

POST /api/v1/fn/github/import

sovaria.api.functions.githubImport(
  args: { body: JsonObject },
): Promise<JsonValue>

Parameters

args{ body: JsonObject }required

Returns

Promise<JsonValue>

{
  "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"
  }
}

sovaria.api.functions.invocationStatus

Get status for an async function invocation id.

sovaria.api.functions.invocationStatus(
  args: { invocationId: string },
): Promise<JsonValue>

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

Parameters

args{ invocationId: string }required

Returns

Promise<JsonValue>

{
  "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"
}

sovaria.api.functions.list

List functions with active version and queue summary.

sovaria.api.functions.list(
  args?: { limit?: JsonValue; offset?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/fn/functions

Parameters

args{ limit?: JsonValue; offset?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "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
    }
  ]
}

sovaria.api.functions.simulationDiff

Diff two simulation invocation outputs.

sovaria.api.functions.simulationDiff(
  args: { functionName: string; leftInvocationId?: JsonValue; rightInvocationId?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ functionName: string; leftInvocationId?: JsonValue; rightInvocationId?: JsonValue }required

Returns

Promise<JsonValue>

{
  "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
}

sovaria.api.functions.status

Get function deployment status by deploy id.

sovaria.api.functions.status(
  args: { deployId: string },
): Promise<JsonValue>

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

Parameters

args{ deployId: string }required

Returns

Promise<JsonValue>

{
  "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-…"
}

sovaria.api.functions.update

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

sovaria.api.functions.update(
  args: { functionName: string; body: JsonObject },
): Promise<JsonValue>

Parameters

args{ functionName: string; body: JsonObject }required

Returns

Promise<JsonValue>

{
  "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"
}

sovaria.api.functions.updateBindings

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

sovaria.api.functions.updateBindings(
  args: { functionName: string; bindings: JsonValue },
): Promise<JsonValue>

Parameters

args{ functionName: string; bindings: JsonValue }required

Returns

Promise<JsonValue>

[
  {
    "name": "STRIPE_KEY",
    "type": "secret",
    "value": "••••••••"
  }
]

sovaria.api.functions.updatePolicy

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

sovaria.api.functions.updatePolicy(
  args: { functionName: string; policy: JsonObject },
): Promise<JsonValue>

Parameters

args{ functionName: string; policy: JsonObject }required

Returns

Promise<JsonValue>

{
  "invoke_permission": "authenticated",
  "rate_limit_per_minute": 120,
  "max_payload_bytes": 65536,
  "allowed_origins": "https://app.example.com",
  "timeout": 20
}

sovaria.api.functions.versions

List deployment versions for a function.

sovaria.api.functions.versions(
  args: { functionName: string; limit?: JsonValue; offset?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ functionName: string; limit?: JsonValue; offset?: JsonValue }required

Returns

Promise<JsonValue>

{
  "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-…"
    }
  ]
}

sovaria.api.functions.listGithubPreviews

Preview environments of the linked GitHub repository's open pull requests: PR number and title, status (creating, deploying, ready, partial, error), API URL, functions and migrations applied.

sovaria.api.functions.listGithubPreviews(): Promise<JsonValue>

GET /api/v1/fn/github/previews

Returns

Promise<JsonValue>

{
  "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,
      "updated_at": 1761300045,
      "functions": [
        "apply-discount",
        "checkout"
      ],
      "migrations": [
        "sovaria/migrations/20261024_discounts.sql"
      ]
    }
  ]
}

sovaria.api.functions.getFunctionLimits

A function's own memory, timeout and minimum-instances settings, what it runs with (effective) and the plan's maximums.

sovaria.api.functions.getFunctionLimits(
  args: { functionName: string },
): Promise<JsonValue>

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

Parameters

args{ functionName: string }required

Returns

Promise<JsonValue>

{
  "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
  }
}

sovaria.api.functions.setFunctionLimits

Lower a function's timeout or memory (never above the plan; null = plan maximum) and set its minimum instances: pre-started sandboxes kept for it so its calls start warm (plan fn.min_instances; left out = unchanged).

sovaria.api.functions.setFunctionLimits(
  args: { functionName: string; timeoutSec?: JsonValue; memoryMb?: JsonValue; minInstances?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ functionName: string; timeoutSec?: JsonValue; memoryMb?: JsonValue; minInstances?: JsonValue }required

Returns

Promise<JsonValue>

{
  "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
  }
}

sovaria.api.functions.envSecrets

Project-wide function secrets (names only, never values).

sovaria.api.functions.envSecrets(): Promise<JsonValue>

GET /api/v1/fn/env-secrets

Returns

Promise<JsonValue>

{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": null,
  "secrets": [
    "STRIPE_KEY",
    "OPENAI_API_KEY"
  ]
}

sovaria.api.functions.setEnvSecrets

Add or change project-wide function secrets: secrets {NAME: value}.

sovaria.api.functions.setEnvSecrets(
  args: { secrets: JsonValue },
): Promise<JsonValue>

PUT /api/v1/fn/env-secrets

Parameters

args{ secrets: JsonValue }required

Returns

Promise<JsonValue>

{
  "set": [
    "STRIPE_KEY"
  ],
  "env_id": null
}

sovaria.api.functions.deleteEnvSecret

Remove one project-wide function secret.

sovaria.api.functions.deleteEnvSecret(
  args: { name: string },
): Promise<JsonValue>

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

Parameters

args{ name: string }required

Returns

Promise<JsonValue>

{
  "deleted": true,
  "name": "STRIPE_KEY"
}

sovaria.api.functions.logs

Every function's invocation logs, newest first (filter by function, status, source, text, time).

sovaria.api.functions.logs(
  args?: { function?: JsonValue; status?: JsonValue; source?: JsonValue; triggerId?: JsonValue; q?: JsonValue; since?: JsonValue; until?: JsonValue; before?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/fn/logs

Parameters

args{ function?: JsonValue; status?: JsonValue; source?: JsonValue; triggerId?: JsonValue; q?: JsonValue; since?: JsonValue; until?: JsonValue; before?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "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,
      "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
}

sovaria.api.functions.createApiVersion

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

sovaria.api.functions.createApiVersion(
  args: { name: JsonValue; note?: JsonValue; functions?: JsonValue; pins?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/api-versions

Parameters

args{ name: JsonValue; note?: JsonValue; functions?: JsonValue; pins?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.functions.getApiVersion

One API version and its pins.

sovaria.api.functions.getApiVersion(
  args: { name: string },
): Promise<JsonValue>

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

Parameters

args{ name: string }required

Returns

Promise<JsonValue>

sovaria.api.functions.updateApiVersion

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

sovaria.api.functions.updateApiVersion(
  args: { name: string; note?: JsonValue; status?: JsonValue; sunsetAt?: JsonValue; clearSunset?: JsonValue; pins?: JsonValue; remove?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ name: string; note?: JsonValue; status?: JsonValue; sunsetAt?: JsonValue; clearSunset?: JsonValue; pins?: JsonValue; remove?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.functions.deleteApiVersion

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

sovaria.api.functions.deleteApiVersion(
  args: { name: string },
): Promise<JsonValue>

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

Parameters

args{ name: string }required

Returns

Promise<JsonValue>

sovaria.api.functions.listApiVersions

Every API version of the project.

sovaria.api.functions.listApiVersions(): Promise<JsonValue>

GET /api/v1/fn/api-versions

Returns

Promise<JsonValue>

sovaria.api.functions.createFromSource

Create or update a function from source (python3, node18, bun, go, deno): it deploys at once; the answer has its id (call it by name or id).

sovaria.api.functions.createFromSource(
  args: { name: JsonValue; source: JsonValue; runtime?: JsonValue; entrypoint?: JsonValue; envVars?: JsonValue; description?: JsonValue; verifyJwt?: JsonValue; http?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/functions

Parameters

args{ name: JsonValue; source: JsonValue; runtime?: JsonValue; entrypoint?: JsonValue; envVars?: JsonValue; description?: JsonValue; verifyJwt?: JsonValue; http?: JsonValue }required

Returns

Promise<JsonValue>

{
  "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"
}

sovaria.api.functions.syncNow

Sync now.

sovaria.api.functions.syncNow(
  args?: { token?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/fn/github/sync

Parameters

args{ token?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "sha": "a1b2c3d…",
  "deployed": [
    "send-receipt"
  ],
  "unchanged": [
    "nightly-report"
  ],
  "skipped": [],
  "migrations_fetched": []
}

sovaria.api.functions.listMigrations

List migrations.

sovaria.api.functions.listMigrations(): Promise<JsonValue>

GET /api/v1/fn/github/migrations

Returns

Promise<JsonValue>

{
  "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"
    }
  ]
}

sovaria.api.functions.webhook

Webhook.

sovaria.api.functions.webhook(
  args: { projectId?: string; body: JsonObject },
): Promise<JsonValue>

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

Parameters

args{ projectId?: string; body: JsonObject }required

Returns

Promise<JsonValue>

sovaria.api.functions.runRound

Run round.

sovaria.api.functions.runRound(
  args: { code: JsonValue; journal?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ code: JsonValue; journal?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.functions.functionUsage

Function usage.

sovaria.api.functions.functionUsage(
  args: { functionName: string; days?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ functionName: string; days?: JsonValue }required

Returns

Promise<JsonValue>

{
  "days": 7,
  "invocations": 3120,
  "errors": 4,
  "avg_ms": 176.2,
  "p50_ms": 161,
  "p95_ms": 402.5,
  "compute_gb_seconds": 141.6,
  "estimated_cost_usd": 0.0024,
  "rates": {
    "gb_second_usd": 0.0000166667
  }
}

sovaria.api.functions.getFunctionResources

Get function resources.

sovaria.api.functions.getFunctionResources(
  args: { fnName: string },
): Promise<JsonValue>

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

Parameters

args{ fnName: string }required

Returns

Promise<JsonValue>

{
  "name": "send-receipt",
  "runtime": "node18",
  "resource_accesses": [
    {
      "engine": "sql",
      "resource": "orders",
      "actions": [
        "select"
      ]
    }
  ],
  "analysis": "static"
}

sovaria.api.functions.listFunctionTemplates

List function templates.

sovaria.api.functions.listFunctionTemplates(): Promise<JsonValue>

GET /api/v1/fn/templates

Returns

Promise<JsonValue>

[
  {
    "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"
    }
  }
]

#sovaria.api.governance

sovaria.api.governance.adminDatabases

GET /api/v1/governance/admin/databases

sovaria.api.governance.adminDatabases(): Promise<JsonValue>

Returns

Promise<JsonValue>

HTTP
GET /api/v1/governance/admin/databases

sovaria.api.governance.getTenant

GET /api/v1/governance/tenants/{org_id}

sovaria.api.governance.getTenant(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

HTTP
GET /api/v1/governance/tenants/{…}

sovaria.api.governance.getTenantDatabaseConnection

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/connection

sovaria.api.governance.getTenantDatabaseConnection(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "id": 77,
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "region": "ap-south-1",
  "compute_size": "micro",
  "database": "prj_f0c3e9a2",
  "username": "prj_f0c3e9a2_owner",
  "status": "ready",
  "health_status": "healthy",
  "max_storage_bytes": 8589934592,
  "created_at": "2026-10-01T08:00:00+00:00",
  "ready_at": "2026-10-01T08:00:41+00:00",
  "pool_mode": "transaction",
  "pool_size": 20,
  "pitr_enabled": true,
  "wal_archive_enabled": true,
  "isolation_mode": "dedicated_project",
  "host": "db.b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90.sovaria.in",
  "port": 5432,
  "sslmode": "require",
  "external_access_note": "",
  "max_connections": 60,
  "direct": {
    "host": "db.b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90.sovaria.in",
    "port": 5432,
    "connection_uri_template": "postgresql://prj_f0c3e9a2_owner:${PASSWORD}@db.b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90.sovaria.in:5432/prj_f0c3e9a2?sslmode=require",
    "psql_command": "psql 'postgresql://prj_f0c3e9a2_owner:<password>@db.b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90.sovaria.in:5432/prj_f0c3e9a2?sslmode=require'"
  },
  "pooled": {
    "host": "db.b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90.sovaria.in",
    "port": 5432,
    "pool_mode": "transaction",
    "pool_size": 20,
    "connection_uri_template": "postgresql://prj_f0c3e9a2_owner:${PASSWORD}@db.b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90.sovaria.in:5432/prj_f0c3e9a2?sslmode=require",
    "psql_command": "psql 'postgresql://prj_f0c3e9a2_owner:<password>@db.b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90.sovaria.in:5432/prj_f0c3e9a2?sslmode=require'"
  }
}

sovaria.api.governance.listHosts

GET /api/v1/governance/hosts

sovaria.api.governance.listHosts(
  args?: { regionId?: JsonValue } = {},
): Promise<JsonValue>

Parameters

args{ regionId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

HTTP
GET /api/v1/governance/hosts

sovaria.api.governance.listRegions

GET /api/v1/governance/regions

sovaria.api.governance.listRegions(): Promise<JsonValue>

Returns

Promise<JsonValue>

HTTP
GET /api/v1/governance/regions

sovaria.api.governance.listTenantDatabaseBackups

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups

sovaria.api.governance.listTenantDatabaseBackups(
  args?: { orgId?: string; projectId?: string; limit?: JsonValue } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string; projectId?: string; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

[
  {
    "id": 1042,
    "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
    "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
    "kind": "daily",
    "location_ref": "s3://sovaria-backups/…/1042.dump",
    "size_bytes": 48211968,
    "created_at": "2026-10-18T02:00:05+00:00",
    "expires_at": "2026-10-25T02:00:05+00:00",
    "status": "completed",
    "checksum": "sha256:7c1e…",
    "encryption": "aes-256-gcm"
  }
]

sovaria.api.governance.listTenantDatabases

GET /api/v1/governance/tenants/{org_id}/databases

sovaria.api.governance.listTenantDatabases(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

[
  {
    "id": 77,
    "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
    "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
    "region": "ap-south-1",
    "compute_size": "micro",
    "host": "db-f0c3e9a2",
    "port": 5432,
    "database": "prj_f0c3e9a2",
    "username": "prj_f0c3e9a2_owner",
    "status": "ready",
    "health_status": "healthy",
    "max_storage_bytes": 8589934592,
    "created_at": "2026-10-01T08:00:00+00:00",
    "ready_at": "2026-10-01T08:00:41+00:00",
    "pool_mode": "transaction",
    "pool_size": 20,
    "pitr_enabled": true,
    "wal_archive_enabled": true,
    "isolation_mode": "dedicated_project"
  }
]

sovaria.api.governance.listTenants

GET /api/v1/governance/tenants

sovaria.api.governance.listTenants(): Promise<JsonValue>

Returns

Promise<JsonValue>

HTTP
GET /api/v1/governance/tenants

sovaria.api.governance.metricsOverview

GET /api/v1/governance/metrics/overview

sovaria.api.governance.metricsOverview(): Promise<JsonValue>

Returns

Promise<JsonValue>

HTTP
GET /api/v1/governance/metrics/overview

sovaria.api.governance.patchHost

PATCH /api/v1/governance/hosts/{host_id}

sovaria.api.governance.patchHost(
  args: { hostId: string; body: JsonObject },
): Promise<JsonValue>

Parameters

args{ hostId: string; body: JsonObject }required

Returns

Promise<JsonValue>

HTTP
PATCH /api/v1/governance/hosts/{…}

sovaria.api.governance.patchRegion

PATCH /api/v1/governance/regions/{region_id}

sovaria.api.governance.patchRegion(
  args: { regionId: string; body: JsonObject },
): Promise<JsonValue>

Parameters

args{ regionId: string; body: JsonObject }required

Returns

Promise<JsonValue>

HTTP
PATCH /api/v1/governance/regions/{…}

sovaria.api.governance.pauseTenantDatabase

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/pause

sovaria.api.governance.pauseTenantDatabase(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "id": 77,
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "region": "ap-south-1",
  "compute_size": "micro",
  "host": "db-f0c3e9a2",
  "port": 5432,
  "database": "prj_f0c3e9a2",
  "username": "prj_f0c3e9a2_owner",
  "status": "paused",
  "health_status": "healthy",
  "max_storage_bytes": 8589934592,
  "created_at": "2026-10-01T08:00:00+00:00",
  "ready_at": "2026-10-01T08:00:41+00:00",
  "pool_mode": "transaction",
  "pool_size": 20,
  "pitr_enabled": true,
  "wal_archive_enabled": true,
  "isolation_mode": "dedicated_project"
}

sovaria.api.governance.resizeTenantDatabase

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/resize

sovaria.api.governance.resizeTenantDatabase(
  args: { orgId?: string; projectId?: string; computeSize: JsonValue },
): Promise<JsonValue>

Parameters

args{ orgId?: string; projectId?: string; computeSize: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.resumeTenantDatabase

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/resume

sovaria.api.governance.resumeTenantDatabase(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "id": 77,
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "region": "ap-south-1",
  "compute_size": "micro",
  "host": "db-f0c3e9a2",
  "port": 5432,
  "database": "prj_f0c3e9a2",
  "username": "prj_f0c3e9a2_owner",
  "status": "ready",
  "health_status": "healthy",
  "max_storage_bytes": 8589934592,
  "created_at": "2026-10-01T08:00:00+00:00",
  "ready_at": "2026-10-01T08:00:41+00:00",
  "pool_mode": "transaction",
  "pool_size": 20,
  "pitr_enabled": true,
  "wal_archive_enabled": true,
  "isolation_mode": "dedicated_project"
}

sovaria.api.governance.getTenantDatabaseSleep

Whether the project's database (and each environment's) is asleep after idling.

sovaria.api.governance.getTenantDatabaseSleep(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/sleep

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "state": "awake",
  "can_sleep": true,
  "environments": {
    "7a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d": {
      "state": "asleep",
      "can_sleep": true,
      "slept_at": "2026-10-25T03:10:00+00:00",
      "notice": "This database is asleep; it wakes on the next request, which takes a few seconds."
    }
  },
  "policy": {
    "enabled": true,
    "nonprod_days": 3,
    "free_days": 14
  }
}

sovaria.api.governance.wakeTenantDatabase

Wake a sleeping database now (project_id may be an environment id); returns once it accepts connections.

sovaria.api.governance.wakeTenantDatabase(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/wake

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "state": "awake"
}

sovaria.api.governance.revealTenantDatabaseConnection

Reveal a database connection string (staff, with an active access grant).

sovaria.api.governance.revealTenantDatabaseConnection(
  args: { orgId?: string; projectId?: string; grantId: JsonValue },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/connection/reveal

Parameters

args{ orgId?: string; projectId?: string; grantId: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/governance/tenants/{…}/databases/{…}/connection/reveal

sovaria.api.governance.setTenantStatus

POST /api/v1/governance/tenants/{org_id}/status

sovaria.api.governance.setTenantStatus(
  args: { orgId?: string; status: JsonValue },
): Promise<JsonValue>

Parameters

args{ orgId?: string; status: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/governance/tenants/{…}/status

sovaria.api.governance.triggerTenantDatabaseBackup

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups

sovaria.api.governance.triggerTenantDatabaseBackup(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "id": 1052,
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "kind": "manual",
  "location_ref": "s3://sovaria-backups/…/1042.dump",
  "size_bytes": 48211968,
  "created_at": "2026-10-18T11:00:00+00:00",
  "expires_at": "2026-10-25T11:00:00+00:00",
  "status": "completed",
  "checksum": "sha256:7c1e…",
  "encryption": "aes-256-gcm"
}

sovaria.api.governance.listDatabaseReplicas

Read replicas of the project's dedicated database: status, connection string, lag behind the primary, plan limit.

sovaria.api.governance.listDatabaseReplicas(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/replicas

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "replicas": [
    {
      "id": "rep_5d1c…",
      "status": "ready",
      "host": "db-f0c3e9a2-r1",
      "port": 5432,
      "database": "prj_f0c3e9a2",
      "read_only": true,
      "connection_string": "postgresql://prj_f0c3e9a2_owner:${PASSWORD}@db-f0c3e9a2-r1:5432/prj_f0c3e9a2",
      "error": "",
      "created_at": "2026-10-12T10:00:00+00:00",
      "ready_at": "2026-10-12T10:03:12+00:00",
      "streaming": true,
      "lag_bytes": 0,
      "lag_seconds": 0.4
    }
  ],
  "limits": {
    "replicas": 2
  }
}

sovaria.api.governance.createDatabaseReplica

Start a streaming read replica (status provisioning until its base backup is done, then ready).

sovaria.api.governance.createDatabaseReplica(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/replicas

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "id": "rep_5d1c…",
  "status": "provisioning",
  "host": "db-f0c3e9a2-r1",
  "port": 5432,
  "database": "prj_f0c3e9a2",
  "read_only": true,
  "connection_string": "postgresql://prj_f0c3e9a2_owner:${PASSWORD}@db-f0c3e9a2-r1:5432/prj_f0c3e9a2",
  "error": "",
  "created_at": "2026-10-12T10:00:00+00:00",
  "ready_at": null,
  "streaming": null,
  "lag_bytes": null,
  "lag_seconds": null
}

sovaria.api.governance.deleteDatabaseReplica

Remove a read replica and its copy of the data.

sovaria.api.governance.deleteDatabaseReplica(
  args: { orgId?: string; projectId?: string; replicaId: string },
): Promise<JsonValue>

DELETE /api/v1/governance/tenants/{org_id}/databases/{project_id}/replicas/{replica_id}

Parameters

args{ orgId?: string; projectId?: string; replicaId: string }required

Returns

Promise<JsonValue>

{
  "status": "deleted",
  "replica": {
    "id": "rep_5d1c…",
    "status": "ready",
    "host": "db-f0c3e9a2-r1",
    "port": 5432,
    "database": "prj_f0c3e9a2",
    "read_only": true,
    "connection_string": "postgresql://prj_f0c3e9a2_owner:${PASSWORD}@db-f0c3e9a2-r1:5432/prj_f0c3e9a2",
    "error": "",
    "created_at": "2026-10-12T10:00:00+00:00",
    "ready_at": "2026-10-12T10:03:12+00:00",
    "streaming": true,
    "lag_bytes": 0,
    "lag_seconds": 0.4
  }
}

sovaria.api.governance.compareDatabaseMoments

What changed between two moments of the database — a backup id or "now" on each side: schema objects added, removed or changed (with a diff) and rows per table.

sovaria.api.governance.compareDatabaseMoments(
  args: { orgId?: string; projectId?: string; fromMoment: JsonValue; toMoment?: JsonValue; includePlatform?: JsonValue },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/compare

Parameters

args{ orgId?: string; projectId?: string; fromMoment: JsonValue; toMoment?: JsonValue; includePlatform?: JsonValue }required

Returns

Promise<JsonValue>

{
  "from": {
    "moment": "1042",
    "at": "2026-10-18T02:00:05+00:00"
  },
  "to": {
    "moment": "now",
    "at": "2026-10-18T11:05:00+00:00"
  },
  "objects": [
    {
      "type": "column",
      "schema": "public",
      "name": "orders.status",
      "change": "added",
      "after": "status text NOT NULL DEFAULT 'pending'",
      "platform": false
    }
  ],
  "tables": [
    {
      "table": "public.orders",
      "rows_before": 1204,
      "rows_after": 1311,
      "change": "changed"
    }
  ],
  "summary": {
    "objects_added": 1,
    "objects_removed": 0,
    "objects_changed": 0,
    "tables_with_row_changes": 1
  }
}

sovaria.api.governance.restoreDatabaseBackup

Replace the project's database with a backup (dedicated databases): a safety backup is taken first, the backup loads beside production in one transaction and is swapped in; undo within 7 days.

sovaria.api.governance.restoreDatabaseBackup(
  args: { orgId?: string; projectId?: string; backupId: string; confirm: JsonValue },
): Promise<JsonValue>

Org owners and admins. POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups/{backup_id}/restore

Parameters

args{ orgId?: string; projectId?: string; backupId: string; confirm: JsonValue }required

Returns

Promise<JsonValue>

{
  "id": 9,
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "backup_id": 1042,
  "backup_at": "2026-10-18T02:00:05+00:00",
  "safety_backup_id": 1051,
  "status": "running",
  "error": null,
  "actor": "6e19c0a2-…",
  "created_at": "2026-10-18T11:02:00+00:00",
  "finished_at": null,
  "undone_at": null,
  "dropped_at": null,
  "undo_until": null
}

sovaria.api.governance.listDatabaseRestores

Database restores of the project: status, the backup used, the safety backup and until when it can be undone.

sovaria.api.governance.listDatabaseRestores(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/restores

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "restores": [
    {
      "id": 9,
      "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "backup_id": 1042,
      "backup_at": "2026-10-18T02:00:05+00:00",
      "safety_backup_id": 1051,
      "status": "done",
      "error": null,
      "actor": "6e19c0a2-…",
      "created_at": "2026-10-18T11:02:00+00:00",
      "finished_at": "2026-10-18T11:03:40+00:00",
      "undone_at": null,
      "dropped_at": null,
      "undo_until": "2026-10-25T11:03:40+00:00"
    }
  ],
  "keep_days": 7
}

sovaria.api.governance.undoDatabaseRestore

Put back the database exactly as it was right before a restore (within the undo window).

sovaria.api.governance.undoDatabaseRestore(
  args: { orgId?: string; projectId?: string; restoreId: string },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/restores/{restore_id}/undo

Parameters

args{ orgId?: string; projectId?: string; restoreId: string }required

Returns

Promise<JsonValue>

{
  "id": 9,
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "backup_id": 1042,
  "backup_at": "2026-10-18T02:00:05+00:00",
  "safety_backup_id": 1051,
  "status": "undone",
  "error": null,
  "actor": "6e19c0a2-…",
  "created_at": "2026-10-18T11:02:00+00:00",
  "finished_at": "2026-10-18T11:03:40+00:00",
  "undone_at": "2026-10-18T12:00:00+00:00",
  "dropped_at": null,
  "undo_until": null
}

sovaria.api.governance.getPitrStatus

Point-in-time recovery of the project's database: whether it is on, the earliest and latest moment that can be restored, base backups and archived WAL.

sovaria.api.governance.getPitrStatus(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups/pitr

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "plan": "pro",
  "pitr_eligible": true,
  "retention_days": 7,
  "retention_hours": 168,
  "state": "on",
  "enabled": true,
  "pitr_enabled": true,
  "wal_archive_enabled": true,
  "restart_required": false,
  "available": true,
  "enabled_at": "2026-10-16T08:59:40+00:00",
  "earliest_restore_time": "2026-10-16T09:00:12+00:00",
  "latest_restore_time": "2026-10-23T09:09:31+00:00",
  "restorable_until_now": true,
  "base_backups": 8,
  "last_base_backup": {
    "name": "pitr-base-f0c3e9a21b4d4e7f8a6c2d9b5e3f1a07-20261023020004.tar.gz",
    "finished_at": "2026-10-23T02:00:41+00:00",
    "size_bytes": 48211044
  },
  "archived_wal": {
    "files": 2210,
    "bytes": 381204480,
    "last_archived_at": "2026-10-23T09:09:31+00:00"
  },
  "error": null,
  "message": null,
  "execution_mode": "provisioned"
}

sovaria.api.governance.enablePitr

Turn on point-in-time recovery (WAL archiving; Pro and higher).

sovaria.api.governance.enablePitr(
  args?: { orgId?: string; projectId?: string; restart?: JsonValue } = {},
): Promise<JsonValue>

If the database needs one restart for it (a few seconds), it restarts only with restart=true; otherwise the answer says state=restart_required. POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/pitr/enable

Parameters

args{ orgId?: string; projectId?: string; restart?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "plan": "pro",
  "pitr_eligible": true,
  "retention_days": 7,
  "retention_hours": 168,
  "state": "on",
  "enabled": true,
  "pitr_enabled": true,
  "wal_archive_enabled": true,
  "restart_required": false,
  "available": false,
  "enabled_at": "2026-10-16T08:59:40+00:00",
  "earliest_restore_time": null,
  "latest_restore_time": null,
  "restorable_until_now": false,
  "base_backups": 0,
  "last_base_backup": null,
  "archived_wal": {
    "files": 0,
    "bytes": 0,
    "last_archived_at": null
  },
  "error": null,
  "message": "The first base backup is being taken; restores are possible once it finishes.",
  "execution_mode": "provisioned"
}

sovaria.api.governance.disablePitr

Stop point-in-time recovery archiving (no restart).

sovaria.api.governance.disablePitr(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

What was archived stays restorable until it leaves the plan's window. POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/pitr/disable

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "plan": "pro",
  "pitr_eligible": true,
  "retention_days": 7,
  "retention_hours": 168,
  "state": "disabled",
  "enabled": false,
  "pitr_enabled": false,
  "wal_archive_enabled": false,
  "restart_required": false,
  "available": true,
  "enabled_at": "2026-10-16T08:59:40+00:00",
  "earliest_restore_time": "2026-10-16T09:00:12+00:00",
  "latest_restore_time": "2026-10-23T09:09:31+00:00",
  "restorable_until_now": false,
  "base_backups": 8,
  "last_base_backup": {
    "name": "pitr-base-f0c3e9a21b4d4e7f8a6c2d9b5e3f1a07-20261023020004.tar.gz",
    "finished_at": "2026-10-23T02:00:41+00:00",
    "size_bytes": 48211044
  },
  "archived_wal": {
    "files": 2210,
    "bytes": 381204480,
    "last_archived_at": "2026-10-23T09:09:31+00:00"
  },
  "error": null,
  "message": null,
  "execution_mode": "provisioned"
}

sovaria.api.governance.restoreDatabaseToTime

Restore the project's database to a moment (ISO-8601 target_time).

sovaria.api.governance.restoreDatabaseToTime(
  args: { orgId?: string; projectId?: string; targetTime: JsonValue; confirm?: JsonValue; verifyOnly?: JsonValue },
): Promise<JsonValue>

It is recovered in a new container beside production and checked; with confirm=true it is then swapped in (safety backup first, undo for 7 days). verify_only=true only checks the moment restores. Returns a job; poll get_restore_job. POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/restore

Parameters

args{ orgId?: string; projectId?: string; targetTime: JsonValue; confirm?: JsonValue; verifyOnly?: JsonValue }required

Returns

Promise<JsonValue>

{
  "id": 12,
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "backup_id": 0,
  "backup_at": "2026-10-22T14:32:00+00:00",
  "safety_backup_id": null,
  "status": "running",
  "error": "",
  "actor": "6e19c0a2-…",
  "created_at": "2026-10-23T09:10:00+00:00",
  "finished_at": null,
  "undone_at": null,
  "dropped_at": null,
  "kind": "pitr",
  "target_time": "2026-10-22T14:32:00+00:00",
  "recovered_to": null,
  "phase": "queued",
  "undo_until": null,
  "verify_only": false,
  "job_id": "12",
  "poll_url": "/v1/governance/tenants/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90/databases/f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07/backups/pitr/jobs/12"
}

sovaria.api.governance.getRestoreJob

A database restore job (point-in-time or from a backup): status (running, done, verified, failed, undone), the step it is on, the moment, and until when it can be undone.

sovaria.api.governance.getRestoreJob(
  args: { orgId?: string; projectId?: string; jobId: string },
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups/pitr/jobs/{job_id}

Parameters

args{ orgId?: string; projectId?: string; jobId: string }required

Returns

Promise<JsonValue>

{
  "id": 12,
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "backup_id": 0,
  "backup_at": "2026-10-22T14:32:00+00:00",
  "safety_backup_id": 1093,
  "status": "done",
  "error": "",
  "actor": "6e19c0a2-…",
  "created_at": "2026-10-23T09:10:00+00:00",
  "finished_at": "2026-10-23T09:13:52+00:00",
  "undone_at": null,
  "dropped_at": null,
  "kind": "pitr",
  "target_time": "2026-10-22T14:32:00+00:00",
  "recovered_to": "2026-10-22 14:31:58.412+00",
  "phase": "checked: 14 tables, 182330 rows",
  "undo_until": "2026-10-30T09:13:52+00:00"
}

sovaria.api.governance.listEnvironments

Production plus the project's environments (staging ones and API versions): database status, what each database started with (database, copy_state) and its own API URL; limit is how many the plan allows.

sovaria.api.governance.listEnvironments(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "production": {
    "status": "ready"
  },
  "environments": [
    {
      "env_id": "9a1e7c3b-2d4f-4b8a-9c1e-5f6a7b8c9d0e",
      "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "name": "staging",
      "kind": "staging",
      "label": null,
      "created_by": "6e19c0a2-…",
      "created_at": 1761300000,
      "database_mode": "sample",
      "copy_state": "copying",
      "status": "ready",
      "api_url": "https://3fa1c2d9b8e7.sovarias.in"
    }
  ],
  "limit": 2
}

sovaria.api.governance.createEnvironment

Create a branch (kind=branch: a copy of the system to change, then deploy; plan env.branches) or an environment (kind=staging | version; plan env.staging_environments), each with its own database in the project's container.

sovaria.api.governance.createEnvironment(
  args: { orgId?: string; projectId?: string; envId: JsonValue; name: JsonValue; kind?: JsonValue; label?: JsonValue; fromEnvId?: JsonValue; database?: JsonValue; sampleRows?: JsonValue; includeTables?: JsonValue; excludeTables?: JsonValue; mask?: JsonValue; maskAdd?: JsonValue; maskSkip?: JsonValue; protected?: JsonValue; expiresInDays?: JsonValue },
): Promise<JsonValue>

database: empty | schema (default: production's structure, no rows) | sample (plus up to sample_rows newest rows per table and every row they reference; plan env.branch_data, Pro and higher) | all (every row, up to env.branch_data_max_gb; Ultra and higher). Personal columns are masked unless mask=false (owners/admins, audited). Rows are copied as a job: poll get_environment_copy. protected (plan env.protection) and expires_in_days (deleted automatically) are optional. POST /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments

Parameters

args{ orgId?: string; projectId?: string; envId: JsonValue; name: JsonValue; kind?: JsonValue; label?: JsonValue; fromEnvId?: JsonValue; database?: JsonValue; sampleRows?: JsonValue; includeTables?: JsonValue; excludeTables?: JsonValue; mask?: JsonValue; maskAdd?: JsonValue; maskSkip?: JsonValue; protected?: JsonValue; expiresInDays?: JsonValue }required

Returns

Promise<JsonValue>

{
  "env_id": "9a1e7c3b-2d4f-4b8a-9c1e-5f6a7b8c9d0e",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "name": "staging",
  "kind": "staging",
  "label": null,
  "created_by": "6e19c0a2-…",
  "created_at": 1761300000,
  "database_mode": "sample",
  "copy_state": "copying",
  "status": "ready",
  "api_url": "https://3fa1c2d9b8e7.sovarias.in",
  "database": "sample"
}

sovaria.api.governance.getEnvironmentCopy

What an environment's database started with and how its row copy is going: state copying | done | failed, tables and rows copied, masked columns, size, or why it failed.

sovaria.api.governance.getEnvironmentCopy(
  args: { orgId?: string; projectId?: string; envId: string },
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments/{env_id}/copy

Parameters

args{ orgId?: string; projectId?: string; envId: string }required

Returns

Promise<JsonValue>

{
  "env_id": "9a1e7c3b-2d4f-4b8a-9c1e-5f6a7b8c9d0e",
  "database": "sample",
  "state": "done",
  "error": null,
  "detail": {
    "mode": "sample",
    "tables": {
      "public.orders": 500,
      "public.users": 212
    },
    "rows": 712,
    "masked": [
      "public.users.email",
      "public.users.phone",
      "public.users.full_name"
    ],
    "bytes": 9437184
  },
  "started_at": 1761300001.2,
  "finished_at": 1761300009.8
}

sovaria.api.governance.deleteEnvironment

Delete an environment, its database (a backup is kept first), URL and Version history branch.

sovaria.api.governance.deleteEnvironment(
  args: { orgId?: string; projectId?: string; envId: string },
): Promise<JsonValue>

Owners and admins; a protected environment is refused (ENVIRONMENT_PROTECTED). DELETE /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments/{env_id}

Parameters

args{ orgId?: string; projectId?: string; envId: string }required

Returns

Promise<JsonValue>

{
  "status": "deleted",
  "env_id": "9a1e7c3b-2d4f-4b8a-9c1e-5f6a7b8c9d0e"
}

sovaria.api.governance.queryInsights

The project's SQL statements (pg_stat_statements) by total time, average, calls, worst run or rows.

sovaria.api.governance.queryInsights(
  args?: { orgId?: string; projectId?: string; sort?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/query-insights

Parameters

args{ orgId?: string; projectId?: string; sort?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.resetQueryInsights

Clear this database's query statistics.

sovaria.api.governance.resetQueryInsights(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/query-insights/reset

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.indexAdvisor

Indexes that would speed up the slowest statements, tested as hypothetical indexes (hypopg).

sovaria.api.governance.indexAdvisor(
  args?: { orgId?: string; projectId?: string; queryid?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/index-advisor

Parameters

args{ orgId?: string; projectId?: string; queryid?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.indexAdvisorForQuery

Index recommendations for one statement (only EXPLAINed, never run).

sovaria.api.governance.indexAdvisorForQuery(
  args: { orgId?: string; projectId?: string; query: JsonValue },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/index-advisor/query

Parameters

args{ orgId?: string; projectId?: string; query: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.applyIndex

Build a recommended index with CREATE INDEX CONCURRENTLY (background; poll index_status).

sovaria.api.governance.applyIndex(
  args: { orgId?: string; projectId?: string; schema?: JsonValue; table: JsonValue; columns: JsonValue },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/index-advisor/apply

Parameters

args{ orgId?: string; projectId?: string; schema?: JsonValue; table: JsonValue; columns: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.indexStatus

Whether an index the advisor started is building, ready, failed or invalid.

sovaria.api.governance.indexStatus(
  args: { orgId?: string; projectId?: string; indexName: string },
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/index-advisor/indexes/{index_name}

Parameters

args{ orgId?: string; projectId?: string; indexName: string }required

Returns

Promise<JsonValue>

sovaria.api.governance.updateEnvironment

Change an environment (owners and admins): kind staging | version (with label, e.g.

sovaria.api.governance.updateEnvironment(
  args: { orgId?: string; projectId?: string; envId: string; kind?: JsonValue; label?: JsonValue; protected?: JsonValue; expiresInDays?: JsonValue },
): Promise<JsonValue>

v2), protected (plan env.protection: no delete, reset or restore until turned off), expires_in_days (deleted automatically after that many days; 0 clears it). PATCH /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments/{env_id}

Parameters

args{ orgId?: string; projectId?: string; envId: string; kind?: JsonValue; label?: JsonValue; protected?: JsonValue; expiresInDays?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.resetEnvironment

Make an environment's database again from the one it started from (its parent environment, else production) with the same data option; sample/all rows are copied again with the same masking.

sovaria.api.governance.resetEnvironment(
  args: { orgId?: string; projectId?: string; envId: string; confirm: JsonValue },
): Promise<JsonValue>

A backup is taken first; functions and policies are kept. POST /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments/{env_id}/reset

Parameters

args{ orgId?: string; projectId?: string; envId: string; confirm: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.restoreEnvironment

Put an environment's database back as it was at at (point-in-time, within db.pitr_retention_days; production is not touched).

sovaria.api.governance.restoreEnvironment(
  args: { orgId?: string; projectId?: string; envId: string; at: JsonValue; confirm: JsonValue },
): Promise<JsonValue>

Runs as a job: poll get_environment_restore. POST /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments/{env_id}/restore

Parameters

args{ orgId?: string; projectId?: string; envId: string; at: JsonValue; confirm: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.getEnvironmentRestore

How an environment restore is going: status running | done | failed, phase, recovered_to, error.

sovaria.api.governance.getEnvironmentRestore(
  args: { orgId?: string; projectId?: string; envId: string; restoreId: string },
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments/{env_id}/restore/{restore_id}

Parameters

args{ orgId?: string; projectId?: string; envId: string; restoreId: string }required

Returns

Promise<JsonValue>

sovaria.api.governance.getBackupHealth

Backup health: last good backup, failures since, recovery point (RPO) of daily backups and PITR, retention and on-demand limits with what was used.

sovaria.api.governance.getBackupHealth(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups/health

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.listProjectExports

Portable export bundles of the project (Postgres dump + migration metadata).

sovaria.api.governance.listProjectExports(
  args?: { orgId?: string; projectId?: string; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/exports

Parameters

args{ orgId?: string; projectId?: string; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.triggerProjectExport

Create a portable export bundle (download it with download_project_export).

sovaria.api.governance.triggerProjectExport(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/exports

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.getCompare

A compare job: running, failed (with error) or the full answer with status done.

sovaria.api.governance.getCompare(
  args: { orgId?: string; projectId?: string; compareId: string },
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/compare/{compare_id}

Parameters

args{ orgId?: string; projectId?: string; compareId: string }required

Returns

Promise<JsonValue>

sovaria.api.governance.restoreDatabaseInto

Restore this project's backup (backup_id) or a moment (target_time) into an environment of the project (env_id) or another project (project_id) instead of replacing production.

sovaria.api.governance.restoreDatabaseInto(
  args?: { orgId?: string; projectId?: string; envId?: JsonValue; targetProjectId?: JsonValue; backupId?: JsonValue; targetTime?: JsonValue; confirm?: JsonValue; reason?: JsonValue } = {},
): Promise<JsonValue>

Owners/admins; confirm: true; counts as a rollback. POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/restore-into

Parameters

args{ orgId?: string; projectId?: string; envId?: JsonValue; targetProjectId?: JsonValue; backupId?: JsonValue; targetTime?: JsonValue; confirm?: JsonValue; reason?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.restoreDatabaseTables

Copy single tables from a backup or a moment into production as restored_<table>_<stamp> beside the live ones (nothing live changes).

sovaria.api.governance.restoreDatabaseTables(
  args: { orgId?: string; projectId?: string; tables: JsonValue; backupId?: JsonValue; targetTime?: JsonValue; reason?: JsonValue },
): Promise<JsonValue>

Owners/admins; counts as a rollback. POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/restore-tables

Parameters

args{ orgId?: string; projectId?: string; tables: JsonValue; backupId?: JsonValue; targetTime?: JsonValue; reason?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.listComputePlans

List compute plans.

sovaria.api.governance.listComputePlans(): Promise<JsonValue>

GET /api/v1/governance/compute/plans

Returns

Promise<JsonValue>

sovaria.api.governance.getTenantDatabaseSetup

Get tenant database setup.

sovaria.api.governance.getTenantDatabaseSetup(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/setup

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.getDatabaseCapabilities

Get database capabilities.

sovaria.api.governance.getDatabaseCapabilities(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/capabilities

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.getDatabasePooler

Get database pooler.

sovaria.api.governance.getDatabasePooler(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/pooler

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.setDatabasePooler

Set database pooler.

sovaria.api.governance.setDatabasePooler(
  args: { orgId?: string; projectId?: string; poolMode: JsonValue; poolSize: JsonValue; reason?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/governance/tenants/{org_id}/databases/{project_id}/pooler

Parameters

args{ orgId?: string; projectId?: string; poolMode: JsonValue; poolSize: JsonValue; reason?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.restartDatabaseContainer

Restart database container.

sovaria.api.governance.restartDatabaseContainer(
  args: { orgId?: string; projectId?: string; body: JsonObject },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/restart

Parameters

args{ orgId?: string; projectId?: string; body: JsonObject }required

Returns

Promise<JsonValue>

sovaria.api.governance.getDatabaseDiagnostics

Get database diagnostics.

sovaria.api.governance.getDatabaseDiagnostics(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/diagnostics

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.runDatabaseMaintenance

Run database maintenance.

sovaria.api.governance.runDatabaseMaintenance(
  args: { orgId?: string; projectId?: string; action: JsonValue; reason?: JsonValue; table?: JsonValue },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/maintenance

Parameters

args{ orgId?: string; projectId?: string; action: JsonValue; reason?: JsonValue; table?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.killDatabaseQuery

Kill database query.

sovaria.api.governance.killDatabaseQuery(
  args: { orgId?: string; projectId?: string; pid: JsonValue; reason?: JsonValue },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/kill-query

Parameters

args{ orgId?: string; projectId?: string; pid: JsonValue; reason?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.setDatabaseSettings

Set database settings.

sovaria.api.governance.setDatabaseSettings(
  args?: { orgId?: string; projectId?: string; idleInTransactionTimeoutMs?: JsonValue; logMinDurationMs?: JsonValue; readOnly?: JsonValue; reason?: JsonValue; statementTimeoutMs?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/governance/tenants/{org_id}/databases/{project_id}/settings

Parameters

args{ orgId?: string; projectId?: string; idleInTransactionTimeoutMs?: JsonValue; logMinDurationMs?: JsonValue; readOnly?: JsonValue; reason?: JsonValue; statementTimeoutMs?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.setDatabaseStatementTimeout

Set database statement timeout.

sovaria.api.governance.setDatabaseStatementTimeout(
  args: { orgId?: string; projectId?: string; statementTimeoutMs: JsonValue },
): Promise<JsonValue>

PUT /api/v1/governance/tenants/{org_id}/databases/{project_id}/statement-timeout

Parameters

args{ orgId?: string; projectId?: string; statementTimeoutMs: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.resetDatabasePassword

Reset database password.

sovaria.api.governance.resetDatabasePassword(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/reset-password

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.setDatabasePassword

Set database password.

sovaria.api.governance.setDatabasePassword(
  args: { orgId?: string; projectId?: string; password: JsonValue },
): Promise<JsonValue>

PUT /api/v1/governance/tenants/{org_id}/databases/{project_id}/password

Parameters

args{ orgId?: string; projectId?: string; password: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.forgetDatabasePassword

Forget database password.

sovaria.api.governance.forgetDatabasePassword(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

DELETE /api/v1/governance/tenants/{org_id}/databases/{project_id}/password

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.rotateDatabasePassword

Rotate database password.

sovaria.api.governance.rotateDatabasePassword(
  args: { orgId?: string; projectId?: string; body: JsonObject },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/rotate-password

Parameters

args{ orgId?: string; projectId?: string; body: JsonObject }required

Returns

Promise<JsonValue>

sovaria.api.governance.getTenantDataMetadata

Get tenant data metadata.

sovaria.api.governance.getTenantDataMetadata(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/data/metadata

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.executeTenantDataQuery

Execute tenant data query.

sovaria.api.governance.executeTenantDataQuery(
  args: { orgId?: string; projectId?: string; grantId: JsonValue; sql: JsonValue },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/data/query

Parameters

args{ orgId?: string; projectId?: string; grantId: JsonValue; sql: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.reconcileProjectDataPlane

Reconcile project data plane.

sovaria.api.governance.reconcileProjectDataPlane(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/reconcile

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.requestTenantPitrRestore

Request tenant pitr restore.

sovaria.api.governance.requestTenantPitrRestore(
  args: { orgId?: string; projectId?: string; confirm?: JsonValue; reason?: JsonValue; targetTime: JsonValue; verifyOnly?: JsonValue },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups/pitr/restore

Parameters

args{ orgId?: string; projectId?: string; confirm?: JsonValue; reason?: JsonValue; targetTime: JsonValue; verifyOnly?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.createDatabaseCheckpoint

Create database checkpoint.

sovaria.api.governance.createDatabaseCheckpoint(
  args?: { orgId?: string; projectId?: string; envId?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/projects/{project_id}/checkpoints

Parameters

args{ orgId?: string; projectId?: string; envId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.restoreDatabaseCheckpoint

Restore database checkpoint.

sovaria.api.governance.restoreDatabaseCheckpoint(
  args: { orgId?: string; projectId?: string; backupId: string; confirm?: JsonValue; envId?: JsonValue },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/projects/{project_id}/checkpoints/{backup_id}/restore

Parameters

args{ orgId?: string; projectId?: string; backupId: string; confirm?: JsonValue; envId?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.governance.deleteTenantCustomDomain

Delete tenant custom domain.

sovaria.api.governance.deleteTenantCustomDomain(
  args: { orgId?: string; domainId: string },
): Promise<JsonValue>

DELETE /api/v1/governance/tenants/{org_id}/domains/{domain_id}

Parameters

args{ orgId?: string; domainId: string }required

Returns

Promise<JsonValue>

sovaria.api.governance.verifyTenantCustomDomain

Verify tenant custom domain.

sovaria.api.governance.verifyTenantCustomDomain(
  args: { orgId?: string; domainId: string },
): Promise<JsonValue>

POST /api/v1/governance/tenants/{org_id}/domains/{domain_id}/verify

Parameters

args{ orgId?: string; domainId: string }required

Returns

Promise<JsonValue>

sovaria.api.governance.getPostgresUpgrade

Get postgres upgrade.

sovaria.api.governance.getPostgresUpgrade(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/governance/postgres-upgrades/{org_id}/{project_id}

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.governance.postPostgresUpgrade

Post postgres upgrade.

sovaria.api.governance.postPostgresUpgrade(
  args: { orgId?: string; projectId?: string; action: string; confirm?: JsonValue; method?: JsonValue; reason: JsonValue; rehearse?: JsonValue; volume?: JsonValue },
): Promise<JsonValue>

POST /api/v1/governance/postgres-upgrades/{org_id}/{project_id}/{action}

Parameters

args{ orgId?: string; projectId?: string; action: string; confirm?: JsonValue; method?: JsonValue; reason: JsonValue; rehearse?: JsonValue; volume?: JsonValue }required

Returns

Promise<JsonValue>

#sovaria.api.history

sovaria.api.history.commit

Create a version-history commit.

sovaria.api.history.commit(
  args: { timeline?: JsonValue; message: JsonValue; author?: JsonValue; eventType?: JsonValue },
): Promise<JsonValue>

POST /api/v1/chrono/commit

Parameters

args{ timeline?: JsonValue; message: JsonValue; author?: JsonValue; eventType?: JsonValue }required

Returns

Promise<JsonValue>

{
  "hex_id": "9f3c2a71e4b85d06c1a7f2e9",
  "timeline": "main",
  "timestamp_ns": 1792310000000000000
}

sovaria.api.history.converge

Converge source timeline into target timeline.

sovaria.api.history.converge(
  args: { target: JsonValue; source: JsonValue; author: JsonValue; message?: JsonValue },
): Promise<JsonValue>

Branches that record an environment are refused (409 USE_DEPLOY): deploy them with promote_environment. POST /api/v1/chrono/timelines/converge

Parameters

args{ target: JsonValue; source: JsonValue; author: JsonValue; message?: JsonValue }required

Returns

Promise<JsonValue>

{
  "strategy": "THREE_WAY_MERGE",
  "new_head_hex": "e5f1…",
  "conflict_count": 0
}

sovaria.api.history.createSnapshot

Name a point on a branch to go back to (timeline: main = production, or a branch's name; env_id: the environment checked out, '' = production).

sovaria.api.history.createSnapshot(
  args?: { message?: JsonValue; timeline?: JsonValue; envId?: JsonValue; includeDatabase?: JsonValue } = {},
): Promise<JsonValue>

include_database also keeps a checkpoint of that branch's database (a backup taken now), so restoring brings the data back exactly. POST /api/v1/chrono/snapshots/create

Parameters

args{ message?: JsonValue; timeline?: JsonValue; envId?: JsonValue; includeDatabase?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "snapshot_id": 12,
  "base_chronon_hex": "9f3c2a71e4b85d06c1a7f2e9",
  "lock_time_us": 1840,
  "engine_pointers": {
    "guard": 412,
    "forge": 98
  },
  "created_at_ns": 1792310000000000000,
  "degraded": false
}

sovaria.api.history.deleteTimeline

Delete a timeline.

sovaria.api.history.deleteTimeline(
  args: { name: string },
): Promise<JsonValue>

DELETE /api/v1/chrono/timelines/{name}

Parameters

args{ name: string }required

Returns

Promise<JsonValue>

{
  "deleted": true,
  "timeline": "try-new-rules"
}

sovaria.api.history.jumpTimeline

Move a history-only branch to a commit.

sovaria.api.history.jumpTimeline(
  args: { name: string; targetHex: JsonValue },
): Promise<JsonValue>

main and branches that record an environment only move forward (409 USE_RESTORE): use restore. POST /api/v1/chrono/timelines/{name}/jump

Parameters

args{ name: string; targetHex: JsonValue }required

Returns

Promise<JsonValue>

{
  "jumped": true,
  "previous_head": "9f3c2a71e4b85d06c1a7f2e9",
  "new_head": "41aa07d2c96e3b58f0e1d4a2"
}

sovaria.api.history.listSnapshots

Snapshots with their branch (timeline, env_id) and database checkpoint (database: kind, backup_id, at) when one was kept.

sovaria.api.history.listSnapshots(
  args?: { timeline?: JsonValue } = {},
): Promise<JsonValue>

timeline lists one branch's. GET /api/v1/chrono/snapshots

Parameters

args{ timeline?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "snapshots": [
    {
      "snapshot_id": 12,
      "message": "before launch",
      "created_at_ns": 1792310000000000000,
      "base_chronon_hex": "9f3c2a71e4b85d06c1a7f2e9",
      "project_id": "f0c3e9a2-…",
      "author": "ana@skolist.com",
      "degraded": false,
      "engine_count": 6
    }
  ]
}

sovaria.api.history.listTimelines

Branches: name, head_hex, kind (production | environment | history) and env_id for an environment's branch.

sovaria.api.history.listTimelines(): Promise<JsonValue>

GET /api/v1/chrono/timelines

Returns

Promise<JsonValue>

{
  "timelines": [
    {
      "name": "main",
      "head_hex": "9f3c2a71e4b85d06c1a7f2e9",
      "chronon_count": 412
    },
    {
      "name": "try-new-rules",
      "head_hex": "c0de…",
      "chronon_count": 3
    }
  ]
}

sovaria.api.history.restoreSnapshot

Go back to a snapshot on its branch (confirm=true; review restore_snapshot_plan first): policies, settings, functions and buckets are put back with your own permissions; include_schema rolls back migrations since then and include_database puts the database back from the snapshot's checkpoint (or the closest backup before it).

sovaria.api.history.restoreSnapshot(
  args: { snapshotId: string; confirm?: JsonValue; includeDatabase?: JsonValue; includeSchema?: JsonValue; envId?: JsonValue },
): Promise<JsonValue>

POST /api/v1/chrono/snapshots/{snapshot_id}/restore

Parameters

args{ snapshotId: string; confirm?: JsonValue; includeDatabase?: JsonValue; includeSchema?: JsonValue; envId?: JsonValue }required

Returns

Promise<JsonValue>

{
  "restored": true,
  "snapshot_id": 12,
  "total_time_ms": 940,
  "engines_acked": [
    "guard",
    "forge"
  ],
  "engines_requested": [
    "guard",
    "forge"
  ],
  "restore_status": "full",
  "degraded": false
}

sovaria.api.history.restoreSnapshotPlan

What restoring a snapshot puts back on its branch, change by change, with who would gain or lose access (writes nothing).

sovaria.api.history.restoreSnapshotPlan(
  args: { snapshotId: string; envId?: JsonValue },
): Promise<JsonValue>

POST /api/v1/chrono/snapshots/{snapshot_id}/restore-plan

Parameters

args{ snapshotId: string; envId?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.history.deleteSnapshot

Forget a snapshot (its commit stays in the history; its database checkpoint expires like a manual backup).

sovaria.api.history.deleteSnapshot(
  args: { snapshotId: string },
): Promise<JsonValue>

DELETE /api/v1/chrono/snapshots/{snapshot_id}

Parameters

args{ snapshotId: string }required

Returns

Promise<JsonValue>

sovaria.api.history.spawnTimeline

Spawn a new timeline from a source chronon.

sovaria.api.history.spawnTimeline(
  args: { name: JsonValue; sourceHexId?: JsonValue },
): Promise<JsonValue>

POST /api/v1/chrono/timelines/spawn

Parameters

args{ name: JsonValue; sourceHexId?: JsonValue }required

Returns

Promise<JsonValue>

{
  "timeline": "try-new-rules",
  "spawned_from_hex": "9f3c2a71e4b85d06c1a7f2e9",
  "created_at_ns": 1792310000000000000
}

sovaria.api.history.timelineHistory

Fetch timeline history chronons.

sovaria.api.history.timelineHistory(
  args: { name: string; limit?: JsonValue; offset?: JsonValue },
): Promise<JsonValue>

GET /api/v1/chrono/timelines/{name}/history

Parameters

args{ name: string; limit?: JsonValue; offset?: JsonValue }required

Returns

Promise<JsonValue>

{
  "timeline": "main",
  "chronons": [
    {
      "hex_id": "9f3c2a71e4b85d06c1a7f2e9",
      "short_hex": "9f3c2a71e4b8",
      "message": "policy pol_orders_read updated",
      "author": "ana@skolist.com",
      "timestamp_ns": 1792227600123456800,
      "parent_hex_ids": [
        "41aa07d2c96e3b58f0e1d4a2"
      ],
      "changed_domains": [
        "policies"
      ],
      "event_type": "policy.updated",
      "metadata": {
        "policy_id": "pol_orders_read"
      }
    }
  ]
}

sovaria.api.history.topology

Return timeline graph topology.

sovaria.api.history.topology(
  args?: { timeline?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/chrono/timelines/topology

Parameters

args{ timeline?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "nodes": [
    {
      "chronon_hex": "9f3c2a71e4b85d06c1a7f2e9",
      "message": "policy pol_orders_read updated",
      "parents": [
        "41aa07d2c96e3b58f0e1d4a2"
      ]
    }
  ],
  "edges": [
    {
      "from_node": "41aa07d2c96e3b58f0e1d4a2",
      "to_node": "9f3c2a71e4b85d06c1a7f2e9"
    }
  ]
}

sovaria.api.history.variance

Calculate variance between two chronons.

sovaria.api.history.variance(
  args: { oldChrononHex: JsonValue; newChrononHex: JsonValue; domainFilter?: JsonValue },
): Promise<JsonValue>

POST /api/v1/chrono/variance

Parameters

args{ oldChrononHex: JsonValue; newChrononHex: JsonValue; domainFilter?: JsonValue }required

Returns

Promise<JsonValue>

{
  "summary": {
    "insertions": 1,
    "deletions": 1,
    "unchanged": 0
  },
  "hunks": [
    {
      "domain": "policies",
      "name": "pol_orders_read.spl",
      "operations": [
        [
          "-",
          "ALLOW IF ctx.resource.name == \"orders\""
        ],
        [
          "+",
          "ALLOW IF ctx.resource.name == \"orders\" AND ctx.actor.is_anonymous == False"
        ]
      ]
    }
  ],
  "truncated": false,
  "truncation_reason": null,
  "processed_hunks": 1,
  "total_hunks": 1
}

sovaria.api.history.restorePlan

What going back to at (a commit id or ISO time) on a branch means, change by change, for that branch's own environment (main = production): automated actions, manual ones, changes from other branches (left alone), the opt-in schema rollback and database restore, and the access preview.

sovaria.api.history.restorePlan(
  args: { at: JsonValue; timeline?: JsonValue; envId?: JsonValue; only?: JsonValue; includeDatabase?: JsonValue; includeSchema?: JsonValue },
): Promise<JsonValue>

env_id is the environment you have checked out ('' = production); a mismatch is refused (ENV_MISMATCH). Writes nothing. POST /api/v1/chrono/restore-plan

Parameters

args{ at: JsonValue; timeline?: JsonValue; envId?: JsonValue; only?: JsonValue; includeDatabase?: JsonValue; includeSchema?: JsonValue }required

Returns

Promise<JsonValue>

{
  "at": "41aa07d2c96e3b58f0e1d4a2",
  "actions": [
    {
      "type": "policy.restore",
      "path": "policies/pol_orders_read.spl",
      "policy_id": "pol_orders_read",
      "name": "Signed-in users read orders",
      "spl_source": "ALLOW IF ctx.resource.name == \"orders\"",
      "exists_now": true
    },
    {
      "type": "settings.restore",
      "path": "settings/project.json",
      "settings": {
        "allowPublicSignup": false
      }
    }
  ],
  "automated": 2,
  "manual": 0,
  "database": null,
  "preview": {
    "violations": [],
    "changes": []
  }
}

sovaria.api.history.restore

Apply the restore plan with your own permissions, in the branch's own environment: configuration first, then the schema rollback (include_schema), then the database (include_database).

sovaria.api.history.restore(
  args: { at: JsonValue; timeline?: JsonValue; envId?: JsonValue; only?: JsonValue; includeDatabase?: JsonValue; includeSchema?: JsonValue; confirm: JsonValue },
): Promise<JsonValue>

Waits briefly for the new commits: new_head, or recording=true while they are still arriving (poll the branch until its head moves past head_before). POST /api/v1/chrono/restore

Parameters

args{ at: JsonValue; timeline?: JsonValue; envId?: JsonValue; only?: JsonValue; includeDatabase?: JsonValue; includeSchema?: JsonValue; confirm: JsonValue }required

Returns

Promise<JsonValue>

{
  "at": "41aa07d2c96e3b58f0e1d4a2",
  "results": [
    {
      "type": "policy.restore",
      "path": "policies/pol_orders_read.spl",
      "status": "applied",
      "http_status": 200,
      "detail": null
    }
  ],
  "applied": 1,
  "failed": 0,
  "manual": 0
}

sovaria.api.history.commitChanges

What one commit changed (or how it differs from compare_to), item by item: policy, table, function, settings, bucket, with a summary in words and each item's previous version.

sovaria.api.history.commitChanges(
  args: { hexId: string; compareTo?: JsonValue },
): Promise<JsonValue>

GET /api/v1/chrono/commits/{hex_id}/changes

Parameters

args{ hexId: string; compareTo?: JsonValue }required

Returns

Promise<JsonValue>

{
  "commit": "9f3c2a71e4b85d06c1a7f2e9",
  "compared_to": "41aa07d2c96e3b58f0e1d4a2",
  "message": "policy pol_orders_read updated",
  "author": "ana@skolist.com",
  "timestamp_ns": 1792227600123456800,
  "event_type": "policy.updated",
  "metadata": {},
  "changes": [
    {
      "path": "policies/pol_orders_read.spl",
      "kind": "policy",
      "item": "pol_orders_read",
      "change": "modified",
      "summary": [
        "rule changed"
      ],
      "before": "ALLOW IF ctx.resource.name == \"orders\"",
      "after": "ALLOW IF ctx.resource.name == \"orders\" AND ctx.actor.is_anonymous == False",
      "reference": {
        "hex_id": "77b0…",
        "message": "policy pol_orders_read created",
        "timestamp_ns": 1791900000000000000,
        "author": "ana@skolist.com"
      }
    }
  ],
  "truncated": false
}

sovaria.api.history.undoPlan

What undoing exactly one commit puts back on the branch's environment (writes nothing), with the schema rollback dry run when the commit applied a migration.

sovaria.api.history.undoPlan(
  args: { hexId: string; timeline?: JsonValue; envId?: JsonValue },
): Promise<JsonValue>

POST /api/v1/chrono/commits/{hex_id}/undo-plan

Parameters

args{ hexId: string; timeline?: JsonValue; envId?: JsonValue }required

Returns

Promise<JsonValue>

{
  "commit": "9f3c2a71e4b85d06c1a7f2e9",
  "parent": "41aa07d2c96e3b58f0e1d4a2",
  "migration_versions": [],
  "actions": [
    {
      "type": "policy.restore",
      "path": "policies/pol_orders_read.spl",
      "policy_id": "pol_orders_read",
      "name": "Signed-in users read orders",
      "spl_source": "ALLOW IF ctx.resource.name == \"orders\"",
      "exists_now": true,
      "changed_since": false
    }
  ],
  "automated": 1,
  "manual": 0,
  "changed_since": 0,
  "preview": {
    "violations": [],
    "changes": [
      {
        "persona": "__guest__",
        "who": "Visitors who aren't signed in",
        "action": "sql:select",
        "resource": "orders",
        "before": "DENY",
        "after": "ALLOW"
      }
    ]
  },
  "schema_preview": null
}

sovaria.api.history.undo

Undo one commit with your own permissions on the branch's environment; its migration's down SQL only with include_schema.

sovaria.api.history.undo(
  args: { hexId: string; confirm: JsonValue; timeline?: JsonValue; envId?: JsonValue; includeSchema?: JsonValue },
): Promise<JsonValue>

POST /api/v1/chrono/commits/{hex_id}/undo

Parameters

args{ hexId: string; confirm: JsonValue; timeline?: JsonValue; envId?: JsonValue; includeSchema?: JsonValue }required

Returns

Promise<JsonValue>

{
  "commit": "9f3c2a71e4b85d06c1a7f2e9",
  "parent": "41aa07d2c96e3b58f0e1d4a2",
  "migration_versions": [],
  "results": [
    {
      "type": "policy.restore",
      "path": "policies/pol_orders_read.spl",
      "status": "applied",
      "http_status": 200,
      "detail": null
    }
  ],
  "applied": 1,
  "failed": 0,
  "manual": 0
}

sovaria.api.history.listEnvironmentBranches

Which Version history branch records which environment ({env_id, branch}).

sovaria.api.history.listEnvironmentBranches(): Promise<JsonValue>

main is production's. GET /api/v1/chrono/environments

Returns

Promise<JsonValue>

sovaria.api.history.bindEnvironment

Give an environment its own Version history branch (spawned from main's head), for environments made before branches recorded them; returns the branch it has.

sovaria.api.history.bindEnvironment(
  args: { envId: string; name: JsonValue },
): Promise<JsonValue>

PUT /api/v1/chrono/environments/{env_id}

Parameters

args{ envId: string; name: JsonValue }required

Returns

Promise<JsonValue>

#sovaria.api.hosting

sovaria.api.hosting.checkSiteName

Check site name.

sovaria.api.hosting.checkSiteName(
  args: { name: JsonValue },
): Promise<JsonValue>

GET /api/v1/fn/hosting/site-names

Parameters

args{ name: JsonValue }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/site-names

sovaria.api.hosting.listTokens

List tokens.

sovaria.api.hosting.listTokens(
  args: { site: string },
): Promise<JsonValue>

GET /api/v1/fn/hosting/sites/{site}/tokens

Parameters

args{ site: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/fn/hosting/sites/{…}/tokens

sovaria.api.hosting.createToken

Create token.

sovaria.api.hosting.createToken(
  args: { site: string; name?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/hosting/sites/{site}/tokens

Parameters

args{ site: string; name?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
POST /api/v1/fn/hosting/sites/{…}/tokens

sovaria.api.hosting.revokeToken

Revoke token.

sovaria.api.hosting.revokeToken(
  args: { site: string; tokenId: string },
): Promise<JsonValue>

DELETE /api/v1/fn/hosting/sites/{site}/tokens/{token_id}

Parameters

args{ site: string; tokenId: string }required

Returns

Promise<JsonValue>

HTTP
DELETE /api/v1/fn/hosting/sites/{…}/tokens/{…}

#sovaria.api.integrations

sovaria.api.integrations.providers

Integrations that can be connected (Vercel, Netlify, GitHub …).

sovaria.api.integrations.providers(): Promise<JsonValue>

GET /api/v1/integrations/connect/providers

Returns

Promise<JsonValue>

{
  "providers": [
    {
      "id": "vercel",
      "name": "Vercel",
      "kind": "deploy",
      "configured": true,
      "enabled": true,
      "docs": "https://vercel.com/dashboard/integrations/console",
      "callback_url": "https://api.sovaria.in/api/v1/integrations/connect/vercel/callback"
    }
  ]
}

sovaria.api.integrations.connect

Start connecting a provider: returns the URL to send the owner to.

sovaria.api.integrations.connect(
  args: { orgId?: string; provider: string; returnTo: JsonValue; projectId?: JsonValue; categories?: JsonValue },
): Promise<JsonValue>

POST /api/v1/org/{org_id}/integrations/{provider}/connect

Parameters

args{ orgId?: string; provider: string; returnTo: JsonValue; projectId?: JsonValue; categories?: JsonValue }required

Returns

Promise<JsonValue>

{
  "authorize_url": "https://vercel.com/integrations/sovaria/new?state=…"
}

sovaria.api.integrations.complete

Finish a connection after the provider's callback (pending id).

sovaria.api.integrations.complete(
  args: { orgId?: string; provider: string; pending: JsonValue },
): Promise<JsonValue>

POST /api/v1/org/{org_id}/integrations/{provider}/complete

Parameters

args{ orgId?: string; provider: string; pending: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.integrations.connections

The org's connected integrations.

sovaria.api.integrations.connections(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/integrations/connections

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.integrations.state

One provider's connection state.

sovaria.api.integrations.state(
  args: { orgId?: string; provider: string; projectId?: JsonValue },
): Promise<JsonValue>

GET /api/v1/org/{org_id}/integrations/{provider}/state

Parameters

args{ orgId?: string; provider: string; projectId?: JsonValue }required

Returns

Promise<JsonValue>

{
  "provider": "vercel",
  "connected": true,
  "connected_at": "2026-10-12T09:00:00Z",
  "last_sync": {
    "target_id": "prj_8hT…",
    "at": "2026-10-12T09:01:00+00:00",
    "keys": [
      "NEXT_PUBLIC_SOVARIA_URL",
      "NEXT_PUBLIC_SOVARIA_ANON_KEY"
    ]
  }
}

sovaria.api.integrations.targets

Where the provider can sync to (its projects/sites).

sovaria.api.integrations.targets(
  args: { orgId?: string; provider: string; projectId?: JsonValue },
): Promise<JsonValue>

GET /api/v1/org/{org_id}/integrations/{provider}/targets

Parameters

args{ orgId?: string; provider: string; projectId?: JsonValue }required

Returns

Promise<JsonValue>

{
  "targets": [
    {
      "id": "prj_8hT…",
      "name": "skolist-web"
    }
  ]
}

sovaria.api.integrations.env

Environment variables Sovaria syncs to connected providers.

sovaria.api.integrations.env(
  args?: { orgId?: string; projectId?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/integrations/env

Parameters

args{ orgId?: string; projectId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "env": {
    "SOVARIA_URL": "https://3f9a1c0b7e2d.sovarias.in",
    "SOVARIA_ANON_KEY": "svr_…",
    "NEXT_PUBLIC_SOVARIA_URL": "https://3f9a1c0b7e2d.sovarias.in",
    "NEXT_PUBLIC_SOVARIA_ANON_KEY": "svr_…",
    "VITE_SOVARIA_URL": "https://3f9a1c0b7e2d.sovarias.in",
    "VITE_SOVARIA_ANON_KEY": "svr_…"
  }
}

sovaria.api.integrations.sync

Sync a project's connection values (URL, anon key) to a provider target.

sovaria.api.integrations.sync(
  args: { orgId?: string; provider: string; projectId: JsonValue; targetId: JsonValue },
): Promise<JsonValue>

POST /api/v1/org/{org_id}/integrations/{provider}/sync

Parameters

args{ orgId?: string; provider: string; projectId: JsonValue; targetId: JsonValue }required

Returns

Promise<JsonValue>

{
  "synced": [
    "SOVARIA_URL",
    "SOVARIA_ANON_KEY",
    "NEXT_PUBLIC_SOVARIA_URL",
    "NEXT_PUBLIC_SOVARIA_ANON_KEY",
    "VITE_SOVARIA_URL",
    "VITE_SOVARIA_ANON_KEY"
  ],
  "target_id": "prj_8hT…"
}

sovaria.api.integrations.disconnect

Disconnect a provider.

sovaria.api.integrations.disconnect(
  args: { orgId?: string; provider: string; projectId?: JsonValue },
): Promise<JsonValue>

DELETE /api/v1/org/{org_id}/integrations/{provider}

Parameters

args{ orgId?: string; provider: string; projectId?: JsonValue }required

Returns

Promise<JsonValue>

{
  "disconnected": "vercel"
}

#sovaria.api.knowledge

sovaria.api.knowledge.list

Knowledge bases (RAG) with documents, chunks, tokens, the embedding model and estimated cost.

sovaria.api.knowledge.list(): Promise<JsonValue>

GET /api/v1/data/rel/vector/knowledge

Returns

Promise<JsonValue>

{
  "knowledge_bases": [
    {
      "name": "support_docs",
      "table": "kb_support_docs",
      "description": "Help center",
      "access": "app_users",
      "user_uploads": false,
      "chunk_tokens": 450,
      "overlap_tokens": 60,
      "created_by": "7c1e…",
      "created_at": "2026-10-20T09:12:00+00:00",
      "documents": 12,
      "chunks": 214,
      "tokens": 96120,
      "pending": 0,
      "embedding_cost_usd": 0.0019224
    }
  ],
  "model": {
    "model": "openai/text-embedding-3-small@512",
    "dim": 512,
    "semantic": true,
    "billing": "own_key",
    "usd_per_million_tokens": 0.02
  },
  "limit": 5
}

sovaria.api.knowledge.create

Create a knowledge base: name, description, access (team | app_users), user_uploads, chunk_tokens.

sovaria.api.knowledge.create(
  args: { body: JsonObject },
): Promise<JsonValue>

POST /api/v1/data/rel/vector/knowledge

Parameters

args{ body: JsonObject }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "name": "support_docs",
  "table": "kb_support_docs",
  "access": "app_users",
  "user_uploads": false,
  "model": "openai/text-embedding-3-small@512",
  "dimensions": 512,
  "migration_version": "20261020091200",
  "reversible": true
}

sovaria.api.knowledge.update

Change a knowledge base's description, access or user_uploads.

sovaria.api.knowledge.update(
  args: { name: string; body: JsonObject },
): Promise<JsonValue>

PATCH /api/v1/data/rel/vector/knowledge/{name}

Parameters

args{ name: string; body: JsonObject }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "name": "support_docs",
  "access": "app_users",
  "user_uploads": true,
  "description": "Help center",
  "migration_version": "20261020091500",
  "reversible": true
}

sovaria.api.knowledge.delete

Delete a knowledge base with all its documents.

sovaria.api.knowledge.delete(args: { name: string }): Promise<JsonValue>

DELETE /api/v1/data/rel/vector/knowledge/{name}

Parameters

args{ name: string }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "name": "support_docs",
  "deleted": true,
  "migration_version": "20261020092000",
  "reversible": false
}

sovaria.api.knowledge.listDocuments

Documents the caller may read: title, source, chunks, tokens, status.

sovaria.api.knowledge.listDocuments(
  args: { name: string; limit?: JsonValue; offset?: JsonValue },
): Promise<JsonValue>

GET /api/v1/data/rel/vector/knowledge/{name}/documents

Parameters

args{ name: string; limit?: JsonValue; offset?: JsonValue }required

Returns

Promise<JsonValue>

{
  "name": "support_docs",
  "limit": 50,
  "offset": 0,
  "documents": [
    {
      "document_id": "refunds",
      "title": "Refund policy",
      "kind": "markdown",
      "source_uri": null,
      "chunks": 4,
      "tokens": 1630,
      "pending": 0,
      "private": false,
      "status": "ready",
      "created_at": "2026-10-20T09:13:00+00:00",
      "updated_at": "2026-10-20T09:13:00+00:00",
      "metadata": {
        "area": "billing"
      }
    }
  ]
}

sovaria.api.knowledge.addDocument

Add or replace a document: text (+format), content_base64 + filename (PDF, DOCX, HTML, Markdown, TXT, CSV, JSON) or url; optional document_id, title, metadata.

sovaria.api.knowledge.addDocument(
  args: { name: string; body: JsonObject },
): Promise<JsonValue>

refresh_hours (url, team) fetches the page again on a schedule. POST /api/v1/data/rel/vector/knowledge/{name}/documents

Parameters

args{ name: string; body: JsonObject }required

Returns

Promise<JsonValue>

{
  "name": "support_docs",
  "document_id": "refunds",
  "title": "Refund policy",
  "kind": "markdown",
  "source_uri": null,
  "tokens": 18,
  "chunks": 2,
  "new_chunks": 2,
  "reused_chunks": 0,
  "removed_chunks": 0,
  "new_tokens": 18,
  "embedded_now": 2,
  "pending": 0,
  "model": "openai/text-embedding-3-small@512",
  "billing": "own_key",
  "estimated_cost_usd": 3.6e-7,
  "private": false
}

sovaria.api.knowledge.deleteDocument

Remove a document (its owner or the team).

sovaria.api.knowledge.deleteDocument(
  args: { name: string; documentId: string },
): Promise<JsonValue>

DELETE /api/v1/data/rel/vector/knowledge/{name}/documents/{document_id}

Parameters

args{ name: string; documentId: string }required

Returns

Promise<JsonValue>

{
  "name": "support_docs",
  "document_id": "refunds",
  "deleted_chunks": 2
}

sovaria.api.knowledge.listSources

URL documents fetched again on a schedule (refresh_hours): next fetch, last error.

sovaria.api.knowledge.listSources(
  args: { name: string },
): Promise<JsonValue>

GET /api/v1/data/rel/vector/knowledge/{name}/sources

Parameters

args{ name: string }required

Returns

Promise<JsonValue>

#sovaria.api.mcp

sovaria.api.mcp.listConnections

AI assistants you connected over Sovaria's MCP server: the app, its organization and project, read-only or not, when it was connected and last used.

sovaria.api.mcp.listConnections(): Promise<JsonValue>

GET /api/v1/auth/mcp/connections

Returns

Promise<JsonValue>

{
  "connections": [
    {
      "id": "1b9f6c2e-4d3a-4e8b-9a71-5c0d2e3f4a5b",
      "client_name": "Claude",
      "client_id": "mcp_Xv3kP9qLm2Rt8sWy1aBc4d",
      "org": {
        "id": "8a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
        "name": "Skolist"
      },
      "project": {
        "id": "5f2c7a91-3b4d-4e6f-8a1b-2c3d4e5f6a7b",
        "name": "Storefront"
      },
      "read_only": false,
      "created_at": "2026-10-19T08:14:02.118Z",
      "last_used_at": "2026-10-19T09:02:47.530Z",
      "device": "Chrome on macOS"
    }
  ]
}

sovaria.api.mcp.disconnect

Disconnect one of your AI assistants: its tokens stop working at once.

sovaria.api.mcp.disconnect(
  args: { grantId: string },
): Promise<JsonValue>

DELETE /api/v1/auth/mcp/connections/{grant_id}

Parameters

args{ grantId: string }required

Returns

Promise<JsonValue>

{
  "status": "revoked"
}

sovaria.api.mcp.orgSettings

Whether members may connect AI assistants to this organization, the MCP server URL, and (owners and admins) every member's connection.

sovaria.api.mcp.orgSettings(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/mcp

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "allowed": true,
  "resource": "https://api.sovaria.in/mcp",
  "can_manage": true,
  "connections": [
    {
      "id": "1b9f6c2e-4d3a-4e8b-9a71-5c0d2e3f4a5b",
      "client_name": "Claude",
      "client_id": "mcp_Xv3kP9qLm2Rt8sWy1aBc4d",
      "org": {
        "id": "8a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
        "name": "Skolist"
      },
      "project": {
        "id": "5f2c7a91-3b4d-4e6f-8a1b-2c3d4e5f6a7b",
        "name": "Storefront"
      },
      "read_only": false,
      "created_at": "2026-10-19T08:14:02.118Z",
      "last_used_at": "2026-10-19T09:02:47.530Z",
      "device": "Chrome on macOS",
      "member_email": "ada@skolist.dev"
    }
  ]
}

sovaria.api.mcp.setOrgAllowed

Allow or stop AI assistants for the organization (owners and admins).

sovaria.api.mcp.setOrgAllowed(
  args: { orgId?: string; allowed: JsonValue },
): Promise<JsonValue>

Turning it off ends every member's connection. PUT /api/v1/org/{org_id}/mcp

Parameters

args{ orgId?: string; allowed: JsonValue }required

Returns

Promise<JsonValue>

{
  "allowed": false
}

sovaria.api.mcp.orgDisconnect

Disconnect a member's AI assistant from the organization (owners and admins).

sovaria.api.mcp.orgDisconnect(
  args: { orgId?: string; grantId: string },
): Promise<JsonValue>

DELETE /api/v1/org/{org_id}/mcp/connections/{grant_id}

Parameters

args{ orgId?: string; grantId: string }required

Returns

Promise<JsonValue>

{
  "status": "revoked"
}

#sovaria.api.messaging

sovaria.api.messaging.listTemplates

Message templates of the project (push and/or email content with {{ variables }}).

sovaria.api.messaging.listTemplates(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/messaging/templates

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "templates": [
    {
      "name": "order-shipped",
      "description": "Sent when an order ships",
      "category": "transactional",
      "push": {
        "title": "Your order shipped",
        "body": "Order #{{ order_id }} is on its way."
      },
      "email": {
        "subject": "Order #{{ order_id }} shipped",
        "html": "<p>Hi {{ name }}, your order is on its way.</p>",
        "text": "Hi {{ name }}, your order is on its way."
      },
      "channels": [
        "push",
        "email"
      ],
      "updated_by": "ana@skolist.com",
      "created_at": "2026-10-08T10:00:00+00:00",
      "updated_at": "2026-10-12T09:00:00+00:00"
    }
  ]
}

sovaria.api.messaging.getTemplate

One message template.

sovaria.api.messaging.getTemplate(
  args: { projectId?: string; name: string },
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/messaging/templates/{name}

Parameters

args{ projectId?: string; name: string }required

Returns

Promise<JsonValue>

{
  "name": "order-shipped",
  "description": "Sent when an order ships",
  "category": "transactional",
  "push": {
    "title": "Your order shipped",
    "body": "Order #{{ order_id }} is on its way."
  },
  "email": {
    "subject": "Order #{{ order_id }} shipped",
    "html": "<p>Hi {{ name }}, your order is on its way.</p>",
    "text": "Hi {{ name }}, your order is on its way."
  },
  "channels": [
    "push",
    "email"
  ],
  "updated_by": "ana@skolist.com",
  "created_at": "2026-10-08T10:00:00+00:00",
  "updated_at": "2026-10-12T09:00:00+00:00"
}

sovaria.api.messaging.putTemplate

Create or replace a template: push {title, body, image?, data?}, email {subject, html?, text?}; category transactional or marketing (marketing skips opted-out users and adds an unsubscribe link).

sovaria.api.messaging.putTemplate(
  args: { projectId?: string; name: string; description?: JsonValue; category?: JsonValue; push?: JsonValue; email?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/projects/{project_id}/messaging/templates/{name}

Parameters

args{ projectId?: string; name: string; description?: JsonValue; category?: JsonValue; push?: JsonValue; email?: JsonValue }required

Returns

Promise<JsonValue>

{
  "name": "order-shipped",
  "description": "Sent when an order ships",
  "category": "transactional",
  "push": {
    "title": "Your order shipped",
    "body": "Order #{{ order_id }} is on its way."
  },
  "email": {
    "subject": "Order #{{ order_id }} shipped",
    "html": "<p>Hi {{ name }}, your order is on its way.</p>",
    "text": "Hi {{ name }}, your order is on its way."
  },
  "channels": [
    "push",
    "email"
  ],
  "updated_by": "ana@skolist.com",
  "created_at": "2026-10-08T10:00:00+00:00",
  "updated_at": "2026-10-12T09:00:00+00:00"
}

sovaria.api.messaging.deleteTemplate

Delete a message template.

sovaria.api.messaging.deleteTemplate(
  args: { projectId?: string; name: string },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/messaging/templates/{name}

Parameters

args{ projectId?: string; name: string }required

Returns

Promise<JsonValue>

sovaria.api.messaging.listAudiences

Saved audiences: read-only SQL queries returning user_id (other columns become per-user variables).

sovaria.api.messaging.listAudiences(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/messaging/audiences

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "audiences": [
    {
      "name": "inactive-30d",
      "description": "No order in 30 days",
      "sql": "select user_id, name from customers where last_order_at < now() - interval '30 days'",
      "last_count": 412,
      "last_run_at": "2026-10-18T08:00:00+00:00",
      "updated_by": "ana@skolist.com",
      "updated_at": "2026-10-15T09:00:00+00:00"
    }
  ]
}

sovaria.api.messaging.getAudience

One audience and its last count.

sovaria.api.messaging.getAudience(
  args: { projectId?: string; name: string },
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/messaging/audiences/{name}

Parameters

args{ projectId?: string; name: string }required

Returns

Promise<JsonValue>

{
  "name": "inactive-30d",
  "description": "No order in 30 days",
  "sql": "select user_id, name from customers where last_order_at < now() - interval '30 days'",
  "last_count": 412,
  "last_run_at": "2026-10-18T08:00:00+00:00",
  "updated_by": "ana@skolist.com",
  "updated_at": "2026-10-15T09:00:00+00:00"
}

sovaria.api.messaging.putAudience

Create or replace an audience: a SELECT on the project database returning user_id (e.g.

sovaria.api.messaging.putAudience(
  args: { projectId?: string; name: string; sql: JsonValue; description?: JsonValue },
): Promise<JsonValue>

select user_id, first_name from profiles where plan = 'pro'). PUT /api/v1/projects/{project_id}/messaging/audiences/{name}

Parameters

args{ projectId?: string; name: string; sql: JsonValue; description?: JsonValue }required

Returns

Promise<JsonValue>

{
  "name": "inactive-30d",
  "description": "No order in 30 days",
  "sql": "select user_id, name from customers where last_order_at < now() - interval '30 days'",
  "last_count": 412,
  "last_run_at": "2026-10-18T08:00:00+00:00",
  "updated_by": "ana@skolist.com",
  "updated_at": "2026-10-15T09:00:00+00:00"
}

sovaria.api.messaging.deleteAudience

Delete an audience.

sovaria.api.messaging.deleteAudience(
  args: { projectId?: string; name: string },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/messaging/audiences/{name}

Parameters

args{ projectId?: string; name: string }required

Returns

Promise<JsonValue>

sovaria.api.messaging.previewAudience

Run a saved audience: how many app users it reaches, columns and a sample of 10.

sovaria.api.messaging.previewAudience(
  args: { projectId?: string; name: string },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/messaging/audiences/{name}/preview

Parameters

args{ projectId?: string; name: string }required

Returns

Promise<JsonValue>

{
  "columns": [
    "user_id",
    "name"
  ],
  "rows": 412,
  "users": 409,
  "over_limit": false,
  "limit": 50000,
  "not_app_users": 3,
  "sample": [
    {
      "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
      "name": "Ana"
    }
  ]
}

sovaria.api.messaging.previewSql

Try an audience query before saving it: app users reached, columns and a sample.

sovaria.api.messaging.previewSql(
  args: { projectId?: string; sql: JsonValue },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/messaging/audiences/preview

Parameters

args{ projectId?: string; sql: JsonValue }required

Returns

Promise<JsonValue>

{
  "columns": [
    "user_id",
    "name"
  ],
  "rows": 412,
  "users": 409,
  "over_limit": false,
  "limit": 50000,
  "not_app_users": 3,
  "sample": [
    {
      "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
      "name": "Ana"
    }
  ]
}

sovaria.api.messaging.send

Send a template (or content {push, email}) to {user_ids | audience | sql | topic | all_users} on push and/or email, with variables; dry_run reports who would get it and renders a preview.

sovaria.api.messaging.send(
  args: { projectId?: string; template?: JsonValue; content?: JsonValue; to: JsonValue; channels?: JsonValue; variables?: JsonValue; category?: JsonValue; dryRun?: JsonValue; sendAt?: JsonValue; timezone?: JsonValue; timezoneFallback?: JsonValue; track?: JsonValue },
): Promise<JsonValue>

send_at schedules it (timezone 'user' = that local time for each recipient). A durable job sends it; poll getSend. POST /api/v1/projects/{project_id}/messaging/send

Parameters

args{ projectId?: string; template?: JsonValue; content?: JsonValue; to: JsonValue; channels?: JsonValue; variables?: JsonValue; category?: JsonValue; dryRun?: JsonValue; sendAt?: JsonValue; timezone?: JsonValue; timezoneFallback?: JsonValue; track?: JsonValue }required

Returns

Promise<JsonValue>

{
  "id": "5d2c…",
  "status": "sending",
  "template": "order-shipped",
  "audience": null,
  "target": "users",
  "channels": [
    "push",
    "email"
  ],
  "category": "transactional",
  "recipients": 1,
  "counts": {
    "push": {
      "eligible": 1,
      "no_device": 0,
      "opted_out": 0
    },
    "email": {
      "eligible": 1,
      "no_email": 0,
      "opted_out": 0
    }
  },
  "dry_run": false,
  "error": null,
  "actor": "ana@skolist.com",
  "created_at": "2026-10-18T10:00:00+00:00",
  "finished_at": null,
  "not_app_users": 0
}

sovaria.api.messaging.listSends

Recent sends with status and per-channel counts.

sovaria.api.messaging.listSends(
  args?: { projectId?: string; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/messaging/sends

Parameters

args{ projectId?: string; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "sends": [
    {
      "id": "5d2c…",
      "status": "done",
      "template": "order-shipped",
      "audience": null,
      "target": "users",
      "channels": [
        "push",
        "email"
      ],
      "category": "transactional",
      "recipients": 1,
      "counts": {
        "push": {
          "eligible": 1,
          "no_device": 0,
          "opted_out": 0,
          "sent": 1
        },
        "email": {
          "eligible": 1,
          "no_email": 0,
          "opted_out": 0,
          "sent": 1
        }
      },
      "dry_run": false,
      "error": null,
      "actor": "ana@skolist.com",
      "created_at": "2026-10-18T10:00:00+00:00",
      "finished_at": "2026-10-18T10:00:04+00:00"
    }
  ]
}

sovaria.api.messaging.getSend

One send: status (sending, done, failed) and counts per channel and outcome.

sovaria.api.messaging.getSend(
  args: { projectId?: string; sendId: string },
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/messaging/sends/{send_id}

Parameters

args{ projectId?: string; sendId: string }required

Returns

Promise<JsonValue>

{
  "id": "5d2c…",
  "status": "done",
  "template": "order-shipped",
  "audience": null,
  "target": "users",
  "channels": [
    "push",
    "email"
  ],
  "category": "transactional",
  "recipients": 1,
  "counts": {
    "push": {
      "eligible": 1,
      "no_device": 0,
      "opted_out": 0
    },
    "email": {
      "eligible": 1,
      "no_email": 0,
      "opted_out": 0
    }
  },
  "dry_run": false,
  "error": null,
  "actor": "ana@skolist.com",
  "created_at": "2026-10-18T10:00:00+00:00",
  "finished_at": "2026-10-18T10:00:04+00:00"
}

sovaria.api.messaging.listDeliveries

Delivery log: per recipient and channel, sent / failed / no_device / no_email / opted_out with an error code (never content).

sovaria.api.messaging.listDeliveries(
  args?: { projectId?: string; sendId?: JsonValue; userId?: JsonValue; status?: JsonValue; limit?: JsonValue; offset?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/messaging/deliveries

Parameters

args{ projectId?: string; sendId?: JsonValue; userId?: JsonValue; status?: JsonValue; limit?: JsonValue; offset?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "deliveries": [
    {
      "send_id": "5d2c…",
      "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
      "channel": "push",
      "status": "sent",
      "error": null,
      "at": "2026-10-18T10:00:02+00:00"
    },
    {
      "send_id": "5d2c…",
      "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
      "channel": "email",
      "status": "sent",
      "error": null,
      "at": "2026-10-18T10:00:03+00:00"
    }
  ]
}

sovaria.api.messaging.usage

Messages sent this month per channel and the plan's messaging limits.

sovaria.api.messaging.usage(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/messaging/usage

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "this_month": {
    "sends": 214,
    "push_sent": 18420,
    "email_sent": 3902
  },
  "limits": {
    "msg.templates_per_project": 100,
    "msg.audiences_per_project": 50,
    "msg.max_recipients_per_send": 50000,
    "msg.delivery_log_days": 30,
    "push.sends_month": 1000000,
    "email.sends_month": 2000
  }
}

sovaria.api.messaging.setUserOptout

Record an app user's marketing choice (channel push, email or all) from your own UI.

sovaria.api.messaging.setUserOptout(
  args: { projectId?: string; userId: string; channel: JsonValue; optedOut: JsonValue },
): Promise<JsonValue>

PUT /api/v1/projects/{project_id}/messaging/users/{user_id}/optouts

Parameters

args{ projectId?: string; userId: string; channel: JsonValue; optedOut: JsonValue }required

Returns

Promise<JsonValue>

{
  "marketing": {
    "push": true,
    "email": false
  }
}

sovaria.api.messaging.getPreferences

The signed-in app user's marketing preferences per channel.

sovaria.api.messaging.getPreferences(): Promise<JsonValue>

GET /api/v1/messaging/preferences

Returns

Promise<JsonValue>

{
  "marketing": {
    "push": true,
    "email": false
  }
}

sovaria.api.messaging.setPreferences

The signed-in app user turns marketing push/email on or off: { marketing: { email: false } }.

sovaria.api.messaging.setPreferences(
  args: { marketing: JsonValue },
): Promise<JsonValue>

PUT /api/v1/messaging/preferences

Parameters

args{ marketing: JsonValue }required

Returns

Promise<JsonValue>

{
  "marketing": {
    "push": true,
    "email": false
  }
}

sovaria.api.messaging.cancelSend

Cancel a scheduled or running send (recipients not reached yet get nothing).

sovaria.api.messaging.cancelSend(
  args: { projectId?: string; sendId: string },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/messaging/sends/{send_id}/cancel

Parameters

args{ projectId?: string; sendId: string }required

Returns

Promise<JsonValue>

sovaria.api.messaging.listInApp

In-app messages of the project with impressions, clicks and dismissals.

sovaria.api.messaging.listInApp(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/messaging/in-app

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.messaging.putInApp

Create or replace an in-app message: content {title, body, image, layout, buttons}, trigger (app_open, screen:x, event:x), audience, window, max impressions per user.

sovaria.api.messaging.putInApp(
  args: { projectId?: string; name: string; content: JsonValue; trigger?: JsonValue; audience?: JsonValue; status?: JsonValue; startsAt?: JsonValue; endsAt?: JsonValue; maxImpressions?: JsonValue; priority?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/projects/{project_id}/messaging/in-app/{name}

Parameters

args{ projectId?: string; name: string; content: JsonValue; trigger?: JsonValue; audience?: JsonValue; status?: JsonValue; startsAt?: JsonValue; endsAt?: JsonValue; maxImpressions?: JsonValue; priority?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.messaging.deleteInApp

Delete an in-app message.

sovaria.api.messaging.deleteInApp(
  args: { projectId?: string; name: string },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/messaging/in-app/{name}

Parameters

args{ projectId?: string; name: string }required

Returns

Promise<JsonValue>

sovaria.api.messaging.trackEvent

The signed-in app user opened (or clicked) a message they were sent (push data sov_send).

sovaria.api.messaging.trackEvent(
  args: { sendId: JsonValue; channel?: JsonValue; kind?: JsonValue },
): Promise<JsonValue>

POST /api/v1/messaging/events

Parameters

args{ sendId: JsonValue; channel?: JsonValue; kind?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.messaging.myInApp

In-app messages the signed-in app user should see now for a trigger.

sovaria.api.messaging.myInApp(
  args?: { trigger?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/messaging/in-app

Parameters

args{ trigger?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.messaging.inAppEvent

Report an in-app message impression, click or dismissal.

sovaria.api.messaging.inAppEvent(
  args: { messageId: string; kind: JsonValue },
): Promise<JsonValue>

POST /api/v1/messaging/in-app/{message_id}/events

Parameters

args{ messageId: string; kind: JsonValue }required

Returns

Promise<JsonValue>

#sovaria.api.mobile

sovaria.api.mobile.listApps

Registered iOS/Android apps (bundle/package ids, redirect URIs).

sovaria.api.mobile.listApps(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/mobile/apps

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "apps": [
    {
      "id": "a3c1…",
      "platform": "ios",
      "name": "Skolist iOS",
      "created_at": "2026-10-05T09:00:00+00:00",
      "updated_at": "2026-10-05T09:00:00+00:00",
      "bundle_id": "com.skolist.shop",
      "team_id": "ABCDE12345",
      "redirect_uris": [
        "skolist://auth-callback"
      ]
    },
    {
      "id": "b7d2…",
      "platform": "android",
      "name": "Skolist Android",
      "created_at": "2026-10-05T09:05:00+00:00",
      "updated_at": "2026-10-05T09:05:00+00:00",
      "package_name": "com.skolist.shop",
      "sha256_cert_fingerprints": [
        "14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5"
      ],
      "redirect_uris": [
        "skolist://auth-callback"
      ]
    }
  ],
  "app_callback_path": "/auth/v1/app-callback"
}

sovaria.api.mobile.createApp

Register an app: platform, bundle_id+team_id (iOS) or package_name+sha256_cert_fingerprints (Android), redirect_uris.

sovaria.api.mobile.createApp(
  args: { projectId?: string; body: JsonObject },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/mobile/apps

Parameters

args{ projectId?: string; body: JsonObject }required

Returns

Promise<JsonValue>

{
  "id": "a3c1…",
  "platform": "ios",
  "name": "Skolist iOS",
  "created_at": "2026-10-05T09:00:00+00:00",
  "updated_at": "2026-10-05T09:00:00+00:00",
  "bundle_id": "com.skolist.shop",
  "team_id": "ABCDE12345",
  "redirect_uris": [
    "skolist://auth-callback"
  ]
}

sovaria.api.mobile.updateApp

Change a registered app (name, ids, fingerprints, redirect URIs).

sovaria.api.mobile.updateApp(
  args: { projectId?: string; appId: string; body: JsonObject },
): Promise<JsonValue>

PATCH /api/v1/projects/{project_id}/mobile/apps/{app_id}

Parameters

args{ projectId?: string; appId: string; body: JsonObject }required

Returns

Promise<JsonValue>

sovaria.api.mobile.deleteApp

Remove a registered app.

sovaria.api.mobile.deleteApp(
  args: { projectId?: string; appId: string },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/mobile/apps/{app_id}

Parameters

args{ projectId?: string; appId: string }required

Returns

Promise<JsonValue>

sovaria.api.mobile.listUserDevices

An app user's signed-in devices and push tokens.

sovaria.api.mobile.listUserDevices(
  args: { projectId?: string; userId: string },
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/users/{user_id}/devices

Parameters

args{ projectId?: string; userId: string }required

Returns

Promise<JsonValue>

{
  "devices": [
    {
      "device_id": "f1d2c3…",
      "name": "iPhone 15",
      "platform": "ios",
      "app_version": "2.4.0",
      "ip": "203.0.113.24",
      "user_agent": "Skolist/2.4.0 (iPhone; iOS 18.1)",
      "last_active_at": "2026-10-18T07:30:00+00:00",
      "session_ids": [
        "9f1c…"
      ],
      "current": false
    }
  ],
  "push_devices": [
    {
      "id": "5e0a…",
      "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
      "device_id": "f1d2c3…",
      "platform": "ios",
      "provider": "apns",
      "app_id": "com.skolist.shop",
      "topics": [
        "orders",
        "promos"
      ],
      "locale": "en-IN",
      "token_hint": "9a3f61c2",
      "active": true,
      "last_error": null,
      "created_at": "2026-10-10T08:00:00+00:00",
      "last_seen_at": "2026-10-18T07:30:00+00:00"
    }
  ]
}

sovaria.api.mobile.revokeUserDevice

Sign one of an app user's devices out (sessions and push tokens).

sovaria.api.mobile.revokeUserDevice(
  args: { projectId?: string; userId: string; deviceId: string },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/users/{user_id}/devices/{device_id}

Parameters

args{ projectId?: string; userId: string; deviceId: string }required

Returns

Promise<JsonValue>

{
  "sessions_ended": 1,
  "push_tokens_removed": 1
}

#sovaria.api.notificationChannels

sovaria.api.notificationChannels.list

The organization's notification channels (Slack, Discord, Teams, webhooks); URLs come back as hints only.

sovaria.api.notificationChannels.list(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/notification-channels

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "channels": [
    {
      "id": "7d3a…",
      "kind": "slack",
      "name": "#ops",
      "url_hint": "hooks.slack.com/…/Xy9",
      "categories": [
        "security",
        "usage"
      ],
      "enabled": true,
      "last_status": "ok",
      "last_error": null,
      "last_sent_at": "2026-10-17T22:00:00+00:00",
      "created_at": "2026-10-01T09:00:00+00:00"
    }
  ]
}

sovaria.api.notificationChannels.create

Send the org's notifications (security, project, usage, billing) to a Slack, Discord or Teams incoming webhook.

sovaria.api.notificationChannels.create(
  args: { orgId?: string; kind: JsonValue; url: JsonValue; name?: JsonValue; categories?: JsonValue },
): Promise<JsonValue>

Owners/admins; up to 10. POST /api/v1/org/{org_id}/notification-channels

Parameters

args{ orgId?: string; kind: JsonValue; url: JsonValue; name?: JsonValue; categories?: JsonValue }required

Returns

Promise<JsonValue>

{
  "id": "7d3b…",
  "kind": "webhook",
  "name": "PagerDuty bridge",
  "url_hint": "hooks.skolist.com/…lerts",
  "categories": [
    "security",
    "usage"
  ],
  "enabled": true,
  "last_status": null,
  "last_error": null,
  "last_sent_at": null,
  "created_at": "2026-10-18T11:40:00+00:00",
  "signing_secret": "whsec_…(shown once)"
}

sovaria.api.notificationChannels.test

Send a test notification to the channel.

sovaria.api.notificationChannels.test(
  args: { orgId?: string; channelId: string },
): Promise<JsonValue>

POST /api/v1/org/{org_id}/notification-channels/{channel_id}/test

Parameters

args{ orgId?: string; channelId: string }required

Returns

Promise<JsonValue>

{
  "ok": true,
  "error": null
}

sovaria.api.notificationChannels.delete

Remove a notification channel.

sovaria.api.notificationChannels.delete(
  args: { orgId?: string; channelId: string },
): Promise<JsonValue>

DELETE /api/v1/org/{org_id}/notification-channels/{channel_id}

Parameters

args{ orgId?: string; channelId: string }required

Returns

Promise<JsonValue>

{
  "deleted": true
}

#sovaria.api.notifications

sovaria.api.notifications.listNotifications

List notifications.

sovaria.api.notifications.listNotifications(
  args?: { limit?: JsonValue; unread?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/notifications

Parameters

args{ limit?: JsonValue; unread?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "items": [
    {
      "id": "3f1e…",
      "category": "usage",
      "event": "usage.threshold",
      "title": "Storage at 80% of your plan",
      "body": "Skolist shop uses 4 GB of 5 GB.",
      "link": "/org/…/usage",
      "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "created_at": "2026-10-18T06:00:00+00:00",
      "read_at": null
    }
  ],
  "unread": 1
}

sovaria.api.notifications.markRead

Mark read.

sovaria.api.notifications.markRead(
  args?: { all?: JsonValue; ids?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/notifications/read

Parameters

args{ all?: JsonValue; ids?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "updated": 4
}

sovaria.api.notifications.getPreferences

Get preferences.

sovaria.api.notifications.getPreferences(): Promise<JsonValue>

GET /api/v1/notifications/preferences

Returns

Promise<JsonValue>

{
  "preferences": {
    "security": true,
    "billing": true,
    "usage": true,
    "project": true,
    "product": false
  },
  "categories": [
    {
      "id": "security",
      "label": "Security alerts",
      "locked": true
    },
    {
      "id": "billing",
      "label": "Billing and plan",
      "locked": false
    },
    {
      "id": "usage",
      "label": "Usage and limits",
      "locked": false
    },
    {
      "id": "project",
      "label": "Project activity",
      "locked": false
    },
    {
      "id": "product",
      "label": "Product updates",
      "locked": false
    }
  ]
}

sovaria.api.notifications.updatePreferences

Update preferences.

sovaria.api.notifications.updatePreferences(
  args: { preferences: JsonValue },
): Promise<JsonValue>

PUT /api/v1/notifications/preferences

Parameters

args{ preferences: JsonValue }required

Returns

Promise<JsonValue>

{
  "preferences": {
    "security": true,
    "billing": true,
    "usage": true,
    "project": false,
    "product": true
  }
}

#sovaria.api.observability

sovaria.api.observability.metrics

Requests, 4xx/5xx errors, latency (avg, p50, p95, p99) and bytes over time for the project, per gateway service.

sovaria.api.observability.metrics(
  args?: { hours?: JsonValue; service?: JsonValue; points?: JsonValue; byService?: JsonValue } = {},
): Promise<JsonValue>

History by plan (obs.retention_days). GET /api/v1/observability/metrics

Parameters

args{ hours?: JsonValue; service?: JsonValue; points?: JsonValue; byService?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "hours": 24,
  "retention_hours": 168,
  "bucket_seconds": 900,
  "totals": {
    "requests": 1840,
    "console_requests": 12,
    "errors_4xx": 31,
    "errors_5xx": 2,
    "error_rate": 0.0179,
    "avg_ms": 48.2,
    "p50_ms": 25,
    "p95_ms": 250,
    "p99_ms": 1000,
    "bytes_in": 512000,
    "bytes_out": 8800000
  },
  "services": {
    "atlas-rel": {
      "requests": 1840,
      "console_requests": 12,
      "errors_4xx": 31,
      "errors_5xx": 2,
      "error_rate": 0.0179,
      "avg_ms": 48.2,
      "p50_ms": 25,
      "p95_ms": 250,
      "p99_ms": 1000,
      "bytes_in": 512000,
      "bytes_out": 8800000
    }
  },
  "series": [
    {
      "t": 1792396800,
      "requests": 1840,
      "console_requests": 12,
      "errors_4xx": 31,
      "errors_5xx": 2,
      "error_rate": 0.0179,
      "avg_ms": 48.2,
      "p50_ms": 25,
      "p95_ms": 250,
      "p99_ms": 1000,
      "bytes_in": 512000,
      "bytes_out": 8800000
    }
  ]
}

sovaria.api.observability.logs

Recent requests, newest first (method, path, status, duration, service, trace_id, env_id).

sovaria.api.observability.logs(
  args?: { limit?: JsonValue; service?: JsonValue; status?: JsonValue; q?: JsonValue; after?: JsonValue; before?: JsonValue; source?: JsonValue; env?: JsonValue } = {},
): Promise<JsonValue>

after = live tail, before = older page. GET /api/v1/observability/logs

Parameters

args{ limit?: JsonValue; service?: JsonValue; status?: JsonValue; q?: JsonValue; after?: JsonValue; before?: JsonValue; source?: JsonValue; env?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "logs": [
    {
      "time": 1792396800.412,
      "method": "GET",
      "path": "/rest/v1/orders",
      "status": 503,
      "duration_ms": 12.4,
      "service": "rest",
      "source": "app",
      "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
      "env_id": null
    }
  ],
  "has_more": true,
  "retention_minutes": 1440
}

sovaria.api.observability.routes

Latency (p50, p95, p99) and 4xx/5xx per route (method + path with ids collapsed), busiest first; env = comma-separated environment ids (main = none named), default all; route adds that route's series.

sovaria.api.observability.routes(
  args?: { hours?: JsonValue; env?: JsonValue; route?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/observability/routes

Parameters

args{ hours?: JsonValue; env?: JsonValue; route?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "envs": [
    "-"
  ],
  "environments": [
    "-",
    "9b1d6c2e-5f4a-4e8b-9c7d-3a2f1e0d9c8b"
  ],
  "hours": 24,
  "retention_hours": 168,
  "bucket_seconds": 900,
  "routes": [
    {
      "route": "GET /rest/v1/orders",
      "method": "GET",
      "path": "/rest/v1/orders",
      "requests": 1840,
      "errors_4xx": 31,
      "errors_5xx": 2,
      "error_rate": 0.0179,
      "server_error_rate": 0.0011,
      "avg_ms": 48.2,
      "p50_ms": 25,
      "p95_ms": 250,
      "p99_ms": 1000
    }
  ],
  "total_routes": 14
}

sovaria.api.observability.alertsList

SLO alert rules with their state (ok, firing, no_data, paused), the plan limit (obs.alert_rules), the metric catalog and recent events.

sovaria.api.observability.alertsList(): Promise<JsonValue>

GET /api/v1/observability/alerts

Returns

Promise<JsonValue>

{
  "rules": [
    {
      "id": "alr_3f9a1c0b7e2d4a6f",
      "name": "Slow orders",
      "metric": "latency_p95_ms",
      "threshold": 800,
      "window_minutes": 15,
      "target": "GET /rest/v1/orders",
      "env": null,
      "min_requests": 20,
      "email": true,
      "webhook_url": "https://hooks.example.com/sovaria",
      "enabled": true,
      "disabled_reason": null,
      "created_at": 1792310000,
      "unit": "ms",
      "has_signing_secret": true,
      "active": true,
      "state": "firing",
      "since": 1792396800,
      "value": 2500,
      "checked_at": 1792396860,
      "last_delivery": {
        "kind": "firing",
        "at": 1792396800,
        "email": true,
        "webhook": {
          "ok": true,
          "error": null
        }
      }
    }
  ],
  "limit": 10,
  "used": 1,
  "metrics": [
    {
      "id": "latency_p95_ms",
      "label": "Latency p95",
      "unit": "ms",
      "target": "route",
      "min": 1,
      "max": 60000
    }
  ],
  "windows": [
    5,
    10,
    15,
    30,
    60
  ],
  "resolution_minutes": 1,
  "events": [
    {
      "t": 1792396800,
      "rule_id": "alr_3f9a1c0b7e2d4a6f",
      "name": "Slow orders",
      "kind": "firing",
      "value": 2500,
      "threshold": 800,
      "metric": "latency_p95_ms"
    }
  ]
}

sovaria.api.observability.alertsCreate

Create an alert rule: metric latency_p95_ms, latency_p99_ms, error_rate (5xx %), function_failures or db_connections; threshold; window 5-60 min; optional route/function target; team email and/or a signed HTTPS webhook (signing_secret returned once).

sovaria.api.observability.alertsCreate(
  args: { metric: JsonValue; threshold: JsonValue; windowMinutes?: JsonValue; name?: JsonValue; target?: JsonValue; env?: JsonValue; minRequests?: JsonValue; email?: JsonValue; webhookUrl?: JsonValue },
): Promise<JsonValue>

Owners and admins. POST /api/v1/observability/alerts

Parameters

args{ metric: JsonValue; threshold: JsonValue; windowMinutes?: JsonValue; name?: JsonValue; target?: JsonValue; env?: JsonValue; minRequests?: JsonValue; email?: JsonValue; webhookUrl?: JsonValue }required

Returns

Promise<JsonValue>

{
  "id": "alr_3f9a1c0b7e2d4a6f",
  "name": "Slow orders",
  "metric": "latency_p95_ms",
  "threshold": 800,
  "window_minutes": 15,
  "target": "GET /rest/v1/orders",
  "env": null,
  "min_requests": 20,
  "email": true,
  "webhook_url": "https://hooks.example.com/sovaria",
  "enabled": true,
  "disabled_reason": null,
  "created_at": 1792310000,
  "unit": "ms",
  "has_signing_secret": true,
  "active": true,
  "state": "pending",
  "since": null,
  "value": null,
  "checked_at": null,
  "last_delivery": null,
  "signing_secret": "whsec_…(shown once)"
}

sovaria.api.observability.alertsUpdate

Change an alert rule (any create field) or pause/resume it ({enabled: false}).

sovaria.api.observability.alertsUpdate(
  args: { ruleId: string; body: JsonObject },
): Promise<JsonValue>

PATCH /api/v1/observability/alerts/{rule_id}

Parameters

args{ ruleId: string; body: JsonObject }required

Returns

Promise<JsonValue>

{
  "id": "alr_3f9a1c0b7e2d4a6f",
  "name": "Slow orders",
  "metric": "latency_p95_ms",
  "threshold": 800,
  "window_minutes": 15,
  "target": "GET /rest/v1/orders",
  "env": null,
  "min_requests": 20,
  "email": true,
  "webhook_url": "https://hooks.example.com/sovaria",
  "enabled": false,
  "disabled_reason": null,
  "created_at": 1792310000,
  "unit": "ms",
  "has_signing_secret": true,
  "active": true,
  "state": "paused",
  "since": 1792396800,
  "value": 2500,
  "checked_at": 1792396860,
  "last_delivery": {
    "kind": "firing",
    "at": 1792396800,
    "email": true,
    "webhook": {
      "ok": true,
      "error": null
    }
  }
}

sovaria.api.observability.alertsDelete

Delete an alert rule.

sovaria.api.observability.alertsDelete(
  args: { ruleId: string },
): Promise<JsonValue>

DELETE /api/v1/observability/alerts/{rule_id}

Parameters

args{ ruleId: string }required

Returns

Promise<JsonValue>

{
  "deleted": "alr_3f9a1c0b7e2d4a6f"
}

sovaria.api.observability.alertsTest

Measure the rule now (value, would_fire) and send an alert.test to its webhook.

sovaria.api.observability.alertsTest(
  args: { ruleId: string },
): Promise<JsonValue>

POST /api/v1/observability/alerts/{rule_id}/test

Parameters

args{ ruleId: string }required

Returns

Promise<JsonValue>

{
  "value": 2500,
  "note": null,
  "would_fire": true,
  "webhook": {
    "ok": true,
    "error": null
  }
}

sovaria.api.observability.alertsEvents

Fired and resolved alerts, newest first.

sovaria.api.observability.alertsEvents(
  args?: { limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/observability/alerts/events

Parameters

args{ limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "events": [
    {
      "t": 1792396800,
      "rule_id": "alr_3f9a1c0b7e2d4a6f",
      "name": "Slow orders",
      "kind": "firing",
      "value": 2500,
      "threshold": 800,
      "metric": "latency_p95_ms"
    }
  ]
}

sovaria.api.observability.updateDrain

Update drain.

sovaria.api.observability.updateDrain(
  args: { drainId: string; config?: JsonValue; enabled?: JsonValue; name?: JsonValue; secret?: JsonValue },
): Promise<JsonValue>

PATCH /api/v1/observability/drains/{drain_id}

Parameters

args{ drainId: string; config?: JsonValue; enabled?: JsonValue; name?: JsonValue; secret?: JsonValue }required

Returns

Promise<JsonValue>

{
  "id": "drn_3f9a1c0b7e2d4a6f",
  "name": "Datadog prod",
  "kind": "datadog",
  "config": {
    "site": "datadoghq.eu"
  },
  "has_secret": true,
  "enabled": false,
  "disabled_reason": null,
  "active": false,
  "created_at": 1792310000,
  "sent": 18234,
  "failed": 2,
  "last_delivery_at": 1792396800.4,
  "last_error": null
}

sovaria.api.observability.deleteDrain

Delete drain.

sovaria.api.observability.deleteDrain(
  args: { drainId: string },
): Promise<JsonValue>

DELETE /api/v1/observability/drains/{drain_id}

Parameters

args{ drainId: string }required

Returns

Promise<JsonValue>

{
  "deleted": "drn_3f9a1c0b7e2d4a6f"
}

sovaria.api.observability.testDrain

Test drain.

sovaria.api.observability.testDrain(
  args: { drainId: string },
): Promise<JsonValue>

POST /api/v1/observability/drains/{drain_id}/test

Parameters

args{ drainId: string }required

Returns

Promise<JsonValue>

{
  "ok": true,
  "error": null
}

#sovaria.api.org

sovaria.api.org.acceptOrgInvite

POST /api/v1/org/invites/accept

sovaria.api.org.acceptOrgInvite(
  args: { token: JsonValue },
): Promise<JsonValue>

Parameters

args{ token: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "accepted",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "user_id": "c1d2…",
  "role": "MEMBER"
}

sovaria.api.org.addMember

Add a user as a member of an org/project node.

sovaria.api.org.addMember(
  args: { orgId?: string; userId: JsonValue; role: JsonValue },
): Promise<JsonValue>

POST /api/v1/org/{org_id}/member

Parameters

args{ orgId?: string; userId: JsonValue; role: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "user_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "role": "MEMBER"
}

sovaria.api.org.createEdge

Connect two DAPG nodes with a typed relationship.

sovaria.api.org.createEdge(
  args: { sourceNodeId: JsonValue; targetNodeId: JsonValue; relationType: JsonValue; role?: JsonValue },
): Promise<JsonValue>

POST /api/v1/edge

Parameters

args{ sourceNodeId: JsonValue; targetNodeId: JsonValue; relationType: JsonValue; role?: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "source_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "target_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "relation_type": "MEMBER_OF"
}

sovaria.api.org.createOrgInvite

POST /api/v1/org/{org_id}/invites

sovaria.api.org.createOrgInvite(
  args: { orgId?: string; email: JsonValue; role: JsonValue },
): Promise<JsonValue>

Parameters

args{ orgId?: string; email: JsonValue; role: JsonValue }required

Returns

Promise<JsonValue>

{
  "invite_id": "5a0f…",
  "token": "Qm9…(43 characters)",
  "expires_at": "2026-10-25T11:00:00+00:00",
  "accept_url": "https://console.sovaria.in/invite/accept?token=Qm9…"
}

sovaria.api.org.deleteOrg

DELETE /api/v1/org/{org_id}

sovaria.api.org.deleteOrg(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "status": "deleting",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90"
}

sovaria.api.org.ensureDefaultApiKeys

POST /api/v1/apikeys/ensure-defaults

sovaria.api.org.ensureDefaultApiKeys(): Promise<JsonValue>

Returns

Promise<JsonValue>

[]

sovaria.api.org.getChildren

List child nodes attached by a relation (e.g.

sovaria.api.org.getChildren(
  args: { parentId: string; relation?: JsonValue },
): Promise<JsonValue>

OWNS, HAS_ENV). GET /api/v1/org/{parent_id}/children

Parameters

args{ parentId: string; relation?: JsonValue }required

Returns

Promise<JsonValue>

[
  {
    "id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
    "type": "PROJECT",
    "name": "Skolist shop",
    "metadata_json": {
      "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
      "region": "ap-south-1"
    },
    "role": null,
    "env_id": "8d1e5c2a-…",
    "env_name": "production",
    "env_db_type": "postgres"
  }
]

sovaria.api.org.getContext

Resolve a user's roles on a resource by walking the DAPG.

sovaria.api.org.getContext(
  args: { userId: string; resourceId: string },
): Promise<JsonValue>

GET /api/v1/context/{user_id}/{resource_id}

Parameters

args{ userId: string; resourceId: string }required

Returns

Promise<JsonValue>

{
  "roles": [
    "ADMIN"
  ],
  "mfa_required": false
}

sovaria.api.org.getNode

Fetch a single graph node by ID.

sovaria.api.org.getNode(args: { nodeId: string }): Promise<JsonValue>

GET /api/v1/org/{node_id}

Parameters

args{ nodeId: string }required

Returns

Promise<JsonValue>

{
  "id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "type": "ORG",
  "name": "Skolist",
  "metadata_json": {
    "settings": {
      "default_member_role": "MEMBER"
    }
  },
  "created_at": "2026-09-01T10:00:00+00:00"
}

sovaria.api.org.getProjectRef

GET /api/v1/org/{project_id}/ref

sovaria.api.org.getProjectRef(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "project_ref": "3f9a1c0b7e2d",
  "project_url": "https://3f9a1c0b7e2d.sovarias.in",
  "project_url_local": "http://localhost:8000  (X-Sovaria-Project-Ref: 3f9a1c0b7e2d)",
  "client_endpoints": {
    "auth_base": "https://3f9a1c0b7e2d.sovarias.in/auth/v1",
    "functions_base": "https://3f9a1c0b7e2d.sovarias.in/functions/v1",
    "rest_doc_base": "https://3f9a1c0b7e2d.sovarias.in/rest/doc",
    "rest_sql": "https://3f9a1c0b7e2d.sovarias.in/rest/sql/query",
    "storage_base": "https://3f9a1c0b7e2d.sovarias.in/storage/v1",
    "realtime_base": "https://3f9a1c0b7e2d.sovarias.in/realtime/v1"
  }
}

sovaria.api.org.getProjectSettings

GET /api/v1/project-settings

sovaria.api.org.getProjectSettings(): Promise<JsonValue>

Returns

Promise<JsonValue>

{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "settings": {
    "allowPublicSignup": true,
    "allowInviteOnlySignup": false,
    "anonymousSignIn": false,
    "emailVerification": true,
    "secureEmailChange": true,
    "phoneVerification": false,
    "mfaEnforcement": false,
    "passwordMinLength": 8,
    "passwordRequireUppercase": true,
    "passwordRequireDigit": true,
    "passwordRequireSpecial": true,
    "captchaProtection": false,
    "bruteForceProtection": true,
    "rateLimiting": true,
    "sessionTimeout": 60,
    "apiRateLimitPerMinute": 120,
    "apiRateLimitPerUserPerMinute": 0,
    "allowedOrigins": [
      "https://app.skolist.com",
      "http://localhost:*"
    ],
    "realtime_cdc": {
      "enabled": true,
      "tables": [
        "orders"
      ]
    },
    "stagingFirst": false,
    "containsPHI": false,
    "customSmtpEnabled": false,
    "projectDisplayName": "Skolist shop",
    "authProviders": {
      "email": true,
      "magic_link": true,
      "google": false
    },
    "authConfig": {
      "sessions": {
        "timeBoxMinutes": 0,
        "inactivityMinutes": 0,
        "singleSession": false,
        "reuseIntervalSeconds": 10
      },
      "urls": {
        "siteUrl": "https://app.skolist.com",
        "redirectUrls": [
          "https://app.skolist.com/**",
          "skolist://auth-callback"
        ]
      },
      "rateLimits": {
        "emailsPerHour": 30,
        "smsPerHour": 30,
        "tokenRefreshesPer5Min": 150,
        "verificationsPer5Min": 30,
        "anonymousSignInsPerHour": 30,
        "signInsPer5Min": 30,
        "failedSignInsPerAccount15Min": 10,
        "magicLinksPerEmailHour": 3,
        "magicLinksPerIpHour": 5,
        "passwordResetsPerEmailHour": 3,
        "passwordResetsPerIpHour": 5,
        "emailCodeAttempts": 5,
        "smsPerNumberHour": 10
      },
      "mfa": {
        "totp": true,
        "phone": false,
        "maxFactors": 10
      },
      "attack": {
        "leakedPasswordCheck": false,
        "preventEnumeration": true
      },
      "passkeys": {
        "enabled": false,
        "rpId": "",
        "rpName": "",
        "origins": []
      },
      "mobile": {
        "requirePkce": true
      }
    },
    "realtimeConfig": {
      "allowPublicAccess": true,
      "maxConcurrentClients": 0,
      "maxEventsPerSecond": 100,
      "maxPayloadKB": 128
    }
  },
  "ignored_keys": []
}

sovaria.api.org.getRoleCatalog

GET /api/v1/roles/catalog

sovaria.api.org.getRoleCatalog(): Promise<JsonValue>

Returns

Promise<JsonValue>

{
  "orgTeamRoles": [
    "OWNER",
    "ADMIN",
    "MEMBER",
    "VIEWER"
  ],
  "appUserRoles": [
    "admin",
    "customer",
    "staff"
  ]
}

sovaria.api.org.getRoleMatrix

GET /api/v1/roles/matrix

sovaria.api.org.getRoleMatrix(): Promise<JsonValue>

Returns

Promise<JsonValue>

{
  "admin": {
    "read": true,
    "write": true,
    "delete": true,
    "manage_users": true,
    "manage_roles": true,
    "manage_settings": true,
    "manage_api_keys": true,
    "manage_policies": true,
    "execute_functions": true,
    "manage_storage": true,
    "view_logs": true,
    "manage_billing": true
  },
  "staff": {
    "read": true,
    "write": true,
    "delete": false,
    "manage_users": false,
    "manage_roles": false,
    "manage_settings": false,
    "manage_api_keys": false,
    "manage_policies": false,
    "execute_functions": true,
    "manage_storage": true,
    "view_logs": false,
    "manage_billing": false
  }
}

sovaria.api.org.getRoleMatrixStatus

Whether the saved role matrix is enforced, and the plan's role allowance GET /api/v1/roles/matrix/status

sovaria.api.org.getRoleMatrixStatus(): Promise<JsonValue>

Returns

Promise<JsonValue>

sovaria.api.org.listApiKeys

GET /api/v1/apikeys

sovaria.api.org.listApiKeys(): Promise<JsonValue>

Returns

Promise<JsonValue>

[
  {
    "id": "1c7e…",
    "name": "Backend worker",
    "prefix": "svr_9f3c…",
    "role": "editor",
    "kind": "custom",
    "created": "2026-10-18T09:00:00+00:00",
    "expires_at": "2027-10-18T09:00:00+00:00",
    "last_used": null,
    "is_active": true
  },
  {
    "id": "0a1b…",
    "name": "Anon Key",
    "prefix": "svr_4c1d…",
    "role": "viewer",
    "kind": "anon",
    "created": "2026-10-18T09:00:00+00:00",
    "expires_at": null,
    "last_used": "2026-10-18T11:59:00+00:00",
    "is_active": true
  }
]

sovaria.api.org.listNodes

List graph nodes; when provided, `node_type filters by type

sovaria.api.org.listNodes(
  args?: { nodeType?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/org

Parameters

args{ nodeType?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

[
  {
    "id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
    "type": "ORG",
    "name": "Skolist",
    "metadata_json": {
      "settings": {
        "require_mfa": false
      }
    },
    "role": "OWNER",
    "env_id": null,
    "env_name": null,
    "env_db_type": null
  }
]

sovaria.api.org.listOrgMembers

GET /api/v1/org/{org_id}/members

sovaria.api.org.listOrgMembers(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

[
  {
    "id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
    "type": "USER",
    "name": "Ana Lima",
    "metadata_json": {},
    "role": "ADMIN",
    "email": "ana@skolist.com",
    "mfa_enabled": true
  }
]

sovaria.api.org.getOrgSeats

Seats on the plan: members plus pending invites against the seat limit (null = no limit).

sovaria.api.org.getOrgSeats(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/seats

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "plan": "pro",
  "members": 3,
  "pending_invites": 1,
  "on_hold": 0,
  "used": 4,
  "limit": 5,
  "left": 1,
  "full": false
}

sovaria.api.org.removeOrgMember

DELETE /api/v1/org/{org_id}/member/{user_id}

sovaria.api.org.removeOrgMember(
  args: { orgId?: string; userId: string },
): Promise<JsonValue>

Parameters

args{ orgId?: string; userId: string }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "user_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "role": "MEMBER"
}

sovaria.api.org.revokeApiKey

DELETE /api/v1/apikeys/{key_id}

sovaria.api.org.revokeApiKey(
  args: { keyId: string },
): Promise<JsonValue>

Parameters

args{ keyId: string }required

Returns

Promise<JsonValue>

{
  "status": "revoked",
  "key_id": "1c7e…"
}

sovaria.api.org.setOrgPlan

PUT /api/v1/org/{org_id}/plan

sovaria.api.org.setOrgPlan(
  args: { orgId?: string; plan: JsonValue },
): Promise<JsonValue>

Parameters

args{ orgId?: string; plan: JsonValue }required

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "plan": "free"
}

sovaria.api.org.updateMemberRole

PUT /api/v1/org/{org_id}/member/{user_id}

sovaria.api.org.updateMemberRole(
  args: { orgId?: string; userId: string; role: JsonValue },
): Promise<JsonValue>

Parameters

args{ orgId?: string; userId: string; role: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "user_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "role": "VIEWER"
}

sovaria.api.org.updateOrg

PUT /api/v1/org/{org_id}

sovaria.api.org.updateOrg(
  args: { orgId?: string; body: JsonObject },
): Promise<JsonValue>

Parameters

args{ orgId?: string; body: JsonObject }required

Returns

Promise<JsonValue>

sovaria.api.org.updateProjectSettings

PUT /api/v1/project-settings

sovaria.api.org.updateProjectSettings(
  args: { settings: JsonValue },
): Promise<JsonValue>

Parameters

args{ settings: JsonValue }required

Returns

Promise<JsonValue>

{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "settings": {
    "allowPublicSignup": false,
    "allowInviteOnlySignup": false,
    "anonymousSignIn": false,
    "emailVerification": true,
    "secureEmailChange": true,
    "phoneVerification": false,
    "mfaEnforcement": false,
    "passwordMinLength": 8,
    "passwordRequireUppercase": true,
    "passwordRequireDigit": true,
    "passwordRequireSpecial": true,
    "captchaProtection": false,
    "bruteForceProtection": true,
    "rateLimiting": true,
    "sessionTimeout": 60,
    "apiRateLimitPerMinute": 300,
    "apiRateLimitPerUserPerMinute": 0,
    "allowedOrigins": [
      "https://app.skolist.com"
    ],
    "realtime_cdc": {
      "enabled": true,
      "tables": [
        "orders"
      ]
    },
    "stagingFirst": false,
    "containsPHI": false,
    "customSmtpEnabled": false,
    "projectDisplayName": "Skolist shop",
    "authProviders": {
      "email": true,
      "magic_link": true,
      "google": false
    },
    "authConfig": {
      "sessions": {
        "timeBoxMinutes": 0,
        "inactivityMinutes": 0,
        "singleSession": false,
        "reuseIntervalSeconds": 10
      },
      "urls": {
        "siteUrl": "https://app.skolist.com",
        "redirectUrls": [
          "https://app.skolist.com/**",
          "skolist://auth-callback"
        ]
      },
      "rateLimits": {
        "emailsPerHour": 30,
        "smsPerHour": 30,
        "tokenRefreshesPer5Min": 150,
        "verificationsPer5Min": 30,
        "anonymousSignInsPerHour": 30,
        "signInsPer5Min": 30,
        "failedSignInsPerAccount15Min": 10,
        "magicLinksPerEmailHour": 3,
        "magicLinksPerIpHour": 5,
        "passwordResetsPerEmailHour": 3,
        "passwordResetsPerIpHour": 5,
        "emailCodeAttempts": 5,
        "smsPerNumberHour": 10
      },
      "mfa": {
        "totp": true,
        "phone": false,
        "maxFactors": 10
      },
      "attack": {
        "leakedPasswordCheck": false,
        "preventEnumeration": true
      },
      "passkeys": {
        "enabled": false,
        "rpId": "",
        "rpName": "",
        "origins": []
      },
      "mobile": {
        "requirePkce": true
      }
    },
    "realtimeConfig": {
      "allowPublicAccess": true,
      "maxConcurrentClients": 0,
      "maxEventsPerSecond": 100,
      "maxPayloadKB": 128
    }
  },
  "ignored_keys": []
}

sovaria.api.org.updateRoleMatrix

PUT /api/v1/roles/matrix

sovaria.api.org.updateRoleMatrix(
  args: { matrix: JsonValue },
): Promise<JsonValue>

Parameters

args{ matrix: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "roles": [
    "admin",
    "customer",
    "staff"
  ]
}

sovaria.api.org.transferOrgOwnership

Hand the organization and its billing to another admin (owner only).

sovaria.api.org.transferOrgOwnership(
  args: { orgId?: string; newOwnerId: JsonValue; reason?: JsonValue },
): Promise<JsonValue>

409 ONE_OWNED_ORG when they already own one. POST /api/v1/org/{org_id}/transfer-ownership

Parameters

args{ orgId?: string; newOwnerId: JsonValue; reason?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.org.revealAnonKey

The project's full anon (publishable) key, for app config.

sovaria.api.org.revealAnonKey(): Promise<JsonValue>

Safe to show. GET /api/v1/apikeys/anon/reveal

Returns

Promise<JsonValue>

{
  "available": true,
  "key_id": "0a1b…",
  "raw_key": "svr_4c1d…"
}

sovaria.api.org.rotateAnonKey

Replace the anon key (owners/admins); apps using the old key stop working.

sovaria.api.org.rotateAnonKey(): Promise<JsonValue>

POST /api/v1/apikeys/anon/rotate

Returns

Promise<JsonValue>

{
  "available": true,
  "key_id": "0a1c…",
  "raw_key": "svr_…"
}

sovaria.api.org.hardDeleteApiKey

Delete a revoked key for good (owners/admins).

sovaria.api.org.hardDeleteApiKey(
  args: { keyId: string },
): Promise<JsonValue>

DELETE /api/v1/apikeys/{key_id}/hard

Parameters

args{ keyId: string }required

Returns

Promise<JsonValue>

sovaria.api.org.listOrgInvites

Pending invites of the org.

sovaria.api.org.listOrgInvites(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/invites

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "invites": [
    {
      "id": "5a0f…",
      "email": "li@skolist.com",
      "role": "MEMBER",
      "invited_by": "ana@skolist.com",
      "created_at": "2026-10-18T11:00:00+00:00",
      "expires_at": "2026-10-25T11:00:00+00:00",
      "expired": false
    }
  ]
}

sovaria.api.org.resendOrgInvite

Send an invite's email again.

sovaria.api.org.resendOrgInvite(
  args: { orgId?: string; inviteId: string },
): Promise<JsonValue>

POST /api/v1/org/{org_id}/invites/{invite_id}/resend

Parameters

args{ orgId?: string; inviteId: string }required

Returns

Promise<JsonValue>

{
  "invite_id": "5a0f…",
  "expires_at": "2026-10-25T12:00:00+00:00",
  "accept_url": "https://console.sovaria.in/invite/accept?token=…"
}

sovaria.api.org.revokeOrgInvite

Withdraw a pending invite.

sovaria.api.org.revokeOrgInvite(
  args: { orgId?: string; inviteId: string },
): Promise<JsonValue>

DELETE /api/v1/org/{org_id}/invites/{invite_id}

Parameters

args{ orgId?: string; inviteId: string }required

Returns

Promise<JsonValue>

{
  "revoked": true
}

sovaria.api.org.memberProjects

Projects one org member can open.

sovaria.api.org.memberProjects(
  args: { orgId?: string; userId: string },
): Promise<JsonValue>

GET /api/v1/org/{org_id}/member/{user_id}/projects

Parameters

args{ orgId?: string; userId: string }required

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "user_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "project_ids": [
    "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07"
  ],
  "assignments": [
    {
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "permissions": [
        "database.read",
        "functions.read"
      ]
    }
  ],
  "projects": [
    {
      "id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "name": "Skolist shop"
    }
  ]
}

sovaria.api.org.setMemberProjects

Replace the projects one org member can open.

sovaria.api.org.setMemberProjects(
  args: { orgId?: string; userId: string; projectIds: JsonValue },
): Promise<JsonValue>

PUT /api/v1/org/{org_id}/member/{user_id}/projects

Parameters

args{ orgId?: string; userId: string; projectIds: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "user_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
  "project_ids": [
    "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07"
  ],
  "assignments": [
    {
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "permissions": [
        "database.read",
        "functions.read"
      ]
    }
  ]
}

sovaria.api.org.previewJoinCode

Preview join code.

sovaria.api.org.previewJoinCode(
  args: { code: string },
): Promise<JsonValue>

GET /api/v1/org/join/{code}

Parameters

args{ code: string }required

Returns

Promise<JsonValue>

{
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "org_name": "Skolist",
  "role": "member",
  "requires_approval": true,
  "already_member": false,
  "request_pending": false,
  "seats_full": false
}

sovaria.api.org.useJoinCode

Use join code.

sovaria.api.org.useJoinCode(
  args: { code: string; body: JsonObject },
): Promise<JsonValue>

POST /api/v1/org/join/{code}

Parameters

args{ code: string; body: JsonObject }required

Returns

Promise<JsonValue>

{
  "status": "requested",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90"
}

sovaria.api.org.listOrgJoinRequests

List org join requests.

sovaria.api.org.listOrgJoinRequests(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/join-requests

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "requests": [
    {
      "id": "9c1a…",
      "user_id": "c1d2…",
      "email": "li@skolist.com",
      "message": "I'm on the data team",
      "requested_role": "member",
      "created_at": "2026-10-18T11:30:00+00:00"
    }
  ]
}

sovaria.api.org.decideOrgJoinRequest

Decide org join request.

sovaria.api.org.decideOrgJoinRequest(
  args: { orgId?: string; requestId: string; approve: JsonValue; role?: JsonValue },
): Promise<JsonValue>

POST /api/v1/org/{org_id}/join-requests/{request_id}

Parameters

args{ orgId?: string; requestId: string; approve: JsonValue; role?: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "approved",
  "user_id": "c1d2…",
  "role": "viewer"
}

sovaria.api.org.updateNotificationChannel

Update notification channel.

sovaria.api.org.updateNotificationChannel(
  args: { orgId?: string; channelId: string; categories?: JsonValue; enabled?: JsonValue; name?: JsonValue },
): Promise<JsonValue>

PATCH /api/v1/org/{org_id}/notification-channels/{channel_id}

Parameters

args{ orgId?: string; channelId: string; categories?: JsonValue; enabled?: JsonValue; name?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.org.connectProvidersForOrg

Connect providers for org.

sovaria.api.org.connectProvidersForOrg(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/integrations/connect/providers

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.org.orgAppSave

Org app save.

sovaria.api.org.orgAppSave(
  args: { orgId?: string; provider: string; clientId: JsonValue; clientSecret: JsonValue; slug?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/org/{org_id}/integrations/{provider}/app

Parameters

args{ orgId?: string; provider: string; clientId: JsonValue; clientSecret: JsonValue; slug?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.org.orgAppDelete

Org app delete.

sovaria.api.org.orgAppDelete(
  args: { orgId?: string; provider: string },
): Promise<JsonValue>

DELETE /api/v1/org/{org_id}/integrations/{provider}/app

Parameters

args{ orgId?: string; provider: string }required

Returns

Promise<JsonValue>

sovaria.api.org.listDeletedProjects

List deleted projects.

sovaria.api.org.listDeletedProjects(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/deleted-projects

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.org.restoreDeletedProject

Restore deleted project.

sovaria.api.org.restoreDeletedProject(
  args?: { orgId?: string; projectId?: string } = {},
): Promise<JsonValue>

POST /api/v1/org/{org_id}/deleted-projects/{project_id}/restore

Parameters

args{ orgId?: string; projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.org.previewOrgInvite

Preview org invite.

sovaria.api.org.previewOrgInvite(
  args: { token: JsonValue },
): Promise<JsonValue>

POST /api/v1/org/invites/preview

Parameters

args{ token: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "pending",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "org_name": "Skolist",
  "role": "member",
  "email": "li@skolist.com",
  "invited_by": "ana@skolist.com",
  "expires_at": "2026-10-25T11:00:00+00:00",
  "has_account": false
}

sovaria.api.org.catalog

Catalog.

sovaria.api.org.catalog(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/iam/catalog

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "permissions": [
    {
      "id": "database.read",
      "label": "View tables, rows, schemas and database status"
    },
    {
      "id": "database.write",
      "label": "Insert/update/delete rows, run SQL, change tables and schemas"
    }
  ],
  "groups": [
    {
      "name": "Database",
      "permissions": [
        "database.read",
        "database.write",
        "database.admin"
      ]
    }
  ]
}

sovaria.api.org.myPermissions

My permissions.

sovaria.api.org.myPermissions(
  args?: { orgId?: string; projectId?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/iam/me

Parameters

args{ orgId?: string; projectId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "member": true,
  "role": "MEMBER",
  "permissions": [
    "database.read",
    "database.write",
    "functions.deploy",
    "logs.read"
  ],
  "ai_permissions": null
}

sovaria.api.org.getRoles

Get roles.

sovaria.api.org.getRoles(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/iam/roles

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "roles": [
    {
      "id": "owner",
      "name": "Owner",
      "description": "",
      "builtin": true,
      "permissions": [
        "…every permission"
      ],
      "members": null,
      "updated_at": null
    },
    {
      "id": "4e8d…",
      "name": "Support",
      "description": "Reads data and logs",
      "builtin": false,
      "permissions": [
        "auth.read",
        "database.read",
        "logs.read"
      ],
      "members": 2,
      "updated_at": "2026-10-15T09:00:00+00:00"
    }
  ]
}

sovaria.api.org.postRole

Post role.

sovaria.api.org.postRole(
  args: { orgId?: string; description?: JsonValue; name: JsonValue; permissions?: JsonValue },
): Promise<JsonValue>

POST /api/v1/org/{org_id}/iam/roles

Parameters

args{ orgId?: string; description?: JsonValue; name: JsonValue; permissions?: JsonValue }required

Returns

Promise<JsonValue>

{
  "id": "4e8d…",
  "name": "Support",
  "permissions": [
    "auth.read",
    "database.read",
    "logs.read"
  ]
}

sovaria.api.org.patchRole

Patch role.

sovaria.api.org.patchRole(
  args: { orgId?: string; roleId: string; description?: JsonValue; name?: JsonValue; permissions?: JsonValue },
): Promise<JsonValue>

PATCH /api/v1/org/{org_id}/iam/roles/{role_id}

Parameters

args{ orgId?: string; roleId: string; description?: JsonValue; name?: JsonValue; permissions?: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "updated"
}

sovaria.api.org.removeRole

Remove role.

sovaria.api.org.removeRole(
  args: { orgId?: string; roleId: string },
): Promise<JsonValue>

DELETE /api/v1/org/{org_id}/iam/roles/{role_id}

Parameters

args{ orgId?: string; roleId: string }required

Returns

Promise<JsonValue>

{
  "status": "deleted"
}

sovaria.api.org.getAssignments

Get assignments.

sovaria.api.org.getAssignments(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/iam/assignments

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "assignments": [
    {
      "id": "a12f…",
      "user_id": "6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51",
      "email": "ana@skolist.com",
      "role_id": "4e8d…",
      "role_name": "Support",
      "project_id": null,
      "project_name": null
    }
  ]
}

sovaria.api.org.postAssignment

Post assignment.

sovaria.api.org.postAssignment(
  args: { orgId?: string; projectId?: JsonValue; roleId: JsonValue; userId: JsonValue },
): Promise<JsonValue>

POST /api/v1/org/{org_id}/iam/assignments

Parameters

args{ orgId?: string; projectId?: JsonValue; roleId: JsonValue; userId: JsonValue }required

Returns

Promise<JsonValue>

{
  "id": "a12f…"
}

sovaria.api.org.deleteAssignment

Delete assignment.

sovaria.api.org.deleteAssignment(
  args: { orgId?: string; assignmentId: string },
): Promise<JsonValue>

DELETE /api/v1/org/{org_id}/iam/assignments/{assignment_id}

Parameters

args{ orgId?: string; assignmentId: string }required

Returns

Promise<JsonValue>

{
  "status": "removed"
}

sovaria.api.org.getAiPolicy

Get ai policy.

sovaria.api.org.getAiPolicy(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/iam/ai-policy

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "permissions": [
    "ai.use",
    "database.read",
    "logs.read"
  ]
}

sovaria.api.org.putAiPolicy

Put ai policy.

sovaria.api.org.putAiPolicy(
  args?: { orgId?: string; permissions?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/org/{org_id}/iam/ai-policy

Parameters

args{ orgId?: string; permissions?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "permissions": [
    "ai.use",
    "database.read",
    "logs.read"
  ]
}

sovaria.api.org.getOrgSamlSettings

Get org saml settings.

sovaria.api.org.getOrgSamlSettings(
  args?: { orgId?: string } = {},
): Promise<JsonValue>

GET /api/v1/org/{org_id}/sso/saml

Parameters

args{ orgId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "enabled": true,
  "idp_entity_id": "http://www.okta.com/exk1…",
  "idp_sso_url": "https://skolist.okta.com/app/…/sso/saml",
  "idp_certificate_set": true,
  "email_attribute": "email",
  "sp_entity_id": "https://api.sovaria.in/api/v1/auth/saml/metadata/b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "updated_at": "2026-10-01T09:00:00+00:00"
}

sovaria.api.org.updateOrgSamlSettings

Update org saml settings.

sovaria.api.org.updateOrgSamlSettings(
  args?: { orgId?: string; domains?: JsonValue; emailAttribute?: JsonValue; enabled?: JsonValue; idpCertificatePem?: JsonValue; idpEntityId?: JsonValue; idpSsoUrl?: JsonValue; metadataXml?: JsonValue; spEntityId?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/org/{org_id}/sso/saml

Parameters

args{ orgId?: string; domains?: JsonValue; emailAttribute?: JsonValue; enabled?: JsonValue; idpCertificatePem?: JsonValue; idpEntityId?: JsonValue; idpSsoUrl?: JsonValue; metadataXml?: JsonValue; spEntityId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.org.verifyOrgSamlDomain

Verify org saml domain.

sovaria.api.org.verifyOrgSamlDomain(
  args: { orgId?: string; domain: string },
): Promise<JsonValue>

POST /api/v1/org/{org_id}/sso/saml/domains/{domain}/verify

Parameters

args{ orgId?: string; domain: string }required

Returns

Promise<JsonValue>

#sovaria.api.perf

sovaria.api.perf.summary

Client performance: p50/p75/p95, count and web-vitals ratings per metric (or per page/screen with by=route).

sovaria.api.perf.summary(
  args?: { days?: JsonValue; kind?: JsonValue; release?: JsonValue; platform?: JsonValue; by?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/perf/summary

Parameters

args{ days?: JsonValue; kind?: JsonValue; release?: JsonValue; platform?: JsonValue; by?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.perf.series

One client metric's percentile over time.

sovaria.api.perf.series(
  args: { kind: JsonValue; name: JsonValue; days?: JsonValue; route?: JsonValue; release?: JsonValue; platform?: JsonValue; q?: JsonValue },
): Promise<JsonValue>

GET /api/v1/perf/series

Parameters

args{ kind: JsonValue; name: JsonValue; days?: JsonValue; route?: JsonValue; release?: JsonValue; platform?: JsonValue; q?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.perf.samples

Raw client measurements (newest or slowest first), each with its trace id.

sovaria.api.perf.samples(
  args?: { kind?: JsonValue; name?: JsonValue; route?: JsonValue; traceId?: JsonValue; slowest?: JsonValue; days?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/perf/samples

Parameters

args{ kind?: JsonValue; name?: JsonValue; route?: JsonValue; traceId?: JsonValue; slowest?: JsonValue; days?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.perf.network

Client network time per route next to the gateway's server time for the same route.

sovaria.api.perf.network(
  args?: { days?: JsonValue; env?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/perf/network

Parameters

args{ days?: JsonValue; env?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.perf.trace

Client spans and the server trace for one trace id.

sovaria.api.perf.trace(args: { traceId: string }): Promise<JsonValue>

GET /api/v1/perf/traces/{trace_id}

Parameters

args{ traceId: string }required

Returns

Promise<JsonValue>

sovaria.api.perf.usage

Performance measurements accepted and dropped this month, and the plan's limits.

sovaria.api.perf.usage(): Promise<JsonValue>

GET /api/v1/perf/usage

Returns

Promise<JsonValue>

#sovaria.api.platform

sovaria.api.platform.createEventHook

POST /api/v1/auth/event-hooks

sovaria.api.platform.createEventHook(
  args: { body: JsonObject },
): Promise<JsonValue>

Parameters

args{ body: JsonObject }required

Returns

Promise<JsonValue>

{
  "id": "0b6e…",
  "name": "CRM sync",
  "url": "https://hooks.skolist.com/sovaria-auth",
  "events": [
    "auth.user.login.success",
    "auth.user.registered"
  ],
  "enabled": true,
  "created_at": "2026-10-18T10:10:00+00:00",
  "updated_at": "2026-10-18T10:10:00+00:00",
  "delivery_count": 0,
  "failure_count": 0,
  "last_delivery_at": null,
  "last_error": null
}

sovaria.api.platform.deleteEventHook

DELETE /api/v1/auth/event-hooks/{hook_id}

sovaria.api.platform.deleteEventHook(
  args: { hookId: string },
): Promise<JsonValue>

Parameters

args{ hookId: string }required

Returns

Promise<JsonValue>

sovaria.api.platform.disconnectGithub

DELETE /api/v1/auth/github/connection-state

sovaria.api.platform.disconnectGithub(
  args?: { projectId?: JsonValue } = {},
): Promise<JsonValue>

Parameters

args{ projectId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "provider": "github",
  "project_scope": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "connected": false,
  "disconnected": true
}

sovaria.api.platform.gatewayHealth

GET /healthz

sovaria.api.platform.gatewayHealth(): Promise<JsonValue>

Returns

Promise<JsonValue>

HTTP
GET /healthz

sovaria.api.platform.getEnginesHealth

Return aggregate gateway health for downstream engines.

sovaria.api.platform.getEnginesHealth(): Promise<JsonValue>

GET /api/v1/system/engines/health

Returns

Promise<JsonValue>

HTTP
GET /api/v1/system/engines/health

sovaria.api.platform.getErrorTrace

GET /api/v1/error-traces/{trace_id}

sovaria.api.platform.getErrorTrace(
  args: { traceId: string },
): Promise<JsonValue>

Parameters

args{ traceId: string }required

Returns

Promise<JsonValue>

HTTP
GET /api/v1/error-traces/{…}

sovaria.api.platform.getGithubConnectionState

GET /api/v1/auth/github/connection-state

sovaria.api.platform.getGithubConnectionState(
  args?: { projectId?: JsonValue } = {},
): Promise<JsonValue>

Parameters

args{ projectId?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "provider": "github",
  "project_scope": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "connected": true,
  "connected_at": "2026-10-04T15:20:00Z",
  "updated_at": "2026-10-04T15:20:00Z",
  "token_hint": "gho_…1f",
  "metadata": {
    "email": "dev@skolist.com",
    "login": "skolist-dev",
    "name": "Skolist Dev",
    "scopes": [
      "read:user",
      "repo",
      "user:email"
    ]
  }
}

sovaria.api.platform.listEventHooks

GET /api/v1/auth/event-hooks

sovaria.api.platform.listEventHooks(): Promise<JsonValue>

Returns

Promise<JsonValue>

[
  {
    "id": "0b6e…",
    "name": "CRM sync",
    "url": "https://hooks.skolist.com/sovaria-auth",
    "events": [
      "auth.user.login.success",
      "auth.user.registered"
    ],
    "enabled": true,
    "created_at": "2026-10-01T10:00:00+00:00",
    "updated_at": "2026-10-01T10:00:00+00:00",
    "delivery_count": 412,
    "failure_count": 3,
    "last_delivery_at": "2026-10-17T09:41:05+00:00",
    "last_error": null
  }
]

sovaria.api.platform.resolveErrorTrace

PATCH /api/v1/error-traces/{trace_id}/resolved

sovaria.api.platform.resolveErrorTrace(
  args: { traceId: string; resolved: JsonValue },
): Promise<JsonValue>

Parameters

args{ traceId: string; resolved: JsonValue }required

Returns

Promise<JsonValue>

HTTP
PATCH /api/v1/error-traces/{…}/resolved

#sovaria.api.policy

sovaria.api.policy.auditCount

Return current audit-entry count.

sovaria.api.policy.auditCount(): Promise<JsonValue>

GET /api/v1/audit/count

Returns

Promise<JsonValue>

{
  "count": 913
}

sovaria.api.policy.auditVerify

Verify audit hash-chain integrity.

sovaria.api.policy.auditVerify(): Promise<JsonValue>

GET /api/v1/audit/verify

Returns

Promise<JsonValue>

{
  "chain_key": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "chain_valid": true,
  "verified_entries": 913,
  "head_chain_seq": 913,
  "head_hash": "c3e8…"
}

sovaria.api.policy.policyCreate

Create and compile a policy.

sovaria.api.policy.policyCreate(
  args: { policyId: JsonValue; name: JsonValue; splSource: JsonValue; orgId: JsonValue },
): Promise<JsonValue>

POST /api/v1/policies/

Parameters

args{ policyId: JsonValue; name: JsonValue; splSource: JsonValue; orgId: JsonValue }required

Returns

Promise<JsonValue>

{
  "policy_id": "pol_orders_read",
  "version": 1,
  "status": "compiled"
}

sovaria.api.policy.policyDelete

Delete (deactivate) a policy.

sovaria.api.policy.policyDelete(
  args: { policyId: string },
): Promise<JsonValue>

DELETE /api/v1/policies/{policy_id}

Parameters

args{ policyId: string }required

Returns

Promise<JsonValue>

sovaria.api.policy.policyEvaluate

Evaluate a policy against an explicit debug context.

sovaria.api.policy.policyEvaluate(
  args: { policyId: string; context: JsonValue },
): Promise<JsonValue>

POST /api/v1/policies/{policy_id}/evaluate

Parameters

args{ policyId: string; context: JsonValue }required

Returns

Promise<JsonValue>

{
  "policy_id": "pol_orders_read",
  "decision": "DENY",
  "http_status": 403,
  "deny_reason": "NO_MATCH",
  "retry_after_ms": 0,
  "latency_us": 41.2
}

sovaria.api.policy.policyGet

Get a single policy by ID.

sovaria.api.policy.policyGet(
  args: { policyId: string },
): Promise<JsonValue>

GET /api/v1/policies/{policy_id}

Parameters

args{ policyId: string }required

Returns

Promise<JsonValue>

{
  "policy_id": "pol_orders_read",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "name": "Signed-in users read orders",
  "spl_source": "ALLOW IF ctx.resource.name == \"orders\" AND ctx.action IN [\"SELECT\", \"sql:select\"] AND ctx.actor.is_anonymous == False",
  "version": 3,
  "is_active": true,
  "env_id": null,
  "inherited": false
}

sovaria.api.policy.policyHistory

Return version history for a policy.

sovaria.api.policy.policyHistory(
  args: { policyId: string },
): Promise<JsonValue>

GET /api/v1/policies/{policy_id}/history

Parameters

args{ policyId: string }required

Returns

Promise<JsonValue>

[
  {
    "audit_id": "v3",
    "policy_id": "pol_orders_read",
    "actor_user_id": "6e19c0a2-…",
    "action": "UPSERT",
    "new_spl_source": "ALLOW IF ctx.resource.name == \"orders\" AND ctx.action IN [\"SELECT\", \"sql:select\"] AND ctx.actor.is_anonymous == False",
    "version": 3,
    "created_at": "2026-10-17T12:31:08Z"
  }
]

sovaria.api.policy.policyList

List active policies visible in current tenant scope.

sovaria.api.policy.policyList(): Promise<JsonValue>

GET /api/v1/policies/

Returns

Promise<JsonValue>

[
  {
    "policy_id": "pol_orders_read",
    "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
    "name": "Signed-in users read orders",
    "spl_source": "ALLOW IF ctx.resource.name == \"orders\" AND ctx.action IN [\"SELECT\", \"sql:select\"] AND ctx.actor.is_anonymous == False",
    "version": 3,
    "is_active": true,
    "env_id": null,
    "inherited": false
  }
]

sovaria.api.policy.policyRollback

Rollback a policy to a historical version.

sovaria.api.policy.policyRollback(
  args: { policyId: string; version: JsonValue },
): Promise<JsonValue>

POST /api/v1/policies/{policy_id}/rollback

Parameters

args{ policyId: string; version: JsonValue }required

Returns

Promise<JsonValue>

{
  "policy_id": "pol_orders_read",
  "version": 5,
  "restored_from": 2,
  "status": "rolled_back"
}

sovaria.api.policy.policyTemplates

List server-authoritative SPL templates.

sovaria.api.policy.policyTemplates(): Promise<JsonValue>

GET /api/v1/policies/templates

Returns

Promise<JsonValue>

{
  "templates": [
    {
      "category": "Basic",
      "label": "Signed-in users can read",
      "name": "Signed-in users can read",
      "spl": "ALLOW IF ctx.actor.is_anonymous == False AND ctx.action == \"SELECT\"",
      "desc": "Signed-in app users can read tables. Writes need another rule."
    }
  ],
  "categories": {
    "Basic": [
      {
        "label": "Signed-in users can read",
        "name": "Signed-in users can read",
        "spl": "ALLOW IF ctx.actor.is_anonymous == False AND ctx.action == \"SELECT\"",
        "desc": "Signed-in app users can read tables. Writes need another rule."
      }
    ]
  }
}

sovaria.api.policy.simulatePermissionsBatch

Simulate permissions batch.

sovaria.api.policy.simulatePermissionsBatch(
  args: { disabledPolicyIds?: JsonValue; draftPolicies?: JsonValue; envId?: JsonValue; explain?: JsonValue; operations: JsonValue; orgId?: JsonValue; projectId?: JsonValue },
): Promise<JsonValue>

POST /api/v1/policies/simulate/batch

Parameters

args{ disabledPolicyIds?: JsonValue; draftPolicies?: JsonValue; envId?: JsonValue; explain?: JsonValue; operations: JsonValue; orgId?: JsonValue; projectId?: JsonValue }required

Returns

Promise<JsonValue>

{
  "results": [
    {
      "op_index": 0,
      "action": "doc:write",
      "resource": "carts",
      "decision": "DENY",
      "policy_id": null,
      "reason": "NO_POLICY_DEFINED"
    }
  ]
}

#sovaria.api.push

sovaria.api.push.getCredentials

Which push providers are set up (never the keys).

sovaria.api.push.getCredentials(
  args?: { projectId?: string } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/push/credentials

Parameters

args{ projectId?: string }optionaldefault {}

Returns

Promise<JsonValue>

{
  "fcm": {
    "project_id": "skolist-shop-1a2b3",
    "client_email": "firebase-adminsdk-x1@skolist-shop-1a2b3.iam.gserviceaccount.com",
    "uploaded_at": "2026-10-06T10:00:00+00:00",
    "uploaded_by": "ana@skolist.com"
  },
  "apns": {
    "key_id": "AB12CD34EF",
    "team_id": "ABCDE12345",
    "bundle_id": "com.skolist.shop",
    "environment": "production",
    "uploaded_at": "2026-10-06T10:05:00+00:00",
    "uploaded_by": "ana@skolist.com"
  },
  "disabled_by_staff": false
}

sovaria.api.push.setFcmCredentials

Upload the Firebase service account JSON (encrypted, write-only).

sovaria.api.push.setFcmCredentials(
  args: { projectId?: string; serviceAccount: JsonValue },
): Promise<JsonValue>

PUT /api/v1/projects/{project_id}/push/credentials/fcm

Parameters

args{ projectId?: string; serviceAccount: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.push.setApnsCredentials

Upload the APNs .p8 key (encrypted, write-only).

sovaria.api.push.setApnsCredentials(
  args: { projectId?: string; p8: JsonValue; keyId: JsonValue; teamId: JsonValue; bundleId: JsonValue; environment?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/projects/{project_id}/push/credentials/apns

Parameters

args{ projectId?: string; p8: JsonValue; keyId: JsonValue; teamId: JsonValue; bundleId: JsonValue; environment?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.push.deleteCredentials

Remove FCM or APNs credentials.

sovaria.api.push.deleteCredentials(
  args: { projectId?: string; provider: string },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/push/credentials/{provider}

Parameters

args{ projectId?: string; provider: string }required

Returns

Promise<JsonValue>

sovaria.api.push.listDevices

Push devices registered in the project (tokens are never returned).

sovaria.api.push.listDevices(
  args?: { projectId?: string; userId?: JsonValue; limit?: JsonValue; before?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/push/devices

Parameters

args{ projectId?: string; userId?: JsonValue; limit?: JsonValue; before?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "devices": [
    {
      "id": "5e0a…",
      "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
      "device_id": "f1d2c3…",
      "platform": "ios",
      "provider": "apns",
      "app_id": "com.skolist.shop",
      "topics": [
        "orders",
        "promos"
      ],
      "locale": "en-IN",
      "token_hint": "9a3f61c2",
      "active": true,
      "last_error": null,
      "created_at": "2026-10-10T08:00:00+00:00",
      "last_seen_at": "2026-10-18T07:30:00+00:00"
    }
  ],
  "active_by_platform": {
    "ios": 812,
    "android": 1404
  },
  "next_before": "2026-10-11T06:12:00+00:00"
}

sovaria.api.push.send

Send a push: to {user_ids|device_ids|topic}, notification {title, body, image}, data, badge, priority, ttl_seconds, dry_run.

sovaria.api.push.send(
  args: { projectId?: string; message: JsonObject },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/push/send

Parameters

args{ projectId?: string; message: JsonObject }required

Returns

Promise<JsonValue>

{
  "id": "7f30…",
  "requested": 2,
  "sent": 2,
  "failed": 0,
  "pruned": 0,
  "dry_run": false,
  "errors": {}
}

sovaria.api.push.listSends

Recent sends (counts and error codes) and this month's total.

sovaria.api.push.listSends(
  args?: { projectId?: string; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/push/sends

Parameters

args{ projectId?: string; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "sends": [
    {
      "id": "7f30…",
      "actor": "ana@skolist.com",
      "target": "users",
      "requested": 2,
      "sent": 2,
      "failed": 0,
      "pruned": 0,
      "dry_run": false,
      "errors": {},
      "created_at": "2026-10-18T08:00:00+00:00"
    }
  ],
  "this_month": {
    "sent": 18420,
    "failed": 31,
    "sends": 214
  }
}

sovaria.api.push.registerDevice

Register the signed-in app user's push token (FCM or APNs).

sovaria.api.push.registerDevice(
  args: { token: JsonValue; platform: JsonValue; provider?: JsonValue; deviceId?: JsonValue; appId?: JsonValue; topics?: JsonValue; locale?: JsonValue },
): Promise<JsonValue>

POST /api/v1/push/devices

Parameters

args{ token: JsonValue; platform: JsonValue; provider?: JsonValue; deviceId?: JsonValue; appId?: JsonValue; topics?: JsonValue; locale?: JsonValue }required

Returns

Promise<JsonValue>

{
  "id": "5e0a…",
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "device_id": "f1d2c3…",
  "platform": "ios",
  "provider": "apns",
  "app_id": "com.skolist.shop",
  "topics": [
    "orders",
    "promos"
  ],
  "locale": "en-IN",
  "token_hint": "9a3f61c2",
  "active": true,
  "last_error": null,
  "created_at": "2026-10-10T08:00:00+00:00",
  "last_seen_at": "2026-10-18T07:30:00+00:00"
}

sovaria.api.push.myDevices

The signed-in app user's push tokens.

sovaria.api.push.myDevices(): Promise<JsonValue>

GET /api/v1/push/devices

Returns

Promise<JsonValue>

{
  "devices": [
    {
      "id": "5e0a…",
      "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
      "device_id": "f1d2c3…",
      "platform": "ios",
      "provider": "apns",
      "app_id": "com.skolist.shop",
      "topics": [
        "orders",
        "promos"
      ],
      "locale": "en-IN",
      "token_hint": "9a3f61c2",
      "active": true,
      "last_error": null,
      "created_at": "2026-10-10T08:00:00+00:00",
      "last_seen_at": "2026-10-18T07:30:00+00:00"
    }
  ]
}

sovaria.api.push.updateTopics

Subscribe a device to topics or unsubscribe it.

sovaria.api.push.updateTopics(
  args: { deviceRowId: string; subscribe?: JsonValue; unsubscribe?: JsonValue; replace?: JsonValue },
): Promise<JsonValue>

PATCH /api/v1/push/devices/{device_row_id}/topics

Parameters

args{ deviceRowId: string; subscribe?: JsonValue; unsubscribe?: JsonValue; replace?: JsonValue }required

Returns

Promise<JsonValue>

{
  "id": "5e0a…",
  "user_id": "3c8f1e2a-9b47-4d6e-a5c1-7f0e2d4b8a93",
  "device_id": "f1d2c3…",
  "platform": "ios",
  "provider": "apns",
  "app_id": "com.skolist.shop",
  "topics": [
    "orders",
    "promos"
  ],
  "locale": "en-IN",
  "token_hint": "9a3f61c2",
  "active": true,
  "last_error": null,
  "created_at": "2026-10-10T08:00:00+00:00",
  "last_seen_at": "2026-10-18T07:30:00+00:00"
}

sovaria.api.push.deleteDevice

Remove one of the signed-in user's push devices.

sovaria.api.push.deleteDevice(
  args: { deviceRowId: string },
): Promise<JsonValue>

DELETE /api/v1/push/devices/{device_row_id}

Parameters

args{ deviceRowId: string }required

Returns

Promise<JsonValue>

sovaria.api.push.unregisterToken

Drop a push token (sign-out, notifications turned off).

sovaria.api.push.unregisterToken(
  args: { token: JsonValue },
): Promise<JsonValue>

POST /api/v1/push/devices/unregister

Parameters

args{ token: JsonValue }required

Returns

Promise<JsonValue>

{
  "removed": 1
}

sovaria.api.push.setWebpushCredentials

Create (or rotate) the project's web push VAPID keys; returns the public key.

sovaria.api.push.setWebpushCredentials(
  args?: { projectId?: string; subject?: JsonValue; rotate?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/push/credentials/webpush

Parameters

args{ projectId?: string; subject?: JsonValue; rotate?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.push.webpushKey

The project's VAPID public key for browsers (pushManager.subscribe applicationServerKey).

sovaria.api.push.webpushKey(): Promise<JsonValue>

GET /api/v1/push/webpush-key

Returns

Promise<JsonValue>

sovaria.api.push.cancelSend

Cancel a queued or running large push send.

sovaria.api.push.cancelSend(
  args: { projectId?: string; sendId: string },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/push/sends/{send_id}/cancel

Parameters

args{ projectId?: string; sendId: string }required

Returns

Promise<JsonValue>

#sovaria.api.queues

sovaria.api.queues.list

Message queues of the project's environment with length and oldest message age, plus the plan's queue limits and usage.

sovaria.api.queues.list(): Promise<JsonValue>

GET /api/v1/queues

Returns

Promise<JsonValue>

{
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "queues": [
    {
      "queue_id": "3c9d1e7f2a4b4c6d8e0f1a2b3c4d5e6f",
      "org_id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
      "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
      "env_id": "",
      "name": "emails",
      "description": "Outgoing mail",
      "visibility_timeout_sec": 60,
      "max_reads": 5,
      "dead_letter_queue": "emails-dead",
      "retention_days": null,
      "app_send": false,
      "consumer": {
        "function_name": "send-email",
        "enabled": true,
        "batch_size": 10,
        "concurrency": 2,
        "visibility_timeout_sec": null,
        "ack": "archive",
        "last_error": ""
      },
      "queue_length": 12,
      "stored_bytes": 3480,
      "sent_total": 940,
      "dead_total": 2,
      "created_by": "8b2c…",
      "created_at": 1791800000,
      "updated_at": 1791800000,
      "metrics": {
        "oldest_msg_age_sec": 42.5
      }
    }
  ],
  "limits": {
    "max_queues": 25,
    "messages_month": 2000000,
    "max_message_bytes": 262144,
    "storage_bytes": 2147483648,
    "retention_days": 7
  },
  "usage": {
    "queues": 2,
    "stored_bytes": 3480
  }
}

sovaria.api.queues.create

Create a queue: visibility_timeout_sec, max_reads + dead_letter_queue, retention_days, app_send (app users may send) and an optional consumer {function_name, enabled, batch_size, concurrency, visibility_timeout_sec, ack}.

sovaria.api.queues.create(
  args: { name: JsonValue; description?: JsonValue; visibilityTimeoutSec?: JsonValue; maxReads?: JsonValue; deadLetterQueue?: JsonValue; retentionDays?: JsonValue; appSend?: JsonValue; consumer?: JsonValue },
): Promise<JsonValue>

POST /api/v1/queues

Parameters

args{ name: JsonValue; description?: JsonValue; visibilityTimeoutSec?: JsonValue; maxReads?: JsonValue; deadLetterQueue?: JsonValue; retentionDays?: JsonValue; appSend?: JsonValue; consumer?: JsonValue }required

Returns

Promise<JsonValue>

{
  "queue_id": "3c9d1e7f2a4b4c6d8e0f1a2b3c4d5e6f",
  "org_id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": "",
  "name": "emails",
  "description": "Outgoing mail",
  "visibility_timeout_sec": 60,
  "max_reads": 5,
  "dead_letter_queue": "emails-dead",
  "retention_days": null,
  "app_send": false,
  "consumer": {
    "function_name": "send-email",
    "enabled": true,
    "batch_size": 10,
    "concurrency": 2,
    "visibility_timeout_sec": null,
    "ack": "archive",
    "last_error": ""
  },
  "queue_length": 12,
  "stored_bytes": 3480,
  "sent_total": 940,
  "dead_total": 2,
  "created_by": "8b2c…",
  "created_at": 1791800000,
  "updated_at": 1791800000
}

sovaria.api.queues.get

One queue with its settings, consumer binding and metrics.

sovaria.api.queues.get(args: { queueName: string }): Promise<JsonValue>

GET /api/v1/queues/{queue_name}

Parameters

args{ queueName: string }required

Returns

Promise<JsonValue>

{
  "queue_id": "3c9d1e7f2a4b4c6d8e0f1a2b3c4d5e6f",
  "org_id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": "",
  "name": "emails",
  "description": "Outgoing mail",
  "visibility_timeout_sec": 60,
  "max_reads": 5,
  "dead_letter_queue": "emails-dead",
  "retention_days": null,
  "app_send": false,
  "consumer": {
    "function_name": "send-email",
    "enabled": true,
    "batch_size": 10,
    "concurrency": 2,
    "visibility_timeout_sec": null,
    "ack": "archive",
    "last_error": ""
  },
  "queue_length": 12,
  "stored_bytes": 3480,
  "sent_total": 940,
  "dead_total": 2,
  "created_by": "8b2c…",
  "created_at": 1791800000,
  "updated_at": 1791800000,
  "metrics": {
    "queue_name": "emails",
    "queue_length": 12,
    "visible": 9,
    "in_flight": 3,
    "delayed": 0,
    "oldest_msg_age_sec": 42.5,
    "newest_msg_age_sec": 1.2,
    "total_messages": 940,
    "archived": 915,
    "dead_lettered": 2,
    "stored_bytes": 3480,
    "scrape_time": 1792206000
  }
}

sovaria.api.queues.update

Change a queue's settings or consumer binding (only the fields sent change).

sovaria.api.queues.update(
  args: { queueName: string; settings: JsonObject },
): Promise<JsonValue>

PATCH /api/v1/queues/{queue_name}

Parameters

args{ queueName: string; settings: JsonObject }required

Returns

Promise<JsonValue>

{
  "queue_id": "3c9d1e7f2a4b4c6d8e0f1a2b3c4d5e6f",
  "org_id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "env_id": "",
  "name": "emails",
  "description": "Outgoing mail",
  "visibility_timeout_sec": 60,
  "max_reads": 5,
  "dead_letter_queue": "emails-dead",
  "retention_days": null,
  "app_send": false,
  "consumer": {
    "function_name": "send-email",
    "enabled": false,
    "batch_size": 10,
    "concurrency": 2,
    "visibility_timeout_sec": null,
    "ack": "archive",
    "last_error": ""
  },
  "queue_length": 12,
  "stored_bytes": 3480,
  "sent_total": 940,
  "dead_total": 2,
  "created_by": "8b2c…",
  "created_at": 1791800000,
  "updated_at": 1791800000,
  "metrics": {
    "queue_name": "emails",
    "queue_length": 12,
    "visible": 9,
    "in_flight": 3,
    "delayed": 0,
    "oldest_msg_age_sec": 42.5,
    "newest_msg_age_sec": 1.2,
    "total_messages": 940,
    "archived": 915,
    "dead_lettered": 2,
    "stored_bytes": 3480,
    "scrape_time": 1792206000
  }
}

sovaria.api.queues.delete

Delete a queue and all its messages.

sovaria.api.queues.delete(
  args: { queueName: string },
): Promise<JsonValue>

DELETE /api/v1/queues/{queue_name}

Parameters

args{ queueName: string }required

Returns

Promise<JsonValue>

{
  "deleted": true,
  "name": "emails",
  "messages_deleted": 12
}

sovaria.api.queues.send

Send one JSON message (delay: seconds before it can be read); returns msg_id.

sovaria.api.queues.send(
  args: { queueName: string; message: JsonValue; delay?: JsonValue; headers?: JsonValue },
): Promise<JsonValue>

POST /api/v1/queues/{queue_name}/send

Parameters

args{ queueName: string; message: JsonValue; delay?: JsonValue; headers?: JsonValue }required

Returns

Promise<JsonValue>

{
  "msg_id": 41
}

sovaria.api.queues.sendBatch

Send up to 100 messages at once; returns msg_ids in order.

sovaria.api.queues.sendBatch(
  args: { queueName: string; messages: JsonValue; delay?: JsonValue; headers?: JsonValue },
): Promise<JsonValue>

POST /api/v1/queues/{queue_name}/send_batch

Parameters

args{ queueName: string; messages: JsonValue; delay?: JsonValue; headers?: JsonValue }required

Returns

Promise<JsonValue>

{
  "msg_ids": [
    42,
    43
  ]
}

sovaria.api.queues.read

Read up to qty visible messages and hide them for vt seconds (default: the queue's); archive or delete each when done, or it reappears.

sovaria.api.queues.read(
  args: { queueName: string; qty?: JsonValue; vt?: JsonValue },
): Promise<JsonValue>

POST /api/v1/queues/{queue_name}/read

Parameters

args{ queueName: string; qty?: JsonValue; vt?: JsonValue }required

Returns

Promise<JsonValue>

{
  "messages": [
    {
      "msg_id": 41,
      "read_ct": 1,
      "enqueued_at": 1792205990,
      "vt": 1792206060,
      "message": {
        "to": "ada@example.com",
        "template": "welcome"
      },
      "headers": null
    }
  ]
}

sovaria.api.queues.pop

Read and delete up to qty messages at once (at-most-once).

sovaria.api.queues.pop(
  args: { queueName: string; qty?: JsonValue },
): Promise<JsonValue>

POST /api/v1/queues/{queue_name}/pop

Parameters

args{ queueName: string; qty?: JsonValue }required

Returns

Promise<JsonValue>

{
  "messages": [
    {
      "msg_id": 41,
      "read_ct": 1,
      "enqueued_at": 1792205990,
      "vt": 1792206060,
      "message": {
        "to": "ada@example.com",
        "template": "welcome"
      },
      "headers": null
    }
  ]
}

sovaria.api.queues.archive

Archive messages (kept for the retention period); returns the ids archived.

sovaria.api.queues.archive(
  args: { queueName: string; msgIds: JsonValue },
): Promise<JsonValue>

POST /api/v1/queues/{queue_name}/archive

Parameters

args{ queueName: string; msgIds: JsonValue }required

Returns

Promise<JsonValue>

{
  "archived": [
    41
  ]
}

sovaria.api.queues.deleteMessages

Delete messages; returns the ids deleted.

sovaria.api.queues.deleteMessages(
  args: { queueName: string; msgIds: JsonValue },
): Promise<JsonValue>

POST /api/v1/queues/{queue_name}/delete

Parameters

args{ queueName: string; msgIds: JsonValue }required

Returns

Promise<JsonValue>

{
  "deleted": [
    42
  ]
}

sovaria.api.queues.setVt

Hide a message for vt more seconds from now (0 = visible now).

sovaria.api.queues.setVt(
  args: { queueName: string; msgId: JsonValue; vt: JsonValue },
): Promise<JsonValue>

POST /api/v1/queues/{queue_name}/set_vt

Parameters

args{ queueName: string; msgId: JsonValue; vt: JsonValue }required

Returns

Promise<JsonValue>

{
  "message": {
    "msg_id": 43,
    "read_ct": 1,
    "enqueued_at": 1792205990,
    "vt": 1792206060,
    "message": {
      "to": "ada@example.com",
      "template": "welcome"
    },
    "headers": null
  }
}

sovaria.api.queues.purge

Delete every waiting message (and the archive with include_archived); returns how many.

sovaria.api.queues.purge(
  args: { queueName: string; includeArchived?: JsonValue },
): Promise<JsonValue>

POST /api/v1/queues/{queue_name}/purge

Parameters

args{ queueName: string; includeArchived?: JsonValue }required

Returns

Promise<JsonValue>

{
  "purged": 12
}

sovaria.api.queues.metrics

Queue length, visible / in flight / delayed, oldest and newest message age, totals, archived and dead-lettered.

sovaria.api.queues.metrics(
  args: { queueName: string },
): Promise<JsonValue>

GET /api/v1/queues/{queue_name}/metrics

Parameters

args{ queueName: string }required

Returns

Promise<JsonValue>

{
  "queue_name": "emails",
  "queue_length": 12,
  "visible": 9,
  "in_flight": 3,
  "delayed": 0,
  "oldest_msg_age_sec": 42.5,
  "newest_msg_age_sec": 1.2,
  "total_messages": 940,
  "archived": 915,
  "dead_lettered": 2,
  "stored_bytes": 3480,
  "scrape_time": 1792206000
}

sovaria.api.queues.messages

Look at messages without reading them: state waiting, archived or dead.

sovaria.api.queues.messages(
  args: { queueName: string; state?: JsonValue; limit?: JsonValue; before?: JsonValue },
): Promise<JsonValue>

GET /api/v1/queues/{queue_name}/messages

Parameters

args{ queueName: string; state?: JsonValue; limit?: JsonValue; before?: JsonValue }required

Returns

Promise<JsonValue>

{
  "messages": [
    {
      "msg_id": 41,
      "read_ct": 1,
      "enqueued_at": 1792205990,
      "vt": 1792206060,
      "message": {
        "to": "ada@example.com",
        "template": "welcome"
      },
      "headers": null,
      "archived_at": null,
      "dead_lettered": false,
      "in_flight": true
    }
  ],
  "next_before": null
}

sovaria.api.queues.deleteMessage

Delete one message by id (acknowledge it).

sovaria.api.queues.deleteMessage(
  args: { queueName: string; msgId: string },
): Promise<JsonValue>

DELETE /api/v1/queues/{queue_name}/messages/{msg_id}

Parameters

args{ queueName: string; msgId: string }required

Returns

Promise<JsonValue>

{
  "deleted": [
    42
  ]
}

#sovaria.api.realtime

sovaria.api.realtime.channels

List active realtime channels.

sovaria.api.realtime.channels(): Promise<JsonValue>

GET /api/v1/rt/stream/channels

Returns

Promise<JsonValue>

{
  "channels": [
    {
      "channel": "room-42",
      "scoped_channel": "b2f4a1c8…:room-42:…",
      "subscribers": 2,
      "event_count": 1834
    }
  ],
  "total": 1
}

sovaria.api.realtime.presence

Fetch presence for a realtime channel.

sovaria.api.realtime.presence(
  args: { channel: string },
): Promise<JsonValue>

GET /api/v1/rt/stream/presence/{channel}

Parameters

args{ channel: string }required

Returns

Promise<JsonValue>

{
  "channel": "doc-1234",
  "online_clients": [
    "c_7f2a91",
    "c_03bd4e"
  ],
  "count": 2
}

sovaria.api.realtime.replay

Replay events for a realtime channel.

sovaria.api.realtime.replay(
  args: { channel: string; after?: JsonValue; limit?: JsonValue },
): Promise<JsonValue>

GET /api/v1/rt/stream/replay/{channel}

Parameters

args{ channel: string; after?: JsonValue; limit?: JsonValue }required

Returns

Promise<JsonValue>

{
  "channel": "room-42",
  "events": [
    {
      "channel": "room-42",
      "scoped_channel": "b2f4a1c8…:room-42:…",
      "payload": {
        "text": "Are you there?",
        "from": "grace"
      },
      "clock": {
        "pulse-1": 1833
      },
      "clock_delta": {
        "pulse-1": 1
      },
      "stream_seq": 1833
    },
    {
      "channel": "room-42",
      "scoped_channel": "b2f4a1c8…:room-42:…",
      "payload": {
        "text": "Hello!",
        "from": "ada"
      },
      "clock": {
        "pulse-1": 1834
      },
      "clock_delta": {
        "pulse-1": 1
      },
      "stream_seq": 1834
    }
  ],
  "count": 2
}

sovaria.api.realtime.subscribe

Subscribe a client ID to a realtime channel.

sovaria.api.realtime.subscribe(
  args: { channel: JsonValue; clientId: JsonValue },
): Promise<JsonValue>

POST /api/v1/rt/stream/subscribe

Parameters

args{ channel: JsonValue; clientId: JsonValue }required

Returns

Promise<JsonValue>

{
  "channel": "orders",
  "subscribed": true
}

sovaria.api.realtime.unsubscribe

Unsubscribe a client ID from a realtime channel.

sovaria.api.realtime.unsubscribe(
  args: { channel: JsonValue; clientId: JsonValue },
): Promise<JsonValue>

POST /api/v1/rt/stream/unsubscribe

Parameters

args{ channel: JsonValue; clientId: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok"
}

sovaria.api.realtime.publishBatch

Publish batch.

sovaria.api.realtime.publishBatch(
  args: { channel: string; body: JsonObject },
): Promise<JsonValue>

POST /api/v1/rt/stream/publish-batch/{channel}

Parameters

args{ channel: string; body: JsonObject }required

Returns

Promise<JsonValue>

#sovaria.api.remoteConfig

sovaria.api.remoteConfig.getDraft

Remote config draft of an environment: parameters, conditions, the published version and pending changes.

sovaria.api.remoteConfig.getDraft(
  args?: { projectId?: string; env?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/config

Parameters

args{ projectId?: string; env?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.putParam

Create or change a parameter: type (bool|string|number|json), default, description, conditional [{condition, value}].

sovaria.api.remoteConfig.putParam(
  args: { projectId?: string; key: string; type?: JsonValue; defaultValue?: JsonValue; description?: JsonValue; conditional?: JsonValue; env?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/projects/{project_id}/config/params/{key}

Parameters

args{ projectId?: string; key: string; type?: JsonValue; defaultValue?: JsonValue; description?: JsonValue; conditional?: JsonValue; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.deleteParam

Delete a parameter from the draft.

sovaria.api.remoteConfig.deleteParam(
  args: { projectId?: string; key: string; env?: JsonValue },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/config/params/{key}

Parameters

args{ projectId?: string; key: string; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.putCondition

Create or change a targeting condition: rules (attrs, semver, percent, users, audience), priority (lower wins first).

sovaria.api.remoteConfig.putCondition(
  args: { projectId?: string; name: string; rules: JsonValue; priority?: JsonValue; description?: JsonValue; env?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/projects/{project_id}/config/conditions/{name}

Parameters

args{ projectId?: string; name: string; rules: JsonValue; priority?: JsonValue; description?: JsonValue; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.deleteCondition

Delete a condition from the draft.

sovaria.api.remoteConfig.deleteCondition(
  args: { projectId?: string; name: string; env?: JsonValue },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/config/conditions/{name}

Parameters

args{ projectId?: string; name: string; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.getTemplate

The draft (or the published version) as a git-friendly template file.

sovaria.api.remoteConfig.getTemplate(
  args?: { projectId?: string; env?: JsonValue; source?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/config/template

Parameters

args{ projectId?: string; env?: JsonValue; source?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.putTemplate

Replace the draft from a template file {conditions, parameters}; prune removes what the file doesn't have.

sovaria.api.remoteConfig.putTemplate(
  args?: { projectId?: string; conditions?: JsonValue; parameters?: JsonValue; env?: JsonValue; prune?: JsonValue } = {},
): Promise<JsonValue>

Nothing is published. PUT /api/v1/projects/{project_id}/config/template

Parameters

args{ projectId?: string; conditions?: JsonValue; parameters?: JsonValue; env?: JsonValue; prune?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.diff

What publishing the draft (or a given template) would change against the published version.

sovaria.api.remoteConfig.diff(
  args?: { projectId?: string; template?: JsonValue; env?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/config/diff

Parameters

args{ projectId?: string; template?: JsonValue; env?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.preview

How many recently seen users would get different values if the draft (or template) were published.

sovaria.api.remoteConfig.preview(
  args?: { projectId?: string; template?: JsonValue; env?: JsonValue; sample?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/config/preview

Parameters

args{ projectId?: string; template?: JsonValue; env?: JsonValue; sample?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.publish

Publish the draft as the next immutable version (base_version: the version you reviewed; scheduled_at: publish later).

sovaria.api.remoteConfig.publish(
  args?: { projectId?: string; message?: JsonValue; baseVersion?: JsonValue; scheduledAt?: JsonValue; env?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/config/publish

Parameters

args{ projectId?: string; message?: JsonValue; baseVersion?: JsonValue; scheduledAt?: JsonValue; env?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.listVersions

Published (and scheduled) versions, newest first.

sovaria.api.remoteConfig.listVersions(
  args?: { projectId?: string; env?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/config/versions

Parameters

args{ projectId?: string; env?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.getVersion

One published version with its snapshot and template file.

sovaria.api.remoteConfig.getVersion(
  args: { projectId?: string; version: string; env?: JsonValue },
): Promise<JsonValue>

GET /api/v1/projects/{project_id}/config/versions/{version}

Parameters

args{ projectId?: string; version: string; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.rollback

Publish an older version again as a new version.

sovaria.api.remoteConfig.rollback(
  args: { projectId?: string; version: string; message?: JsonValue; env?: JsonValue },
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/config/rollback/{version}

Parameters

args{ projectId?: string; version: string; message?: JsonValue; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.cancelSchedule

Cancel a scheduled publish.

sovaria.api.remoteConfig.cancelSchedule(
  args: { projectId?: string; scheduleId: string; env?: JsonValue },
): Promise<JsonValue>

DELETE /api/v1/projects/{project_id}/config/schedules/{schedule_id}

Parameters

args{ projectId?: string; scheduleId: string; env?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.remoteConfig.evaluate

The values one user or device would get (context: user_id, anon_id, platform, app_version, country, language, attrs).

sovaria.api.remoteConfig.evaluate(
  args?: { projectId?: string; context?: JsonValue; source?: JsonValue; env?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/projects/{project_id}/config/evaluate

Parameters

args{ projectId?: string; context?: JsonValue; source?: JsonValue; env?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

#sovaria.api.schedules

sovaria.api.schedules.list

Cron schedules of the project's environment, newest first (optionally of one function).

sovaria.api.schedules.list(
  args?: { functionName?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/fn/schedules

Parameters

args{ functionName?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "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,
      "last_run_at": 1792206000,
      "created_at": 1791800000,
      "updated_at": 1791800000
    }
  ]
}

sovaria.api.schedules.create

Create a cron schedule: target_type function (function_name, payload), http (target: url, method, headers, body) or sql (target: sql, params); cron_expression in timezone (IANA), overlap allow|skip, max_attempts, timeout_sec.

sovaria.api.schedules.create(
  args: { cronExpression: JsonValue; functionName?: JsonValue; payload?: JsonValue; enabled?: JsonValue; name?: JsonValue; description?: JsonValue; timezone?: JsonValue; overlap?: JsonValue; maxAttempts?: JsonValue; timeoutSec?: JsonValue; targetType?: JsonValue; target?: JsonValue },
): Promise<JsonValue>

Payload/target values may be {"$secret": NAME}. POST /api/v1/fn/schedules

Parameters

args{ cronExpression: JsonValue; functionName?: JsonValue; payload?: JsonValue; enabled?: JsonValue; name?: JsonValue; description?: JsonValue; timezone?: JsonValue; overlap?: JsonValue; maxAttempts?: JsonValue; timeoutSec?: JsonValue; targetType?: JsonValue; target?: JsonValue }required

Returns

Promise<JsonValue>

{
  "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,
  "last_run_at": 1792206000,
  "created_at": 1791800000,
  "updated_at": 1791800000
}

sovaria.api.schedules.get

One schedule: expression, timezone, readable summary, next and last run.

sovaria.api.schedules.get(
  args: { scheduleId: string },
): Promise<JsonValue>

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

Parameters

args{ scheduleId: string }required

Returns

Promise<JsonValue>

{
  "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,
  "last_run_at": 1792206000,
  "created_at": 1791800000,
  "updated_at": 1791800000
}

sovaria.api.schedules.update

Change a schedule; only the fields sent change (payload null clears it; "[redacted]" values keep what is stored).

sovaria.api.schedules.update(
  args: { scheduleId: string; changes: JsonObject },
): Promise<JsonValue>

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

Parameters

args{ scheduleId: string; changes: JsonObject }required

Returns

Promise<JsonValue>

{
  "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,
  "created_at": 1791800000,
  "updated_at": 1791800000
}

sovaria.api.schedules.delete

Delete a schedule (its run history stays in the logs).

sovaria.api.schedules.delete(
  args: { scheduleId: string },
): Promise<JsonValue>

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

Parameters

args{ scheduleId: string }required

Returns

Promise<JsonValue>

{
  "deleted": true,
  "schedule_id": "sch_2b91…"
}

sovaria.api.schedules.runs

Run history, newest first: status (incl.

sovaria.api.schedules.runs(
  args: { scheduleId: string; limit?: JsonValue; before?: JsonValue },
): Promise<JsonValue>

SKIPPED and MISSED slots), duration, error, attempts and the response preview of HTTP/SQL targets. GET /api/v1/fn/schedules/{schedule_id}/runs

Parameters

args{ scheduleId: string; limit?: JsonValue; before?: JsonValue }required

Returns

Promise<JsonValue>

{
  "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,
      "error": "",
      "function_name": "nightly-report",
      "version": 4,
      "attempts": 1,
      "response_preview": ""
    },
    {
      "invocation_id": "7d1e0c4b2a9f4e3d8c7b6a5f4e3d2c1b",
      "status": "SKIPPED",
      "started_at": 1792119600,
      "completed_at": 1792119600.2,
      "duration_ms": 0,
      "error": "Skipped: the previous run was still in progress (overlap: skip)",
      "function_name": "nightly-report",
      "version": 4,
      "attempts": 0,
      "response_preview": ""
    }
  ]
}

sovaria.api.schedules.run

Run a schedule now (its regular times don't change); returns the queued invocation id.

sovaria.api.schedules.run(
  args: { scheduleId: string },
): Promise<JsonValue>

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

Parameters

args{ scheduleId: string }required

Returns

Promise<JsonValue>

{
  "schedule_id": "6f1c2b9a4d3e4f5a8b7c6d5e4f3a2b1c",
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "status": "QUEUED",
  "queued_at": 1792206000
}

sovaria.api.schedules.preview

The next run times of a cron expression in a time zone, with a readable summary; nothing is saved.

sovaria.api.schedules.preview(
  args: { cronExpression: JsonValue; timezone?: JsonValue; count?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/schedules/preview

Parameters

args{ cronExpression: JsonValue; timezone?: JsonValue; count?: JsonValue }required

Returns

Promise<JsonValue>

{
  "cron_expression": "0 9 * * MON-FRI",
  "timezone": "Asia/Kolkata",
  "summary": "At 09:00 on Monday through Friday (Asia/Kolkata)",
  "next_runs": [
    1792468800,
    1792555200,
    1792641600
  ],
  "next_runs_local": [
    "2026-10-27T09:00:00+05:30",
    "2026-10-28T09:00:00+05:30",
    "2026-10-29T09:00:00+05:30"
  ]
}

#sovaria.api.secrets

sovaria.api.secrets.listProjectSecretVersions

List project secret versions.

sovaria.api.secrets.listProjectSecretVersions(
  args: { secretName: string },
): Promise<JsonValue>

GET /api/v1/project-secrets/{secret_name}/versions

Parameters

args{ secretName: string }required

Returns

Promise<JsonValue>

[
  {
    "version": 2,
    "created_at": "2026-10-16T08:00:00+00:00",
    "current": true
  },
  {
    "version": 1,
    "created_at": "2026-10-02T10:00:00+00:00",
    "current": false
  }
]

sovaria.api.secrets.restoreProjectSecretVersion

Restore project secret version.

sovaria.api.secrets.restoreProjectSecretVersion(
  args: { secretName: string; version: string },
): Promise<JsonValue>

POST /api/v1/project-secrets/{secret_name}/versions/{version}/restore

Parameters

args{ secretName: string; version: string }required

Returns

Promise<JsonValue>

{
  "name": "STRIPE_SECRET",
  "value_set": true,
  "value_hint": "sk…9Q",
  "created_at": "2026-10-02T10:00:00+00:00",
  "updated_at": "2026-10-18T12:05:00+00:00",
  "version_count": 3,
  "generated": false,
  "rotation_period": "manual",
  "next_rotation_at": null,
  "rotated_at": null
}

#sovaria.api.simulation

sovaria.api.simulation.compareRuns

Compare two simulation runs of the project: regressions, improvements and new failures.

sovaria.api.simulation.compareRuns(
  args: { targetRunId: string; baselineRunId: string },
): Promise<JsonValue>

GET /api/v1/sim/runs/{target_run_id}/compare/{baseline_run_id}

Parameters

args{ targetRunId: string; baselineRunId: string }required

Returns

Promise<JsonValue>

{
  "baseline_run_id": "run_41a…",
  "target_run_id": "run_7c2e…",
  "summary": {
    "regressions": 1,
    "improvements": 3,
    "unchanged": 210,
    "new_cases": 4,
    "removed_cases": 0,
    "new_failures": 1,
    "resolved_failures": 3
  },
  "regressions": [
    {
      "case_key": "__guest__|sql:select|orders|",
      "role": "__guest__",
      "action": "sql:select",
      "resource": "orders",
      "endpoint": "",
      "baseline": {
        "outcome": "DENY",
        "is_deviation": false,
        "deviation_type": "NONE",
        "severity": 0
      },
      "target": {
        "outcome": "ALLOW",
        "is_deviation": true,
        "deviation_type": "UNEXPECTED_ALLOW",
        "severity": 3
      }
    }
  ],
  "improvements": []
}

sovaria.api.simulation.discover

What a simulation would test (user types, resources, rules), redacted by what you may read; pass its manifest_id to a run.

sovaria.api.simulation.discover(): Promise<JsonValue>

POST /api/v1/sim/discover

Returns

Promise<JsonValue>

{
  "manifest_id": "man_3b…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "env_id": null,
  "discovered_at": "2026-10-17T13:30:58Z",
  "roles": [
    "OWNER",
    "ADMIN",
    "MEMBER",
    "VIEWER"
  ],
  "app_personas": [
    {
      "persona": "app:staff",
      "users": 3,
      "roles": [
        "staff"
      ],
      "has_public_key": true
    }
  ],
  "user_count_by_role": {
    "MEMBER": 2
  },
  "role_subjects": {},
  "functions": [
    {
      "name": "send-receipt",
      "method": "POST",
      "invoke_permission": "authenticated",
      "runtime": "python3",
      "description": ""
    }
  ],
  "policies": [
    {
      "policy_id": "pol_orders_read",
      "name": "Signed-in users read orders",
      "is_active": true,
      "spl_source": "ALLOW IF ctx.resource.name == \"orders\" AND ctx.action IN [\"SELECT\", \"sql:select\"] AND ctx.actor.is_anonymous == False",
      "conditions": []
    }
  ],
  "collections": [
    "carts"
  ],
  "tables": [
    {
      "name": "orders",
      "schema": "public",
      "table": "orders",
      "kind": "table",
      "rls_enabled": true,
      "rls_forced": false,
      "columns": [
        {
          "name": "id",
          "type": "bigint"
        }
      ],
      "rls_policies": [],
      "security_invoker": false
    }
  ],
  "buckets": [
    "avatars"
  ],
  "bucket_details": [
    {
      "name": "avatars",
      "public": false
    }
  ],
  "settings": {
    "allowPublicSignup": true
  },
  "channels": [
    "room-42"
  ],
  "discovery_ms": 812.4
}

sovaria.api.simulation.getRun

One simulation run with every case's result (history keeps no rule source or user ids).

sovaria.api.simulation.getRun(
  args: { runId: string; view?: JsonValue },
): Promise<JsonValue>

view=compact leaves out each layer's check list (checks_count instead); get_run_case gives one request's full trace. GET /api/v1/sim/runs/{run_id}

Parameters

args{ runId: string; view?: JsonValue }required

Returns

Promise<JsonValue>

{
  "run_id": "run_7c2e…",
  "project_id": "f0c3e9a2-1b4d-4e7f-8a6c-2d9b5e3f1a07",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "status": "complete",
  "started_at": "2026-10-17T13:31:02Z",
  "completed_at": "2026-10-17T13:31:40Z",
  "cases_total": 214,
  "cases_pass": 209,
  "cases_fail": 2,
  "cases_warn": 3,
  "cases_deviation": 2,
  "top_findings": [
    {
      "severity": "critical",
      "category": "access_control",
      "title": "2 request(s) get through that your rules deny",
      "detail": "…",
      "fix": "…"
    }
  ],
  "results": [
    {
      "case": {
        "role": "__guest__",
        "action": "sql:select",
        "resource": "orders",
        "expected": "DENY"
      },
      "outcome": "ALLOW",
      "is_deviation": true,
      "deviation_type": "UNEXPECTED_ALLOW",
      "guard_decision": "DENY",
      "duration_ms": 38.5
    }
  ],
  "runner_ms": 38210
}

sovaria.api.simulation.getRunCase

One request of a run with its full trace (every check of every layer), for a run read with view=compact.

sovaria.api.simulation.getRunCase(
  args: { runId: string; caseId: string },
): Promise<JsonValue>

GET /api/v1/sim/runs/{run_id}/cases/{case_id}

Parameters

args{ runId: string; caseId: string }required

Returns

Promise<JsonValue>

{
  "run_id": "run_7c2e…",
  "result": {
    "case": {
      "case_id": "case_42",
      "role": "app:teacher",
      "action": "sql:select",
      "resource": "fees",
      "expected": "DENY"
    },
    "outcome": "DENY",
    "is_deviation": false,
    "deviation_type": "NONE",
    "layer_traces": [
      {
        "layer": 1,
        "label": "Gateway",
        "engine": "gateway",
        "status": "PASS",
        "detail": "9 checks passed",
        "latency_ms": 2.4,
        "checks": [
          {
            "id": "firewall",
            "stage": "gateway",
            "label": "Firewall (WAF)",
            "status": "PASS",
            "detail": "…",
            "latency_ms": 0.3
          }
        ]
      }
    ],
    "breakpoints": [],
    "duration_ms": 12
  }
}

sovaria.api.simulation.summary

What the Simulation page shows first: the checks' counts by severity, the latest run's numbers and how many runs are kept.

sovaria.api.simulation.summary(): Promise<JsonValue>

Free; carries an ETag. GET /api/v1/sim/summary

Returns

Promise<JsonValue>

{
  "checks": {
    "critical": 1,
    "warning": 3,
    "info": 2
  },
  "discovered_at": "2026-11-10T09:12:00Z",
  "latest_run": {
    "run_id": "run_7c2e…",
    "status": "complete",
    "started_at": "2026-11-10T09:00:02Z",
    "cases_total": 214,
    "cases_pass": 209,
    "cases_fail": 2,
    "cases_warn": 3,
    "cases_deviation": 2,
    "runner_ms": 38210
  },
  "runs_total": 12
}

sovaria.api.simulation.listRuns

The project's simulation runs, newest first; limit 1-100 (default 50) and offset page through them.

sovaria.api.simulation.listRuns(
  args?: { limit?: JsonValue; offset?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/sim/runs

Parameters

args{ limit?: JsonValue; offset?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "runs": [
    {
      "run_id": "run_7c2e…",
      "status": "complete",
      "started_at": "2026-10-17T13:31:02Z",
      "cases_total": 214,
      "cases_fail": 2
    }
  ],
  "total": 1,
  "limit": 50,
  "offset": 0
}

sovaria.api.simulation.quota

Real simulation runs used and allowed today (UTC) and this month; reading it uses nothing.

sovaria.api.simulation.quota(): Promise<JsonValue>

GET /api/v1/sim/quota

Returns

Promise<JsonValue>

{
  "day": {
    "used": 1,
    "limit": 2,
    "resets_at": "2026-10-22T00:00:00+00:00"
  },
  "month": {
    "used": 3,
    "limit": 5,
    "resets_at": "2026-11-03T10:00:00+00:00"
  },
  "partial_units_per_run": 5
}

sovaria.api.simulation.listIntended

Outcomes the team marked as intended for this project (shown green on every run, left out of findings).

sovaria.api.simulation.listIntended(): Promise<JsonValue>

GET /api/v1/sim/intended

Returns

Promise<JsonValue>

{
  "intended": [
    {
      "mark_id": "6f1c2a9d0b7e4c5a8e3f2d1c0b9a8e7f",
      "role": "__guest__",
      "action": "sql:select",
      "resource": "public.products",
      "outcome": "ALLOW",
      "note": "The product catalogue is public",
      "marked_by": "2c1f6b8a-4d3e-4f5a-9b8c-7d6e5f4a3b2c",
      "marked_at": 1792531200
    }
  ]
}

sovaria.api.simulation.markIntended

Mark an outcome as intended (role, action, resource, outcome ALLOW or DENY, optional note); needs policies.write.

sovaria.api.simulation.markIntended(
  args: { role: JsonValue; action: JsonValue; resource: JsonValue; outcome: JsonValue; note?: JsonValue },
): Promise<JsonValue>

Marking the same role/action/resource again replaces it. POST /api/v1/sim/intended

Parameters

args{ role: JsonValue; action: JsonValue; resource: JsonValue; outcome: JsonValue; note?: JsonValue }required

Returns

Promise<JsonValue>

{
  "mark_id": "6f1c2a9d0b7e4c5a8e3f2d1c0b9a8e7f",
  "role": "__guest__",
  "action": "sql:select",
  "resource": "public.products",
  "outcome": "ALLOW",
  "note": "The product catalogue is public",
  "marked_by": "2c1f6b8a-4d3e-4f5a-9b8c-7d6e5f4a3b2c",
  "marked_at": 1792531200
}

sovaria.api.simulation.unmarkIntended

Remove an intended-outcome mark; matching cases show as measured again.

sovaria.api.simulation.unmarkIntended(
  args: { markId: string },
): Promise<JsonValue>

Needs policies.write. DELETE /api/v1/sim/intended/{mark_id}

Parameters

args{ markId: string }required

Returns

Promise<JsonValue>

{
  "removed": true,
  "mark_id": "6f1c2a9d0b7e4c5a8e3f2d1c0b9a8e7f"
}

sovaria.api.simulation.topology

Callers, gateway checks, sign-in, resources and connectors of the project (platform defences as one 'Platform protection' node).

sovaria.api.simulation.topology(): Promise<JsonValue>

GET /api/v1/sim/topology

Returns

Promise<JsonValue>

{
  "project": {
    "id": "8cab1cf9-…",
    "name": "Storefront",
    "plan": "pro"
  },
  "callers": [
    {
      "id": "__guest__",
      "label": "Visitor (not signed in)",
      "kind": "guest"
    }
  ],
  "gateway": {
    "checks": [
      {
        "id": "project_rate",
        "label": "Project rate limit",
        "detail": "120 requests/min per IP"
      },
      {
        "id": "platform",
        "label": "Platform protection"
      }
    ]
  },
  "identity": {
    "providers": [
      "Email and password",
      "Google"
    ],
    "mfa": true,
    "passkeys": false,
    "captcha": false,
    "sessions": {
      "timeoutMin": 0,
      "inactivityMin": 0,
      "singleSession": false
    }
  },
  "resources": {
    "tables": [
      "orders"
    ],
    "collections": [],
    "functions": [
      "stripe-webhook"
    ],
    "buckets": [
      "invoices"
    ],
    "channels": []
  },
  "integrations": [
    {
      "id": "smtp",
      "kind": "smtp",
      "name": "Sovaria email",
      "vendor": "Email",
      "configured": true,
      "lastError": null,
      "flows": [
        {
          "id": "password_reset",
          "label": "Password reset"
        }
      ],
      "outcomes": [
        "ok",
        "slow",
        "down",
        "limit",
        "creds",
        "ours"
      ]
    }
  ],
  "settingsReview": []
}

sovaria.api.simulation.inventory

Everything the project has, read from every engine: tables in every schema it created, collections, buckets, secrets (names only), functions with their schedules, queues, workflows and triggers, sign-in providers, hooks, webhooks, channels, edge limits, backups, environments, domains, policies and plan headroom.

sovaria.api.simulation.inventory(
  args?: { include?: JsonValue; fresh?: JsonValue } = {},
): Promise<JsonValue>

Cached a minute; redacted by the caller's permissions. GET /api/v1/sim/inventory

Parameters

args{ include?: JsonValue; fresh?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.simulation.checks

The checks catalogue: what is wrong or at risk (database, functions, storage, sign-in, edge, plan headroom, settings above the plan, realtime, backups, integrations, design), worst first, each with a fix.

sovaria.api.simulation.checks(
  args?: { severity?: JsonValue; area?: JsonValue; fresh?: JsonValue } = {},
): Promise<JsonValue>

severity keeps that level and worse. GET /api/v1/sim/checks

Parameters

args{ severity?: JsonValue; area?: JsonValue; fresh?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.simulation.graph

The architecture map: nodes by layer (clients, edge, identity, policies, services and data, async, external, resilience) with their status from the checks and the latest run, and the edges between them.

sovaria.api.simulation.graph(
  args?: { fresh?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/sim/graph

Parameters

args{ fresh?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.simulation.limits

Every limit the project lives under, with its value and how it is counted.

sovaria.api.simulation.limits(): Promise<JsonValue>

GET /api/v1/sim/limits

Returns

Promise<JsonValue>

{
  "limits": [
    {
      "label": "Sign-ins per 5 minutes",
      "setting": "signInsPer5Min",
      "value": 30,
      "unit": "per 5 min",
      "keyed_by": "ip",
      "method": "fixed window",
      "kind": "rate"
    }
  ]
}

sovaria.api.simulation.integrationRun

Run one integration flow under a programmed outcome: modelled (free, nothing sent) or sealed (real code path, recorded, one single-request check).

sovaria.api.simulation.integrationRun(
  args: { connectorId: JsonValue; flowId: JsonValue; outcome?: JsonValue; mode?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sim/integrations/run

Parameters

args{ connectorId: JsonValue; flowId: JsonValue; outcome?: JsonValue; mode?: JsonValue }required

Returns

Promise<JsonValue>

{
  "connector_id": "smtp",
  "flow_id": "password_reset",
  "outcome": "creds",
  "mode": "modelled",
  "steps": [
    {
      "lane": "app",
      "text": "A user signs up / asks for a link",
      "tone": "on"
    },
    {
      "lane": "sovaria",
      "text": "Sovaria renders your email template and hands it to the sender",
      "tone": "on"
    },
    {
      "lane": "dummy",
      "text": "Email sender (dummy): Refuses the username or password",
      "tone": "bad"
    },
    {
      "lane": "sovaria",
      "text": "Reports 'check your SMTP settings'",
      "tone": "bad"
    }
  ],
  "user_sees": "No email at all until the SMTP password is fixed.",
  "verdict": "bad",
  "lesson_key": "sim.integrations.smtp.creds",
  "artifact": {
    "id": "",
    "kind": "smtp",
    "target_host": "Email",
    "outcome": "creds",
    "created_at": "",
    "preview": {
      "note": "Modelled from your settings: nothing was built or sent."
    }
  }
}

sovaria.api.simulation.drillsRun

Judge the 14 security drills from the project's configuration (optionally with a what-if draft that is never saved).

sovaria.api.simulation.drillsRun(
  args?: { drillIds?: JsonValue; overrides?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/sim/drills/run

Parameters

args{ drillIds?: JsonValue; overrides?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "results": [
    {
      "id": "stuff",
      "group": "Accounts",
      "name": "Credential stuffing from a botnet",
      "verdict": "exposed",
      "stopped_at": null,
      "why": "A botnet trying leaked passwords stays under the per-IP limits; nothing else stops it.",
      "fix": {
        "setting_path": "authConfig.attack.leakedPasswordCheck",
        "label": "Turn on the leaked-password check or CAPTCHA",
        "console_link": "auth/attack-protection"
      }
    }
  ],
  "score": 71,
  "real_score": 71,
  "shield": false,
  "overrides_applied": {},
  "mode": "modelled"
}

sovaria.api.simulation.runArtifacts

What a run's sealed send points would have sent (secrets masked; message bodies need settings.manage).

sovaria.api.simulation.runArtifacts(
  args: { runId: string },
): Promise<JsonValue>

GET /api/v1/sim/runs/{run_id}/artifacts

Parameters

args{ runId: string }required

Returns

Promise<JsonValue>

{
  "run_id": "7c1d…",
  "artifacts": [
    {
      "id": "9f2e1c0a…",
      "run_id": "7c1d…",
      "kind": "smtp",
      "target_host": "email.amazonaws.com",
      "outcome": "ok",
      "persona": "__guest__",
      "preview": {
        "to": "a***@example.com",
        "subject": "Confirm your email",
        "body": "(hidden: needs Project settings)"
      },
      "created_at": 1792531200
    }
  ]
}

sovaria.api.simulation.snapshot

A project snapshot for offline simulation (sov simulate offline): tables, row policies, functions, every case with the rules' verdict.

sovaria.api.simulation.snapshot(
  args?: { includeRows?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/sim/snapshot

Parameters

args{ includeRows?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

#sovaria.api.sovariq

sovaria.api.sovariq.orgWebSettings

Org web settings.

sovaria.api.sovariq.orgWebSettings(): Promise<JsonValue>

GET /api/v1/sovariq/web

Returns

Promise<JsonValue>

sovaria.api.sovariq.setOrgWebSettings

Set org web settings.

sovaria.api.sovariq.setOrgWebSettings(
  args?: { apiKey?: JsonValue; enabled?: JsonValue; provider?: JsonValue; removeKey?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/sovariq/web

Parameters

args{ apiKey?: JsonValue; enabled?: JsonValue; provider?: JsonValue; removeKey?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.sovariq.status

Status.

sovaria.api.sovariq.status(): Promise<JsonValue>

GET /api/v1/sovariq/status

Returns

Promise<JsonValue>

sovaria.api.sovariq.templateBackend

Template backend.

sovaria.api.sovariq.templateBackend(
  args: { templateId: string; confirmExistingRoles?: JsonValue; dryRun?: JsonValue; only?: JsonValue; removeSampleData?: JsonValue; sampleData?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/templates/{template_id}/backend

Parameters

args{ templateId: string; confirmExistingRoles?: JsonValue; dryRun?: JsonValue; only?: JsonValue; removeSampleData?: JsonValue; sampleData?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.listTools

List tools.

sovaria.api.sovariq.listTools(): Promise<JsonValue>

GET /api/v1/sovariq/tools

Returns

Promise<JsonValue>

sovaria.api.sovariq.listSkills

List skills.

sovaria.api.sovariq.listSkills(): Promise<JsonValue>

GET /api/v1/sovariq/skills

Returns

Promise<JsonValue>

sovaria.api.sovariq.listConversations

List conversations.

sovaria.api.sovariq.listConversations(
  args?: { limit?: JsonValue; offset?: JsonValue; q?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/sovariq/conversations

Parameters

args{ limit?: JsonValue; offset?: JsonValue; q?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.sovariq.createConversation

Create conversation.

sovaria.api.sovariq.createConversation(
  args: { approvalPolicy?: JsonValue; autoApprove?: JsonValue; browser?: JsonValue; builderFrontendId?: JsonValue; client?: JsonValue; deep?: JsonValue; editLast?: JsonValue; effort?: JsonValue; images?: JsonValue; kind?: JsonValue; learn?: JsonValue; message: JsonValue; mode?: JsonValue; model?: JsonValue; page?: JsonValue; plan?: JsonValue; screen?: JsonValue; tab?: JsonValue; visual?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/conversations

Parameters

args{ approvalPolicy?: JsonValue; autoApprove?: JsonValue; browser?: JsonValue; builderFrontendId?: JsonValue; client?: JsonValue; deep?: JsonValue; editLast?: JsonValue; effort?: JsonValue; images?: JsonValue; kind?: JsonValue; learn?: JsonValue; message: JsonValue; mode?: JsonValue; model?: JsonValue; page?: JsonValue; plan?: JsonValue; screen?: JsonValue; tab?: JsonValue; visual?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.sendMessage

Send message.

sovaria.api.sovariq.sendMessage(
  args: { conversationId: string; approvalPolicy?: JsonValue; autoApprove?: JsonValue; browser?: JsonValue; builderFrontendId?: JsonValue; client?: JsonValue; deep?: JsonValue; editLast?: JsonValue; effort?: JsonValue; images?: JsonValue; kind?: JsonValue; learn?: JsonValue; message: JsonValue; mode?: JsonValue; model?: JsonValue; page?: JsonValue; plan?: JsonValue; screen?: JsonValue; tab?: JsonValue; visual?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/conversations/{conversation_id}/messages

Parameters

args{ conversationId: string; approvalPolicy?: JsonValue; autoApprove?: JsonValue; browser?: JsonValue; builderFrontendId?: JsonValue; client?: JsonValue; deep?: JsonValue; editLast?: JsonValue; effort?: JsonValue; images?: JsonValue; kind?: JsonValue; learn?: JsonValue; message: JsonValue; mode?: JsonValue; model?: JsonValue; page?: JsonValue; plan?: JsonValue; screen?: JsonValue; tab?: JsonValue; visual?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.conversationImage

Conversation image.

sovaria.api.sovariq.conversationImage(
  args: { conversationId: string; imageId: string },
): Promise<JsonValue>

GET /api/v1/sovariq/conversations/{conversation_id}/images/{image_id}

Parameters

args{ conversationId: string; imageId: string }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.claimClientCall

Claim client call.

sovaria.api.sovariq.claimClientCall(
  args: { conversationId: string; toolUseId: string; nonce: JsonValue; tab: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/conversations/{conversation_id}/client-calls/{tool_use_id}/claim

Parameters

args{ conversationId: string; toolUseId: string; nonce: JsonValue; tab: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.clientResult

Client result.

sovaria.api.sovariq.clientResult(
  args: { conversationId: string; content?: JsonValue; nonce: JsonValue; ok: JsonValue; report?: JsonValue; tab?: JsonValue; toolUseId: JsonValue; url?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/conversations/{conversation_id}/client-results

Parameters

args{ conversationId: string; content?: JsonValue; nonce: JsonValue; ok: JsonValue; report?: JsonValue; tab?: JsonValue; toolUseId: JsonValue; url?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.conversationTasks

Conversation tasks.

sovaria.api.sovariq.conversationTasks(
  args: { conversationId: string },
): Promise<JsonValue>

GET /api/v1/sovariq/conversations/{conversation_id}/tasks

Parameters

args{ conversationId: string }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.buildJournal

Build journal.

sovaria.api.sovariq.buildJournal(
  args: { conversationId: string; limit?: JsonValue },
): Promise<JsonValue>

GET /api/v1/sovariq/conversations/{conversation_id}/journal

Parameters

args{ conversationId: string; limit?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.continueBuild

Continue build.

sovaria.api.sovariq.continueBuild(
  args: { conversationId: string; body: JsonObject },
): Promise<JsonValue>

POST /api/v1/sovariq/conversations/{conversation_id}/continue

Parameters

args{ conversationId: string; body: JsonObject }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.regenerate

Regenerate.

sovaria.api.sovariq.regenerate(
  args: { conversationId: string },
): Promise<JsonValue>

POST /api/v1/sovariq/conversations/{conversation_id}/retry

Parameters

args{ conversationId: string }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.listServers

List servers.

sovaria.api.sovariq.listServers(): Promise<JsonValue>

GET /api/v1/sovariq/mcp-servers

Returns

Promise<JsonValue>

sovaria.api.sovariq.addServer

Add server.

sovaria.api.sovariq.addServer(
  args: { authHeaderName?: JsonValue; authHeaderValue?: JsonValue; authKind?: JsonValue; name: JsonValue; oauthClientId?: JsonValue; oauthClientSecret?: JsonValue; transport?: JsonValue; url?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/mcp-servers

Parameters

args{ authHeaderName?: JsonValue; authHeaderValue?: JsonValue; authKind?: JsonValue; name: JsonValue; oauthClientId?: JsonValue; oauthClientSecret?: JsonValue; transport?: JsonValue; url?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.testServer

Test server.

sovaria.api.sovariq.testServer(
  args: { serverId: string },
): Promise<JsonValue>

POST /api/v1/sovariq/mcp-servers/{server_id}/test

Parameters

args{ serverId: string }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.startServerOauth

Start server oauth.

sovaria.api.sovariq.startServerOauth(
  args: { serverId: string; oauthClientId?: JsonValue; oauthClientSecret?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/mcp-servers/{server_id}/oauth/start

Parameters

args{ serverId: string; oauthClientId?: JsonValue; oauthClientSecret?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.finishServerOauth

Finish server oauth.

sovaria.api.sovariq.finishServerOauth(
  args: { code?: JsonValue; error?: JsonValue; errorDescription?: JsonValue; iss?: JsonValue; state: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/mcp-servers/oauth/callback

Parameters

args{ code?: JsonValue; error?: JsonValue; errorDescription?: JsonValue; iss?: JsonValue; state: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.toggleServer

Toggle server.

sovaria.api.sovariq.toggleServer(
  args: { serverId: string; enabled: JsonValue },
): Promise<JsonValue>

PATCH /api/v1/sovariq/mcp-servers/{server_id}

Parameters

args{ serverId: string; enabled: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.removeServer

Remove server.

sovaria.api.sovariq.removeServer(
  args: { serverId: string },
): Promise<JsonValue>

DELETE /api/v1/sovariq/mcp-servers/{server_id}

Parameters

args{ serverId: string }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.listProviders

List providers.

sovaria.api.sovariq.listProviders(): Promise<JsonValue>

GET /api/v1/sovariq/providers

Returns

Promise<JsonValue>

sovaria.api.sovariq.putProvider

Put provider.

sovaria.api.sovariq.putProvider(
  args: { providerId: string; apiKey?: JsonValue; baseUrl?: JsonValue; models?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/sovariq/providers/{provider_id}

Parameters

args{ providerId: string; apiKey?: JsonValue; baseUrl?: JsonValue; models?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.providerModels

Provider models.

sovaria.api.sovariq.providerModels(
  args: { providerId: string },
): Promise<JsonValue>

POST /api/v1/sovariq/providers/{provider_id}/models

Parameters

args{ providerId: string }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.deleteProvider

Delete provider.

sovaria.api.sovariq.deleteProvider(
  args: { providerId: string },
): Promise<JsonValue>

DELETE /api/v1/sovariq/providers/{provider_id}

Parameters

args{ providerId: string }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.testProvider

Test provider.

sovaria.api.sovariq.testProvider(
  args?: { model?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/sovariq/provider/test

Parameters

args{ model?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.sovariq.getSites

Get sites.

sovaria.api.sovariq.getSites(): Promise<JsonValue>

GET /api/v1/sovariq/sites

Returns

Promise<JsonValue>

sovaria.api.sovariq.putSites

Put sites.

sovaria.api.sovariq.putSites(
  args?: { allowed?: JsonValue; unblock?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/sovariq/sites

Parameters

args{ allowed?: JsonValue; unblock?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.sovariq.getBrief

Get brief.

sovaria.api.sovariq.getBrief(): Promise<JsonValue>

GET /api/v1/sovariq/brief

Returns

Promise<JsonValue>

sovaria.api.sovariq.putBrief

Put brief.

sovaria.api.sovariq.putBrief(
  args?: { brief?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/sovariq/brief

Parameters

args{ brief?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.sovariq.getRules

Get rules.

sovaria.api.sovariq.getRules(): Promise<JsonValue>

GET /api/v1/sovariq/rules

Returns

Promise<JsonValue>

sovaria.api.sovariq.putRules

Put rules.

sovaria.api.sovariq.putRules(
  args?: { rules?: JsonValue } = {},
): Promise<JsonValue>

PUT /api/v1/sovariq/rules

Parameters

args{ rules?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.sovariq.listMemory

List memory.

sovaria.api.sovariq.listMemory(): Promise<JsonValue>

GET /api/v1/sovariq/memory

Returns

Promise<JsonValue>

sovaria.api.sovariq.deleteMemory

Delete memory.

sovaria.api.sovariq.deleteMemory(
  args: { memoryId: string },
): Promise<JsonValue>

DELETE /api/v1/sovariq/memory/{memory_id}

Parameters

args{ memoryId: string }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.listIntegrations

List integrations.

sovaria.api.sovariq.listIntegrations(): Promise<JsonValue>

GET /api/v1/sovariq/integrations

Returns

Promise<JsonValue>

sovaria.api.sovariq.agentProviderModels

Agent provider models.

sovaria.api.sovariq.agentProviderModels(
  args: { agentId?: JsonValue; apiKey?: JsonValue; baseUrl?: JsonValue; provider: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/agents/provider-models

Parameters

args{ agentId?: JsonValue; apiKey?: JsonValue; baseUrl?: JsonValue; provider: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.draftAgentTool

Draft agent tool.

sovaria.api.sovariq.draftAgentTool(
  args: { function?: JsonValue; goal?: JsonValue; kind: JsonValue; method?: JsonValue; sql?: JsonValue; url?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/agents/draft-tool

Parameters

args{ function?: JsonValue; goal?: JsonValue; kind: JsonValue; method?: JsonValue; sql?: JsonValue; url?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.listSqlSnippets

List sql snippets.

sovaria.api.sovariq.listSqlSnippets(): Promise<JsonValue>

GET /api/v1/sovariq/workspace/sql-snippets

Returns

Promise<JsonValue>

sovaria.api.sovariq.createSqlSnippet

Create sql snippet.

sovaria.api.sovariq.createSqlSnippet(
  args?: { folder?: JsonValue; name?: JsonValue; sql?: JsonValue; visibility?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/sovariq/workspace/sql-snippets

Parameters

args{ folder?: JsonValue; name?: JsonValue; sql?: JsonValue; visibility?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.sovariq.updateSqlSnippet

Update sql snippet.

sovaria.api.sovariq.updateSqlSnippet(
  args: { snippetId: string; folder?: JsonValue; name?: JsonValue; sql?: JsonValue; visibility?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/sovariq/workspace/sql-snippets/{snippet_id}

Parameters

args{ snippetId: string; folder?: JsonValue; name?: JsonValue; sql?: JsonValue; visibility?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.deleteSqlSnippet

Delete sql snippet.

sovaria.api.sovariq.deleteSqlSnippet(
  args: { snippetId: string },
): Promise<JsonValue>

DELETE /api/v1/sovariq/workspace/sql-snippets/{snippet_id}

Parameters

args{ snippetId: string }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.favoriteSqlSnippet

Favorite sql snippet.

sovaria.api.sovariq.favoriteSqlSnippet(
  args: { snippetId: string; on?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/workspace/sql-snippets/{snippet_id}/favorite

Parameters

args{ snippetId: string; on?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.ranSqlSnippet

Ran sql snippet.

sovaria.api.sovariq.ranSqlSnippet(
  args: { snippetId: string },
): Promise<JsonValue>

POST /api/v1/sovariq/workspace/sql-snippets/{snippet_id}/ran

Parameters

args{ snippetId: string }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.listArtifacts

List artifacts.

sovaria.api.sovariq.listArtifacts(
  args?: { conversationId?: JsonValue; language?: JsonValue; limit?: JsonValue; type?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/sovariq/artifacts

Parameters

args{ conversationId?: JsonValue; language?: JsonValue; limit?: JsonValue; type?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

sovaria.api.sovariq.createArtifact

Create artifact.

sovaria.api.sovariq.createArtifact(
  args: { content: JsonValue; conversationId: JsonValue; language?: JsonValue; title: JsonValue; type: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/artifacts

Parameters

args{ content: JsonValue; conversationId: JsonValue; language?: JsonValue; title: JsonValue; type: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.getArtifact

Get artifact.

sovaria.api.sovariq.getArtifact(
  args: { artifactId: string; version?: JsonValue },
): Promise<JsonValue>

GET /api/v1/sovariq/artifacts/{artifact_id}

Parameters

args{ artifactId: string; version?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.artifactVersions

Artifact versions.

sovaria.api.sovariq.artifactVersions(
  args: { artifactId: string },
): Promise<JsonValue>

GET /api/v1/sovariq/artifacts/{artifact_id}/versions

Parameters

args{ artifactId: string }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.saveArtifact

Save artifact.

sovaria.api.sovariq.saveArtifact(
  args: { artifactId: string; baseVersion?: JsonValue; content: JsonValue; message?: JsonValue; title?: JsonValue },
): Promise<JsonValue>

PUT /api/v1/sovariq/artifacts/{artifact_id}

Parameters

args{ artifactId: string; baseVersion?: JsonValue; content: JsonValue; message?: JsonValue; title?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.patchArtifact

Patch artifact.

sovaria.api.sovariq.patchArtifact(
  args: { artifactId: string; baseVersion?: JsonValue; edits: JsonValue; message?: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/artifacts/{artifact_id}/patch

Parameters

args{ artifactId: string; baseVersion?: JsonValue; edits: JsonValue; message?: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.restoreArtifact

Restore artifact.

sovaria.api.sovariq.restoreArtifact(
  args: { artifactId: string; version: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/artifacts/{artifact_id}/restore

Parameters

args{ artifactId: string; version: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.deleteArtifact

Delete artifact.

sovaria.api.sovariq.deleteArtifact(
  args: { artifactId: string },
): Promise<JsonValue>

DELETE /api/v1/sovariq/artifacts/{artifact_id}

Parameters

args{ artifactId: string }required

Returns

Promise<JsonValue>

sovaria.api.sovariq.transcribeAudio

Voice typing: base64 audio in, the words heard out (the project's own OpenAI or Groq key).

sovaria.api.sovariq.transcribeAudio(
  args: { audio: JsonValue; language?: JsonValue; mime: JsonValue },
): Promise<JsonValue>

POST /api/v1/sovariq/transcribe

Parameters

args{ audio: JsonValue; language?: JsonValue; mime: JsonValue }required

Returns

Promise<JsonValue>

#sovaria.api.storage

sovaria.api.storage.createBucket

POST /api/v1/store/buckets

sovaria.api.storage.createBucket(
  args: { body: JsonObject },
): Promise<JsonValue>

Parameters

args{ body: JsonObject }required

Returns

Promise<JsonValue>

{
  "id": "1d0b7c52-5a0e-4c3a-8f7e-2b6d9a1c4e33",
  "name": "avatars",
  "public": false,
  "file_size_limit": 5242880,
  "allowed_mime_types": [
    "image/*"
  ],
  "created_at": "2026-10-02T09:14:07Z",
  "updated_at": "2026-10-02T09:14:07Z"
}

sovaria.api.storage.deleteBucket

DELETE /api/v1/store/buckets/{name}

sovaria.api.storage.deleteBucket(
  args: { name: string },
): Promise<JsonValue>

Parameters

args{ name: string }required

Returns

Promise<JsonValue>

{
  "status": "deleted",
  "bucket": "avatars"
}

sovaria.api.storage.getBucket

GET /api/v1/store/buckets/{name}

sovaria.api.storage.getBucket(
  args: { name: string },
): Promise<JsonValue>

Parameters

args{ name: string }required

Returns

Promise<JsonValue>

{
  "id": "1d0b7c52-5a0e-4c3a-8f7e-2b6d9a1c4e33",
  "name": "avatars",
  "public": false,
  "file_size_limit": 5242880,
  "allowed_mime_types": [
    "image/*"
  ],
  "created_at": "2026-10-02T09:14:07Z",
  "updated_at": "2026-10-02T09:14:07Z",
  "object_count": 3120,
  "size_bytes": 182934211
}

sovaria.api.storage.listBuckets

GET /api/v1/store/buckets

sovaria.api.storage.listBuckets(): Promise<JsonValue>

Returns

Promise<JsonValue>

[
  {
    "id": "1d0b7c52-5a0e-4c3a-8f7e-2b6d9a1c4e33",
    "name": "avatars",
    "public": false,
    "file_size_limit": 5242880,
    "allowed_mime_types": [
      "image/*"
    ],
    "created_at": "2026-10-02T09:14:07Z",
    "updated_at": "2026-10-02T09:14:07Z",
    "size_bytes": 182934211,
    "object_count": 3120
  }
]

sovaria.api.storage.moveObject

POST /api/v1/store/objects/move

sovaria.api.storage.moveObject(
  args: { fromPath: JsonValue; toPath: JsonValue },
): Promise<JsonValue>

Parameters

args{ fromPath: JsonValue; toPath: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "moved",
  "from": "avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/old.png",
  "to": "avatars/6e19c0a2-3f5b-4a8e-9b1d-0c7f2e8a4d51/new.png"
}

sovaria.api.storage.updateBucket

PATCH /api/v1/store/buckets/{name}

sovaria.api.storage.updateBucket(
  args: { name: string; body: JsonObject },
): Promise<JsonValue>

Parameters

args{ name: string; body: JsonObject }required

Returns

Promise<JsonValue>

{
  "id": "1d0b7c52-5a0e-4c3a-8f7e-2b6d9a1c4e33",
  "name": "avatars",
  "public": true,
  "file_size_limit": 5242880,
  "allowed_mime_types": [
    "image/*"
  ],
  "created_at": "2026-10-02T09:14:07Z",
  "updated_at": "2026-10-17T13:20:00Z"
}

#sovaria.api.support

sovaria.api.support.createSupportRequest

Create support request.

sovaria.api.support.createSupportRequest(
  args: { category?: JsonValue; email: JsonValue; message: JsonValue; name: JsonValue; orgId?: JsonValue; source?: JsonValue; subject: JsonValue; userId?: JsonValue },
): Promise<JsonValue>

POST /api/v1/support-requests

Parameters

args{ category?: JsonValue; email: JsonValue; message: JsonValue; name: JsonValue; orgId?: JsonValue; source?: JsonValue; subject: JsonValue; userId?: JsonValue }required

Returns

Promise<JsonValue>

{
  "id": 812,
  "source": "web",
  "category": "technical",
  "name": "Ana Lima",
  "email": "ana@skolist.com",
  "subject": "Restoring a backup",
  "message": "Our restore has been running…",
  "org_id": "b2f4a1c8-7d3e-4f0a-9c6b-5e8d2a1f3c90",
  "user_id": null,
  "status": "open",
  "created_at": "2026-10-18T12:10:00+00:00",
  "updated_at": "2026-10-18T12:10:00+00:00",
  "assigned_to": null,
  "operator_notes": null
}

sovaria.api.support.listSupportRequests

List support requests.

sovaria.api.support.listSupportRequests(
  args?: { limit?: JsonValue; offset?: JsonValue; status?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/support-requests

Parameters

args{ limit?: JsonValue; offset?: JsonValue; status?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

HTTP
GET /api/v1/support-requests

sovaria.api.support.updateSupportRequest

Update support request.

sovaria.api.support.updateSupportRequest(
  args: { requestId: string; assignedTo?: JsonValue; operatorNotes?: JsonValue; status?: JsonValue },
): Promise<JsonValue>

PATCH /api/v1/support-requests/{request_id}

Parameters

args{ requestId: string; assignedTo?: JsonValue; operatorNotes?: JsonValue; status?: JsonValue }required

Returns

Promise<JsonValue>

HTTP
PATCH /api/v1/support-requests/{…}

sovaria.api.support.requestInfrastructure

Request infrastructure.

sovaria.api.support.requestInfrastructure(
  args: { notes?: JsonValue; region?: JsonValue; type: JsonValue },
): Promise<JsonValue>

POST /api/v1/infrastructure-requests

Parameters

args{ notes?: JsonValue; region?: JsonValue; type: JsonValue }required

Returns

Promise<JsonValue>

sovaria.api.support.listInfrastructureRequests

List infrastructure requests.

sovaria.api.support.listInfrastructureRequests(): Promise<JsonValue>

GET /api/v1/infrastructure-requests

Returns

Promise<JsonValue>

#sovaria.api.templates

sovaria.api.templates.list

App templates (SaaS, marketplace, chat): what each creates, the tables it adds and its steps.

sovaria.api.templates.list(): Promise<JsonValue>

Project team only. GET /api/v1/templates

Returns

Promise<JsonValue>

{
  "templates": [
    {
      "name": "saas",
      "title": "SaaS starter",
      "description": "Organizations with members and roles, invitation links, and per-organization projects — every row visible only to members of its organization.",
      "tags": [
        "b2b",
        "multi-tenant",
        "teams"
      ],
      "creates": [
        "Tables organizations, memberships (owner / admin / member), invitations, projects",
        "…"
      ],
      "tables": [
        "organizations",
        "memberships",
        "invitations",
        "projects"
      ],
      "steps": [
        {
          "type": "migration",
          "name": "template saas: organizations, members, invitations, projects"
        },
        {
          "type": "function_rules",
          "functions": [
            "accept_invitation"
          ]
        }
      ],
      "app": "SaaS starter (React + Vite)"
    }
  ]
}

sovaria.api.templates.get

One app template, including the SQL its migration runs.

sovaria.api.templates.get(args: { name: string }): Promise<JsonValue>

GET /api/v1/templates/{name}

Parameters

args{ name: string }required

Returns

Promise<JsonValue>

sovaria.api.templates.apply

Apply a template to the project: its migration (tables + row-level security), buckets and their rules, realtime — each step with your own permissions, stopping at the first refusal.

sovaria.api.templates.apply(
  args: { orgId?: string; projectId?: string; name: string; dryRun?: JsonValue },
): Promise<JsonValue>

dry_run checks for tables that already exist and changes nothing. Needs database.admin. POST /api/v1/governance/tenants/{org_id}/projects/{project_id}/templates/{name}/apply

Parameters

args{ orgId?: string; projectId?: string; name: string; dryRun?: JsonValue }required

Returns

Promise<JsonValue>

{
  "template": "saas",
  "dry_run": true,
  "ok": true,
  "conflicts": [],
  "steps": [
    {
      "type": "migration",
      "what": "template saas: organizations, members, invitations, projects",
      "status": "would apply"
    },
    {
      "type": "function_rules",
      "what": "accept_invitation()",
      "status": "would apply"
    }
  ]
}

#sovaria.api.traces

sovaria.api.traces.list

The project's recent refused (4xx) and failed (5xx) requests, each with who refused it, why and what to do (kind: denied, failed or all).

sovaria.api.traces.list(
  args?: { kind?: JsonValue; before?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

Project team only. GET /api/v1/request-traces

Parameters

args{ kind?: JsonValue; before?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "traces": [
    {
      "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
      "occurred_at": "2026-10-18T10:40:00.412+00:00",
      "method": "GET",
      "path": "/rest/v1/orders",
      "final_status": 403,
      "duration_ms": 12,
      "actor_id": null,
      "env_id": "",
      "explanation": {
        "verdict": "denied",
        "by": "policy",
        "service": "gateway",
        "step": "policy",
        "status": 403,
        "reason": "No access policy allows sql:select on orders for visitors who aren't signed in.",
        "detail": "NO_POLICY_DEFINED",
        "hint": "Add a policy for orders, or sign the user in first."
      }
    }
  ],
  "days": 7
}

sovaria.api.traces.get

One request by its trace id (SovariaError.traceId, the X-Request-ID header): every hop — gateway checks, engine, SQL — and the explanation.

sovaria.api.traces.get(args: { traceId: string }): Promise<JsonValue>

GET /api/v1/request-traces/{trace_id}

Parameters

args{ traceId: string }required

Returns

Promise<JsonValue>

{
  "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
  "occurred_at": "2026-10-18T10:40:00.412+00:00",
  "method": "GET",
  "path": "/rest/v1/orders",
  "final_status": 403,
  "duration_ms": 12,
  "actor_id": null,
  "env_id": "",
  "explanation": {
    "verdict": "denied",
    "by": "policy",
    "service": "gateway",
    "step": "policy",
    "status": 403,
    "reason": "No access policy allows sql:select on orders for visitors who aren't signed in.",
    "detail": "NO_POLICY_DEFINED",
    "hint": "Add a policy for orders, or sign the user in first."
  },
  "hops": [
    {
      "seq": 1,
      "service": "gateway",
      "hop_kind": "gateway_denied",
      "status_code": 403,
      "error_class": "PolicyDenied",
      "error_detail": "NO_POLICY_DEFINED",
      "duration_ms": 6,
      "at": "2026-10-18T10:40:00.420+00:00"
    }
  ]
}

#sovaria.api.triggers

sovaria.api.triggers.list

Event triggers of the project's environment with the plan's trigger limits and the event sources.

sovaria.api.triggers.list(
  args?: { functionName?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/fn/triggers

Parameters

args{ functionName?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "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"
    ]
  }
}

sovaria.api.triggers.create

Run a function when something happens: source db.document | db.row | auth.user | storage.object | realtime.message, event_types, resource (glob), subject_prefix, max_attempts.

sovaria.api.triggers.create(
  args: { functionName: JsonValue; source: JsonValue; eventTypes?: JsonValue; resource?: JsonValue; subjectPrefix?: JsonValue; name?: JsonValue; enabled?: JsonValue; maxAttempts?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/triggers

Parameters

args{ functionName: JsonValue; source: JsonValue; eventTypes?: JsonValue; resource?: JsonValue; subjectPrefix?: JsonValue; name?: JsonValue; enabled?: JsonValue; maxAttempts?: JsonValue }required

Returns

Promise<JsonValue>

{
  "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
}

sovaria.api.triggers.get

One event trigger.

sovaria.api.triggers.get(
  args: { triggerId: string },
): Promise<JsonValue>

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

Parameters

args{ triggerId: string }required

Returns

Promise<JsonValue>

{
  "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
}

sovaria.api.triggers.update

Change an event trigger (only the fields sent change).

sovaria.api.triggers.update(
  args: { triggerId: string; changes: JsonObject },
): Promise<JsonValue>

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

Parameters

args{ triggerId: string; changes: JsonObject }required

Returns

Promise<JsonValue>

{
  "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
}

sovaria.api.triggers.delete

Delete an event trigger.

sovaria.api.triggers.delete(
  args: { triggerId: string },
): Promise<JsonValue>

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

Parameters

args{ triggerId: string }required

Returns

Promise<JsonValue>

{
  "deleted": true,
  "trigger_id": "4c1f9e2b7a0d4e8f9b6c3a2d1e0f5b7c"
}

sovaria.api.triggers.test

Queue one run with a sample event (counts as an invocation).

sovaria.api.triggers.test(
  args: { triggerId: string },
): Promise<JsonValue>

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

Parameters

args{ triggerId: string }required

Returns

Promise<JsonValue>

{
  "queued": true,
  "invocation_id": "0b7c2e91d4a64f0f9a3e5c1d2b8f7a60",
  "event": {
    "event_id": "evt_test_…",
    "source": "db.row",
    "type": "row.updated",
    "resource": "orders",
    "subject": "orders",
    "occurred_at": 1792263000.512
  }
}

#sovaria.api.vector

sovaria.api.vector.deleteCollection

Delete an entire vector collection.

sovaria.api.vector.deleteCollection(
  args: { collection: string },
): Promise<JsonValue>

DELETE /api/v1/collections/{collection}

Parameters

args{ collection: string }required

Returns

Promise<JsonValue>

sovaria.api.vector.deleteRecord

Delete a record from a vector collection.

sovaria.api.vector.deleteRecord(
  args: { collection: string; recordId: string },
): Promise<JsonValue>

DELETE /api/v1/collections/{collection}/records/{record_id}

Parameters

args{ collection: string; recordId: string }required

Returns

Promise<JsonValue>

sovaria.api.vector.embed

Generate embeddings for one or more texts.

sovaria.api.vector.embed(args: { texts: JsonValue }): Promise<JsonValue>

POST /api/v1/embed

Parameters

args{ texts: JsonValue }required

Returns

Promise<JsonValue>

{
  "vectors": [
    [
      0.012,
      -0.044,
      "…"
    ],
    [
      0.031,
      0.007,
      "…"
    ]
  ],
  "dim": 1536,
  "count": 2,
  "model": "openai/text-embedding-3-small@1536"
}

sovaria.api.vector.listCollections

List vector collections in the current project scope.

sovaria.api.vector.listCollections(): Promise<JsonValue>

GET /api/v1/collections

Returns

Promise<JsonValue>

{
  "collections": [
    {
      "name": "help-articles",
      "dim": 1536,
      "size": 2,
      "model": "openai/text-embedding-3-small@1536",
      "app_search": false
    }
  ],
  "model": "openai/text-embedding-3-small@1536",
  "semantic": true
}

sovaria.api.vector.upsert

Embed and upsert documents into a vector collection.

sovaria.api.vector.upsert(
  args: { collection: JsonValue; docs: JsonValue },
): Promise<JsonValue>

POST /api/v1/vectors/upsert

Parameters

args{ collection: JsonValue; docs: JsonValue }required

Returns

Promise<JsonValue>

{
  "inserted": 2,
  "updated": 0,
  "dim": 1536,
  "size": 2
}

sovaria.api.vector.setCollection

Collection settings.

sovaria.api.vector.setCollection(
  args: { collection: string; appSearch?: JsonValue },
): Promise<JsonValue>

app_search: true lets the project's apps (anon key, signed-in users) search it; they can never write or list it. PATCH /api/v1/collections/{collection}

Parameters

args{ collection: string; appSearch?: JsonValue }required

Returns

Promise<JsonValue>

{
  "collection": "help-articles",
  "settings": {
    "app_search": true
  }
}

sovaria.api.vector.reembedCollection

Embed every stored text again with the project's current model (large collections need this after a model change).

sovaria.api.vector.reembedCollection(
  args: { collection: string; force?: JsonValue },
): Promise<JsonValue>

Always covers the whole collection; force is accepted for compatibility and changes nothing. POST /api/v1/collections/{collection}/reembed

Parameters

args{ collection: string; force?: JsonValue }required

Returns

Promise<JsonValue>

{
  "collection": "help-articles",
  "records": 2,
  "model": "openai/text-embedding-3-small@1536"
}

sovaria.api.vector.sqlSearch

Search a SQL table: mode vector (nearest embeddings), keyword (full text) or hybrid (both, reciprocal rank fusion).

sovaria.api.vector.sqlSearch(
  args: { tableName: JsonValue; columnName?: JsonValue; vector?: JsonValue; text?: JsonValue; mode?: JsonValue; textColumns?: JsonValue; language?: JsonValue; k?: JsonValue; metric?: JsonValue; select?: JsonValue; filter?: JsonValue; maxDistance?: JsonValue; metadataFilter?: JsonValue; metadataColumn?: JsonValue; filterIn?: JsonValue; efSearch?: JsonValue; probes?: JsonValue; rerank?: JsonValue; rerankCandidates?: JsonValue },
): Promise<JsonValue>

text is embedded with the project's model when no vector is given. ef_search / probes tune recall, rerank reorders with the managed reranker, filter_in matches any of several values. Only rows the caller may read. POST /api/v1/data/rel/vector/search

Parameters

args{ tableName: JsonValue; columnName?: JsonValue; vector?: JsonValue; text?: JsonValue; mode?: JsonValue; textColumns?: JsonValue; language?: JsonValue; k?: JsonValue; metric?: JsonValue; select?: JsonValue; filter?: JsonValue; maxDistance?: JsonValue; metadataFilter?: JsonValue; metadataColumn?: JsonValue; filterIn?: JsonValue; efSearch?: JsonValue; probes?: JsonValue; rerank?: JsonValue; rerankCandidates?: JsonValue }required

Returns

Promise<JsonValue>

{
  "table": "documents",
  "metric": "cosine",
  "k": 3,
  "mode": "hybrid",
  "results": [
    {
      "id": 12,
      "content": "How to reset your password",
      "distance": 0.182,
      "score": 0.0325,
      "vector_rank": 1,
      "keyword_rank": 1
    },
    {
      "id": 7,
      "content": "Signing in with a magic link",
      "distance": 0.247,
      "score": 0.0317,
      "vector_rank": 2,
      "keyword_rank": 3
    }
  ]
}

sovaria.api.vector.sqlAutoStatus

Tables whose vector column Sovaria keeps embedded, rows embedded and waiting, last error, and the project's model.

sovaria.api.vector.sqlAutoStatus(): Promise<JsonValue>

GET /api/v1/data/rel/vector/auto

Returns

Promise<JsonValue>

{
  "model": {
    "model": "openai/text-embedding-3-small@1536",
    "dim": 1536,
    "semantic": true
  },
  "tables": [
    {
      "table": "documents",
      "column": "embedding",
      "source_columns": [
        "title",
        "content"
      ],
      "model": "openai/text-embedding-3-small@1536",
      "embedded": 3120,
      "pending": 0,
      "synced_at": "2026-10-17T13:10:00Z",
      "last_error": null
    }
  ]
}

sovaria.api.vector.sqlAutoEnable

Keep a vector column (created if missing) filled with embeddings of the source columns; edited rows are embedded again automatically.

sovaria.api.vector.sqlAutoEnable(
  args: { tableName: JsonValue; columnName?: JsonValue; sourceColumns: JsonValue; rebuild?: JsonValue; language?: JsonValue },
): Promise<JsonValue>

rebuild re-embeds the whole table. language sets the keyword index's text search configuration (e.g. english). POST /api/v1/data/rel/vector/auto

Parameters

args{ tableName: JsonValue; columnName?: JsonValue; sourceColumns: JsonValue; rebuild?: JsonValue; language?: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "table": "documents",
  "column": "embedding",
  "source_columns": [
    "title",
    "content"
  ],
  "model": "openai/text-embedding-3-small@1536",
  "dimensions": 1536,
  "created_column": true,
  "background": true,
  "embedded": 128,
  "migration_version": "20261017131500",
  "reversible": true
}

sovaria.api.vector.sqlAutoDisable

Stop keeping a table's vectors up to date (the column and its vectors stay).

sovaria.api.vector.sqlAutoDisable(
  args: { tableName: string },
): Promise<JsonValue>

DELETE /api/v1/data/rel/vector/auto/{table_name}

Parameters

args{ tableName: string }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "table": "documents",
  "enabled": false,
  "migration_version": "20261017132000",
  "reversible": true
}

sovaria.api.vector.sqlAutoSync

Embed waiting rows now instead of on the next background pass (up to limit per table).

sovaria.api.vector.sqlAutoSync(
  args?: { tableName?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/data/rel/vector/auto/sync

Parameters

args{ tableName?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "tables": [
    {
      "table": "documents",
      "embedded": 64
    }
  ],
  "embedded": 64
}

sovaria.api.vector.sqlStatus

pgvector on the project database: available/enabled, vector columns, their indexes (method, metric, quantization, options, building/ready) and row estimates.

sovaria.api.vector.sqlStatus(): Promise<JsonValue>

Team only. GET /api/v1/data/rel/vector/status

Returns

Promise<JsonValue>

{
  "available": true,
  "enabled": true,
  "version": "0.8.0",
  "columns": [
    {
      "table": "documents",
      "column": "embedding",
      "dimensions": 1536
    }
  ]
}

sovaria.api.vector.sqlEnable

Turn pgvector on (or off with enabled: false) for the project database.

sovaria.api.vector.sqlEnable(
  args?: { enabled?: JsonValue } = {},
): Promise<JsonValue>

POST /api/v1/data/rel/vector/enable

Parameters

args{ enabled?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "available": true,
  "enabled": true,
  "version": "0.8.0",
  "columns": [
    {
      "table": "documents",
      "column": "embedding",
      "dimensions": 1536
    }
  ]
}

sovaria.api.vector.sqlCreateTable

Create a documents table (id, content, metadata, embedding vector(n), optional owner_id with owner-only row policies) with an HNSW index.

sovaria.api.vector.sqlCreateTable(
  args: { tableName: JsonValue; dimensions: JsonValue; ownerRows?: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/vector/tables

Parameters

args{ tableName: JsonValue; dimensions: JsonValue; ownerRows?: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "table": "documents",
  "dimensions": 1536,
  "owner_rows": true
}

sovaria.api.vector.sqlAddColumn

Add a vector(n) column to an existing table.

sovaria.api.vector.sqlAddColumn(
  args: { tableName: JsonValue; columnName?: JsonValue; dimensions: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/vector/columns

Parameters

args{ tableName: JsonValue; columnName?: JsonValue; dimensions: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "table": "products",
  "column": "embedding",
  "dimensions": 768
}

sovaria.api.vector.sqlCreateIndex

HNSW (m, ef_construction) or IVFFlat (lists) index, cosine / l2 / inner_product; built CONCURRENTLY in the background by default; halfvec above 2,000 dimensions.

sovaria.api.vector.sqlCreateIndex(
  args: { tableName: JsonValue; columnName?: JsonValue; metric?: JsonValue; method?: JsonValue; m?: JsonValue; efConstruction?: JsonValue; lists?: JsonValue; concurrently?: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/vector/indexes

Parameters

args{ tableName: JsonValue; columnName?: JsonValue; metric?: JsonValue; method?: JsonValue; m?: JsonValue; efConstruction?: JsonValue; lists?: JsonValue; concurrently?: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "index": "documents_embedding_cosine_idx",
  "method": "hnsw",
  "metric": "cosine"
}

sovaria.api.vector.sqlInsertRows

Insert rows whose vector column is a number array; embed: true embeds rows without a vector in the request (automatic-embeddings tables, small batches).

sovaria.api.vector.sqlInsertRows(
  args: { tableName: JsonValue; columnName?: JsonValue; rows: JsonValue; embed?: JsonValue },
): Promise<JsonValue>

POST /api/v1/data/rel/vector/rows

Parameters

args{ tableName: JsonValue; columnName?: JsonValue; rows: JsonValue; embed?: JsonValue }required

Returns

Promise<JsonValue>

{
  "status": "ok",
  "inserted": 1
}

#sovaria.api.webhooks

sovaria.api.webhooks.testWebhook

Test webhook.

sovaria.api.webhooks.testWebhook(
  args: { webhookId: string },
): Promise<JsonValue>

POST /api/v1/webhooks/test/{webhook_id}

Parameters

args{ webhookId: string }required

Returns

Promise<JsonValue>

{
  "status": "delivered",
  "http_status": 200
}

sovaria.api.webhooks.listWebhookDeliveries

List webhook deliveries.

sovaria.api.webhooks.listWebhookDeliveries(
  args: { webhookId: string; limit?: JsonValue },
): Promise<JsonValue>

GET /api/v1/webhooks/{webhook_id}/deliveries

Parameters

args{ webhookId: string; limit?: JsonValue }required

Returns

Promise<JsonValue>

[
  {
    "id": "d41e…",
    "webhook_id": "8b2e…",
    "event_type": "orders.INSERT",
    "status": "delivered",
    "attempts": 1,
    "last_http_status": 200,
    "last_error": null,
    "replay_of": null,
    "next_attempt_at": null,
    "created_at": "2026-10-18T10:59:11+00:00",
    "delivered_at": "2026-10-18T10:59:12+00:00"
  }
]

sovaria.api.webhooks.replayWebhookEvents

Replay webhook events.

sovaria.api.webhooks.replayWebhookEvents(
  args: { webhookId: string; since: JsonValue; until?: JsonValue },
): Promise<JsonValue>

POST /api/v1/webhooks/{webhook_id}/replay

Parameters

args{ webhookId: string; since: JsonValue; until?: JsonValue }required

Returns

Promise<JsonValue>

{
  "queued": 312,
  "since": "2026-10-17T00:00:00+00:00",
  "until": "2026-10-18T12:00:00+00:00"
}

sovaria.api.webhooks.listDeadLetters

List dead letters.

sovaria.api.webhooks.listDeadLetters(
  args?: { limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/webhooks/dead-letter

Parameters

args{ limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

[
  {
    "id": "d41e…",
    "webhook_id": "8b2e…",
    "event_type": "orders.INSERT",
    "status": "dead",
    "attempts": 7,
    "last_http_status": 503,
    "last_error": "http_503",
    "replay_of": null,
    "next_attempt_at": null,
    "created_at": "2026-10-18T10:59:11+00:00",
    "delivered_at": null
  }
]

sovaria.api.webhooks.redriveDeadLetter

Redrive dead letter.

sovaria.api.webhooks.redriveDeadLetter(
  args: { deliveryId: string },
): Promise<JsonValue>

POST /api/v1/webhooks/dead-letter/{delivery_id}/redrive

Parameters

args{ deliveryId: string }required

Returns

Promise<JsonValue>

{
  "status": "requeued",
  "id": "d41e…"
}

#sovaria.api.workflows

sovaria.api.workflows.start

Start a durable workflow run of a function that uses context.step; key makes the start idempotent; max_attempts sets the tries per step (plan fn.trigger_max_attempts).

sovaria.api.workflows.start(
  args: { functionName: JsonValue; input?: JsonValue; key?: JsonValue; maxAttempts?: JsonValue },
): Promise<JsonValue>

POST /api/v1/fn/workflows

Parameters

args{ functionName: JsonValue; input?: JsonValue; key?: JsonValue; maxAttempts?: JsonValue }required

Returns

Promise<JsonValue>

{
  "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": []
}

sovaria.api.workflows.list

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

sovaria.api.workflows.list(
  args?: { functionName?: JsonValue; status?: JsonValue; before?: JsonValue; limit?: JsonValue } = {},
): Promise<JsonValue>

GET /api/v1/fn/workflows

Parameters

args{ functionName?: JsonValue; status?: JsonValue; before?: JsonValue; limit?: JsonValue }optionaldefault {}

Returns

Promise<JsonValue>

{
  "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
  }
}

sovaria.api.workflows.get

One run: status, input, output or error, and every finished step with its result.

sovaria.api.workflows.get(args: { runId: string }): Promise<JsonValue>

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

Parameters

args{ runId: string }required

Returns

Promise<JsonValue>

{
  "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"
    }
  ]
}

sovaria.api.workflows.signal

Wake step.waitForSignal(name) with data (kept until the run waits for it).

sovaria.api.workflows.signal(
  args: { runId: string; name: JsonValue; data?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ runId: string; name: JsonValue; data?: JsonValue }required

Returns

Promise<JsonValue>

{
  "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"
    }
  ]
}

sovaria.api.workflows.cancel

Stop an unfinished run for good.

sovaria.api.workflows.cancel(
  args: { runId: string },
): Promise<JsonValue>

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

Parameters

args{ runId: string }required

Returns

Promise<JsonValue>

{
  "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"
    }
  ]
}

sovaria.api.workflows.retry

Resume a failed run from its failed step; latest moves it to the live function version.

sovaria.api.workflows.retry(
  args: { runId: string; latest?: JsonValue },
): Promise<JsonValue>

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

Parameters

args{ runId: string; latest?: JsonValue }required

Returns

Promise<JsonValue>

{
  "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"
    }
  ]
}