API Reference
API Reference
QANATIX REST API — all endpoints.
Base URL: https://api.qanatix.com/api/v1
All requests require Authorization: Bearer sk_live_... header.
| Method | Path | Description |
|---|
| POST | /search/\{collection\} | Full-text search within a collection |
| GET | /search/\{collection\}?q=... | Search via query parameters |
| Method | Path | Description |
|---|
| POST | /records | Create an record |
| GET | /records | List records (cursor-based pagination, FTS query) |
| GET | /records/\{id\} | Get record by ID |
| PATCH | /records/\{id\} | Update an record |
| DELETE | /records/\{id\} | Soft-delete (archive) an record |
| PATCH | /records/bulk | Bulk update records |
| POST | /records/bulk-delete | Bulk soft-delete records |
| POST | /records/retry-reset | Reset failed upload retries |
| PATCH | /records/\{id\}/visibility | Set record visibility |
| POST | /records/bulk-visibility | Bulk set visibility |
| Method | Path | Description |
|---|
| POST | /upload/\{collection\}/\{record_type\}/batch | Batch upload JSON records |
| POST | /upload/\{collection\}/\{record_type\}/upload | Upload CSV/JSON/NDJSON/XML file |
| POST | /upload/\{collection\}/\{record_type\}/pdf | Upload and extract PDF |
| POST | /upload/\{collection\}/\{record_type\}/stream | Stream NDJSON data |
| POST | /webhooks/upload/\{collection\}/\{record_type\} | Webhook push with HMAC verification |
| GET | /uploads/\{upload_id\} | Get upload status |
| GET | /uploads/\{upload_id\}/errors | Get dead letter queue entries |
| Method | Path | Description |
|---|
| GET | /collections | List collections with record counts |
| Method | Path | Description |
|---|
| POST | /connectors | Create a database connector |
| GET | /connectors | List connectors |
| DELETE | /connectors/\{id\} | Delete a connector |
| POST | /connectors/\{id\}/pull | Trigger a data pull |
| Method | Path | Description |
|---|
| POST | /auth/keys | Generate an API key |
| GET | /auth/keys | List API keys |
| DELETE | /auth/keys/\{key_id\} | Revoke a key |
| POST | /auth/keys/\{key_id\}/rotate | Rotate a key |
| Method | Path | Description |
|---|
| POST | /export?collection=X&format=csv | Start async CSV export |
| POST | /export?collection=X&format=json | Start async JSON export |
| GET | /export/\{id\}/status | Check export progress |
| GET | /export/\{id\}/download | Download completed export |
| GET | /export/active | List active exports |
| Method | Path | Description |
|---|
| GET | /usage?month=YYYY-MM | Get usage stats for current period |
Requires admin scope on API key.
| Method | Path | Description |
|---|
| GET | /admin/tenants | List tenants with stats |
| GET | /admin/stats | System-wide statistics |
| POST | /admin/reindex/\{collection\} | Reindex all records in a collection |
| POST | /admin/reindex/record/\{id\} | Reindex single record |
JWT-authenticated. See Portal Records & Collections.
| Method | Path | Description |
|---|
| GET | /portal/collections | List collections with record counts and indexing stats |
| GET | /portal/records | List records (paginated, filterable by collection) |
| GET | /portal/records/\{id\} | Get record by ID |
| PATCH | /portal/records/\{id\} | Update an record (incl. collection_data, auto re-indexes) |
| DELETE | /portal/records/\{id\} | Soft-delete (archive) an record |
| POST | /portal/records/\{id\}/reindex | Reindex a single record |
| DELETE | /portal/collections/\{name\} | Delete a collection and all its records |
| POST | /portal/collections/\{name\}/reindex | Reindex all records in a collection |
| POST | /portal/search/\{collection\} | Search from dashboard (same as /search but JWT auth) |
| POST | /portal/upload/\{collection\}/\{record_type\}/upload | Upload file from dashboard |
JWT-authenticated. See Portal API and Billing.
| Method | Path | Description |
|---|
| GET | /portal/account | Get account info |
| PATCH | /portal/account | Update profile |
| GET | /portal/usage | Usage summary |
| GET | /portal/quickstart | Quickstart checklist |
| POST | /portal/keys | Create an API key |
| GET | /portal/keys | List API keys |
| DELETE | /portal/keys/\{key_id\} | Revoke a key |
| POST | /portal/keys/\{key_id\}/rotate | Rotate a key |
| GET | /portal/billing/status | Get billing status |
| POST | /portal/billing/checkout | Create Stripe checkout session |
| POST | /portal/billing/portal | Create Stripe customer portal session |
JWT-authenticated. See Blue-Green Replace.
| Method | Path | Description |
|---|
| POST | /portal/collections/\{name\}/replace | Upload new dataset into staging generation |
| GET | /portal/collections/\{name\}/replace-status | Check staging progress and readiness |
| POST | /portal/collections/\{name\}/swap | Atomically swap staging into production |
| POST | /portal/collections/\{name\}/cancel-replace | Cancel and discard staging generation |
| Method | Path | Description |
|---|
| GET | /health | Liveness check |
| GET | /health/ready | Readiness (DB + Redis) |
| GET | /health/search | Search quality metrics |
| GET | /metrics | Prometheus-compatible metrics |
| Path | Description |
|---|
/mcp/ | MCP Streamable HTTP endpoint |
- Content-Type:
application/json for POST/PATCH
- Content-Type:
multipart/form-data for file uploads
- Content-Type:
application/x-ndjson for streaming
All responses are JSON with consistent structure. Errors include a detail field.
See Errors and Rate Limits.