Complete guide to integrating with the Vaachas API
Works with Postgres (incl. Supabase), MongoDB (incl. Atlas), Elasticsearch (incl. Bonsai), and Cassandra (incl. DataStax Astra DB).
Vaachas is the operational layer between your app and every datastore you rely on. Ship multi-database workflows without custom routing code, queue plumbing, or ad-hoc credential management. This guide shows how to wire the gateway into your stack in minutes—provision connections, register them once, and call a single HTTP API for writes and reads.
Follow the quickstart to set up databases, register credentials, and issue your first request. Later sections cover payload formats, long-running write tracking, authentication, and operational guardrails so you can plug Vaachas into production services with confidence.
https://api.vaachas.comCentral API instead of bespoke queue and worker code.
Sync the primary and secondaries with ordered writes.
API keys, retries, and status polling built in.
Include your API key using the X-API-KEY header for all requests.
curl -X POST "https://api.vaachas.com/api/data/v1/direct" -H "Content-Type: application/json" -H "X-API-KEY: YOUR_API_KEY" -d '{
"dbId": "YOUR_DB_ID",
"query": "SELECT * FROM products"
}'Bring an existing cluster or pick any managed option. Vaachas supports most PostgreSQL, MongoDB, Cassandra, and Elasticsearch providers out of the box.
Managed Postgres with full compatibility for host/port or connection string modes.
Deploy a managed MongoDB cluster or connect your self-hosted deployment.
Fully managed Cassandra with Secure Connect bundle support for Vaachas integrations.
Provision managed Elasticsearch and capture the endpoint URL for your index.
Already have these databases provisioned? Continue to Step 2.
Run these DDL commands in your provider consoles or your own DB clients. Do not run them via Vaachas.
Locate host/port/database/username/password or the connection string in your provider console. Some providers like Mongo atlas require whitelisting IPs for access. So, if required whitelist this IP on provider for flawless functioning - 51.222.62.168/29
SupabaseAtlasBonsaiAstra DBDatabases (/dashboard/credentials).Add Database.Name and select Type (POSTGRES, SUPABASE, MONGO, ELASTIC, CASSANDRA).Connection.HOST_PORT: host, port, username, password, and database/index (Elasticsearch uses Index).CONNECTION_STRING: connection string (Mongo requires database name too).API_KEY: for Astra DB, token + Secure Connect bundle (base64); otherwise API key.

Databases list and Add New Database form.
API Keys (/dashboard/api-keys).Generate API Key, give it a name, set expiration, and create.
API Keys: Generate API Key modal.
Developer Tools (/dashboard/developer-tools) → API Testing.Request Type: Query (read) or Manipulation (write).API Key (X-API-KEY). You can copy/paste queries text in the following diagrams from Requests & Responses. sequence. Click Execute. If a tracking id is returned, use Check Status.Database by dbId and paste a read query. Click Execute. View Response.
Developer Tools: API Testing Console overview writes.

Developer Tools: API Testing Console overview reads.
Use any provider. Common starting points:
/api/data/v1/directTwo request shapes are supported:
{
"queryToDbsMap": {
"INSERT INTO products (id,name,price) VALUES ('111...','Acme Anvil',49.99)": [
{ "dbId": "supabase", "sequence": 0 },
{ "dbId": "elastic", "sequence": 1 }
]
}
}sequence 0 runs synchronously; higher sequences continue in the same workflow. Default sequence is 1. Same sequence values run in parallel.
{
"dbId": "supabase",
"query": "SELECT * FROM products ORDER BY created_at DESC"
}DataManipulationResponse (sync)
{
"queries": [
{
"query": "INSERT INTO products (...) VALUES (...)",
"dbs": [ { "dbId": "supabase", "succeeded": true } ]
}
]
}DataManipulationResponse (async)
{ "requestTrackingId": "req-123" }DataManipulationResponse (mixed)
{
"queries": [ { "query": "...", "dbs": [ { "dbId": "supabase", "succeeded": true } ] } ],
"requestTrackingId": "req-123"
}DataQueryResponse
{ "results": [{"id":"..."}], "succeeded": true }{ "results": null, "succeeded": false, "error": "details" }Per‑DB status object: { "dbId": string, "succeeded": boolean, "error": string | null }.
curl -X POST "https://api.vaachas.com/api/data/v1/direct" -H "Content-Type: application/json" -H "X-API-KEY: YOUR_API_KEY" -d '{
"queryToDbsMap": {
"INSERT INTO products (id,name,price) VALUES (''11111111-1111-1111-1111-111111111111'',''Acme Anvil'',49.99)": [
{ "dbId": "supabase", "sequence": 0 },
{ "dbId": "elastic", "sequence": 1 }
]
}
}'curl -X POST "https://api.vaachas.com/api/data/v1/direct" -H "Content-Type: application/json" -H "X-API-KEY: YOUR_API_KEY" -d '{
"dbId": "supabase",
"query": "SELECT * FROM products ORDER BY created_at DESC"
}'/api/data/v1/direct/status/{requestTrackingId}Poll the execution status of asynchronous or mixed workflows.
{
"requestStatus": "RUNNING | COMPLETED | FAILED | TERMINATED | CANCELED | UNKNOWN",
"queries": [ { "query": "...", "dbs": [ { "dbId": "supabase", "succeeded": true, "error": null } ] } ]
}The Direct API executes your queries against the target engines in their native dialects:
API calls are rate‑limited per plan.
/api/v1/ratelimit/meView your current plan and effective rate limit policy.
curl -X GET "https://api.vaachas.com/api/v1/ratelimit/me" -H "X-API-KEY: YOUR_API_KEY"
DirectDbDataManipulationRequest or DirectDbDataQueryRequest.X-API-KEY header; ensure key is active in /dashboard/api-keys.requestTrackingId is wrong or expired.error with succeeded: false./dashboard/credentials; verify host/port or connection string, user/password/API key, database/index name, and network access.sequence = 0 runs synchronously; its results appear in the immediate response.sequence values run in parallel.sequence values continue in the same workflow and may complete asynchronously; a requestTrackingId is returned. Use the Status API to poll.{ dbId, succeeded, error }.requestTrackingId, poll until the workflow reaches a terminal state.