Skip to main content

Endpoint groups

Core concepts

End-to-end lifecycle

SDKs

HydraDB publishes official SDKs for Python and TypeScript/Node. They wrap every endpoint in this reference with typed methods and IDE autocomplete. Quick init:
SDK methods mirror the API: client.<group>.<method>() maps to the corresponding endpoint. The SDKs are generated from the OpenAPI contract and set API-Version: 2 automatically.

Full endpoint inventory

Conventions

Authentication: Every endpoint requires Authorization: Bearer <your_api_key> in the request header. Get your key at app.hydradb.com. Versioning: Send API-Version: 2 with every request.
Response envelope: Core v2 endpoints (/databases, /context/*, and /query) return a consistent envelope. Endpoint pages show the full envelope; the resource-specific payload lives under data. Webhook management endpoints (/webhooks/indexing*) are the exception: they return their documented response object directly.
Errors use the same envelope with success: false, data: null, and an error object containing code and message. meta may also include a deprecation list when a request uses a legacy /tenants route or a deprecated field (tenant_id/sub_tenant_id, or sub_tenant_ids on /query); each entry carries deprecated, a message, and deprecated_since (field-level notices also add deprecated_field and preferred_field). It is a non-breaking migration nudge (the status code is unchanged) and is accompanied by a Deprecation: true response header. See Migrating from tenant_id and sub_tenant_id.
  • Quick reference vs API details. Each endpoint page starts with a short cheat sheet (what to send, what to save, common gotchas). Later on the page you will see a complete field reference with types, defaults, and examples that is kept in sync with the API. Use the cheat sheet to get moving quickly, and the API details when you need exact request/response shapes (especially for agents and strict validators).
  • Database scoping. Most database-scoped endpoints require a database (formerly tenant_id). Many source and query endpoints also accept an optional collection (formerly sub_tenant_id) for finer-grained scoping. If omitted, the default collection is used. The old tenant_id/sub_tenant_id names (and the old /tenants routes) remain accepted as deprecated aliases; sending a canonical name and its alias with different values returns 400. See Migrating from tenant_id and sub_tenant_id.
  • Async operations. Database creation, deletion, and content ingestion are asynchronous. They return immediately after queuing. Use the relevant status endpoint to confirm completion before downstream operations.
  • Pagination. Listing endpoints (/context/list) return pagination fields for browsing large result sets.
  • Parameter casing. The REST API uses snake_case (database). The TypeScript SDK accepts the same snake_case keys; method names are camelCase when generated for TypeScript. The Python SDK uses snake_case throughout.
  • Query modes. POST /query supports query_by: "hybrid" or "text" and type: "knowledge", "memory", or "all". The same type enum is used across ingestion, listing, deletion, and query; query additionally accepts "all".
Status codes: Successful responses return 200 (or 202 for async accepts). Errors follow standard HTTP semantics: See Error Responses for response shapes, error codes, and retry patterns.

Rate limits

Rate limits apply per API key. For production deployments, build retry logic with exponential backoff against the 429 response. Contact [email protected] for current limit values.

Next steps

Existing v1 endpoints remain available under the v1 API Reference.
  • Build something: Quickstart walks through your first integration in five minutes
  • Understand the model: Core Concepts explains databases, memories, Query, and metadata
  • Go deeper: Usage covers each primitive in depth
  • Install an SDK: Python ยท TypeScript