# nlqdb API

**Canonical:** https://apis.io/apis/nlqdb-com/nlqdb-com-api/  
**Provider:** nlqdb — https://apis.io/providers/nlqdb-com/  
**Documentation:** https://docs.nlqdb.com/reference/sdk

nlqdb API is one of 2 APIs that [nlqdb](https://apis.io/providers/nlqdb-com/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. This API exposes 6 JSON Schema definitions. The published artifact set on APIs.io includes an OpenAPI specification and 6 JSON Schemas.

nlqdb API as documented publicly: 27 operations. Contract generated from the documentation by API Evangelist (2026-11-19); not the provider's own document.

## Operations (27)

| Method | Path | Summary |
|---|---|---|
| POST | `/v1/ask` | POST /v1/ask — the canonical NL→SQL endpoint. |
| POST | `/v1/attach` | POST /v1/attach — attach the Postgres or D1 a team already has ( GLOBAL-043 ). |
| GET | `/v1/chat/messages` | listChat() – the caller’s persisted chat turns, oldest first. |
| POST | `/v1/chat/messages` | POST /v1/chat/messages — chat-style transcript endpoint. |
| GET | `/v1/databases` | GET /v1/databases — list databases. |
| POST | `/v1/databases` | POST /v1/databases — create a database from a plain-English brief. |
| DELETE | `/v1/databases/{id}` | DELETE /v1/databases/:id — destructive removal ( SK-HDC-016 ). |
| GET | `/v1/databases/{id}/changes` | GET /v1/databases/:id/changes — every schema change the DBA made on a database, newest first, each with its inverse. |
| POST | `/v1/db/connect` | POST /v1/db/connect — connect a bring-your-own Postgres / ClickHouse ( SK-DBCONN-001 ). |
| GET | `/v1/grants` | listGrants() – the caller’s grants ( SK-EKP-008 ), both roles in one list. |
| POST | `/v1/grants` | mint request. |
| DELETE | `/v1/grants/{id}` | DELETE /v1/grants/:id response. |
| POST | `/v1/insert` | POST /v1/insert — insert JSON rows exactly as sent, no model call; an unseen table or field is created. |
| GET | `/v1/keys` | GET /v1/keys — API-key lifecycle. |
| POST | `/v1/keys` | POST /v1/keys mint. |
| GET | `/v1/keys/{hash}/status` | DO revalidation probe. |
| DELETE | `/v1/keys/{id}` | DELETE /v1/keys/:id — API-key lifecycle. |
| GET | `/v1/keys/byollm` | GET /v1/keys/byollm |
| POST | `/v1/keys/byollm` | setByollm() |
| POST | `/v1/memory/remember` | remember() – write a typed memory row into an agent_memory_v1 preset DB. |
| GET | `/v1/models` | the model catalog served by GET /v1/models. |
| POST | `/v1/oauth/mcp-callback` | cross‑Worker bridge. |
| POST | `/v1/oauth/mcp-callback/redeem` | redeemOAuthBridgeCode() – redeem the one-shot OAuth-bridge code. |
| POST | `/v1/premium/interest` | registerPremiumInterest() – record a “count me in” for the hosted-premium plan. |
| POST | `/v1/proposals/{id}/apply` | POST /v1/proposals/:id/apply — run a proposal’s DDL on the attached DB ( GLOBAL-043 item 5); id is the one attach() / listChanges gave. |
| POST | `/v1/proposals/{id}/reject` | rejectProposal() – decline a proposal, with an optional reason. |
| POST | `/v1/run` | POST /v1/run — raw-SQL escape hatch ( GLOBAL-015 ). |

## Machine-readable artifacts (7)

- **OpenAPI** — https://artifacts.apis.io/nlqdb-com/openapi/_ae-authored/nlqdb-com-openapi-generated.yml
- **JSONSchema** — https://artifacts.apis.io/nlqdb-com/json-schema/nlqdb-com-post-v1-grants-request-schema.json
- **JSONSchema** — https://artifacts.apis.io/nlqdb-com/json-schema/nlqdb-com-post-v1-oauth-mcp-callback-request-schema.json
- **JSONSchema** — https://artifacts.apis.io/nlqdb-com/json-schema/nlqdb-com-post-v1-keys-response-schema.json
- **JSONSchema** — https://artifacts.apis.io/nlqdb-com/json-schema/nlqdb-com-post-v1-db-connect-request-schema.json
- **JSONSchema** — https://artifacts.apis.io/nlqdb-com/json-schema/nlqdb-com-post-v1-keys-request-schema.json
- **JSONSchema** — https://artifacts.apis.io/nlqdb-com/json-schema/nlqdb-com-post-v1-grants-response-schema.json

## Other nlqdb APIs (1)

- [nlqdb API](https://apis.io/apis/nlqdb-com/nlqdb-api/)

## Use this from code or an agent

- **REST, no key:** `GET https://apis.io/api/v1/providers/nlqdb-com` returns the provider's full profile as JSON.
- **MCP:** `https://apis.io/mcp` (Streamable HTTP) — search the catalog, read any provider, compare providers, check agent readiness.
- **Free API key** for catalog-wide search, ratings and comparisons: sign in with GitHub, Google or LinkedIn at https://apis.io/developer/account/ (plans: https://apis.io/developer/plans/).

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/nlqdb-com/nlqdb-com-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/nlqdb-com/.
