Skip to content
VaultDBDocs

API reference

Every endpoint the VaultDB API serves. This page is built from the same OpenAPI document that GET /api/openapi returns, generated from the API's route table.

Base URL
https://api.vaultdb.io
Document version
1.0.0
Authentication
An API key, or a session JWT from the admin app.

Multi-tenant SQLite databases over HTTP.

Authenticate with Authorization: Bearer <token>, where the token is either an API key (created in System > Security > API keys) or a session JWT. Every endpoint is scoped to the account the credential belongs to; a request can never reach another account's data.

Generated from the live route table, so it describes what this deployment actually serves.

Endpoint groups

databases

GET/api/databases

List the databases on this account, with table and row counts

Operation ID: getDatabases

Responses
StatusDescription
200List the databases on this account, with table and row counts
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases

Provision a database for the account

Operation ID: postDatabases

Responses
StatusDescription
201Provision a database for the account
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/databases/{dbid}

One database with its table list

Operation ID: getDatabasesByDbid

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
200One database with its table list
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

DELETE/api/databases/{dbid}

Drop a database, its file, and its policies, webhooks and schedules

Operation ID: deleteDatabasesByDbid

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
200Drop a database, its file, and its policies, webhooks and schedules
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/databases/{dbid}/tables

Table names in a database

Operation ID: getDatabasesByDbidTables

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
200Table names in a database
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases/{dbid}/tables

Create a table

Operation ID: postDatabasesByDbidTables

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
201Create a table
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/databases/{dbid}/tables/{table}/data

Read rows, filtered by query params and row-level policies

Operation ID: getDatabasesByDbidTablesByTableData

Path parameters
NameDescription
dbidDatabase identifier
tableTable name
Responses
StatusDescription
200Read rows, filtered by query params and row-level policies
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases/{dbid}/tables/{table}/data

Insert one row or many, within the plan row/storage/batch limits

Operation ID: postDatabasesByDbidTablesByTableData

Path parameters
NameDescription
dbidDatabase identifier
tableTable name
Responses
StatusDescription
201Insert one row or many, within the plan row/storage/batch limits
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

PUT/api/databases/{dbid}/tables/{table}/data

Update rows matching a non-empty where filter

Operation ID: putDatabasesByDbidTablesByTableData

Path parameters
NameDescription
dbidDatabase identifier
tableTable name
Responses
StatusDescription
200Update rows matching a non-empty where filter
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

DELETE/api/databases/{dbid}/tables/{table}/data

Delete rows matching a non-empty where filter

Operation ID: deleteDatabasesByDbidTablesByTableData

Path parameters
NameDescription
dbidDatabase identifier
tableTable name
Responses
StatusDescription
200Delete rows matching a non-empty where filter
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/databases/{dbid}/tables/{table}/schema

Column definitions for a table

Operation ID: getDatabasesByDbidTablesByTableSchema

Path parameters
NameDescription
dbidDatabase identifier
tableTable name
Responses
StatusDescription
200Column definitions for a table
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

DELETE/api/databases/{dbid}/tables/{table}

Drop a table and its row-level policies

Operation ID: deleteDatabasesByDbidTablesByTable

Path parameters
NameDescription
dbidDatabase identifier
tableTable name
Responses
StatusDescription
200Drop a table and its row-level policies
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/databases/{dbid}/policies

Row-level policies on a database, optionally filtered to one table

Operation ID: getDatabasesByDbidPolicies

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
200Row-level policies on a database, optionally filtered to one table
400Invalid request
401No valid credential
403Requires the Databases.policies permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases/{dbid}/policies

Create a row-level policy (one column comparison, never free SQL)

Operation ID: postDatabasesByDbidPolicies

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
201Create a row-level policy (one column comparison, never free SQL)
400Invalid request
401No valid credential
403Requires the Databases.policies permission, or a plan that includes this endpoint
404Not found, or owned by another account

DELETE/api/databases/{dbid}/policies/{policyId}

Drop a row-level policy

Operation ID: deleteDatabasesByDbidPoliciesByPolicyId

Path parameters
NameDescription
dbidDatabase identifier
policyIdRow-level policy identifier
Responses
StatusDescription
200Drop a row-level policy
400Invalid request
401No valid credential
403Requires the Databases.policies permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/databases/{dbid}/schedules

Scheduled queries on a database

Operation ID: getDatabasesByDbidSchedules

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
200Scheduled queries on a database
400Invalid request
401No valid credential
403Requires the Databases.schedules permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases/{dbid}/schedules

Create a scheduled query (5-field cron, UTC). Also needs Databases.sql.

Operation ID: postDatabasesByDbidSchedules

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
201Create a scheduled query (5-field cron, UTC). Also needs Databases.sql.
400Invalid request
401No valid credential
403Requires the Databases.schedules permission, or a plan that includes this endpoint
404Not found, or owned by another account

DELETE/api/databases/{dbid}/schedules/{scheduleId}

Drop a scheduled query

Operation ID: deleteDatabasesByDbidSchedulesByScheduleId

Path parameters
NameDescription
dbidDatabase identifier
scheduleIdScheduled query identifier
Responses
StatusDescription
200Drop a scheduled query
400Invalid request
401No valid credential
403Requires the Databases.schedules permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/databases/{dbid}/webhooks

Hooks registered on a database (never their signing secrets)

Operation ID: getDatabasesByDbidWebhooks

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
200Hooks registered on a database (never their signing secrets)
400Invalid request
401No valid credential
403Requires the Databases.webhooks permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases/{dbid}/webhooks

Register a hook; returns its signing secret once

Operation ID: postDatabasesByDbidWebhooks

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
201Register a hook; returns its signing secret once
400Invalid request
401No valid credential
403Requires the Databases.webhooks permission, or a plan that includes this endpoint
404Not found, or owned by another account

DELETE/api/databases/{dbid}/webhooks/{webhookId}

Remove a hook

Operation ID: deleteDatabasesByDbidWebhooksByWebhookId

Path parameters
NameDescription
dbidDatabase identifier
webhookIdWebhook identifier
Responses
StatusDescription
200Remove a hook
400Invalid request
401No valid credential
403Requires the Databases.webhooks permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/databases/{dbid}/subscribe

Server-Sent Events stream of row changes, optionally filtered by table

Operation ID: getDatabasesByDbidSubscribe

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
200Server-Sent Events stream of row changes, optionally filtered by table
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases/{dbid}/query

Run SQL against a database; read-only plans are held to non-mutating statements

Operation ID: postDatabasesByDbidQuery

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
201Run SQL against a database; read-only plans are held to non-mutating statements
400Invalid request
401No valid credential
403Requires the Databases.sql permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/databases/{dbid}/branches

Branches taken from a database

Operation ID: getDatabasesByDbidBranches

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
200Branches taken from a database
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases/{dbid}/branches

Copy a database to a new one

Operation ID: postDatabasesByDbidBranches

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
201Copy a database to a new one
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/databases/{dbid}/tables/{table}/export

Stream a table as CSV or JSON

Operation ID: getDatabasesByDbidTablesByTableExport

Path parameters
NameDescription
dbidDatabase identifier
tableTable name
Responses
StatusDescription
200Stream a table as CSV or JSON
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases/{dbid}/tables/{table}/import

Load rows from CSV, creating the table if it does not exist

Operation ID: postDatabasesByDbidTablesByTableImport

Path parameters
NameDescription
dbidDatabase identifier
tableTable name
Responses
StatusDescription
201Load rows from CSV, creating the table if it does not exist
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases/{dbid}/tables/{table}/search

Vector similarity search over a JSON-array column

Operation ID: postDatabasesByDbidTablesByTableSearch

Path parameters
NameDescription
dbidDatabase identifier
tableTable name
Responses
StatusDescription
201Vector similarity search over a JSON-array column
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/databases/{dbid}/snapshots

Restore points taken from a database

Operation ID: getDatabasesByDbidSnapshots

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
200Restore points taken from a database
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases/{dbid}/snapshots

Take a point-in-time snapshot of a database

Operation ID: postDatabasesByDbidSnapshots

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
201Take a point-in-time snapshot of a database
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

DELETE/api/databases/{dbid}/snapshots/{snapshotId}

Delete a snapshot

Operation ID: deleteDatabasesByDbidSnapshotsBySnapshotId

Path parameters
NameDescription
dbidDatabase identifier
snapshotIdsnapshotId
Responses
StatusDescription
200Delete a snapshot
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases/{dbid}/snapshots/{snapshotId}/restore

Replace a database with one of its snapshots

Operation ID: postDatabasesByDbidSnapshotsBySnapshotIdRestore

Path parameters
NameDescription
dbidDatabase identifier
snapshotIdsnapshotId
Responses
StatusDescription
201Replace a database with one of its snapshots
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/databases/{dbid}/graphql

Generated GraphQL schema for a database

Operation ID: getDatabasesByDbidGraphql

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
200Generated GraphQL schema for a database
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/databases/{dbid}/graphql

Run a GraphQL query or mutation against a database

Operation ID: postDatabasesByDbidGraphql

Path parameters
NameDescription
dbidDatabase identifier
Responses
StatusDescription
201Run a GraphQL query or mutation against a database
400Invalid request
401No valid credential
403Requires the Databases.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

openapi

GET/api/openapi

OpenAPI 3.0 document, generated from this route table

Operation ID: getOpenapi

Responses
StatusDescription
200OpenAPI 3.0 document, generated from this route table
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

sdk

GET/api/sdk/typescript

Download a generated TypeScript client

Operation ID: getSdkTypescript

Responses
StatusDescription
200Download a generated TypeScript client
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/sdk/python

Download a generated Python client

Operation ID: getSdkPython

Responses
StatusDescription
200Download a generated Python client
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account

billing

GET/api/billing/status

Plan, its limits, and current usage

Operation ID: getBillingStatus

Responses
StatusDescription
200Plan, its limits, and current usage
400Invalid request
401No valid credential
403Requires the Billing permission, or a plan that includes this endpoint
404Not found, or owned by another account

PUT/api/billing/plan

Set any account plan directly, without Stripe (instance owner only)

Operation ID: putBillingPlan

Responses
StatusDescription
200Set any account plan directly, without Stripe (instance owner only)
400Invalid request
401No valid credential
403Requires the Billing.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/billing/checkout

Start a Stripe Checkout session for an upgrade

Operation ID: postBillingCheckout

Responses
StatusDescription
201Start a Stripe Checkout session for an upgrade
400Invalid request
401No valid credential
403Requires the Billing.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/billing/portal

Open the Stripe billing portal

Operation ID: postBillingPortal

Responses
StatusDescription
201Open the Stripe billing portal
400Invalid request
401No valid credential
403Requires the Billing.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

DELETE/api/billing/account

Delete your own organization and everything it owns (an organization admin, signed in, with password)

Operation ID: deleteBillingAccount

Responses
StatusDescription
200Delete your own organization and everything it owns (an organization admin, signed in, with password)
400Invalid request
401No valid credential
403Requires the Billing.edit permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/billing/webhook

Stripe subscription events, authenticated by signature

Operation ID: postBillingWebhook

Responses
StatusDescription
201Stripe subscription events, authenticated by signature
400Invalid request
401No valid credential
403Requires the Billing permission, or a plan that includes this endpoint
404Not found, or owned by another account

governance

GET/api/governance/policies

Governance policies on this instance, with their newest and published version numbers

Operation ID: getGovernancePolicies

Responses
StatusDescription
200Governance policies on this instance, with their newest and published version numbers
400Invalid request
401No valid credential
403Requires the System.security.governance permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/governance/policies

Create a named governance policy and its version 1 (instance owner only)

Operation ID: postGovernancePolicies

Responses
StatusDescription
201Create a named governance policy and its version 1 (instance owner only)
400Invalid request
401No valid credential
403Requires the System.security.governance permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/governance/policies/{id}

One governance policy with every saved version

Operation ID: getGovernancePoliciesById

Path parameters
NameDescription
idid
Responses
StatusDescription
200One governance policy with every saved version
400Invalid request
401No valid credential
403Requires the System.security.governance permission, or a plan that includes this endpoint
404Not found, or owned by another account

PUT/api/governance/policies/{id}

Rename a governance policy, change its slug, or publish or unpublish a version (instance owner only)

Operation ID: putGovernancePoliciesById

Path parameters
NameDescription
idid
Responses
StatusDescription
200Rename a governance policy, change its slug, or publish or unpublish a version (instance owner only)
400Invalid request
401No valid credential
403Requires the System.security.governance permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/governance/policies/{id}/versions

Save the next version of a governance policy (instance owner only)

Operation ID: postGovernancePoliciesByIdVersions

Path parameters
NameDescription
idid
Responses
StatusDescription
201Save the next version of a governance policy (instance owner only)
400Invalid request
401No valid credential
403Requires the System.security.governance permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/governance/templates

Starter templates for new governance policies, with their blanks

Operation ID: getGovernanceTemplates

Responses
StatusDescription
200Starter templates for new governance policies, with their blanks
400Invalid request
401No valid credential
403Requires the System.security.governance permission, or a plan that includes this endpoint
404Not found, or owned by another account

public

GET/api/public/policies

Published governance policies on this instance

Operation ID: getPublicPolicies

Responses
StatusDescription
200Published governance policies on this instance
400Invalid request
401No valid credential
403Requires the System.security.governance permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/public/policies/{type}/{slug}

The published text of one governance policy, as JSON or ?format=markdown

Operation ID: getPublicPoliciesByTypeBySlug

Path parameters
NameDescription
typetype
slugslug
Responses
StatusDescription
200The published text of one governance policy, as JSON or ?format=markdown
400Invalid request
401No valid credential
403Requires the System.security.governance permission, or a plan that includes this endpoint
404Not found, or owned by another account

signup

GET/api/signup

Whether self sign-up is open, and the Turnstile site key its form uses

Operation ID: getSignup

Responses
StatusDescription
200Whether self sign-up is open, and the Turnstile site key its form uses
400Invalid request
401No valid credential
403Requires the System.accounts permission, or a plan that includes this endpoint
404Not found, or owned by another account

POST/api/signup

Create an organization on the Free plan and its admin (Turnstile-checked, limited per IP and per day)

Operation ID: postSignup

Responses
StatusDescription
201Create an organization on the Free plan and its admin (Turnstile-checked, limited per IP and per day)
400Invalid request
401No valid credential
403Requires the System.accounts permission, or a plan that includes this endpoint
404Not found, or owned by another account

GET/api/signup/settings

Self sign-up switch, limits and Turnstile keys (instance owner only)

Operation ID: getSignupSettings

Responses
StatusDescription
200Self sign-up switch, limits and Turnstile keys (instance owner only)
400Invalid request
401No valid credential
403Requires the System.accounts permission, or a plan that includes this endpoint
404Not found, or owned by another account

PUT/api/signup/settings

Change the self sign-up switch, limits or Turnstile keys (instance owner only)

Operation ID: putSignupSettings

Responses
StatusDescription
200Change the self sign-up switch, limits or Turnstile keys (instance owner only)
400Invalid request
401No valid credential
403Requires the System.accounts permission, or a plan that includes this endpoint
404Not found, or owned by another account

admin

GET/api/admin/platform

Instance storage, database and subscription totals (instance owner only)

Operation ID: getAdminPlatform

Responses
StatusDescription
200Instance storage, database and subscription totals (instance owner only)
400Invalid request
401No valid credential
403Requires the Databases permission, or a plan that includes this endpoint
404Not found, or owned by another account